RSA_sign_ASN1_OCTET_STRING.pod 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. The following functions have been deprecated since OpenSSL 3.0, and can be
  7. hidden entirely by defining B<OPENSSL_API_COMPAT> with a suitable version value,
  8. see L<openssl_user_macros(7)>:
  9. int RSA_sign_ASN1_OCTET_STRING(int dummy, unsigned char *m,
  10. unsigned int m_len, unsigned char *sigret,
  11. unsigned int *siglen, RSA *rsa);
  12. int RSA_verify_ASN1_OCTET_STRING(int dummy, unsigned char *m,
  13. unsigned int m_len, unsigned char *sigbuf,
  14. unsigned int siglen, RSA *rsa);
  15. =head1 DESCRIPTION
  16. All of the functions described on this page are deprecated.
  17. Applications should instead use EVP PKEY APIs.
  18. RSA_sign_ASN1_OCTET_STRING() signs the octet string B<m> of size
  19. B<m_len> using the private key B<rsa> represented in DER using PKCS #1
  20. padding. It stores the signature in B<sigret> and the signature size
  21. in B<siglen>. B<sigret> must point to B<RSA_size(rsa)> bytes of
  22. memory.
  23. B<dummy> is ignored.
  24. The random number generator must be seeded when calling
  25. RSA_sign_ASN1_OCTET_STRING().
  26. If the automatic seeding or reseeding of the OpenSSL CSPRNG fails due to
  27. external circumstances (see L<RAND(7)>), the operation will fail.
  28. RSA_verify_ASN1_OCTET_STRING() verifies that the signature B<sigbuf>
  29. of size B<siglen> is the DER representation of a given octet string
  30. B<m> of size B<m_len>. B<dummy> is ignored. B<rsa> is the signer's
  31. public key.
  32. =head1 RETURN VALUES
  33. RSA_sign_ASN1_OCTET_STRING() returns 1 on success, 0 otherwise.
  34. RSA_verify_ASN1_OCTET_STRING() returns 1 on successful verification, 0
  35. otherwise.
  36. The error codes can be obtained by L<ERR_get_error(3)>.
  37. =head1 BUGS
  38. These functions serve no recognizable purpose.
  39. =head1 SEE ALSO
  40. L<ERR_get_error(3)>,
  41. L<RAND_bytes(3)>, L<RSA_sign(3)>,
  42. L<RSA_verify(3)>,
  43. L<RAND(7)>
  44. =head1 HISTORY
  45. All of these functions were deprecated in OpenSSL 3.0.
  46. =head1 COPYRIGHT
  47. Copyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved.
  48. Licensed under the Apache License 2.0 (the "License"). You may not use
  49. this file except in compliance with the License. You can obtain a copy
  50. in the file LICENSE in the source distribution or at
  51. L<https://www.openssl.org/source/license.html>.
  52. =cut