diff options
| author | tb <> | 2018-03-17 15:55:53 +0000 |
|---|---|---|
| committer | tb <> | 2018-03-17 15:55:53 +0000 |
| commit | 1c31745efe6ed99c3a4e427046074fc4b544f08d (patch) | |
| tree | 123a71ccc635fe7520330822d65ea57601fb6e5e | |
| parent | d1ec49153a2f42b993f68df3479aec526cce4b2e (diff) | |
| download | openbsd-1c31745efe6ed99c3a4e427046074fc4b544f08d.tar.gz openbsd-1c31745efe6ed99c3a4e427046074fc4b544f08d.tar.bz2 openbsd-1c31745efe6ed99c3a4e427046074fc4b544f08d.zip | |
Provide SSL_SESSION_get_ticket_lifetime_hint() and
SSL_SESSION_has_ticket()
ok jsing
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libssl/Symbols.list | 2 | ||||
| -rw-r--r-- | src/lib/libssl/ssl.h | 4 | ||||
| -rw-r--r-- | src/lib/libssl/ssl_sess.c | 14 |
3 files changed, 18 insertions, 2 deletions
diff --git a/src/lib/libssl/Symbols.list b/src/lib/libssl/Symbols.list index 3f63272442..581b292a74 100644 --- a/src/lib/libssl/Symbols.list +++ b/src/lib/libssl/Symbols.list | |||
| @@ -147,8 +147,10 @@ SSL_SESSION_get_ex_new_index | |||
| 147 | SSL_SESSION_get_id | 147 | SSL_SESSION_get_id |
| 148 | SSL_SESSION_get_master_key | 148 | SSL_SESSION_get_master_key |
| 149 | SSL_SESSION_get_protocol_version | 149 | SSL_SESSION_get_protocol_version |
| 150 | SSL_SESSION_get_ticket_lifetime_hint | ||
| 150 | SSL_SESSION_get_time | 151 | SSL_SESSION_get_time |
| 151 | SSL_SESSION_get_timeout | 152 | SSL_SESSION_get_timeout |
| 153 | SSL_SESSION_has_ticket | ||
| 152 | SSL_SESSION_new | 154 | SSL_SESSION_new |
| 153 | SSL_SESSION_print | 155 | SSL_SESSION_print |
| 154 | SSL_SESSION_print_fp | 156 | SSL_SESSION_print_fp |
diff --git a/src/lib/libssl/ssl.h b/src/lib/libssl/ssl.h index 17b9467ae0..05939f214d 100644 --- a/src/lib/libssl/ssl.h +++ b/src/lib/libssl/ssl.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ssl.h,v 1.151 2018/03/17 15:48:31 tb Exp $ */ | 1 | /* $OpenBSD: ssl.h,v 1.152 2018/03/17 15:55:52 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 | * |
| @@ -1327,6 +1327,8 @@ const unsigned char *SSL_SESSION_get_id(const SSL_SESSION *ss, | |||
| 1327 | unsigned int *len); | 1327 | unsigned int *len); |
| 1328 | const unsigned char *SSL_SESSION_get0_id_context(const SSL_SESSION *ss, | 1328 | const unsigned char *SSL_SESSION_get0_id_context(const SSL_SESSION *ss, |
| 1329 | unsigned int *len); | 1329 | unsigned int *len); |
| 1330 | unsigned long SSL_SESSION_get_ticket_lifetime_hint(const SSL_SESSION *s); | ||
| 1331 | int SSL_SESSION_has_ticket(const SSL_SESSION *s); | ||
| 1330 | unsigned int SSL_SESSION_get_compress_id(const SSL_SESSION *ss); | 1332 | unsigned int SSL_SESSION_get_compress_id(const SSL_SESSION *ss); |
| 1331 | int SSL_SESSION_print_fp(FILE *fp, const SSL_SESSION *ses); | 1333 | int SSL_SESSION_print_fp(FILE *fp, const SSL_SESSION *ses); |
| 1332 | int SSL_SESSION_print(BIO *fp, const SSL_SESSION *ses); | 1334 | int SSL_SESSION_print(BIO *fp, const SSL_SESSION *ses); |
diff --git a/src/lib/libssl/ssl_sess.c b/src/lib/libssl/ssl_sess.c index b97dfd7867..4903719fb3 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.76 2018/03/17 14:47:48 tb Exp $ */ | 1 | /* $OpenBSD: ssl_sess.c,v 1.77 2018/03/17 15:55:53 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 | * |
| @@ -249,6 +249,18 @@ SSL_SESSION_get_compress_id(const SSL_SESSION *ss) | |||
| 249 | return 0; | 249 | return 0; |
| 250 | } | 250 | } |
| 251 | 251 | ||
| 252 | unsigned long | ||
| 253 | SSL_SESSION_get_ticket_lifetime_hint(const SSL_SESSION *s) | ||
| 254 | { | ||
| 255 | return s->tlsext_tick_lifetime_hint; | ||
| 256 | } | ||
| 257 | |||
| 258 | int | ||
| 259 | SSL_SESSION_has_ticket(const SSL_SESSION *s) | ||
| 260 | { | ||
| 261 | return (s->tlsext_ticklen > 0) ? 1 : 0; | ||
| 262 | } | ||
| 263 | |||
| 252 | /* | 264 | /* |
| 253 | * SSLv3/TLSv1 has 32 bytes (256 bits) of session ID space. As such, filling | 265 | * SSLv3/TLSv1 has 32 bytes (256 bits) of session ID space. As such, filling |
| 254 | * the ID with random gunk repeatedly until we have no conflict is going to | 266 | * the ID with random gunk repeatedly until we have no conflict is going to |
