PEM_read_CMS.pod 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. =pod
  2. =head1 NAME
  3. DECLARE_PEM_rw,
  4. PEM_read_CMS,
  5. PEM_read_bio_CMS,
  6. PEM_write_CMS,
  7. PEM_write_bio_CMS,
  8. PEM_write_DHxparams,
  9. PEM_write_bio_DHxparams,
  10. PEM_read_ECPKParameters,
  11. PEM_read_bio_ECPKParameters,
  12. PEM_write_ECPKParameters,
  13. PEM_write_bio_ECPKParameters,
  14. PEM_read_ECPrivateKey,
  15. PEM_write_ECPrivateKey,
  16. PEM_write_bio_ECPrivateKey,
  17. PEM_read_EC_PUBKEY,
  18. PEM_read_bio_EC_PUBKEY,
  19. PEM_write_EC_PUBKEY,
  20. PEM_write_bio_EC_PUBKEY,
  21. PEM_read_NETSCAPE_CERT_SEQUENCE,
  22. PEM_read_bio_NETSCAPE_CERT_SEQUENCE,
  23. PEM_write_NETSCAPE_CERT_SEQUENCE,
  24. PEM_write_bio_NETSCAPE_CERT_SEQUENCE,
  25. PEM_read_PKCS8,
  26. PEM_read_bio_PKCS8,
  27. PEM_write_PKCS8,
  28. PEM_write_bio_PKCS8,
  29. PEM_write_PKCS8_PRIV_KEY_INFO,
  30. PEM_read_bio_PKCS8_PRIV_KEY_INFO,
  31. PEM_read_PKCS8_PRIV_KEY_INFO,
  32. PEM_write_bio_PKCS8_PRIV_KEY_INFO,
  33. PEM_read_SSL_SESSION,
  34. PEM_read_bio_SSL_SESSION,
  35. PEM_write_SSL_SESSION,
  36. PEM_write_bio_SSL_SESSION
  37. - PEM object encoding routines
  38. =head1 SYNOPSIS
  39. =for comment generic
  40. #include <openssl/pem.h>
  41. DECLARE_PEM_rw(name, TYPE)
  42. TYPE *PEM_read_TYPE(FILE *fp, TYPE **a, pem_password_cb *cb, void *u);
  43. TYPE *PEM_read_bio_TYPE(BIO *bp, TYPE **a, pem_password_cb *cb, void *u);
  44. int PEM_write_TYPE(FILE *fp, const TYPE *a);
  45. int PEM_write_bio_TYPE(BIO *bp, const TYPE *a);
  46. =head1 DESCRIPTION
  47. In the description below, I<TYPE> is used
  48. as a placeholder for any of the OpenSSL datatypes, such as I<X509>.
  49. The macro B<DECLARE_PEM_rw> expands to the set of declarations shown in
  50. the next four lines of the synopsis.
  51. These routines convert between local instances of ASN1 datatypes and
  52. the PEM encoding. For more information on the templates, see
  53. L<ASN1_ITEM(3)>. For more information on the lower-level routines used
  54. by the functions here, see L<PEM_read(3)>.
  55. PEM_read_TYPE() reads a PEM-encoded object of I<TYPE> from the file B<fp>
  56. and returns it. The B<cb> and B<u> parameters are as described in
  57. L<pem_password_cb(3)>.
  58. PEM_read_bio_TYPE() is similar to PEM_read_TYPE() but reads from the BIO B<bp>.
  59. PEM_write_TYPE() writes the PEM encoding of the object B<a> to the file B<fp>.
  60. PEM_write_bio_TYPE() similarly writes to the BIO B<bp>.
  61. =head1 RETURN VALUES
  62. PEM_read_TYPE() and PEM_read_bio_TYPE() return a pointer to an allocated
  63. object, which should be released by calling TYPE_free(), or NULL on error.
  64. PEM_write_TYPE() and PEM_write_bio_TYPE() return the number of bytes written
  65. or zero on error.
  66. =head1 SEE ALSO
  67. L<PEM_read(3)>
  68. =head1 COPYRIGHT
  69. Copyright 1998-2016 The OpenSSL Project Authors. All Rights Reserved.
  70. Licensed under the OpenSSL license (the "License"). You may not use
  71. this file except in compliance with the License. You can obtain a copy
  72. in the file LICENSE in the source distribution or at
  73. L<https://www.openssl.org/source/license.html>.
  74. =cut