summaryrefslogtreecommitdiffstats
path: root/ssl/ssl_ciph.c
diff options
context:
space:
mode:
authorPaul Yang <yang.yang@baishancloud.com>2017-08-23 00:37:10 +0800
committerBenjamin Kaduk <kaduk@mit.edu>2017-08-30 14:01:13 -0500
commit50966bfa119d129c4b2bc405b6ade1c6a21b84f2 (patch)
treed36649684cf1ff69c6fb264ef7daf50c46aaf620 /ssl/ssl_ciph.c
parent22d1a340b644d5d833157de1c0c2d1f0d7690529 (diff)
Introduce SSL_CIPHER_get_protocol_id
The returned ID matches with what IANA specifies (or goes on the wire anyway, IANA notwithstanding). Doc is added. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/4107)
Diffstat (limited to 'ssl/ssl_ciph.c')
-rw-r--r--ssl/ssl_ciph.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ssl/ssl_ciph.c b/ssl/ssl_ciph.c
index deacef7b70..cba9e14c26 100644
--- a/ssl/ssl_ciph.c
+++ b/ssl/ssl_ciph.c
@@ -1764,6 +1764,11 @@ uint32_t SSL_CIPHER_get_id(const SSL_CIPHER *c)
return c->id;
}
+uint16_t SSL_CIPHER_get_protocol_id(const SSL_CIPHER *c)
+{
+ return c->id & 0xFFFF;
+}
+
SSL_COMP *ssl3_comp_find(STACK_OF(SSL_COMP) *sk, int n)
{
SSL_COMP *ctmp;