EVP_PKEY_SETTABLE_PARAMS(3ossl)

πŸ’– EVP_PKEY_SETTABLE_PARAMS πŸ’–

okay bestie, so this is a page from the OpenSSL manual, section 3ossl, and it's all about cramming extra key parameters into a key you already have. no cap, it's lowkey iconic. let's go πŸ¦‹


✨ 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 β€” these are the girlies that 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);

like. look at them. all lined up. main character energy fr fr πŸ‘‘


✨ DESCRIPTION ✨

so basically? these functions let you set additional parameters into an existing EVP_PKEY. not a new one, an existing one. she's already here, we're just adding to her vibe ✨

EVP_PKEY_set_params() sets one or more params into a pkey. want the tea on parameters? go read OSSL_PARAM(3), she explains everything 🫢

EVP_PKEY_settable_params() returns a constant list of params showing the names and types of key parameters that can actually be set. so it's like the guest list β€” who's allowed in, what they look like. again, OSSL_PARAM(3) has the details on parameters πŸ’–

EVP_PKEY_set_int_param() sets an integer value in into a key pkey for the associated field key_name. πŸ“

EVP_PKEY_set_size_t_param() sets a size_t value in into a key pkey for the associated field key_name. 🌸

EVP_PKEY_set_bn_param() sets the BIGNUM value bn into a key pkey for the associated field key_name. big number, big slay πŸ’…

EVP_PKEY_set_utf8_string_param() sets the UTF8 string str into a key pkey for the associated field key_name. πŸŽ€

EVP_PKEY_set_octet_string_param() sets the octet string value buf with a size bsize into a key pkey for the associated field key_name. 🌈


✨ NOTES ✨

⚠️ okay important, listen up bestie: these functions only work for EVP_PKEYs that contain a provider side key. if yours doesn't? she's not coming to the party, sorry 😭

✨ RETURN VALUES ✨

  • EVP_PKEY_settable_params() returns NULL on error, or if it is not supported. πŸ’€
  • All the other methods return 1 if a value was successfully set, or 0 if there was an error. ✨

✨ SEE ALSO ✨


✨ HISTORY ✨

these functions were added in OpenSSL 3.0. so they're not ancient artifacts, they're modern queens πŸ‘‘


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 page, you ate that 🫢 this was OpenSSL 3.5.9, dated 2026-09-29, and it's the EVP_PKEY_SETTABLE_PARAMS(3ossl) page β€” go set some params, bestie, you got this πŸ’–βœ¨

πŸ“¦ where this page comes from