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_get_server_tmp_key — temporary server key during a handshake

SYNOPSIS

#include <openssl/ssl.h>
long
SSL_get_server_tmp_key(SSL *ssl, EVP_PKEY **key);

DESCRIPTION

SSL_get_server_tmp_key() retrieves the temporary key provided by the server and used during key exchange. For example, if ECDHE is in use, this represents the server's public ECDHE key.
In case of success, a copy of the key is stored in *key. It is the caller's responsibility to free this key after use using EVP_PKEY_free(3).
This function may only be called by the client.
This function is implemented as a macro.

RETURN VALUES

SSL_get_server_tmp_key() returns 1 on success or 0 on failure.

SEE ALSO

EVP_PKEY_free(3), ssl(3), SSL_ctrl(3)

HISTORY

SSL_get_server_tmp_key() first appeared in OpenSSL 1.0.2 and has been available since OpenBSD 6.1.
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