summaryrefslogtreecommitdiff
path: root/src/lib/libssl/tls_internal.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/libssl/tls_internal.h22
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,
51void tls_buffer_cbs(struct tls_buffer *buf, CBS *cbs); 53void tls_buffer_cbs(struct tls_buffer *buf, CBS *cbs);
52int tls_buffer_finish(struct tls_buffer *buf, uint8_t **out, size_t *out_len); 54int tls_buffer_finish(struct tls_buffer *buf, uint8_t **out, size_t *out_len);
53 55
56/*
57 * Key shares.
58 */
59struct tls_key_share;
60
61struct tls_key_share *tls_key_share_new(uint16_t group_id);
62struct tls_key_share *tls_key_share_new_nid(int nid);
63void tls_key_share_free(struct tls_key_share *ks);
64
65uint16_t tls_key_share_group(struct tls_key_share *ks);
66int tls_key_share_peer_pkey(struct tls_key_share *ks, EVP_PKEY *pkey);
67int tls_key_share_generate(struct tls_key_share *ks);
68int tls_key_share_public(struct tls_key_share *ks, CBB *cbb);
69int tls_key_share_peer_public(struct tls_key_share *ks, uint16_t group,
70 CBS *cbs);
71int 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