EVP_SIGNATURE(3ossl)
π EVP_SIGNATURE β okay bestie, let's talk signature algorithm objects π
So this is the 3ossl page (like, the OpenSSL manual, third section, iykyk) and honestly? It's giving "the backstage pass of crypto." These are the functions that manage EVP_SIGNATURE algorithm objects β the little handles that do the signing-and-verifying thing. Not me being obsessed with refcounts, but also... I am. π«Ά
β¨ SYNOPSIS β¨
#include <openssl/evp.h>
typedef struct evp_signature_st EVP_SIGNATURE;
EVP_SIGNATURE *EVP_SIGNATURE_fetch(OSSL_LIB_CTX *ctx, const char *algorithm,
const char *properties);
void EVP_SIGNATURE_free(EVP_SIGNATURE *signature);
int EVP_SIGNATURE_up_ref(EVP_SIGNATURE *signature);
const char *EVP_SIGNATURE_get0_name(const EVP_SIGNATURE *signature);
int EVP_SIGNATURE_is_a(const EVP_SIGNATURE *signature, const char *name);
OSSL_PROVIDER *EVP_SIGNATURE_get0_provider(const EVP_SIGNATURE *signature);
void EVP_SIGNATURE_do_all_provided(OSSL_LIB_CTX *libctx,
void (*fn)(EVP_SIGNATURE *signature,
void *arg),
void *arg);
int EVP_SIGNATURE_names_do_all(const EVP_SIGNATURE *signature,
void (*fn)(const char *name, void *data),
void *data);
const char *EVP_SIGNATURE_get0_name(const EVP_SIGNATURE *signature);
const char *EVP_SIGNATURE_get0_description(const EVP_SIGNATURE *signature);
const OSSL_PARAM *EVP_SIGNATURE_gettable_ctx_params(const EVP_SIGNATURE *sig);
const OSSL_PARAM *EVP_SIGNATURE_settable_ctx_params(const EVP_SIGNATURE *sig);
(Yes, EVP_SIGNATURE_get0_name shows up twice in there. That's literally what the header says, don't come for me π
)
π¦ DESCRIPTION π¦
Okay so real talk, here's what each one actually does:
EVP_SIGNATURE_fetch()β grabs you the implementation for the algorithm you named, from any provider that's offering it, filtered by the criteria inproperties. And the algorithm? It'll be one of the ones offering functions for signature-related tasks β signing, verifying, that whole vibe. Wanna go deeper? Peep"ALGORITHM FETCHING" in crypto(7)for the full tea.
The value it hands back has to be freed eventually with EVP_SIGNATURE_free(). No leaks, bestie, that's the rule. πΈ
EVP_SIGNATURE_free()β decrements the reference count on theEVP_SIGNATUREstructure. Usually you got this thing from an earlierEVP_SIGNATURE_fetch()call. When the refcount hits0, the structure gets freed. And if the argument isNULL? Nothing happens. Chill. πEVP_SIGNATURE_up_ref()β increments that reference count. The opposite twin. Iconic behavior.EVP_SIGNATURE_is_a()β returns1ifsignatureis an implementation of an algorithm identifiable withname, otherwise0. Simple as that, fr fr.EVP_SIGNATURE_get0_provider()β tells you which providersignaturewas fetched from. Like finding out where your fave came from. π§EVP_SIGNATURE_do_all_provided()β traverses all the SIGNATURE implementations across all activated providers in the given library contextlibctx, and for every single one of them, calls your functionfnwith the implementation method plus yourargas the argument. A whole tour. πEVP_SIGNATURE_get0_name()β returns the algorithm name from the implementation behindsignature. Plot twist though: the signature might have multiple synonyms attached, and in that case you get the first name from the algorithm definition. Also important: ownership of that returned string stays with the signature object β do not free it yourself. Hands off, it's not yours. πEVP_SIGNATURE_names_do_all()β traverses all the names forsignature, callingfnwith each name anddata. Every alias gets its moment.EVP_SIGNATURE_get0_description()β returns a description of the signature, made for display and human consumption. What's in it? Totally at the discretion of the signature implementation. Mystery vibes, but legal ones.EVP_SIGNATURE_gettable_ctx_params()andEVP_SIGNATURE_settable_ctx_params()β these two return a constantOSSL_PARAM(3)array describing the names and types of key parameters that a signature algorithm can retrieve or set usingEVP_PKEY_CTX_get_params(3)andEVP_PKEY_CTX_set_params(3). Very demure, very parameterized.
π RETURN VALUES π
EVP_SIGNATURE_fetch()β pointer to anEVP_SIGNATUREon success π,NULLon failure π.EVP_SIGNATURE_up_ref()β1for success,0otherwise.EVP_SIGNATURE_names_do_all()β1if the callback was called for all names. A0means the callback was not called for any names. (Not "some," bestie. Any.)EVP_SIGNATURE_gettable_ctx_params()andEVP_SIGNATURE_settable_ctx_params()β a constantOSSL_PARAM(3)array, orNULLon error.
π SEE ALSO π
"ALGORITHM FETCHING" in crypto(7), OSSL_PROVIDER(3)
π HISTORY π
The functions described here were added in OpenSSL 3.0. So if you're on something older... girl. Upgrade. π«Ά
π COPYRIGHT π
Copyright 2019-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>.
That's the whole page, no cap. β
Okay so this version is 3.5.6, dated 2026-04-07, from the EVP_SIGNATURE(3ossl) era β and that's my cue to β¨ slay β¨ my way out. Stay signed, stay verified, and remember: free your fetches, bestie. π
π₯
π¦ 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