d2i_PKCS8PrivateKey.pod 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. =pod
  2. =head1 NAME
  3. d2i_PKCS8PrivateKey_bio, d2i_PKCS8PrivateKey_fp,
  4. i2d_PKCS8PrivateKey_bio, i2d_PKCS8PrivateKey_fp,
  5. i2d_PKCS8PrivateKey_nid_bio, i2d_PKCS8PrivateKey_nid_fp - PKCS#8 format private key functions
  6. =head1 SYNOPSIS
  7. #include <openssl/evp.h>
  8. EVP_PKEY *d2i_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY **x, pem_password_cb *cb, void *u);
  9. EVP_PKEY *d2i_PKCS8PrivateKey_fp(FILE *fp, EVP_PKEY **x, pem_password_cb *cb, void *u);
  10. int i2d_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc,
  11. char *kstr, int klen,
  12. pem_password_cb *cb, void *u);
  13. int i2d_PKCS8PrivateKey_fp(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc,
  14. char *kstr, int klen,
  15. pem_password_cb *cb, void *u);
  16. int i2d_PKCS8PrivateKey_nid_bio(BIO *bp, EVP_PKEY *x, int nid,
  17. char *kstr, int klen,
  18. pem_password_cb *cb, void *u);
  19. int i2d_PKCS8PrivateKey_nid_fp(FILE *fp, EVP_PKEY *x, int nid,
  20. char *kstr, int klen,
  21. pem_password_cb *cb, void *u);
  22. =head1 DESCRIPTION
  23. The PKCS#8 functions encode and decode private keys in PKCS#8 format using both
  24. PKCS#5 v1.5 and PKCS#5 v2.0 password based encryption algorithms.
  25. Other than the use of DER as opposed to PEM these functions are identical to the
  26. corresponding B<PEM> function as described in the L<pem(3)|pem(3)> manual page.
  27. =head1 NOTES
  28. Before using these functions L<OpenSSL_add_all_algorithms(3)|OpenSSL_add_all_algorithms(3)>
  29. should be called to initialize the internal algorithm lookup tables otherwise errors about
  30. unknown algorithms will occur if an attempt is made to decrypt a private key.
  31. These functions are currently the only way to store encrypted private keys using DER format.
  32. Currently all the functions use BIOs or FILE pointers, there are no functions which
  33. work directly on memory: this can be readily worked around by converting the buffers
  34. to memory BIOs, see L<BIO_s_mem(3)|BIO_s_mem(3)> for details.
  35. =head1 SEE ALSO
  36. L<pem(3)|pem(3)>
  37. =cut