diff options
author | schwarze <> | 2016-11-03 15:20:36 +0000 |
---|---|---|
committer | schwarze <> | 2016-11-03 15:20:36 +0000 |
commit | 60d59582dc15b87539a8dc135d2baf8a181ff37b (patch) | |
tree | 1ce08c06c8b7c83fa9592d241cddc0d7b95ce2ce /src/lib/libcrypto/man/PKCS7_sign_add_signer.3 | |
parent | 05002f727738ee445b4a9367f51474995302c6a6 (diff) | |
download | openbsd-60d59582dc15b87539a8dc135d2baf8a181ff37b.tar.gz openbsd-60d59582dc15b87539a8dc135d2baf8a181ff37b.tar.bz2 openbsd-60d59582dc15b87539a8dc135d2baf8a181ff37b.zip |
convert PEM and PKCS manuals from pod to mdoc
Diffstat (limited to 'src/lib/libcrypto/man/PKCS7_sign_add_signer.3')
-rw-r--r-- | src/lib/libcrypto/man/PKCS7_sign_add_signer.3 | 128 |
1 files changed, 128 insertions, 0 deletions
diff --git a/src/lib/libcrypto/man/PKCS7_sign_add_signer.3 b/src/lib/libcrypto/man/PKCS7_sign_add_signer.3 new file mode 100644 index 0000000000..b20b6b91e6 --- /dev/null +++ b/src/lib/libcrypto/man/PKCS7_sign_add_signer.3 | |||
@@ -0,0 +1,128 @@ | |||
1 | .Dd $Mdocdate: November 3 2016 $ | ||
2 | .Dt PKCS7_SIGN_ADD_SIGNER 3 | ||
3 | .Os | ||
4 | .Sh NAME | ||
5 | .Nm PKCS7_sign_add_signer | ||
6 | .Nd add a signer PKCS7 signed data structure | ||
7 | .Sh SYNOPSIS | ||
8 | .In openssl/pkcs7.h | ||
9 | .Ft PKCS7_SIGNER_INFO * | ||
10 | .Fo PKCS7_sign_add_signer | ||
11 | .Fa "PKCS7 *p7" | ||
12 | .Fa "X509 *signcert" | ||
13 | .Fa "EVP_PKEY *pkey" | ||
14 | .Fa "const EVP_MD *md" | ||
15 | .Fa "int flags" | ||
16 | .Fc | ||
17 | .Sh DESCRIPTION | ||
18 | .Fn PKCS7_sign_add_signer | ||
19 | adds a signer with certificate | ||
20 | .Fa signcert | ||
21 | and private key | ||
22 | .Fa pkey | ||
23 | using message digest | ||
24 | .Fa md | ||
25 | to a | ||
26 | .Vt PKCS7 | ||
27 | signed data structure | ||
28 | .Fa p7 . | ||
29 | .Pp | ||
30 | The | ||
31 | .Vt PKCS7 | ||
32 | structure should be obtained from an initial call to | ||
33 | .Xr PKCS7_sign 3 | ||
34 | with the flag | ||
35 | .Dv PKCS7_PARTIAL | ||
36 | set, or in the case or re-signing, a valid | ||
37 | .Vt PKCS7 | ||
38 | signed data structure. | ||
39 | .Pp | ||
40 | If the | ||
41 | .Fa md | ||
42 | parameter is | ||
43 | .Dv NULL , | ||
44 | then the default digest for the public key algorithm will be used. | ||
45 | .Pp | ||
46 | Unless the | ||
47 | .Dv PKCS7_REUSE_DIGEST | ||
48 | flag is set, the returned | ||
49 | .Dv PKCS7 | ||
50 | structure is not complete and must be | ||
51 | finalized either by streaming (if applicable) or by a call to | ||
52 | .Xr PKCS7_final 3 . | ||
53 | .Pp | ||
54 | The main purpose of this function is to provide finer control over a | ||
55 | PKCS#7 signed data structure where the simpler | ||
56 | .Xr PKCS7_sign 3 | ||
57 | function defaults are not appropriate, for example if multiple | ||
58 | signers or non default digest algorithms are needed. | ||
59 | .Pp | ||
60 | Any of the following flags (OR'ed together) can be passed in the | ||
61 | .Fa flags | ||
62 | parameter. | ||
63 | .Pp | ||
64 | If | ||
65 | .Dv PKCS7_REUSE_DIGEST | ||
66 | is set, then an attempt is made to copy the content digest value from the | ||
67 | .Vt PKCS7 | ||
68 | structure: to add a signer to an existing structure. | ||
69 | An error occurs if a matching digest value cannot be found to copy. | ||
70 | The returned | ||
71 | .Vt PKCS7 | ||
72 | structure will be valid and finalized when this flag is set. | ||
73 | .Pp | ||
74 | If | ||
75 | .Dv PKCS7_PARTIAL | ||
76 | is set in addition to | ||
77 | .Dv PKCS7_REUSE_DIGEST , | ||
78 | then the | ||
79 | .Dv PKCS7_SIGNER_INO | ||
80 | structure will not be finalized, so additional attributes can be added. | ||
81 | In this case an explicit call to | ||
82 | .Xr PKCS7_SIGNER_INFO_sign 3 | ||
83 | is needed to finalize it. | ||
84 | .Pp | ||
85 | If | ||
86 | .Dv PKCS7_NOCERTS | ||
87 | is set, the signer's certificate will not be included in the | ||
88 | .Vt PKCS7 | ||
89 | structure, the signer's certificate must still be supplied in the | ||
90 | .Fa signcert | ||
91 | parameter though. | ||
92 | This can reduce the size of the signature if the signers certificate can | ||
93 | be obtained by other means: for example a previously signed message. | ||
94 | .Pp | ||
95 | The signedData structure includes several PKCS#7 authenticatedAttributes | ||
96 | including the signing time, the PKCS#7 content type and the supported | ||
97 | list of ciphers in an SMIMECapabilities attribute. | ||
98 | If | ||
99 | .Dv PKCS7_NOATTR | ||
100 | is set, then no authenticatedAttributes will be used. | ||
101 | If | ||
102 | .Dv PKCS7_NOSMIMECAP | ||
103 | is set, then just the SMIMECapabilities are omitted. | ||
104 | .Pp | ||
105 | If present, the SMIMECapabilities attribute indicates support for the | ||
106 | following algorithms: triple DES, 128 bit RC2, 64 bit RC2, DES and 40 | ||
107 | bit RC2. | ||
108 | If any of these algorithms is disabled, then it will not be included. | ||
109 | .Pp | ||
110 | .Fn PKCS7_sign_add_signer | ||
111 | returns an internal pointer to the | ||
112 | .Vt PKCS7_SIGNER_INFO | ||
113 | structure just added, this can be used to set additional attributes | ||
114 | before it is finalized. | ||
115 | .Sh RETURN VALUES | ||
116 | .Fn PKCS7_sign_add_signer | ||
117 | returns an internal pointer to the | ||
118 | .Vt PKCS7_SIGNER_INFO | ||
119 | structure just added or | ||
120 | .Dv NULL | ||
121 | if an error occurs. | ||
122 | .Sh SEE ALSO | ||
123 | .Xr ERR_get_error 3 , | ||
124 | .Xr PKCS7_final 3 , | ||
125 | .Xr PKCS7_sign 3 | ||
126 | .Sh HISTORY | ||
127 | .Xr PKCS7_sign_add_signer 3 | ||
128 | was added to OpenSSL 1.0.0. | ||