SSL_CTX_SET_TMP_ECDH(3ossl)
π SSL_CTX_SET_TMP_ECDH(3ossl) β the OpenSSL one, bestie
okay so this is a page from the OpenSSL manual, 3ossl section, and it's all about handling ECDH keys for ephemeral key exchange. it's honestly giving "legacy era" energy, which we'll get into. π
β¨ NAME β¨
SSL_CTX_set_tmp_ecdh, SSL_set_tmp_ecdh, SSL_CTX_set_ecdh_auto, SSL_set_ecdh_auto β handle ECDH keys for ephemeral key exchange π
πΈ SYNOPSIS πΈ
#include <openssl/ssl.h>
long SSL_CTX_set_tmp_ecdh(SSL_CTX *ctx, const EC_KEY *ecdh);
long SSL_set_tmp_ecdh(SSL *ssl, const EC_KEY *ecdh);
long SSL_CTX_set_ecdh_auto(SSL_CTX *ctx, int state);
long SSL_set_ecdh_auto(SSL *ssl, int state);
π¦ DESCRIPTION π¦
so, SSL_CTX_set_tmp_ecdh() sets the ECDH parameters to be used to be ecdh β like, that's the key, periodt. and the way it works is the key gets inherited by all ssl objects created from ctx, so every little connection spawned from that context gets the same vibe. π«Ά
β οΈ bestie listen: this macro is deprecated in favor of SSL_CTX_set1_groups(3). it's giving "still works but please move on" energy. π
SSL_set_tmp_ecdh() sets the parameters only for ssl β just that one, no inheritance, no sharing. it's the main character of its own little connection. β¨
β οΈ also deprecated, this time in favor of SSL_set1_groups(3).
and then we have the auto twins: SSL_CTX_set_ecdh_auto() and SSL_set_ecdh_auto() are deprecated and have no effect. that's it. they literally do nothing. not me showing up to work and contributing zero π they're iconic in a "hanging out in the header file" kinda way tho.
π RETURN VALUES π
SSL_CTX_set_tmp_ecdh()andSSL_set_tmp_ecdh()return1on success and0on failure. π―
(and yeah β the _ecdh_auto ones have no return value listed because, again, they have no effect. vibes only.)
π SEE ALSO π
go read these too, iykyk:
ssl(7)SSL_CTX_set1_curves(3)SSL_CTX_set_cipher_list(3)SSL_CTX_set_options(3)SSL_CTX_set_tmp_dh_callback(3)openssl-ciphers(1)openssl-ecparam(1)
π COPYRIGHT π
Copyright 2018 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (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 <https://www.openssl.org/source/license.html>.
okay that's the whole page bestie, slay π
β¨ this was served up in version 3.5.0, dated 2026-09-25, and it lives at SSL_CTX_SET_TMP_ECDH(3ossl) β go forth and maybe use the non-deprecated group functions instead, love u, bye ππΈπ¦
π¦ where this page comes from
- opensuse-leap 16.0: openssl-3-doc 3.5.0-160000.11.1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms