13784276b1d5bdfcaf3d09feaf5bdce28c77c2a5
[openssl.git] / doc / man7 / ossl_store-file.pod
1 =pod
2
3 =begin comment
4
5 This is a recommended way to describe OSSL_STORE loaders,
6 "ossl_store-{name}", where {name} is replaced with the name of the
7 scheme it implements, in man section 7.
8
9 =end comment
10
11 =head1 NAME
12
13 ossl_store-file - The store 'file' scheme loader
14
15 =head1 SYNOPSIS
16
17 =for comment generic
18
19 #include <openssl/store.h>
20
21 =head1 DESCRIPTION
22
23 Support for the 'file' scheme is built into C<libcrypto>.
24 Since files come in all kinds of formats and content types, the 'file'
25 scheme has its own layer of functionality called "file handlers",
26 which are used to try to decode diverse types of file contents.
27
28 In case a file is formatted as PEM, each called file handler receives
29 the PEM name (everything following any 'C<-----BEGIN >') as well as
30 possible PEM headers, together with the decoded PEM body.  Since PEM
31 formatted files can contain more than one object, the file handlers
32 are called upon for each such object.
33
34 If the file isn't determined to be formatted as PEM, the content is
35 loaded in raw form in its entirety and passed to the available file
36 handlers as is, with no PEM name or headers.
37
38 Each file handler is expected to handle PEM and non-PEM content as
39 appropriate.  Some may refuse non-PEM content for the sake of
40 determinism (for example, there are keys out in the wild that are
41 represented as an ASN.1 OCTET STRING.  In raw form, it's not easily
42 possible to distinguish those from any other data coming as an ASN.1
43 OCTET STRING, so such keys would naturally be accepted as PEM files
44 only).
45
46 =head1 NOTES
47
48 When needed, the 'file' scheme loader will require a pass phrase by
49 using the C<UI_METHOD> that was passed via OSSL_STORE_open().
50 This pass phrase is used as it is, which may present some challenge
51 when the file that's loaded contains a PKCS#12 object.
52 See L<passphrase-encoding(7)> for more information.
53
54 =begin comment
55
56 The treatment of pass phrases is currently being worked on and may
57 change.
58
59 =end comment
60
61 =head1 SEE ALSO
62
63 L<ossl_store(7)>, L<passphrase-encoding(7)>
64
65 =head1 COPYRIGHT
66
67 Copyright 2018 The OpenSSL Project Authors. All Rights Reserved.
68
69 Licensed under the OpenSSL license (the "License").  You may not use
70 this file except in compliance with the License.  You can obtain a copy
71 in the file LICENSE in the source distribution or at
72 L<https://www.openssl.org/source/license.html>.
73
74 =cut