Ulf Möller | 38e33ce | 2000-01-27 19:31:26 +0000 | [diff] [blame] | 1 | =pod |
| 2 | |
| 3 | =head1 NAME |
| 4 | |
Ulf Möller | 4d524e1 | 2000-02-24 11:55:57 +0000 | [diff] [blame] | 5 | DSA_do_sign, DSA_do_verify - raw DSA signature operations |
Ulf Möller | 38e33ce | 2000-01-27 19:31:26 +0000 | [diff] [blame] | 6 | |
| 7 | =head1 SYNOPSIS |
| 8 | |
| 9 | #include <openssl/dsa.h> |
| 10 | |
Matt Caswell | 3dbf824 | 2021-12-02 11:33:49 +0000 | [diff] [blame] | 11 | The following functions have been deprecated since OpenSSL 3.0, and can be |
| 12 | hidden entirely by defining B<OPENSSL_API_COMPAT> with a suitable version value, |
| 13 | see L<openssl_user_macros(7)>: |
Shane Lontis | e52b421 | 2021-03-16 09:39:19 +1000 | [diff] [blame] | 14 | |
Ulf Möller | 38e33ce | 2000-01-27 19:31:26 +0000 | [diff] [blame] | 15 | DSA_SIG *DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa); |
| 16 | |
| 17 | int DSA_do_verify(const unsigned char *dgst, int dgst_len, |
Beat Bolli | e9b7724 | 2017-01-20 19:58:49 +0100 | [diff] [blame] | 18 | DSA_SIG *sig, DSA *dsa); |
Ulf Möller | 38e33ce | 2000-01-27 19:31:26 +0000 | [diff] [blame] | 19 | |
| 20 | =head1 DESCRIPTION |
| 21 | |
Shane Lontis | e52b421 | 2021-03-16 09:39:19 +1000 | [diff] [blame] | 22 | All of the functions described on this page are deprecated. |
| 23 | Applications should instead use L<EVP_PKEY_sign_init(3)>, L<EVP_PKEY_sign(3)>, |
| 24 | L<EVP_PKEY_verify_init(3)> and L<EVP_PKEY_verify(3)>. |
| 25 | |
Ulf Möller | 38e33ce | 2000-01-27 19:31:26 +0000 | [diff] [blame] | 26 | DSA_do_sign() computes a digital signature on the B<len> byte message |
| 27 | digest B<dgst> using the private key B<dsa> and returns it in a |
| 28 | newly allocated B<DSA_SIG> structure. |
| 29 | |
Rich Salz | 9b86974 | 2015-08-17 15:21:33 -0400 | [diff] [blame] | 30 | L<DSA_sign_setup(3)> may be used to precompute part |
Ulf Möller | 38e33ce | 2000-01-27 19:31:26 +0000 | [diff] [blame] | 31 | of the signing operation in case signature generation is |
| 32 | time-critical. |
| 33 | |
| 34 | DSA_do_verify() verifies that the signature B<sig> matches a given |
| 35 | message digest B<dgst> of size B<len>. B<dsa> is the signer's public |
| 36 | key. |
| 37 | |
| 38 | =head1 RETURN VALUES |
| 39 | |
| 40 | DSA_do_sign() returns the signature, NULL on error. DSA_do_verify() |
| 41 | returns 1 for a valid signature, 0 for an incorrect signature and -1 |
| 42 | on error. The error codes can be obtained by |
Rich Salz | 9b86974 | 2015-08-17 15:21:33 -0400 | [diff] [blame] | 43 | L<ERR_get_error(3)>. |
Ulf Möller | 38e33ce | 2000-01-27 19:31:26 +0000 | [diff] [blame] | 44 | |
| 45 | =head1 SEE ALSO |
| 46 | |
Richard Levitte | b97fdb5 | 2016-11-11 09:33:09 +0100 | [diff] [blame] | 47 | L<DSA_new(3)>, L<ERR_get_error(3)>, L<RAND_bytes(3)>, |
Rich Salz | 9b86974 | 2015-08-17 15:21:33 -0400 | [diff] [blame] | 48 | L<DSA_SIG_new(3)>, |
| 49 | L<DSA_sign(3)> |
Ulf Möller | 38e33ce | 2000-01-27 19:31:26 +0000 | [diff] [blame] | 50 | |
Shane Lontis | e52b421 | 2021-03-16 09:39:19 +1000 | [diff] [blame] | 51 | =head1 HISTORY |
| 52 | |
| 53 | All of these functions were deprecated in OpenSSL 3.0. |
| 54 | |
Rich Salz | e2f9261 | 2016-05-18 11:44:05 -0400 | [diff] [blame] | 55 | =head1 COPYRIGHT |
| 56 | |
Shane Lontis | e52b421 | 2021-03-16 09:39:19 +1000 | [diff] [blame] | 57 | Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved. |
Rich Salz | e2f9261 | 2016-05-18 11:44:05 -0400 | [diff] [blame] | 58 | |
Richard Levitte | 4746f25 | 2018-12-06 14:04:44 +0100 | [diff] [blame] | 59 | Licensed under the Apache License 2.0 (the "License"). You may not use |
Rich Salz | e2f9261 | 2016-05-18 11:44:05 -0400 | [diff] [blame] | 60 | this file except in compliance with the License. You can obtain a copy |
| 61 | in the file LICENSE in the source distribution or at |
| 62 | L<https://www.openssl.org/source/license.html>. |
| 63 | |
| 64 | =cut |