diff options
Diffstat (limited to 'src/lib/libcrypto/man/DSA_do_sign.3')
-rw-r--r-- | src/lib/libcrypto/man/DSA_do_sign.3 | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/src/lib/libcrypto/man/DSA_do_sign.3 b/src/lib/libcrypto/man/DSA_do_sign.3 new file mode 100644 index 0000000000..c61ff925bb --- /dev/null +++ b/src/lib/libcrypto/man/DSA_do_sign.3 | |||
@@ -0,0 +1,68 @@ | |||
1 | .Dd $Mdocdate: November 2 2016 $ | ||
2 | .Dt DSA_DO_SIGN 3 | ||
3 | .Os | ||
4 | .Sh NAME | ||
5 | .Nm DSA_do_sign , | ||
6 | .Nm DSA_do_verify | ||
7 | .Nd raw DSA signature operations | ||
8 | .Sh SYNOPSIS | ||
9 | .In openssl/dsa.h | ||
10 | .Ft DSA_SIG * | ||
11 | .Fo DSA_do_sign | ||
12 | .Fa "const unsigned char *dgst" | ||
13 | .Fa "int dlen" | ||
14 | .Fa "DSA *dsa" | ||
15 | .Fc | ||
16 | .Ft int | ||
17 | .Fo DSA_do_verify | ||
18 | .Fa "const unsigned char *dgst" | ||
19 | .Fa "int dgst_len" | ||
20 | .Fa "DSA_SIG *sig" | ||
21 | .Fa "DSA *dsa" | ||
22 | .Fc | ||
23 | .Sh DESCRIPTION | ||
24 | .Fn DSA_do_sign | ||
25 | computes a digital signature on the | ||
26 | .Fa dlen | ||
27 | byte message digest | ||
28 | .Fa dgst | ||
29 | using the private key | ||
30 | .Fa dsa | ||
31 | and returns it in a newly allocated | ||
32 | .Vt DSA_SIG | ||
33 | structure. | ||
34 | .Pp | ||
35 | .Xr DSA_sign_setup 3 | ||
36 | may be used to precompute part of the signing operation in case | ||
37 | signature generation is time-critical. | ||
38 | .Pp | ||
39 | .Fn DSA_do_verify | ||
40 | verifies that the signature | ||
41 | .Fa sig | ||
42 | matches a given message digest | ||
43 | .Fa dgst | ||
44 | of size | ||
45 | .Fa dgst_len . | ||
46 | .Fa dsa | ||
47 | is the signer's public key. | ||
48 | .Sh RETURN VALUES | ||
49 | .Fn DSA_do_sign | ||
50 | returns the signature or | ||
51 | .Dv NULL | ||
52 | on error. | ||
53 | .Fn DSA_do_verify | ||
54 | returns 1 for a valid signature, 0 for an incorrect signature, | ||
55 | and -1 on error. | ||
56 | The error codes can be obtained by | ||
57 | .Xr ERR_get_error 3 . | ||
58 | .Sh SEE ALSO | ||
59 | .Xr dsa 3 , | ||
60 | .Xr DSA_SIG_new 3 , | ||
61 | .Xr DSA_sign 3 , | ||
62 | .Xr ERR_get_error 3 , | ||
63 | .Xr rand 3 | ||
64 | .Sh HISTORY | ||
65 | .Fn DSA_do_sign | ||
66 | and | ||
67 | .Fn DSA_do_verify | ||
68 | were added in OpenSSL 0.9.3. | ||