diff options
Diffstat (limited to '')
-rw-r--r-- | src/lib/libssl/ssl_lib.c | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c index 79021d7e0b..e910d85914 100644 --- a/src/lib/libssl/ssl_lib.c +++ b/src/lib/libssl/ssl_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_lib.c,v 1.175 2018/02/17 15:13:12 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_lib.c,v 1.176 2018/02/17 15:19:43 jsing 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 | * |
@@ -758,7 +758,8 @@ SSL_CTX_get_verify_depth(const SSL_CTX *ctx) | |||
758 | return (X509_VERIFY_PARAM_get_depth(ctx->param)); | 758 | return (X509_VERIFY_PARAM_get_depth(ctx->param)); |
759 | } | 759 | } |
760 | 760 | ||
761 | int (*SSL_CTX_get_verify_callback(const SSL_CTX *ctx))(int, X509_STORE_CTX *) | 761 | int |
762 | (*SSL_CTX_get_verify_callback(const SSL_CTX *ctx))(int, X509_STORE_CTX *) | ||
762 | { | 763 | { |
763 | return (ctx->internal->default_verify_callback); | 764 | return (ctx->internal->default_verify_callback); |
764 | } | 765 | } |
@@ -2645,6 +2646,38 @@ SSL_get_current_expansion(SSL *s) | |||
2645 | return (NULL); | 2646 | return (NULL); |
2646 | } | 2647 | } |
2647 | 2648 | ||
2649 | size_t | ||
2650 | SSL_get_client_random(const SSL *s, unsigned char *out, size_t max_out) | ||
2651 | { | ||
2652 | size_t len = sizeof(s->s3->client_random); | ||
2653 | |||
2654 | if (out == NULL) | ||
2655 | return len; | ||
2656 | |||
2657 | if (len > max_out) | ||
2658 | len = max_out; | ||
2659 | |||
2660 | memcpy(out, s->s3->client_random, len); | ||
2661 | |||
2662 | return len; | ||
2663 | } | ||
2664 | |||
2665 | size_t | ||
2666 | SSL_get_server_random(const SSL *s, unsigned char *out, size_t max_out) | ||
2667 | { | ||
2668 | size_t len = sizeof(s->s3->server_random); | ||
2669 | |||
2670 | if (out == NULL) | ||
2671 | return len; | ||
2672 | |||
2673 | if (len > max_out) | ||
2674 | len = max_out; | ||
2675 | |||
2676 | memcpy(out, s->s3->server_random, len); | ||
2677 | |||
2678 | return len; | ||
2679 | } | ||
2680 | |||
2648 | int | 2681 | int |
2649 | ssl_init_wbio_buffer(SSL *s, int push) | 2682 | ssl_init_wbio_buffer(SSL *s, int push) |
2650 | { | 2683 | { |