diff options
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 |