RSA_sign_ASN1_OCTET_STRING.pod 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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 when calling
  20. RSA_sign_ASN1_OCTET_STRING().
  21. If the automatic seeding or reseeding of the OpenSSL CSPRNG fails due to
  22. external circumstances (see L<RAND(7)>), the operation will fail.
  23. RSA_verify_ASN1_OCTET_STRING() verifies that the signature B<sigbuf>
  24. of size B<siglen> is the DER representation of a given octet string
  25. B<m> of size B<m_len>. B<dummy> is ignored. B<rsa> is the signer's
  26. public key.
  27. =head1 RETURN VALUES
  28. RSA_sign_ASN1_OCTET_STRING() returns 1 on success, 0 otherwise.
  29. RSA_verify_ASN1_OCTET_STRING() returns 1 on successful verification, 0
  30. otherwise.
  31. The error codes can be obtained by L<ERR_get_error(3)>.
  32. =head1 BUGS
  33. These functions serve no recognizable purpose.
  34. =head1 SEE ALSO
  35. L<ERR_get_error(3)>,
  36. L<RAND_bytes(3)>, L<RSA_sign(3)>,
  37. L<RSA_verify(3)>,
  38. L<RAND(7)>
  39. =head1 COPYRIGHT
  40. Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
  41. Licensed under the Apache License 2.0 (the "License"). You may not use
  42. this file except in compliance with the License. You can obtain a copy
  43. in the file LICENSE in the source distribution or at
  44. L<https://www.openssl.org/source/license.html>.
  45. =cut