Sortix
Sortix Download Manual Development Source Code News Blog More
current nightly

Sortix nightly manual

This manual documents Sortix nightly, a development build that has not been officially released. You can instead view this document in the latest official manual.

NAME

SSL_dup — deep copy of an SSL object

SYNOPSIS

#include <openssl/ssl.h>
SSL *
SSL_dup(SSL *ssl);

DESCRIPTION

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.

SEE ALSO

ssl(3), SSL_clear(3), SSL_copy_session_id(3), SSL_free(3), SSL_new(3), SSL_set_security_level(3)

HISTORY

SSL_dup() first appeared in SSLeay 0.8.0 and has been available since OpenBSD 2.4.
Copyright 2011-2025 Jonas 'Sortie' Termansen and contributors.
Sortix's source code is free software under the ISC license.
#sortix on irc.sortix.org
@sortix_org