summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authortb <>2020-09-19 09:56:35 +0000
committertb <>2020-09-19 09:56:35 +0000
commit6c23be8ae2a3bfec4de157d86a462d08f4efd3ed (patch)
treeb604af0689d1ffdeb500101c9b73ccc7d0732155 /src/lib
parenta4fede3dd4df29c213d7d3e5ba6b126d77af33b5 (diff)
downloadopenbsd-6c23be8ae2a3bfec4de157d86a462d08f4efd3ed.tar.gz
openbsd-6c23be8ae2a3bfec4de157d86a462d08f4efd3ed.tar.bz2
openbsd-6c23be8ae2a3bfec4de157d86a462d08f4efd3ed.zip
Prepare to provide SSL_SESSION_{set,get}_max_early_data()
Since we do not support 0-RTT, these are noops. Some software expects this API to be available if TLS1_3_VERSION is defined. ok beck jsing
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libssl/ssl.h6
-rw-r--r--src/lib/libssl/ssl_sess.c14
2 files changed, 18 insertions, 2 deletions
diff --git a/src/lib/libssl/ssl.h b/src/lib/libssl/ssl.h
index a783739c57..401c9cf843 100644
--- a/src/lib/libssl/ssl.h
+++ b/src/lib/libssl/ssl.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl.h,v 1.173 2020/09/17 15:42:14 jsing Exp $ */ 1/* $OpenBSD: ssl.h,v 1.174 2020/09/19 09:56:34 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -1386,6 +1386,10 @@ const unsigned char *SSL_SESSION_get_id(const SSL_SESSION *ss,
1386 unsigned int *len); 1386 unsigned int *len);
1387const unsigned char *SSL_SESSION_get0_id_context(const SSL_SESSION *ss, 1387const unsigned char *SSL_SESSION_get0_id_context(const SSL_SESSION *ss,
1388 unsigned int *len); 1388 unsigned int *len);
1389#if defined(LIBRESSL_HAS_TLS1_3) || defined(LIBRESSL_INTERNAL)
1390uint32_t SSL_SESSION_get_max_early_data(const SSL_SESSION *sess);
1391int SSL_SESSION_set_max_early_data(SSL_SESSION *sess, uint32_t max_early_data);
1392#endif
1389unsigned long SSL_SESSION_get_ticket_lifetime_hint(const SSL_SESSION *s); 1393unsigned long SSL_SESSION_get_ticket_lifetime_hint(const SSL_SESSION *s);
1390int SSL_SESSION_has_ticket(const SSL_SESSION *s); 1394int SSL_SESSION_has_ticket(const SSL_SESSION *s);
1391unsigned int SSL_SESSION_get_compress_id(const SSL_SESSION *ss); 1395unsigned int SSL_SESSION_get_compress_id(const SSL_SESSION *ss);
diff --git a/src/lib/libssl/ssl_sess.c b/src/lib/libssl/ssl_sess.c
index 191e43b74b..d805419de4 100644
--- a/src/lib/libssl/ssl_sess.c
+++ b/src/lib/libssl/ssl_sess.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_sess.c,v 1.99 2020/09/17 15:23:29 jsing Exp $ */ 1/* $OpenBSD: ssl_sess.c,v 1.100 2020/09/19 09:56:35 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -194,6 +194,18 @@ SSL_SESSION_get_ex_data(const SSL_SESSION *s, int idx)
194 return (CRYPTO_get_ex_data(&s->internal->ex_data, idx)); 194 return (CRYPTO_get_ex_data(&s->internal->ex_data, idx));
195} 195}
196 196
197uint32_t
198SSL_SESSION_get_max_early_data(const SSL_SESSION *s)
199{
200 return 0;
201}
202
203int
204SSL_SESSION_set_max_early_data(SSL_SESSION *s, uint32_t max_early_data)
205{
206 return 1;
207}
208
197SSL_SESSION * 209SSL_SESSION *
198SSL_SESSION_new(void) 210SSL_SESSION_new(void)
199{ 211{