summaryrefslogtreecommitdiffstats
path: root/ssl/t1_lib.c
diff options
context:
space:
mode:
authorViktor Dukhovni <openssl-users@dukhovni.org>2018-11-10 01:53:56 -0500
committerViktor Dukhovni <openssl-users@dukhovni.org>2018-11-12 16:55:38 -0500
commita51c9f637cdef7926d8a8991365e4b58975346db (patch)
tree12af19e095f480092b42d3884a6c07e8ba79f985 /ssl/t1_lib.c
parent6e68dae85a8f91944370125561c7ec0d5da46c20 (diff)
Added missing signature algorithm reflection functions
SSL_get_signature_nid() -- local signature algorithm SSL_get_signature_type_nid() -- local signature algorithm key type SSL_get_peer_tmp_key() -- Peer key-exchange public key SSL_get_tmp_key -- local key exchange public key Aliased pre-existing SSL_get_server_tmp_key(), which was formerly just for clients, to SSL_get_peer_tmp_key(). Changed internal calls to use the new name. Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'ssl/t1_lib.c')
-rw-r--r--ssl/t1_lib.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c
index ddafa0c623..fe13a39c38 100644
--- a/ssl/t1_lib.c
+++ b/ssl/t1_lib.c
@@ -1122,6 +1122,14 @@ int SSL_get_peer_signature_type_nid(const SSL *s, int *pnid)
return 1;
}
+int SSL_get_signature_type_nid(const SSL *s, int *pnid)
+{
+ if (s->s3->tmp.sigalg == NULL)
+ return 0;
+ *pnid = s->s3->tmp.sigalg->sig;
+ return 1;
+}
+
/*
* Set a mask of disabled algorithms: an algorithm is disabled if it isn't
* supported, doesn't appear in supported signature algorithms, isn't supported