EVP_PKEY_CTX_GET_ALGOR(3ossl)

πŸ“¦ version 3.5.0, in opensuse-leap 16.0

πŸ’… EVP_PKEY_CTX_GET_ALGOR(3ossl) πŸ’…

okay so this is the OpenSSL manual page for EVP_PKEY_CTX_GET_ALGOR, and honestly? it's giving "short but mighty" ✨ no cap, it's all about passing AlgorithmIdentifier (and its params) to and from algorithm implementations. bestie, let's get into it 🫢


🌸 NAME 🌸

EVP_CIPHER_CTX_get_algor, EVP_CIPHER_CTX_get_algor_params, EVP_CIPHER_CTX_set_algor_params, EVP_PKEY_CTX_get_algor, EVP_PKEY_CTX_get_algor_params, EVP_PKEY_CTX_set_algor_params β€” literally the whole girlie squad whose job is 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);

like, that's it. that's the whole vibe. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so first thing, bestie β€” in this whole description and in the SYNOPSIS up there, TYPE is just a placeholder standing in for any EVP operation type. so whenever you see EVP_TYPE_CTX, just mentally slot in your fave 🌈 iykyk.

  • EVP_TYPE_CTX_get_algor() β€” she attempts to retrieve a complete AlgorithmIdentifier from the EVP_TYPE implementation, and populates *alg with it. if alg is NULL, calling this function will serve to see if calling this function is supported at all by the EVP_TYPE implementation πŸ‘€. and if *alg is NULL, space will be allocated automatically, and assigned to *alg β€” she provides ✨
  • EVP_TYPE_CTX_get_algor_params() β€” she attempts to retrieve the parameters part of an AlgorithmIdentifier from the EVP_TYPE implementation, and populates alg-parameters> with it. if alg is NULL, calling this function will serve to see if calling this function is supported at all by the EVP_TYPE implementation πŸ‘‘. if alg->parameters is NULL, space will be allocated automatically, and assigned to alg->parameters. but if alg->parameters is not NULL, its previous contents will be overwritten with the retrieved AlgorithmIdentifier parameters. Beware! 😭 that's the "not me accidentally yeeting your old data" moment, fr fr
  • EVP_TYPE_CTX_set_algor_params() β€” she attempts to pass alg->parameters to the EVP_TYPE implementation. if alg is NULL, calling this function will serve to see if calling this function is supported at all by the EVP_TYPE implementation πŸ’œ
🫢 friendly reminder: those alg is NULL calls are literally just vibe checks β€” a way to ask "is this even supported?" without doing the real work.

⭐ RETURN VALUES ⭐

all three functions return 1 for success πŸŽ‰, and 0 or a negative number if an error occurs πŸ’€. and specifically β€” <rainbow>-2is returned when the function isn't supported by theEVP_TYPEimplementation. so if you get a-2`, that's not a bug, that's the implementation saying "ma'am, not today" πŸ™ˆ


πŸ’œ HISTORY πŸ’œ

these functions were added in OpenSSL 3.4 πŸŽ€ like, they're new-new. treat them with main character energy πŸ‘‘


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>.


and that's the page, bestie πŸ¦‹βœ¨ this was OpenSSL 3.5.0, dated 2026-09-25 β€” signed, sealed, delivered, and living rent free in EVP_PKEY_CTX_GET_ALGOR(3ossl) πŸ’– periodt.

πŸ“¦ where this page comes from