]> git.ipfire.org Git - thirdparty/openssl.git/blame - doc/man3/RSA_sign_ASN1_OCTET_STRING.pod
Fix a grammar nit in CRYPTO_get_ex_new_index.pod
[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
11 int RSA_sign_ASN1_OCTET_STRING(int dummy, unsigned char *m,
e9b77246
BB
12 unsigned int m_len, unsigned char *sigret,
13 unsigned int *siglen, RSA *rsa);
2186cd8e
UM
14
15 int RSA_verify_ASN1_OCTET_STRING(int dummy, unsigned char *m,
e9b77246
BB
16 unsigned int m_len, unsigned char *sigbuf,
17 unsigned int siglen, RSA *rsa);
2186cd8e
UM
18
19=head1 DESCRIPTION
20
21RSA_sign_ASN1_OCTET_STRING() signs the octet string B<m> of size
22B<m_len> using the private key B<rsa> represented in DER using PKCS #1
23padding. It stores the signature in B<sigret> and the signature size
24in B<siglen>. B<sigret> must point to B<RSA_size(rsa)> bytes of
25memory.
26
27B<dummy> is ignored.
28
29The random number generator must be seeded prior to calling RSA_sign_ASN1_OCTET_STRING().
30
31RSA_verify_ASN1_OCTET_STRING() verifies that the signature B<sigbuf>
32of size B<siglen> is the DER representation of a given octet string
33B<m> of size B<m_len>. B<dummy> is ignored. B<rsa> is the signer's
34public key.
35
36=head1 RETURN VALUES
37
38RSA_sign_ASN1_OCTET_STRING() returns 1 on success, 0 otherwise.
39RSA_verify_ASN1_OCTET_STRING() returns 1 on successful verification, 0
40otherwise.
41
9b86974e 42The error codes can be obtained by L<ERR_get_error(3)>.
2186cd8e
UM
43
44=head1 BUGS
45
46These functions serve no recognizable purpose.
47
48=head1 SEE ALSO
49
c03726ca 50L<ERR_get_error(3)>,
b97fdb57 51L<RAND_bytes(3)>, L<RSA_sign(3)>,
9b86974e 52L<RSA_verify(3)>
2186cd8e 53
e2f92610
RS
54=head1 COPYRIGHT
55
56Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
57
4746f25a 58Licensed under the Apache License 2.0 (the "License"). You may not use
e2f92610
RS
59this file except in compliance with the License. You can obtain a copy
60in the file LICENSE in the source distribution or at
61L<https://www.openssl.org/source/license.html>.
62
63=cut