diff options
| author | tb <> | 2020-09-19 09:56:35 +0000 |
|---|---|---|
| committer | tb <> | 2020-09-19 09:56:35 +0000 |
| commit | 64d116f977e819c5c3ec5361ae30c2df9e5f9101 (patch) | |
| tree | b604af0689d1ffdeb500101c9b73ccc7d0732155 /src | |
| parent | 4e89e6316f0d83fc4353025be7399e53c4722ddf (diff) | |
| download | openbsd-64d116f977e819c5c3ec5361ae30c2df9e5f9101.tar.gz openbsd-64d116f977e819c5c3ec5361ae30c2df9e5f9101.tar.bz2 openbsd-64d116f977e819c5c3ec5361ae30c2df9e5f9101.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')
| -rw-r--r-- | src/lib/libssl/ssl.h | 6 | ||||
| -rw-r--r-- | src/lib/libssl/ssl_sess.c | 14 |
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); |
| 1387 | const unsigned char *SSL_SESSION_get0_id_context(const SSL_SESSION *ss, | 1387 | const 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) | ||
| 1390 | uint32_t SSL_SESSION_get_max_early_data(const SSL_SESSION *sess); | ||
| 1391 | int SSL_SESSION_set_max_early_data(SSL_SESSION *sess, uint32_t max_early_data); | ||
| 1392 | #endif | ||
| 1389 | unsigned long SSL_SESSION_get_ticket_lifetime_hint(const SSL_SESSION *s); | 1393 | unsigned long SSL_SESSION_get_ticket_lifetime_hint(const SSL_SESSION *s); |
| 1390 | int SSL_SESSION_has_ticket(const SSL_SESSION *s); | 1394 | int SSL_SESSION_has_ticket(const SSL_SESSION *s); |
| 1391 | unsigned int SSL_SESSION_get_compress_id(const SSL_SESSION *ss); | 1395 | unsigned 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 | ||
| 197 | uint32_t | ||
| 198 | SSL_SESSION_get_max_early_data(const SSL_SESSION *s) | ||
| 199 | { | ||
| 200 | return 0; | ||
| 201 | } | ||
| 202 | |||
| 203 | int | ||
| 204 | SSL_SESSION_set_max_early_data(SSL_SESSION *s, uint32_t max_early_data) | ||
| 205 | { | ||
| 206 | return 1; | ||
| 207 | } | ||
| 208 | |||
| 197 | SSL_SESSION * | 209 | SSL_SESSION * |
| 198 | SSL_SESSION_new(void) | 210 | SSL_SESSION_new(void) |
| 199 | { | 211 | { |
