diff options
author | 2018-02-14 17:08:44 +0000 | |
---|---|---|
committer | 2018-02-14 17:08:44 +0000 | |
commit | 540ad3effb3e280cbec61900c7b724671ecc1ed2 (patch) | |
tree | 7695d84e2e9969e89dd438f26a89a7fc3ad20ec6 /lib/libssl/ssl_lib.c | |
parent | Provide X509_STORE_CTX_get0_{cert,untrusted}() and (diff) | |
download | wireguard-openbsd-540ad3effb3e280cbec61900c7b724671ecc1ed2.tar.xz wireguard-openbsd-540ad3effb3e280cbec61900c7b724671ecc1ed2.zip |
Provide SSL_CTX_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 9e3ef907290..16f2b546379 100644 --- a/lib/libssl/ssl_lib.c +++ b/lib/libssl/ssl_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_lib.c,v 1.173 2018/02/14 16:16:10 jsing Exp $ */ +/* $OpenBSD: ssl_lib.c,v 1.174 2018/02/14 17:08:44 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -1964,6 +1964,13 @@ SSL_CTX_free(SSL_CTX *ctx) free(ctx); } +int +SSL_CTX_up_ref(SSL_CTX *ctx) +{ + int refs = CRYPTO_add(&ctx->references, 1, CRYPTO_LOCK_SSL_CTX); + return ((refs > 1) ? 1 : 0); +} + void SSL_CTX_set_default_passwd_cb(SSL_CTX *ctx, pem_password_cb *cb) { |