DSA_DO_SIGN(3ossl)

πŸ“¦
version 15.1 Β· 2 versions
, in freebsd 15.1

πŸ’… NAME πŸ’…

okay so bestie, this page is about DSA_do_sign and DSA_do_verify β€” the raw DSA signature operations. that's it, that's the vibe. it's the OpenSSL manual, page DSA_DO_SIGN(3ossl), and yes we're doing this together 🫢


✨ SYNOPSIS ✨

first things first, you gotta pull in the header:

#include <openssl/dsa.h>
πŸ’€ 🚨 deprecated alert 🚨 the functions below have been deprecated since OpenSSL 3.0, and you can hide them entirely by defining OPENSSL_API_COMPAT with a suitable version value β€” go peek at openssl_user_macros(7) for the tea. β˜•

here are the signatures, exactly as written, no cap:

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 🌸

okay so real talk: all of the functions described on this page are deprecated. like, every single one. the glow-up you actually want is:

applications should use those instead. periodt. πŸ‘‘

now for the lore, because you still deserve to know what these do:

  • DSA_do_sign() β€” computes a digital signature on the len byte message digest dgst using the private key dsa, and hands it back to you in a newly allocated DSA_SIG structure. it's giving "here's your signature, bestie, it's yours now" πŸŽ€
  • DSA_sign_setup(3) β€” may be used to precompute part of the signing operation in case signature generation is time-critical. iykyk β€” if you're in a rush, this is the move ⏱️✨
  • 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. main character verification energy πŸ”₯

πŸ¦‹ RETURN VALUES πŸ¦‹

  • DSA_do_sign() β€” returns the signature, or NULL on error. 😭 no signature for you.
  • DSA_do_verify() β€” returns 1 for a valid signature βœ…, 0 for an incorrect signature πŸ™ˆ, and -1 on error πŸ’€.

and where do you get the error codes, you ask? ERR_get_error(3), obviously. go get 'em. πŸ”


πŸŽ€ SEE ALSO πŸŽ€

the whole friend group, linked up:


πŸ’œ HISTORY πŸ’œ

so like, a lil backstory: all of these functions were deprecated in OpenSSL 3.0. that's the whole plot. 🌈


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


okay bestie that's the whole page, you ate that πŸ’…βœ¨ this was DSA_DO_SIGN(3ossl) from OpenSSL 3.5.6, dated 2026-04-07 β€” mwah, go forth and please use the EVP functions fr fr πŸ«ΆπŸŽ€πŸ¦‹

πŸ“¦ where this page comes from