EVP_PKEY_SETTABLE_PARAMS(3ossl)
π EVP_PKEY_SETTABLE_PARAMS π
okay so this is one of those OpenSSL pages, bestie β it lives in the 3ossl section of the manual, and it's literally all about stuffing extra parameters into a key you already have. no cap, it's giving "key glow-up" energy β¨
πΈ NAME πΈ
EVP_PKEY_settable_params, EVP_PKEY_set_params, EVP_PKEY_set_int_param, EVP_PKEY_set_size_t_param, EVP_PKEY_set_bn_param, EVP_PKEY_set_utf8_string_param, EVP_PKEY_set_octet_string_param β set key parameters into a key π
β¨ SYNOPSIS β¨
#include <openssl/evp.h>
const OSSL_PARAM *EVP_PKEY_settable_params(const EVP_PKEY *pkey);
int EVP_PKEY_set_params(EVP_PKEY *pkey, OSSL_PARAM params[]);
int EVP_PKEY_set_int_param(EVP_PKEY *pkey, const char *key_name, int in);
int EVP_PKEY_set_size_t_param(EVP_PKEY *pkey, const char *key_name, size_t in);
int EVP_PKEY_set_bn_param(EVP_PKEY *pkey, const char *key_name,
const BIGNUM *bn);
int EVP_PKEY_set_utf8_string_param(EVP_PKEY *pkey, const char *key_name,
const char *str);
int EVP_PKEY_set_octet_string_param(EVP_PKEY *pkey, const char *key_name,
const unsigned char *buf, size_t bsize);
π¦ DESCRIPTION π¦
so these functions are your little toolkit for setting additional parameters into an already-existing EVP_PKEY π
like the key's already there, you're just adding accessories. very demure, very mindful.
EVP_PKEY_set_params()β sets one or more params into apkey. for the deets on what parameters even are, go readOSSL_PARAM(3)π«ΆEVP_PKEY_settable_params()β returns a constant list of params that tells you the names and types of key parameters that can actually be set. literally a menu, bestie. again, seeOSSL_PARAM(3)for the parameter lore πEVP_PKEY_set_int_param()β sets an integer valueininto a keypkeyfor the associated fieldkey_nameπ’EVP_PKEY_set_size_t_param()β sets asize_tvalueininto a keypkeyfor the associated fieldkey_nameπEVP_PKEY_set_bn_param()β sets theBIGNUMvaluebninto a keypkeyfor the associated fieldkey_name. big number energy π₯EVP_PKEY_set_utf8_string_param()β sets the UTF8 stringstrinto a keypkeyfor the associated fieldkey_nameπEVP_PKEY_set_octet_string_param()β sets the octet string valuebufwith a sizebsizeinto a keypkeyfor the associated fieldkey_nameπ§
π NOTES π
heads up bestie: these functions only work for EVP_PKEYs that contain a provider side key. if yours doesn't, it's not happening. periodt. π
π RETURN VALUES π
EVP_PKEY_settable_params()returnsNULLon error, or if it is not supported π- all the other methods return
1if a value was successfully set, or0if there was an error. slay or flop, no in-between π
π SEE ALSO π
EVP_PKEY_gettable_params(3), EVP_PKEY_CTX_new(3), provider-keymgmt(7), OSSL_PARAM(3)
like yes go read those too, iykyk π«Ά
β HISTORY β
these functions were added in OpenSSL 3.0. vintage-ish but iconic π
π COPYRIGHT π
Copyright 2020-2021 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>.
aaaand that's the whole page, bestie π§π this one's from 3.5.0, dated 2026-09-25 β so go forth and set those params. mwah ππΈ
π¦ 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