1e1051a39Sopenharmony_ci=pod 2e1051a39Sopenharmony_ci 3e1051a39Sopenharmony_ci=begin comment 4e1051a39Sopenharmony_ci 5e1051a39Sopenharmony_ciThis is a recommended way to describe OSSL_STORE loaders, 6e1051a39Sopenharmony_ci"ossl_store-{name}", where {name} is replaced with the name of the 7e1051a39Sopenharmony_cischeme it implements, in man section 7. 8e1051a39Sopenharmony_ci 9e1051a39Sopenharmony_ci=end comment 10e1051a39Sopenharmony_ci 11e1051a39Sopenharmony_ci=head1 NAME 12e1051a39Sopenharmony_ci 13e1051a39Sopenharmony_ciossl_store-file - The store 'file' scheme loader 14e1051a39Sopenharmony_ci 15e1051a39Sopenharmony_ci=head1 SYNOPSIS 16e1051a39Sopenharmony_ci 17e1051a39Sopenharmony_ci=for openssl generic 18e1051a39Sopenharmony_ci 19e1051a39Sopenharmony_ci#include <openssl/store.h> 20e1051a39Sopenharmony_ci 21e1051a39Sopenharmony_ci=head1 DESCRIPTION 22e1051a39Sopenharmony_ci 23e1051a39Sopenharmony_ciSupport for the 'file' scheme is built into C<libcrypto>. 24e1051a39Sopenharmony_ciSince files come in all kinds of formats and content types, the 'file' 25e1051a39Sopenharmony_cischeme has its own layer of functionality called "file handlers", 26e1051a39Sopenharmony_ciwhich are used to try to decode diverse types of file contents. 27e1051a39Sopenharmony_ci 28e1051a39Sopenharmony_ciIn case a file is formatted as PEM, each called file handler receives 29e1051a39Sopenharmony_cithe PEM name (everything following any 'C<-----BEGIN >') as well as 30e1051a39Sopenharmony_cipossible PEM headers, together with the decoded PEM body. Since PEM 31e1051a39Sopenharmony_ciformatted files can contain more than one object, the file handlers 32e1051a39Sopenharmony_ciare called upon for each such object. 33e1051a39Sopenharmony_ci 34e1051a39Sopenharmony_ciIf the file isn't determined to be formatted as PEM, the content is 35e1051a39Sopenharmony_ciloaded in raw form in its entirety and passed to the available file 36e1051a39Sopenharmony_cihandlers as is, with no PEM name or headers. 37e1051a39Sopenharmony_ci 38e1051a39Sopenharmony_ciEach file handler is expected to handle PEM and non-PEM content as 39e1051a39Sopenharmony_ciappropriate. Some may refuse non-PEM content for the sake of 40e1051a39Sopenharmony_cideterminism (for example, there are keys out in the wild that are 41e1051a39Sopenharmony_cirepresented as an ASN.1 OCTET STRING. In raw form, it's not easily 42e1051a39Sopenharmony_cipossible to distinguish those from any other data coming as an ASN.1 43e1051a39Sopenharmony_ciOCTET STRING, so such keys would naturally be accepted as PEM files 44e1051a39Sopenharmony_cionly). 45e1051a39Sopenharmony_ci 46e1051a39Sopenharmony_ci=head1 NOTES 47e1051a39Sopenharmony_ci 48e1051a39Sopenharmony_ciWhen needed, the 'file' scheme loader will require a pass phrase by 49e1051a39Sopenharmony_ciusing the B<UI_METHOD> that was passed via OSSL_STORE_open(). 50e1051a39Sopenharmony_ciThis pass phrase is expected to be UTF-8 encoded, anything else will 51e1051a39Sopenharmony_cigive an undefined result. 52e1051a39Sopenharmony_ciThe files made accessible through this loader are expected to be 53e1051a39Sopenharmony_cistandard compliant with regards to pass phrase encoding. 54e1051a39Sopenharmony_ciFiles that aren't should be re-generated with a correctly encoded pass 55e1051a39Sopenharmony_ciphrase. 56e1051a39Sopenharmony_ciSee L<passphrase-encoding(7)> for more information. 57e1051a39Sopenharmony_ci 58e1051a39Sopenharmony_ci=head1 SEE ALSO 59e1051a39Sopenharmony_ci 60e1051a39Sopenharmony_ciL<ossl_store(7)>, L<passphrase-encoding(7)> 61e1051a39Sopenharmony_ci 62e1051a39Sopenharmony_ci=head1 COPYRIGHT 63e1051a39Sopenharmony_ci 64e1051a39Sopenharmony_ciCopyright 2018 The OpenSSL Project Authors. All Rights Reserved. 65e1051a39Sopenharmony_ci 66e1051a39Sopenharmony_ciLicensed under the Apache License 2.0 (the "License"). You may not use 67e1051a39Sopenharmony_cithis file except in compliance with the License. You can obtain a copy 68e1051a39Sopenharmony_ciin the file LICENSE in the source distribution or at 69e1051a39Sopenharmony_ciL<https://www.openssl.org/source/license.html>. 70e1051a39Sopenharmony_ci 71e1051a39Sopenharmony_ci=cut 72