summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_locl.h
diff options
context:
space:
mode:
authortb <>2022-08-17 18:45:25 +0000
committertb <>2022-08-17 18:45:25 +0000
commit1c5609b103eb8a5e47488306e9b34ff2021b41fa (patch)
tree0e85045f1e93abe5cf5abbe83556b1c64341b959 /src/lib/libssl/ssl_locl.h
parent1629543e9a637d8ec02b2ab4fb5c737c5e968941 (diff)
downloadopenbsd-1c5609b103eb8a5e47488306e9b34ff2021b41fa.tar.gz
openbsd-1c5609b103eb8a5e47488306e9b34ff2021b41fa.tar.bz2
openbsd-1c5609b103eb8a5e47488306e9b34ff2021b41fa.zip
Refactor tls1_get_supported_group()
This splits tls1_get_supported_group() into a few helper functions to be able to count shared groups and to return the n-th shared group since someone thought it is a great idea to expose that in a single API and some others thought it is useful to add this info to log noise. This is all made a bit more complicated thanks to the security level having its tentacles everywhere and because a user-provided security callback can influence the list of groups shared by the peers. ok jsing
Diffstat (limited to 'src/lib/libssl/ssl_locl.h')
-rw-r--r--src/lib/libssl/ssl_locl.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/libssl/ssl_locl.h b/src/lib/libssl/ssl_locl.h
index 6e4eb403cd..35fa4c693c 100644
--- a/src/lib/libssl/ssl_locl.h
+++ b/src/lib/libssl/ssl_locl.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_locl.h,v 1.420 2022/08/17 18:42:13 tb Exp $ */ 1/* $OpenBSD: ssl_locl.h,v 1.421 2022/08/17 18:45:25 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -1527,7 +1527,9 @@ int tls1_ec_group_id2nid(uint16_t group_id, int *out_nid);
1527int tls1_ec_group_id2bits(uint16_t group_id, int *out_bits); 1527int tls1_ec_group_id2bits(uint16_t group_id, int *out_bits);
1528int tls1_ec_nid2group_id(int nid, uint16_t *out_group_id); 1528int tls1_ec_nid2group_id(int nid, uint16_t *out_group_id);
1529int tls1_check_group(SSL *s, uint16_t group_id); 1529int tls1_check_group(SSL *s, uint16_t group_id);
1530int tls1_get_supported_group(SSL *s, int *group_nid); 1530int tls1_count_shared_groups(const SSL *ssl, size_t *out_count);
1531int tls1_get_shared_group_by_index(const SSL *ssl, size_t n, int *out_nid);
1532int tls1_get_supported_group(const SSL *s, int *out_nid);
1531 1533
1532int ssl_check_clienthello_tlsext_early(SSL *s); 1534int ssl_check_clienthello_tlsext_early(SSL *s);
1533int ssl_check_clienthello_tlsext_late(SSL *s); 1535int ssl_check_clienthello_tlsext_late(SSL *s);