RSA_sign_ASN1_OCTET_STRING.pod 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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, unsigned int *siglen,
  8. RSA *rsa);
  9. int RSA_verify_ASN1_OCTET_STRING(int dummy, unsigned char *m,
  10. unsigned int m_len, unsigned char *sigbuf, unsigned int siglen,
  11. 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)|ERR_get_error(3)>.
  29. =head1 BUGS
  30. These functions serve no recognizable purpose.
  31. =head1 SEE ALSO
  32. L<ERR_get_error(3)|ERR_get_error(3)>, L<objects(3)|objects(3)>,
  33. L<rand(3)|rand(3)>, L<rsa(3)|rsa(3)>, L<RSA_sign(3)|RSA_sign(3)>,
  34. L<RSA_verify(3)|RSA_verify(3)>
  35. =head1 HISTORY
  36. RSA_sign_ASN1_OCTET_STRING() and RSA_verify_ASN1_OCTET_STRING() were
  37. added in SSLeay 0.8.
  38. =cut