summaryrefslogtreecommitdiff
path: root/src/lib/libssl/tls_internal.h
diff options
context:
space:
mode:
authorjsing <>2022-01-06 18:23:56 +0000
committerjsing <>2022-01-06 18:23:56 +0000
commit8aaae3574818dcc48e518588a5f21f25567c50f6 (patch)
tree576e268ac740ee1d976432ed20601d429a60115e /src/lib/libssl/tls_internal.h
parent58c29787c787c30889a5c9cdee9a109dfb201177 (diff)
downloadopenbsd-8aaae3574818dcc48e518588a5f21f25567c50f6.tar.gz
openbsd-8aaae3574818dcc48e518588a5f21f25567c50f6.tar.bz2
openbsd-8aaae3574818dcc48e518588a5f21f25567c50f6.zip
Convert legacy TLS client to tls_key_share.
This requires adding DHE support to tls_key_share. In doing so, tls_key_share_peer_public() has to lose the group argument and gains an invalid_key argument. The one place that actually needs the group check is tlsext_keyshare_client_parse(), so add code to do this. ok inoguchi@ tb@
Diffstat (limited to 'src/lib/libssl/tls_internal.h')
-rw-r--r--src/lib/libssl/tls_internal.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/lib/libssl/tls_internal.h b/src/lib/libssl/tls_internal.h
index 87c7f3b7dd..7e2beadeac 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.2 2022/01/05 17:10:03 jsing Exp $ */ 1/* $OpenBSD: tls_internal.h,v 1.3 2022/01/06 18:23:56 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 *
@@ -63,11 +63,14 @@ struct tls_key_share *tls_key_share_new_nid(int nid);
63void tls_key_share_free(struct tls_key_share *ks); 63void tls_key_share_free(struct tls_key_share *ks);
64 64
65uint16_t tls_key_share_group(struct tls_key_share *ks); 65uint16_t tls_key_share_group(struct tls_key_share *ks);
66int tls_key_share_nid(struct tls_key_share *ks);
66int tls_key_share_peer_pkey(struct tls_key_share *ks, EVP_PKEY *pkey); 67int 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_generate(struct tls_key_share *ks);
68int tls_key_share_public(struct tls_key_share *ks, CBB *cbb); 69int 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, 70int tls_key_share_peer_params(struct tls_key_share *ks, CBS *cbs,
70 CBS *cbs); 71 int *invalid_params);
72int tls_key_share_peer_public(struct tls_key_share *ks, CBS *cbs,
73 int *invalid_key);
71int tls_key_share_derive(struct tls_key_share *ks, uint8_t **shared_key, 74int tls_key_share_derive(struct tls_key_share *ks, uint8_t **shared_key,
72 size_t *shared_key_len); 75 size_t *shared_key_len);
73 76