diff options
author | 2018-02-22 17:29:24 +0000 | |
---|---|---|
committer | 2018-02-22 17:29:24 +0000 | |
commit | d17a940535e45c64cc4e6ef3e6e08209c54bd384 (patch) | |
tree | 396311c6fb817e689450a67da8e8fd27d46debdc /lib/libssl/ssl_lib.c | |
parent | Provide SSL_CTX_get_ciphers(). (diff) | |
download | wireguard-openbsd-d17a940535e45c64cc4e6ef3e6e08209c54bd384.tar.xz wireguard-openbsd-d17a940535e45c64cc4e6ef3e6e08209c54bd384.zip |
Provide SSL_up_ref().
Diffstat (limited to 'lib/libssl/ssl_lib.c')
-rw-r--r-- | lib/libssl/ssl_lib.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/libssl/ssl_lib.c b/lib/libssl/ssl_lib.c index 941a230ab1f..aa629a28487 100644 --- a/lib/libssl/ssl_lib.c +++ b/lib/libssl/ssl_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_lib.c,v 1.177 2018/02/22 17:27:07 jsing Exp $ */ +/* $OpenBSD: ssl_lib.c,v 1.178 2018/02/22 17:29:25 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -568,6 +568,13 @@ SSL_free(SSL *s) free(s); } +int +SSL_up_ref(SSL *s) +{ + int refs = CRYPTO_add(&s->references, 1, CRYPTO_LOCK_SSL); + return (refs > 1) ? 1 : 0; +} + void SSL_set_bio(SSL *s, BIO *rbio, BIO *wbio) { |