ossl_store-file.pod 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. =pod
  2. =begin comment
  3. This is a recommended way to describe OSSL_STORE loaders,
  4. "ossl_store-{name}", where {name} is replaced with the name of the
  5. scheme it implements, in man section 7.
  6. =end comment
  7. =head1 NAME
  8. ossl_store-file - The store 'file' scheme loader
  9. =head1 SYNOPSIS
  10. =for openssl generic
  11. #include <openssl/store.h>
  12. =head1 DESCRIPTION
  13. Support for the 'file' scheme is built into C<libcrypto>.
  14. Since files come in all kinds of formats and content types, the 'file'
  15. scheme has its own layer of functionality called "file handlers",
  16. which are used to try to decode diverse types of file contents.
  17. In case a file is formatted as PEM, each called file handler receives
  18. the PEM name (everything following any 'C<-----BEGIN >') as well as
  19. possible PEM headers, together with the decoded PEM body. Since PEM
  20. formatted files can contain more than one object, the file handlers
  21. are called upon for each such object.
  22. If the file isn't determined to be formatted as PEM, the content is
  23. loaded in raw form in its entirety and passed to the available file
  24. handlers as is, with no PEM name or headers.
  25. Each file handler is expected to handle PEM and non-PEM content as
  26. appropriate. Some may refuse non-PEM content for the sake of
  27. determinism (for example, there are keys out in the wild that are
  28. represented as an ASN.1 OCTET STRING. In raw form, it's not easily
  29. possible to distinguish those from any other data coming as an ASN.1
  30. OCTET STRING, so such keys would naturally be accepted as PEM files
  31. only).
  32. =head1 NOTES
  33. When needed, the 'file' scheme loader will require a pass phrase by
  34. using the B<UI_METHOD> that was passed via OSSL_STORE_open().
  35. This pass phrase is expected to be UTF-8 encoded, anything else will
  36. give an undefined result.
  37. The files made accessible through this loader are expected to be
  38. standard compliant with regards to pass phrase encoding.
  39. Files that aren't should be re-generated with a correctly encoded pass
  40. phrase.
  41. See L<passphrase-encoding(7)> for more information.
  42. =head1 SEE ALSO
  43. L<ossl_store(7)>, L<passphrase-encoding(7)>
  44. =head1 COPYRIGHT
  45. Copyright 2018 The OpenSSL Project Authors. All Rights Reserved.
  46. Licensed under the Apache License 2.0 (the "License"). You may not use
  47. this file except in compliance with the License. You can obtain a copy
  48. in the file LICENSE in the source distribution or at
  49. L<https://www.openssl.org/source/license.html>.
  50. =cut