diff options
Diffstat (limited to 'src/lib/libssl/ssl_sess.c')
| -rw-r--r-- | src/lib/libssl/ssl_sess.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/lib/libssl/ssl_sess.c b/src/lib/libssl/ssl_sess.c index 51aa2eac04..b3ee7ef430 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.78 2018/03/17 16:20:01 beck Exp $ */ | 1 | /* $OpenBSD: ssl_sess.c,v 1.79 2018/03/20 15:28:12 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 | * |
| @@ -851,6 +851,19 @@ SSL_SESSION_get0_peer(SSL_SESSION *s) | |||
| 851 | } | 851 | } |
| 852 | 852 | ||
| 853 | int | 853 | int |
| 854 | SSL_SESSION_set1_id(SSL_SESSION *s, const unsigned char *sid, | ||
| 855 | unsigned int sid_len) | ||
| 856 | { | ||
| 857 | if (sid_len > SSL_MAX_SSL_SESSION_ID_LENGTH) { | ||
| 858 | SSLerrorx(SSL_R_SSL_SESSION_ID_TOO_LONG); | ||
| 859 | return 0; | ||
| 860 | } | ||
| 861 | s->session_id_length = sid_len; | ||
| 862 | memmove(s->session_id, sid, sid_len); | ||
| 863 | return 1; | ||
| 864 | } | ||
| 865 | |||
| 866 | int | ||
| 854 | SSL_SESSION_set1_id_context(SSL_SESSION *s, const unsigned char *sid_ctx, | 867 | SSL_SESSION_set1_id_context(SSL_SESSION *s, const unsigned char *sid_ctx, |
| 855 | unsigned int sid_ctx_len) | 868 | unsigned int sid_ctx_len) |
| 856 | { | 869 | { |
