]> git.ipfire.org Git - thirdparty/openssl.git/blame - doc/man3/RSA_sign_ASN1_OCTET_STRING.pod
Remove an unnecessary call to BN_CTX_free.
[thirdparty/openssl.git] / doc / man3 / RSA_sign_ASN1_OCTET_STRING.pod
CommitLineData
2186cd8e
UM
1=pod
2
3=head1 NAME
4
5RSA_sign_ASN1_OCTET_STRING, RSA_verify_ASN1_OCTET_STRING - RSA signatures
6
7=head1 SYNOPSIS
8
9 #include <openssl/rsa.h>
10
4fd8a3e1
P
11Deprecated since OpenSSL 3.0, can be hidden entirely by defining
12B<OPENSSL_API_COMPAT> with a suitable version value, see
13L<openssl_user_macros(7)>:
14
2186cd8e 15 int RSA_sign_ASN1_OCTET_STRING(int dummy, unsigned char *m,
e9b77246
BB
16 unsigned int m_len, unsigned char *sigret,
17 unsigned int *siglen, RSA *rsa);
2186cd8e
UM
18
19 int RSA_verify_ASN1_OCTET_STRING(int dummy, unsigned char *m,
e9b77246
BB
20 unsigned int m_len, unsigned char *sigbuf,
21 unsigned int siglen, RSA *rsa);
2186cd8e
UM
22
23=head1 DESCRIPTION
24
4fd8a3e1
P
25All of the functions described on this page are deprecated.
26Applications should instead use EVP PKEY APIs.
27
2186cd8e
UM
28RSA_sign_ASN1_OCTET_STRING() signs the octet string B<m> of size
29B<m_len> using the private key B<rsa> represented in DER using PKCS #1
30padding. It stores the signature in B<sigret> and the signature size
31in B<siglen>. B<sigret> must point to B<RSA_size(rsa)> bytes of
32memory.
33
34B<dummy> is ignored.
35
262c0088
DMSP
36The random number generator must be seeded when calling
37RSA_sign_ASN1_OCTET_STRING().
38If the automatic seeding or reseeding of the OpenSSL CSPRNG fails due to
39external circumstances (see L<RAND(7)>), the operation will fail.
2186cd8e
UM
40
41RSA_verify_ASN1_OCTET_STRING() verifies that the signature B<sigbuf>
42of size B<siglen> is the DER representation of a given octet string
43B<m> of size B<m_len>. B<dummy> is ignored. B<rsa> is the signer's
44public key.
45
46=head1 RETURN VALUES
47
48RSA_sign_ASN1_OCTET_STRING() returns 1 on success, 0 otherwise.
49RSA_verify_ASN1_OCTET_STRING() returns 1 on successful verification, 0
50otherwise.
51
9b86974e 52The error codes can be obtained by L<ERR_get_error(3)>.
2186cd8e
UM
53
54=head1 BUGS
55
56These functions serve no recognizable purpose.
57
58=head1 SEE ALSO
59
c03726ca 60L<ERR_get_error(3)>,
b97fdb57 61L<RAND_bytes(3)>, L<RSA_sign(3)>,
262c0088
DMSP
62L<RSA_verify(3)>,
63L<RAND(7)>
2186cd8e 64
4fd8a3e1
P
65=head1 HISTORY
66
67All of these functions were deprecated in OpenSSL 3.0.
68
e2f92610
RS
69=head1 COPYRIGHT
70
71Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
72
4746f25a 73Licensed under the Apache License 2.0 (the "License"). You may not use
e2f92610
RS
74this file except in compliance with the License. You can obtain a copy
75in the file LICENSE in the source distribution or at
76L<https://www.openssl.org/source/license.html>.
77
78=cut