diff options
| author | jsing <> | 2018-02-22 17:29:25 +0000 |
|---|---|---|
| committer | jsing <> | 2018-02-22 17:29:25 +0000 |
| commit | aa609591eb7879b96ecb6caf79eb058373d53945 (patch) | |
| tree | 70036dc53413f89136956c37699042b789bac869 /src/lib/libssl/ssl_lib.c | |
| parent | 98857f6afd402959661aaa412234b6a8d4d84266 (diff) | |
| download | openbsd-aa609591eb7879b96ecb6caf79eb058373d53945.tar.gz openbsd-aa609591eb7879b96ecb6caf79eb058373d53945.tar.bz2 openbsd-aa609591eb7879b96ecb6caf79eb058373d53945.zip | |
Provide SSL_up_ref().
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libssl/ssl_lib.c | 9 |
1 files changed, 8 insertions, 1 deletions
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 | { |
