diff options
-rw-r--r-- | src/lib/libssl/Symbols.list | 1 | ||||
-rw-r--r-- | src/lib/libssl/ssl.h | 5 | ||||
-rw-r--r-- | src/lib/libssl/ssl_lib.c | 9 |
3 files changed, 12 insertions, 3 deletions
diff --git a/src/lib/libssl/Symbols.list b/src/lib/libssl/Symbols.list index 8169cf8d66..ad32b98677 100644 --- a/src/lib/libssl/Symbols.list +++ b/src/lib/libssl/Symbols.list | |||
@@ -269,6 +269,7 @@ SSL_shutdown | |||
269 | SSL_state | 269 | SSL_state |
270 | SSL_state_string | 270 | SSL_state_string |
271 | SSL_state_string_long | 271 | SSL_state_string_long |
272 | SSL_up_ref | ||
272 | SSL_use_PrivateKey | 273 | SSL_use_PrivateKey |
273 | SSL_use_PrivateKey_ASN1 | 274 | SSL_use_PrivateKey_ASN1 |
274 | SSL_use_PrivateKey_file | 275 | SSL_use_PrivateKey_file |
diff --git a/src/lib/libssl/ssl.h b/src/lib/libssl/ssl.h index 7756a71230..1b92bde9d4 100644 --- a/src/lib/libssl/ssl.h +++ b/src/lib/libssl/ssl.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl.h,v 1.143 2018/02/22 17:27:07 jsing Exp $ */ | 1 | /* $OpenBSD: ssl.h,v 1.144 2018/02/22 17:29:24 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 | * |
@@ -1337,7 +1337,6 @@ int SSL_check_private_key(const SSL *ctx); | |||
1337 | 1337 | ||
1338 | int SSL_CTX_set_session_id_context(SSL_CTX *ctx, const unsigned char *sid_ctx, unsigned int sid_ctx_len); | 1338 | int SSL_CTX_set_session_id_context(SSL_CTX *ctx, const unsigned char *sid_ctx, unsigned int sid_ctx_len); |
1339 | 1339 | ||
1340 | SSL *SSL_new(SSL_CTX *ctx); | ||
1341 | int SSL_set_session_id_context(SSL *ssl, const unsigned char *sid_ctx, unsigned int sid_ctx_len); | 1340 | int SSL_set_session_id_context(SSL *ssl, const unsigned char *sid_ctx, unsigned int sid_ctx_len); |
1342 | 1341 | ||
1343 | int SSL_CTX_set_purpose(SSL_CTX *s, int purpose); | 1342 | int SSL_CTX_set_purpose(SSL_CTX *s, int purpose); |
@@ -1350,7 +1349,9 @@ int SSL_CTX_set1_param(SSL_CTX *ctx, X509_VERIFY_PARAM *vpm); | |||
1350 | X509_VERIFY_PARAM *SSL_get0_param(SSL *ssl); | 1349 | X509_VERIFY_PARAM *SSL_get0_param(SSL *ssl); |
1351 | int SSL_set1_param(SSL *ssl, X509_VERIFY_PARAM *vpm); | 1350 | int SSL_set1_param(SSL *ssl, X509_VERIFY_PARAM *vpm); |
1352 | 1351 | ||
1352 | SSL *SSL_new(SSL_CTX *ctx); | ||
1353 | void SSL_free(SSL *ssl); | 1353 | void SSL_free(SSL *ssl); |
1354 | int SSL_up_ref(SSL *ssl); | ||
1354 | int SSL_accept(SSL *ssl); | 1355 | int SSL_accept(SSL *ssl); |
1355 | int SSL_connect(SSL *ssl); | 1356 | int SSL_connect(SSL *ssl); |
1356 | int SSL_read(SSL *ssl, void *buf, int num); | 1357 | int SSL_read(SSL *ssl, void *buf, int num); |
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c index 941a230ab1..aa629a2848 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.177 2018/02/22 17:27:07 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_lib.c,v 1.178 2018/02/22 17:29:25 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 | * |
@@ -568,6 +568,13 @@ SSL_free(SSL *s) | |||
568 | free(s); | 568 | free(s); |
569 | } | 569 | } |
570 | 570 | ||
571 | int | ||
572 | SSL_up_ref(SSL *s) | ||
573 | { | ||
574 | int refs = CRYPTO_add(&s->references, 1, CRYPTO_LOCK_SSL); | ||
575 | return (refs > 1) ? 1 : 0; | ||
576 | } | ||
577 | |||
571 | void | 578 | void |
572 | SSL_set_bio(SSL *s, BIO *rbio, BIO *wbio) | 579 | SSL_set_bio(SSL *s, BIO *rbio, BIO *wbio) |
573 | { | 580 | { |