diff options
author | Matt Caswell <matt@openssl.org> | 2016-01-26 11:31:41 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2016-01-26 13:19:10 +0000 |
commit | a18a31e49d266b687f425c3c434a5aef1f719e38 (patch) | |
tree | f7d08fd63fcc76289537c8c357d2e38f0a900e89 /doc/ssl/SSL_new.pod | |
parent | 1bca5888da944b00b7cc675d1d53a53da6d3da1a (diff) |
Add SSL_up_ref() and SSL_CTX_up_ref()
The SSL and SSL_CTX structures are reference counted. However since libssl
was made opaque there is no way for users of the library to manipulate the
reference counts. This adds functions to enable that.
Reviewed-by: Stephen Henson <steve@openssl.org>
Diffstat (limited to 'doc/ssl/SSL_new.pod')
-rw-r--r-- | doc/ssl/SSL_new.pod | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/doc/ssl/SSL_new.pod b/doc/ssl/SSL_new.pod index 4c350c507f..f0e07951e3 100644 --- a/doc/ssl/SSL_new.pod +++ b/doc/ssl/SSL_new.pod @@ -2,20 +2,26 @@ =head1 NAME -SSL_new - create a new SSL structure for a connection +SSL_new, SSL_up_ref - create a new SSL structure for a connection =head1 SYNOPSIS #include <openssl/ssl.h> SSL *SSL_new(SSL_CTX *ctx); + void SSL_up_ref(SSL *s); =head1 DESCRIPTION SSL_new() creates a new B<SSL> structure which is needed to hold the data for a TLS/SSL connection. The new structure inherits the settings of the underlying context B<ctx>: connection method, -options, verification settings, timeout settings. +options, verification settings, timeout settings. An B<SSL> structure is +reference counted. Creating an B<SSL> structure for the first time increments +the reference count. Freeing it (using SSL_free) decrements it. When the +reference count drops to zero, any memory or resources allocated to the B<SSL> +structure are freed. SSL_up_ref() increments the reference count for an +existing B<SSL> structure. =head1 RETURN VALUES |