OpenSSL 1.0.2f
[tomato.git] / release / src / router / openssl / doc / crypto / RSA_sign_ASN1_OCTET_STRING.pod
blobe70380bbfc96ab078711ec346db061337e44f31a
1 =pod
3 =head1 NAME
5 RSA_sign_ASN1_OCTET_STRING, RSA_verify_ASN1_OCTET_STRING - RSA signatures
7 =head1 SYNOPSIS
9  #include <openssl/rsa.h>
11  int RSA_sign_ASN1_OCTET_STRING(int dummy, unsigned char *m,
12     unsigned int m_len, unsigned char *sigret, unsigned int *siglen,
13     RSA *rsa);
15  int RSA_verify_ASN1_OCTET_STRING(int dummy, unsigned char *m,
16     unsigned int m_len, unsigned char *sigbuf, unsigned int siglen,
17     RSA *rsa);
19 =head1 DESCRIPTION
21 RSA_sign_ASN1_OCTET_STRING() signs the octet string B<m> of size
22 B<m_len> using the private key B<rsa> represented in DER using PKCS #1
23 padding. It stores the signature in B<sigret> and the signature size
24 in B<siglen>. B<sigret> must point to B<RSA_size(rsa)> bytes of
25 memory.
27 B<dummy> is ignored.
29 The random number generator must be seeded prior to calling RSA_sign_ASN1_OCTET_STRING().
31 RSA_verify_ASN1_OCTET_STRING() verifies that the signature B<sigbuf>
32 of size B<siglen> is the DER representation of a given octet string
33 B<m> of size B<m_len>. B<dummy> is ignored. B<rsa> is the signer's
34 public key.
36 =head1 RETURN VALUES
38 RSA_sign_ASN1_OCTET_STRING() returns 1 on success, 0 otherwise.
39 RSA_verify_ASN1_OCTET_STRING() returns 1 on successful verification, 0
40 otherwise.
42 The error codes can be obtained by L<ERR_get_error(3)|ERR_get_error(3)>.
44 =head1 BUGS
46 These functions serve no recognizable purpose.
48 =head1 SEE ALSO
50 L<ERR_get_error(3)|ERR_get_error(3)>, L<objects(3)|objects(3)>,
51 L<rand(3)|rand(3)>, L<rsa(3)|rsa(3)>, L<RSA_sign(3)|RSA_sign(3)>,
52 L<RSA_verify(3)|RSA_verify(3)>
54 =head1 HISTORY
56 RSA_sign_ASN1_OCTET_STRING() and RSA_verify_ASN1_OCTET_STRING() were
57 added in SSLeay 0.8.
59 =cut