summaryrefslogtreecommitdiffstats
path: root/lib/libssl/ssl.h
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2020-09-17 15:42:14 +0000
committerjsing <jsing@openbsd.org>2020-09-17 15:42:14 +0000
commit9967537924e0dc4baf6b69309c1d017ae931a826 (patch)
tree1d7c9cdc4a282391cd8c9eb2569163cad9d569b5 /lib/libssl/ssl.h
parentSimplify SSL method lookups. (diff)
downloadwireguard-openbsd-9967537924e0dc4baf6b69309c1d017ae931a826.tar.xz
wireguard-openbsd-9967537924e0dc4baf6b69309c1d017ae931a826.zip
Prepare to provide SSL_get_peer_tmp_key().
OpenSSL effectively renamed SSL_get_server_tmp_key() to SSL_get_peer_tmp_key() and removed the client-side restriction. Prepare for a matching rename. ok tb@
Diffstat (limited to 'lib/libssl/ssl.h')
-rw-r--r--lib/libssl/ssl.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/libssl/ssl.h b/lib/libssl/ssl.h
index eb288699b1c..a783739c570 100644
--- a/lib/libssl/ssl.h
+++ b/lib/libssl/ssl.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl.h,v 1.172 2020/09/13 16:49:05 jsing Exp $ */
+/* $OpenBSD: ssl.h,v 1.173 2020/09/17 15:42:14 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -1126,7 +1126,12 @@ int PEM_write_SSL_SESSION(FILE *fp, SSL_SESSION *x);
#define SSL_CTRL_SET_ECDH_AUTO 94
+#if defined(LIBRESSL_HAS_TLS1_3) || defined(LIBRESSL_INTERNAL)
+#define SSL_CTRL_GET_PEER_TMP_KEY 109
+#define SSL_CTRL_GET_SERVER_TMP_KEY SSL_CTRL_GET_PEER_TMP_KEY
+#else
#define SSL_CTRL_GET_SERVER_TMP_KEY 109
+#endif
#define SSL_CTRL_GET_CHAIN_CERTS 115
@@ -1231,6 +1236,11 @@ int SSL_set_max_proto_version(SSL *ssl, uint16_t version);
#define SSL_get_server_tmp_key(s, pk) \
SSL_ctrl(s,SSL_CTRL_GET_SERVER_TMP_KEY,0,pk)
+#if defined(LIBRESSL_HAS_TLS1_3) || defined(LIBRESSL_INTERNAL)
+#define SSL_get_peer_tmp_key(s, pk) \
+ SSL_ctrl(s, SSL_CTRL_GET_PEER_TMP_KEY, 0, pk)
+#endif /* LIBRESSL_HAS_TLS1_3 || LIBRESSL_INTERNAL */
+
#ifndef LIBRESSL_INTERNAL
/*
* Also provide those functions as macros for compatibility with