DSA_METH_NEW(3)
okay so bestie, welcome to DSA_METH_NEW(3) β a Library Functions Manual moment, and yes the manual name is literally DSA_METH_NEW(3). Weβre hanging in libcrypto, building up DSA methods like itβs a custom-implementation craft project. π
β¨
πΈ NAME πΈ
DSA_meth_new, DSA_meth_free, DSA_meth_dup, DSA_meth_get0_name, DSA_meth_set1_name, DSA_meth_set_sign, DSA_meth_set_finish β build up DSA methods. periodt. π
β¨ SYNOPSIS β¨
library βlibcryptoβ #include <openssl/dsa.h>
DSA_METHOD *
DSA_meth_new(const char *name, int flags);
void
DSA_meth_free(DSA_METHOD *meth);
DSA_METHOD *
DSA_meth_dup(const DSA_METHOD *meth);
const char *
DSA_meth_get0_name(const DSA_METHOD *meth);
int
DSA_meth_set1_name(DSA_METHOD *meth, const char *name);
int
DSA_meth_set_sign(DSA_METHOD *meth,
DSA_SIG *(*sign)(const unsigned char *, int, DSA *));
int
DSA_meth_set_finish(DSA_METHOD *meth, int (*finish)(DSA *));
π DESCRIPTION π
The DSA_METHOD structure holds function pointers for custom DSA implementations. Itβs the vibe-check blueprint for making DSA do your own thing.
DSA_meth_new()β creates a newDSA_METHODstructure. A copy of theNUL-terminatednameis stored in the newDSA_METHODobject. Any newDSAobject constructed from thisDSA_METHODwill have the givenflagsset by default. πDSA_meth_dup()β makes a deep copy ofmeth. This might be useful for creating a newDSA_METHODbased on an existing one, but with some differences. Basically remix energy. π¦DSA_meth_free()β destroysmethand frees any memory associated with it. bye bestie. πDSA_meth_get0_name()β returns an internal pointer to the name ofmeth. Important: that pointer must not be freed by the caller. π«ΆDSA_meth_set1_name()β stores a copy of theNUL-terminatednameinmethafter freeing the previously stored name. Method names are ignored by the default DSA implementation but can be used by alternative implementations and by the application program. slay for alternative implementations. β¨DSA_meth_set_sign()β sets the function used for creating a DSA signature. That function will be called fromDSA_do_sign(3)and indirectly fromDSA_sign(3). The parameters ofsignhave the same meaning as forDSA_do_sign(3). π₯DSA_meth_set_finish()β sets an optional function for destroying a DSA object. UnlessfinishisNULL, it will be called fromDSA_free(3). It takes the same argument and is intended to do DSA implementation specific cleanup. Do not free the memory used by the DSA object itself in thefinishfunction β that is not its job, bestie. π
π RETURN VALUES π
DSA_meth_new()andDSA_meth_dup()return the newly allocatedDSA_METHODobject orNULLon failure. πDSA_meth_get0_name()returns an internal pointer which must not be freed by the caller. π«ΆDSA_meth_set1_name()and allDSA_meth_set_*()functions return1on success or0on failure. In the current implementation, onlyDSA_meth_set1_name()can actually fail. π
π¦ SEE ALSO π¦
π HISTORY π
These functions first appeared in OpenSSL 1.1.0. β¨
DSA_meth_new(), DSA_meth_free(), DSA_meth_dup(), DSA_meth_set_sign(), and DSA_meth_set_finish() have been available since OpenBSD 6.3. π¦
DSA_meth_get0_name() and DSA_meth_set1_name() have been available since OpenBSD 7.2. π
okay thatβs the whole page, bestie. footer vibes: source/version says Debian, date June 8, 2025, and the manual tag is DSA_METH_NEW(3). periodt. πππ«Ά
π¦ where this page comes from
- alpine 3.24: libressl-doc 4.3.1-r0 Β· custom
- arch rolling: libressl 4.4.0-1 Β· ISC AND custom:OpenSSL
- Copyright (c) 2018, 2022 Ingo Schwarze <schwarze@openbsd.org>
- Copyright (c) 2016 The OpenSSL Project. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms