DSA_do_sign.pod 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. =pod
  2. =head1 NAME
  3. DSA_do_sign, DSA_do_verify - raw DSA signature operations
  4. =head1 SYNOPSIS
  5. #include <openssl/dsa.h>
  6. The following functions have been deprecated since OpenSSL 3.0, and can be
  7. hidden entirely by defining B<OPENSSL_API_COMPAT> with a suitable version value,
  8. see L<openssl_user_macros(7)>:
  9. DSA_SIG *DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa);
  10. int DSA_do_verify(const unsigned char *dgst, int dgst_len,
  11. DSA_SIG *sig, DSA *dsa);
  12. =head1 DESCRIPTION
  13. All of the functions described on this page are deprecated.
  14. Applications should instead use L<EVP_PKEY_sign_init(3)>, L<EVP_PKEY_sign(3)>,
  15. L<EVP_PKEY_verify_init(3)> and L<EVP_PKEY_verify(3)>.
  16. DSA_do_sign() computes a digital signature on the B<len> byte message
  17. digest B<dgst> using the private key B<dsa> and returns it in a
  18. newly allocated B<DSA_SIG> structure.
  19. L<DSA_sign_setup(3)> may be used to precompute part
  20. of the signing operation in case signature generation is
  21. time-critical.
  22. DSA_do_verify() verifies that the signature B<sig> matches a given
  23. message digest B<dgst> of size B<len>. B<dsa> is the signer's public
  24. key.
  25. =head1 RETURN VALUES
  26. DSA_do_sign() returns the signature, NULL on error. DSA_do_verify()
  27. returns 1 for a valid signature, 0 for an incorrect signature and -1
  28. on error. The error codes can be obtained by
  29. L<ERR_get_error(3)>.
  30. =head1 SEE ALSO
  31. L<DSA_new(3)>, L<ERR_get_error(3)>, L<RAND_bytes(3)>,
  32. L<DSA_SIG_new(3)>,
  33. L<DSA_sign(3)>
  34. =head1 HISTORY
  35. All of these functions were deprecated in OpenSSL 3.0.
  36. =head1 COPYRIGHT
  37. Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.
  38. Licensed under the Apache License 2.0 (the "License"). You may not use
  39. this file except in compliance with the License. You can obtain a copy
  40. in the file LICENSE in the source distribution or at
  41. L<https://www.openssl.org/source/license.html>.
  42. =cut