DSA_DO_SIGN(3ossl)
π DSA_DO_SIGN(3ossl) β the raw DSA signature ops page, bestie edition π
okay so you opened the 3ossl manual and landed on DSA_DO_SIGN. no cap, this one's a lil spicy because everything on this page is deprecated β but we're gonna read it together anyway because knowing the old stuff is how you understand the new stuff. iykyk π«Ά
β¨ NAME β¨
DSA_do_sign, DSA_do_verify β raw DSA signature operations, literally just the bare-metal signing and verifying, no fancy wrapper, no nothing π
πΈ SYNOPSIS πΈ
#include <openssl/dsa.h>
so like, heads up: the following functions have been deprecated since OpenSSL 3.0, and you can hide them entirely by defining OPENSSL_API_COMPAT with a suitable version value β peep openssl_user_macros(7) for the deets π
DSA_SIG *DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa);
int DSA_do_verify(const unsigned char *dgst, int dgst_len,
DSA_SIG *sig, DSA *dsa);
π¦ DESCRIPTION π¦
all of the functions described on this page are deprecated. bestie i am not kidding. π
applications should instead use EVP_PKEY_sign_init(3), EVP_PKEY_sign(3), EVP_PKEY_verify_init(3) and EVP_PKEY_verify(3). those are the main character functions now π
DSA_do_sign() computes a digital signature on the len byte message digest dgst using the private key dsa, and returns it in a newly allocated DSA_SIG structure. fresh out the oven, just for you β¨
DSA_sign_setup(3) may be used to precompute part of the signing operation in case signature generation is time-critical β like, if you're on a deadline and need those signatures now, that's your girl πβοΈπ¨
DSA_do_verify() verifies that the signature sig matches a given message digest dgst of size len. and dsa here is the signer's public key, not the private one β vibe check passed, that's the one you're allowed to share π
π RETURN VALUES π
DSA_do_sign()returns the signature, orNULLon error. no signature, no party. πDSA_do_verify()returns1for a valid signature,0for an incorrect signature, and-1on error. three moods, pick one.
the error codes can be obtained by ERR_get_error(3) β go ask, she'll tell you what went wrong π
π SEE ALSO π
DSA_new(3), ERR_get_error(3), RAND_bytes(3), DSA_SIG_new(3), DSA_sign(3)
go read those too, they're the friend group π«Ά
β HISTORY β
all of these functions were deprecated in OpenSSL 3.0. so yeah, they've been in their retirement era for a minute now π
π COPYRIGHT π
Copyright 2000-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>.
and that's the whole page, bestie!! no notes, we ate πβ¨ this was DSA_DO_SIGN(3ossl) from OpenSSL 3.5.9, dated 2026-09-29 β slay, go forth and please use EVP_PKEY_sign(3) instead, mwah ππ¦πΈ
π¦ where this page comes from
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms