d2i_PKCS8PrivateKey_bio.pod 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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 L<PEM_read_PrivateKey(3)>.
  27. =head1 NOTES
  28. These functions are currently the only way to store encrypted private keys using DER format.
  29. Currently all the functions use BIOs or FILE pointers, there are no functions which
  30. work directly on memory: this can be readily worked around by converting the buffers
  31. to memory BIOs, see L<BIO_s_mem(3)> for details.
  32. =head1 SEE ALSO
  33. L<PEM_read_PrivateKey(3)>
  34. =head1 COPYRIGHT
  35. Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved.
  36. Licensed under the OpenSSL license (the "License"). You may not use
  37. this file except in compliance with the License. You can obtain a copy
  38. in the file LICENSE in the source distribution or at
  39. L<https://www.openssl.org/source/license.html>.
  40. =cut