summaryrefslogtreecommitdiffstats
path: root/ssl/s3_lib.c
diff options
context:
space:
mode:
authorPhus Lu <phus.lu@gmail.com>2021-10-25 18:47:00 +0800
committerTomas Mraz <tomas@openssl.org>2022-02-03 13:45:41 +0100
commit13a53fbf13bc6fa09c95ad4bdc6ec70fa15aa16d (patch)
tree34c712b39eae57857d9b3b60abd7d8f59c9cdca5 /ssl/s3_lib.c
parent27aca04e13ca8a9bead49de7bc380110ecb7064e (diff)
add SSL_get0_iana_groups() & SSL_client_hello_get_extension_order()
The function/macro allow user get groups/extensions without memory allcations. So we could calculate the ssl fignerprint(ja3) in low cost. Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16910)
Diffstat (limited to 'ssl/s3_lib.c')
-rw-r--r--ssl/s3_lib.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c
index 120b5cedeb..3b3cc8a32a 100644
--- a/ssl/s3_lib.c
+++ b/ssl/s3_lib.c
@@ -3729,6 +3729,14 @@ long ssl3_ctrl(SSL *s, int cmd, long larg, void *parg)
return (int)s->ext.peer_ecpointformats_len;
}
+ case SSL_CTRL_GET_IANA_GROUPS:
+ {
+ if (parg != NULL) {
+ *(uint16_t **)parg = (uint16_t *)s->ext.peer_supportedgroups;
+ }
+ return (int)s->ext.peer_supportedgroups_len;
+ }
+
default:
break;
}