diff options
author | jsing <> | 2022-01-07 15:46:30 +0000 |
---|---|---|
committer | jsing <> | 2022-01-07 15:46:30 +0000 |
commit | 3f7702534a377e0a3b33a6681df0af8a57adbc57 (patch) | |
tree | 270b59705c9d4efa145c0649cce3fa41750939d9 /src/lib/libssl/tls_internal.h | |
parent | a42b07afac78ec75467b5a5ca9fcbbdaf9d093a4 (diff) | |
download | openbsd-3f7702534a377e0a3b33a6681df0af8a57adbc57.tar.gz openbsd-3f7702534a377e0a3b33a6681df0af8a57adbc57.tar.bz2 openbsd-3f7702534a377e0a3b33a6681df0af8a57adbc57.zip |
Convert legacy server to tls_key_share.
This requires a few more additions to the DHE key share code - we need to
be able to either set the DHE parameters or specify the number of key bits
for use with auto DHE parameters. Additionally, we need to be able to
serialise the DHE parameters to send to the client.
This removes the infamous 'tmp' struct from ssl3_state_internal_st.
ok inoguchi@ tb@
Diffstat (limited to '')
-rw-r--r-- | src/lib/libssl/tls_internal.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/libssl/tls_internal.h b/src/lib/libssl/tls_internal.h index 7e2beadeac..f7f939215a 100644 --- a/src/lib/libssl/tls_internal.h +++ b/src/lib/libssl/tls_internal.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tls_internal.h,v 1.3 2022/01/06 18:23:56 jsing Exp $ */ | 1 | /* $OpenBSD: tls_internal.h,v 1.4 2022/01/07 15:46:30 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018, 2019, 2021 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2018, 2019, 2021 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -18,6 +18,7 @@ | |||
18 | #ifndef HEADER_TLS_INTERNAL_H | 18 | #ifndef HEADER_TLS_INTERNAL_H |
19 | #define HEADER_TLS_INTERNAL_H | 19 | #define HEADER_TLS_INTERNAL_H |
20 | 20 | ||
21 | #include <openssl/dh.h> | ||
21 | #include <openssl/evp.h> | 22 | #include <openssl/evp.h> |
22 | 23 | ||
23 | #include "bytestring.h" | 24 | #include "bytestring.h" |
@@ -64,8 +65,11 @@ void tls_key_share_free(struct tls_key_share *ks); | |||
64 | 65 | ||
65 | uint16_t tls_key_share_group(struct tls_key_share *ks); | 66 | uint16_t tls_key_share_group(struct tls_key_share *ks); |
66 | int tls_key_share_nid(struct tls_key_share *ks); | 67 | int tls_key_share_nid(struct tls_key_share *ks); |
68 | void tls_key_share_set_key_bits(struct tls_key_share *ks, size_t key_bits); | ||
69 | int tls_key_share_set_dh_params(struct tls_key_share *ks, DH *dh_params); | ||
67 | int tls_key_share_peer_pkey(struct tls_key_share *ks, EVP_PKEY *pkey); | 70 | int tls_key_share_peer_pkey(struct tls_key_share *ks, EVP_PKEY *pkey); |
68 | int tls_key_share_generate(struct tls_key_share *ks); | 71 | int tls_key_share_generate(struct tls_key_share *ks); |
72 | int tls_key_share_params(struct tls_key_share *ks, CBB *cbb); | ||
69 | int tls_key_share_public(struct tls_key_share *ks, CBB *cbb); | 73 | int tls_key_share_public(struct tls_key_share *ks, CBB *cbb); |
70 | int tls_key_share_peer_params(struct tls_key_share *ks, CBS *cbs, | 74 | int tls_key_share_peer_params(struct tls_key_share *ks, CBS *cbs, |
71 | int *invalid_params); | 75 | int *invalid_params); |