summaryrefslogtreecommitdiff
path: root/lib/libssl
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2021-09-08 17:27:34 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2021-09-08 17:27:34 +0000
commitcd2b10ed1d32c7b3cad251293c1328b49f7930a3 (patch)
tree9ebc3b9c271124557643e82c169500567dff7cd7 /lib/libssl
parentefa109bd4bfd3e7dd5073ef8b04d82fc266a93f2 (diff)
Provide SSL_SESSION_is_resumable and SSL_set_psk_use_session_callback stubs
ok jsing
Diffstat (limited to 'lib/libssl')
-rw-r--r--lib/libssl/ssl.h11
-rw-r--r--lib/libssl/ssl_lib.c8
-rw-r--r--lib/libssl/ssl_sess.c8
3 files changed, 24 insertions, 3 deletions
diff --git a/lib/libssl/ssl.h b/lib/libssl/ssl.h
index 4117d90e89a..49335fc55a8 100644
--- a/lib/libssl/ssl.h
+++ b/lib/libssl/ssl.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl.h,v 1.199 2021/09/08 17:24:23 tb Exp $ */
+/* $OpenBSD: ssl.h,v 1.200 2021/09/08 17:27:33 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -681,6 +681,12 @@ void SSL_CTX_set_alpn_select_cb(SSL_CTX *ctx,
void SSL_get0_alpn_selected(const SSL *ssl, const unsigned char **data,
unsigned int *len);
+#if defined(LIBRESSL_HAS_TLS1_3) || defined(LIBRESSL_INTERNAL)
+typedef int (*SSL_psk_use_session_cb_func)(SSL *ssl, const EVP_MD *md,
+ const unsigned char **id, size_t *idlen, SSL_SESSION **sess);
+void SSL_set_psk_use_session_callback(SSL *s, SSL_psk_use_session_cb_func cb);
+#endif
+
#define SSL_NOTHING 1
#define SSL_WRITING 2
#define SSL_READING 3
@@ -1322,6 +1328,9 @@ int SSL_SESSION_set1_id(SSL_SESSION *s, const unsigned char *sid,
unsigned int sid_len);
int SSL_SESSION_set1_id_context(SSL_SESSION *s,
const unsigned char *sid_ctx, unsigned int sid_ctx_len);
+#if defined(LIBRESSL_HAS_TLS1_3) || defined(LIBRESSL_INTERNAL)
+int SSL_SESSION_is_resumable(const SSL_SESSION *s);
+#endif
SSL_SESSION *SSL_SESSION_new(void);
void SSL_SESSION_free(SSL_SESSION *ses);
diff --git a/lib/libssl/ssl_lib.c b/lib/libssl/ssl_lib.c
index d53bb66b57e..430e9bdc120 100644
--- a/lib/libssl/ssl_lib.c
+++ b/lib/libssl/ssl_lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl_lib.c,v 1.266 2021/09/08 17:24:23 tb Exp $ */
+/* $OpenBSD: ssl_lib.c,v 1.267 2021/09/08 17:27:33 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -1724,6 +1724,12 @@ SSL_get0_alpn_selected(const SSL *ssl, const unsigned char **data,
*len = ssl->s3->internal->alpn_selected_len;
}
+void
+SSL_set_psk_use_session_callback(SSL *s, SSL_psk_use_session_cb_func cb)
+{
+ return;
+}
+
int
SSL_export_keying_material(SSL *s, unsigned char *out, size_t olen,
const char *label, size_t llen, const unsigned char *p, size_t plen,
diff --git a/lib/libssl/ssl_sess.c b/lib/libssl/ssl_sess.c
index 2e3300eb0fd..4e798e08f07 100644
--- a/lib/libssl/ssl_sess.c
+++ b/lib/libssl/ssl_sess.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl_sess.c,v 1.104 2021/05/16 08:24:21 jsing Exp $ */
+/* $OpenBSD: ssl_sess.c,v 1.105 2021/09/08 17:27:33 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -913,6 +913,12 @@ SSL_SESSION_set1_id_context(SSL_SESSION *s, const unsigned char *sid_ctx,
return 1;
}
+int
+SSL_SESSION_is_resumable(const SSL_SESSION *s)
+{
+ return 0;
+}
+
long
SSL_CTX_set_timeout(SSL_CTX *s, long t)
{