EVP_PKEY_SETTABLE_PARAMS(3ossl)
π EVP_PKEY_SETTABLE_PARAMS π
okay bestie, so this one's from the OpenSSL gang β the whole page is called EVP_PKEY_SETTABLE_PARAMS(3ossl) β and it's literally all about shoving extra params into a key that already exists. no cap, it's giving "dress up your EVP_PKEY" 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 β setting 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);
like, look at all those signatures. gorgeous. iconic. we love to see it π«Ά
π DESCRIPTION π
so these functions are your little toolbox for setting additional parameters into an existing EVP_PKEY. key word: existing. we're not making a new one, we're accessorising the one we've got π
EVP_PKEY_set_params()β sets one or more params into a pkey. if you wanna know what a param even is, go peek atOSSL_PARAM(3), it's all there bestie πEVP_PKEY_settable_params()β returns a constant list of params telling you the names and types of key parameters that can be set. again,OSSL_PARAM(3)has the deets π¦EVP_PKEY_set_int_param()β sets an integer valueininto a key pkey for the associated fieldkey_nameπ’EVP_PKEY_set_size_t_param()β sets asize_tvalueininto a key pkey for the associated fieldkey_nameπEVP_PKEY_set_bn_param()β sets theBIGNUMvaluebninto a key pkey for the associated fieldkey_name. big number energy π₯EVP_PKEY_set_utf8_string_param()β sets the UTF8 stringstrinto a key pkey for the associated fieldkey_nameπEVP_PKEY_set_octet_string_param()β sets the octet string valuebufwith a sizebsizeinto a key pkey for the associated fieldkey_nameπ
π NOTES π
heads up! these functions only work for EVP_PKEYs that contain a provider side key. if yours doesn't, this whole vibe check is a fail π
β¨ 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 π
π¦ SEE ALSO π¦
go read those too, iykyk π
π HISTORY π
these functions were added in OpenSSL 3.0 β so they're not ancient, they're just β¨establishedβ¨
πΈ 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>.
okay that's the whole thing, mwah π this little beauty is version 3.5.6, dated 2026-04-07, and it lives at EVP_PKEY_SETTABLE_PARAMS(3ossl) β go set some params, bestie, you've got this π§π
π¦ where this page comes from
- freebsd 15.1: base 15.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms