RSA_sign_ASN1_OCTET_STRING.pod 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. =pod
  2. =head1 NAME
  3. RSA_sign_ASN1_OCTET_STRING, RSA_verify_ASN1_OCTET_STRING - RSA signatures
  4. =head1 SYNOPSIS
  5. #include <openssl/rsa.h>
  6. int RSA_sign_ASN1_OCTET_STRING(int dummy, unsigned char *m,
  7. unsigned int m_len, unsigned char *sigret,
  8. unsigned int *siglen, RSA *rsa);
  9. int RSA_verify_ASN1_OCTET_STRING(int dummy, unsigned char *m,
  10. unsigned int m_len, unsigned char *sigbuf,
  11. unsigned int siglen, RSA *rsa);
  12. =head1 DESCRIPTION
  13. RSA_sign_ASN1_OCTET_STRING() signs the octet string B<m> of size
  14. B<m_len> using the private key B<rsa> represented in DER using PKCS #1
  15. padding. It stores the signature in B<sigret> and the signature size
  16. in B<siglen>. B<sigret> must point to B<RSA_size(rsa)> bytes of
  17. memory.
  18. B<dummy> is ignored.
  19. The random number generator must be seeded prior to calling RSA_sign_ASN1_OCTET_STRING().
  20. RSA_verify_ASN1_OCTET_STRING() verifies that the signature B<sigbuf>
  21. of size B<siglen> is the DER representation of a given octet string
  22. B<m> of size B<m_len>. B<dummy> is ignored. B<rsa> is the signer's
  23. public key.
  24. =head1 RETURN VALUES
  25. RSA_sign_ASN1_OCTET_STRING() returns 1 on success, 0 otherwise.
  26. RSA_verify_ASN1_OCTET_STRING() returns 1 on successful verification, 0
  27. otherwise.
  28. The error codes can be obtained by L<ERR_get_error(3)>.
  29. =head1 BUGS
  30. These functions serve no recognizable purpose.
  31. =head1 SEE ALSO
  32. L<ERR_get_error(3)>,
  33. L<RAND_bytes(3)>, L<RSA_sign(3)>,
  34. L<RSA_verify(3)>
  35. =head1 COPYRIGHT
  36. Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
  37. Licensed under the Apache License 2.0 (the "License"). You may not use
  38. this file except in compliance with the License. You can obtain a copy
  39. in the file LICENSE in the source distribution or at
  40. L<https://www.openssl.org/source/license.html>.
  41. =cut