libressl-SSL_dup3
Deep copy of an ssl object
Usage
SSL Library (libssl, -lssl) libcrypto
#include <openssl/ssl.h>
SSL *
SSL_dup(SSL *ssl);
Overview
SSL_dup() constructs a new SSL object in the same context as ssl and copies much of the contained data from ssl to the new SSL object, but many fields, for example tlsext data, are not copied.
As an exception from deep copying, if a session is already established, the new object shares ssl->cert with the original object.
Return values
SSL_dup() returns the new SSL object or NULL on failure.