diff options
| author | jsing <> | 2022-01-05 17:10:03 +0000 |
|---|---|---|
| committer | jsing <> | 2022-01-05 17:10:03 +0000 |
| commit | 767ff39662be70f355eac7cf069fd9c23c34580d (patch) | |
| tree | bf1d8f80a603da1e77e6fec1a2697b878680932b /src/lib/libssl/tls_internal.h | |
| parent | 2a4d455b5a48685d7473bacd6643c5f7fdfbe18a (diff) | |
| download | openbsd-767ff39662be70f355eac7cf069fd9c23c34580d.tar.gz openbsd-767ff39662be70f355eac7cf069fd9c23c34580d.tar.bz2 openbsd-767ff39662be70f355eac7cf069fd9c23c34580d.zip | |
Rename tls13_key_share to tls_key_share.
In preparation to use the key share code in both the TLSv1.3 and legacy
stacks, rename tls13_key_share to tls_key_share, moving it into the shared
handshake struct. Further changes will then allow the legacy stack to make
use of the same code for ephemeral key exchange.
ok inoguchi@ tb@
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libssl/tls_internal.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/lib/libssl/tls_internal.h b/src/lib/libssl/tls_internal.h index 10af32efdd..87c7f3b7dd 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.1 2021/10/23 13:12:14 jsing Exp $ */ | 1 | /* $OpenBSD: tls_internal.h,v 1.2 2022/01/05 17:10:03 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,8 @@ | |||
| 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/evp.h> | ||
| 22 | |||
| 21 | #include "bytestring.h" | 23 | #include "bytestring.h" |
| 22 | 24 | ||
| 23 | __BEGIN_HIDDEN_DECLS | 25 | __BEGIN_HIDDEN_DECLS |
| @@ -51,6 +53,24 @@ ssize_t tls_buffer_extend(struct tls_buffer *buf, size_t len, | |||
| 51 | void tls_buffer_cbs(struct tls_buffer *buf, CBS *cbs); | 53 | void tls_buffer_cbs(struct tls_buffer *buf, CBS *cbs); |
| 52 | int tls_buffer_finish(struct tls_buffer *buf, uint8_t **out, size_t *out_len); | 54 | int tls_buffer_finish(struct tls_buffer *buf, uint8_t **out, size_t *out_len); |
| 53 | 55 | ||
| 56 | /* | ||
| 57 | * Key shares. | ||
| 58 | */ | ||
| 59 | struct tls_key_share; | ||
| 60 | |||
| 61 | struct tls_key_share *tls_key_share_new(uint16_t group_id); | ||
| 62 | struct tls_key_share *tls_key_share_new_nid(int nid); | ||
| 63 | void tls_key_share_free(struct tls_key_share *ks); | ||
| 64 | |||
| 65 | uint16_t tls_key_share_group(struct tls_key_share *ks); | ||
| 66 | int tls_key_share_peer_pkey(struct tls_key_share *ks, EVP_PKEY *pkey); | ||
| 67 | int tls_key_share_generate(struct tls_key_share *ks); | ||
| 68 | int tls_key_share_public(struct tls_key_share *ks, CBB *cbb); | ||
| 69 | int tls_key_share_peer_public(struct tls_key_share *ks, uint16_t group, | ||
| 70 | CBS *cbs); | ||
| 71 | int tls_key_share_derive(struct tls_key_share *ks, uint8_t **shared_key, | ||
| 72 | size_t *shared_key_len); | ||
| 73 | |||
| 54 | __END_HIDDEN_DECLS | 74 | __END_HIDDEN_DECLS |
| 55 | 75 | ||
| 56 | #endif | 76 | #endif |
