EVP_PKEY_CTX_GET_ALGOR(3ossl)
okay so, bestie, welcome to EVP_PKEY_CTX_GET_ALGOR(3ossl) from OpenSSL β this one is literally all about passing AlgorithmIdentifier and its params to/from algorithm implementations. no cap, itβs giving very specific crypto-plumbing main character energy π
β¨ NAME β¨
Here are the function besties on this page, exactly as listed:
EVP_CIPHER_CTX_get_algorEVP_CIPHER_CTX_get_algor_paramsEVP_CIPHER_CTX_set_algor_paramsEVP_PKEY_CTX_get_algorEVP_PKEY_CTX_get_algor_paramsEVP_PKEY_CTX_set_algor_params
Theyβre all about passing AlgorithmIdentifier and its params to/from algorithm implementations. π«Ά
πΈ SYNOPSIS πΈ
int EVP_TYPE_CTX_get_algor(EVP_TYPE_CTX *ctx, X509_ALGOR **alg);
int EVP_TYPE_CTX_get_algor_params(EVP_TYPE_CTX *ctx, X509_ALGOR *alg);
int EVP_TYPE_CTX_set_algor_params(EVP_TYPE_CTX *ctx, const X509_ALGOR *alg);
π DESCRIPTION π
Quick vocab check, because the page says it and it matters: in this description and in the SYNOPSIS above, TYPE is used as a placeholder for any EVP operation type. iykyk π¦
EVP_TYPE_CTX_get_algor()β attempts to retrieve a completeAlgorithmIdentifierfrom theEVP_TYPEimplementation, and populates*algwith it. IfalgisNULL, calling this function will serve to see if calling this function is supported at all by theEVP_TYPEimplementation. If*algisNULL, space will be allocated automatically, and assigned to*alg.EVP_TYPE_CTX_get_algor_params()β attempts to retrieve the parameters part of anAlgorithmIdentifierfrom theEVP_TYPEimplementation, and populatesalg-parameters>with it. IfalgisNULL, calling this function will serve to see if calling this function is supported at all by theEVP_TYPEimplementation. Ifalg->parametersisNULL, space will be allocated automatically, and assigned toalg->parameters. Ifalg->parametersis notNULL, its previous contents will be overwritten with the retrievedAlgorithmIdentifierparameters. Beware! πEVP_TYPE_CTX_set_algor_params()β attempts to passalg->parametersto theEVP_TYPEimplementation. IfalgisNULL, calling this function will serve to see if calling this function is supported at all by theEVP_TYPEimplementation.
π RETURN VALUES π
All functions return 1 for success, and 0 or a negative number if an error occurs. In particular, -2 is returned when the function isn't supported by the EVP_TYPE implementation. So if you see -2, itβs not a skill issue β itβs an unsupported-implementation issue, fr fr. π
π¦ HISTORY π¦
These functions were added in OpenSSL 3.4. slay β¨
π COPYRIGHT π
Copyright 2024 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>.
π
later, bestie β this page is from OpenSSL 3.5.6, dated 2026-04-07. π
π¦ 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