80 lines
3 KiB
HTML
80 lines
3 KiB
HTML
<?xml version="1.0" ?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<title>SSL_new</title>
|
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
|
<link rev="made" href="mailto:nwani@atx-osx1010-2.corp.continuum.io" />
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<ul id="index">
|
|
<li><a href="#NAME">NAME</a></li>
|
|
<li><a href="#SYNOPSIS">SYNOPSIS</a></li>
|
|
<li><a href="#DESCRIPTION">DESCRIPTION</a></li>
|
|
<li><a href="#RETURN-VALUES">RETURN VALUES</a></li>
|
|
<li><a href="#SEE-ALSO">SEE ALSO</a></li>
|
|
<li><a href="#COPYRIGHT">COPYRIGHT</a></li>
|
|
</ul>
|
|
|
|
<h1 id="NAME">NAME</h1>
|
|
|
|
<p>SSL_dup, SSL_new, SSL_up_ref - create an SSL structure for a connection</p>
|
|
|
|
<h1 id="SYNOPSIS">SYNOPSIS</h1>
|
|
|
|
<pre><code> #include <openssl/ssl.h>
|
|
|
|
SSL *SSL_dup(SSL *s);
|
|
SSL *SSL_new(SSL_CTX *ctx);
|
|
int SSL_up_ref(SSL *s);</code></pre>
|
|
|
|
<h1 id="DESCRIPTION">DESCRIPTION</h1>
|
|
|
|
<p>SSL_new() creates a new <b>SSL</b> 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</b>: connection method, options, verification settings, timeout settings. An <b>SSL</b> structure is reference counted. Creating an <b>SSL</b> 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</b> structure are freed.</p>
|
|
|
|
<p>SSL_up_ref() increments the reference count for an existing <b>SSL</b> structure.</p>
|
|
|
|
<p>SSL_dup() duplicates an existing <b>SSL</b> structure into a new allocated one. All settings are inherited from the original <b>SSL</b> structure. Dynamic data (i.e. existing connection details) are not copied, the new <b>SSL</b> is set into an initial accept (server) or connect (client) state.</p>
|
|
|
|
<h1 id="RETURN-VALUES">RETURN VALUES</h1>
|
|
|
|
<p>The following return values can occur:</p>
|
|
|
|
<dl>
|
|
|
|
<dt id="NULL">NULL</dt>
|
|
<dd>
|
|
|
|
<p>The creation of a new SSL structure failed. Check the error stack to find out the reason.</p>
|
|
|
|
</dd>
|
|
<dt id="Pointer-to-an-SSL-structure">Pointer to an SSL structure</dt>
|
|
<dd>
|
|
|
|
<p>The return value points to an allocated SSL structure.</p>
|
|
|
|
<p>SSL_up_ref() returns 1 for success and 0 for failure.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
<h1 id="SEE-ALSO">SEE ALSO</h1>
|
|
|
|
<p><a href="../man3/SSL_free.html">SSL_free(3)</a>, <a href="../man3/SSL_clear.html">SSL_clear(3)</a>, <a href="../man3/SSL_CTX_set_options.html">SSL_CTX_set_options(3)</a>, <a href="../man3/SSL_get_SSL_CTX.html">SSL_get_SSL_CTX(3)</a>, <a href="../man7/ssl.html">ssl(7)</a></p>
|
|
|
|
<h1 id="COPYRIGHT">COPYRIGHT</h1>
|
|
|
|
<p>Copyright 2000-2017 The OpenSSL Project Authors. All Rights Reserved.</p>
|
|
|
|
<p>Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <a href="https://www.openssl.org/source/license.html">https://www.openssl.org/source/license.html</a>.</p>
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
|