summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libssl/Symbols.list1
-rw-r--r--src/lib/libssl/ssl.h5
-rw-r--r--src/lib/libssl/ssl_lib.c9
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
269SSL_state 269SSL_state
270SSL_state_string 270SSL_state_string
271SSL_state_string_long 271SSL_state_string_long
272SSL_up_ref
272SSL_use_PrivateKey 273SSL_use_PrivateKey
273SSL_use_PrivateKey_ASN1 274SSL_use_PrivateKey_ASN1
274SSL_use_PrivateKey_file 275SSL_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
1338int SSL_CTX_set_session_id_context(SSL_CTX *ctx, const unsigned char *sid_ctx, unsigned int sid_ctx_len); 1338int SSL_CTX_set_session_id_context(SSL_CTX *ctx, const unsigned char *sid_ctx, unsigned int sid_ctx_len);
1339 1339
1340SSL *SSL_new(SSL_CTX *ctx);
1341int SSL_set_session_id_context(SSL *ssl, const unsigned char *sid_ctx, unsigned int sid_ctx_len); 1340int SSL_set_session_id_context(SSL *ssl, const unsigned char *sid_ctx, unsigned int sid_ctx_len);
1342 1341
1343int SSL_CTX_set_purpose(SSL_CTX *s, int purpose); 1342int 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);
1350X509_VERIFY_PARAM *SSL_get0_param(SSL *ssl); 1349X509_VERIFY_PARAM *SSL_get0_param(SSL *ssl);
1351int SSL_set1_param(SSL *ssl, X509_VERIFY_PARAM *vpm); 1350int SSL_set1_param(SSL *ssl, X509_VERIFY_PARAM *vpm);
1352 1351
1352SSL *SSL_new(SSL_CTX *ctx);
1353void SSL_free(SSL *ssl); 1353void SSL_free(SSL *ssl);
1354int SSL_up_ref(SSL *ssl);
1354int SSL_accept(SSL *ssl); 1355int SSL_accept(SSL *ssl);
1355int SSL_connect(SSL *ssl); 1356int SSL_connect(SSL *ssl);
1356int SSL_read(SSL *ssl, void *buf, int num); 1357int 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
571int
572SSL_up_ref(SSL *s)
573{
574 int refs = CRYPTO_add(&s->references, 1, CRYPTO_LOCK_SSL);
575 return (refs > 1) ? 1 : 0;
576}
577
571void 578void
572SSL_set_bio(SSL *s, BIO *rbio, BIO *wbio) 579SSL_set_bio(SSL *s, BIO *rbio, BIO *wbio)
573{ 580{