d2i_RSAPublicKey.pod 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. =pod
  2. =head1 NAME
  3. d2i_RSAPublicKey, i2d_RSAPublicKey, d2i_RSAPrivateKey, i2d_RSAPrivateKey,
  4. d2i_RSA_PUBKEY, i2d_RSA_PUBKEY, i2d_Netscape_RSA,
  5. d2i_Netscape_RSA - RSA public and private key encoding functions.
  6. =head1 SYNOPSIS
  7. #include <openssl/rsa.h>
  8. #include <openssl/x509.h>
  9. RSA * d2i_RSAPublicKey(RSA **a, const unsigned char **pp, long length);
  10. int i2d_RSAPublicKey(RSA *a, unsigned char **pp);
  11. RSA * d2i_RSA_PUBKEY(RSA **a, const unsigned char **pp, long length);
  12. int i2d_RSA_PUBKEY(RSA *a, unsigned char **pp);
  13. RSA * d2i_RSAPrivateKey(RSA **a, const unsigned char **pp, long length);
  14. int i2d_RSAPrivateKey(RSA *a, unsigned char **pp);
  15. int i2d_Netscape_RSA(RSA *a, unsigned char **pp, int (*cb)());
  16. RSA * d2i_Netscape_RSA(RSA **a, const unsigned char **pp, long length, int (*cb)());
  17. =head1 DESCRIPTION
  18. d2i_RSAPublicKey() and i2d_RSAPublicKey() decode and encode a PKCS#1 RSAPublicKey
  19. structure.
  20. d2i_RSA_PUBKEY() and i2d_RSA_PUBKEY() decode and encode an RSA public key using
  21. a SubjectPublicKeyInfo (certificate public key) structure.
  22. d2i_RSAPrivateKey(), i2d_RSAPrivateKey() decode and encode a PKCS#1 RSAPrivateKey
  23. structure.
  24. d2i_Netscape_RSA(), i2d_Netscape_RSA() decode and encode an RSA private key in
  25. NET format.
  26. The usage of all of these functions is similar to the d2i_X509() and
  27. i2d_X509() described in the L<d2i_X509(3)|d2i_X509(3)> manual page.
  28. =head1 NOTES
  29. The B<RSA> structure passed to the private key encoding functions should have
  30. all the PKCS#1 private key components present.
  31. The data encoded by the private key functions is unencrypted and therefore
  32. offers no private key security.
  33. The NET format functions are present to provide compatibility with certain very
  34. old software. This format has some severe security weaknesses and should be
  35. avoided if possible.
  36. =head1 SEE ALSO
  37. L<d2i_X509(3)|d2i_X509(3)>
  38. =head1 HISTORY
  39. TBA
  40. =cut