diff options
Diffstat (limited to 'src/lib/libcrypto/man/CMS_add1_signer.3')
| -rw-r--r-- | src/lib/libcrypto/man/CMS_add1_signer.3 | 161 | 
1 files changed, 0 insertions, 161 deletions
| diff --git a/src/lib/libcrypto/man/CMS_add1_signer.3 b/src/lib/libcrypto/man/CMS_add1_signer.3 deleted file mode 100644 index 403ec5b8e3..0000000000 --- a/src/lib/libcrypto/man/CMS_add1_signer.3 +++ /dev/null | |||
| @@ -1,161 +0,0 @@ | |||
| 1 | .Dd $Mdocdate: November 11 2015 $ | ||
| 2 | .Dt CMS_SIGN_ADD1_SIGNER 3 | ||
| 3 | .Os | ||
| 4 | .Sh NAME | ||
| 5 | .Nm CMS_add1_signer , | ||
| 6 | .Nm CMS_SignerInfo_sign | ||
| 7 | .Nd add a signer to a CMS_ContentInfo signed data structure | ||
| 8 | .Sh SYNOPSIS | ||
| 9 | .In openssl/cms.h | ||
| 10 | .Ft CMS_SignerInfo * | ||
| 11 | .Fo CMS_add1_signer | ||
| 12 | .Fa "CMS_ContentInfo *cms" | ||
| 13 | .Fa "X509 *signcert" | ||
| 14 | .Fa "EVP_PKEY *pkey" | ||
| 15 | .Fa "const EVP_MD *md" | ||
| 16 | .Fa "unsigned int flags" | ||
| 17 | .Fc | ||
| 18 | .Ft int | ||
| 19 | .Fo CMS_SignerInfo_sign | ||
| 20 | .Fa "CMS_SignerInfo *si" | ||
| 21 | .Fc | ||
| 22 | .Sh DESCRIPTION | ||
| 23 | .Fn CMS_add1_signer | ||
| 24 | adds a signer with certificate | ||
| 25 | .Fa signcert | ||
| 26 | and private key | ||
| 27 | .Fa pkey | ||
| 28 | using message digest | ||
| 29 | .Fa md | ||
| 30 | to the | ||
| 31 | .Vt CMS_ContentInfo | ||
| 32 | SignedData structure | ||
| 33 | .Fa cms . | ||
| 34 | .Pp | ||
| 35 | The | ||
| 36 | .Vt CMS_ContentInfo | ||
| 37 | structure should be obtained from an initial call to | ||
| 38 | .Xr CMS_sign 3 | ||
| 39 | with the flag | ||
| 40 | .Dv CMS_PARTIAL | ||
| 41 | set or in the case or re-signing a valid | ||
| 42 | .Vt CMS_ContentInfo | ||
| 43 | SignedData structure. | ||
| 44 | .Pp | ||
| 45 | If the | ||
| 46 | .Fa md | ||
| 47 | parameter is | ||
| 48 | .Dv NULL , | ||
| 49 | then the default digest for the public key algorithm will be used. | ||
| 50 | .Pp | ||
| 51 | Unless the | ||
| 52 | .Dv CMS_REUSE_DIGEST | ||
| 53 | flag is set, the returned | ||
| 54 | .Vt CMS_ContentInfo | ||
| 55 | structure is not complete and must be finalized either by streaming | ||
| 56 | (if applicable) or a call to | ||
| 57 | .Xr CMS_final 3 . | ||
| 58 | .Pp | ||
| 59 | The | ||
| 60 | .Fn CMS_SignerInfo_sign | ||
| 61 | function will explicitly sign a | ||
| 62 | .Vt CMS_SignerInfo | ||
| 63 | structure, its main use is when | ||
| 64 | .Dv CMS_REUSE_DIGEST | ||
| 65 | and | ||
| 66 | .Dv CMS_PARTIAL | ||
| 67 | flags are both set. | ||
| 68 | .Sh NOTES | ||
| 69 | The main purpose of | ||
| 70 | .Fn CMS_add1_signer | ||
| 71 | is to provide finer control over a CMS signed data structure where the | ||
| 72 | simpler | ||
| 73 | .Xr CMS_sign 3 | ||
| 74 | function defaults are not appropriate. | ||
| 75 | For example if multiple signers or non default digest algorithms are | ||
| 76 | needed. | ||
| 77 | New attributes can also be added using the returned | ||
| 78 | .Vt CMS_SignerInfo | ||
| 79 | structure and the CMS attribute utility functions or the CMS signed | ||
| 80 | receipt request functions. | ||
| 81 | .Pp | ||
| 82 | Any of the following flags (OR'ed together) can be passed in the | ||
| 83 | .Fa flags | ||
| 84 | parameter. | ||
| 85 | .Pp | ||
| 86 | If | ||
| 87 | .Dv CMS_REUSE_DIGEST | ||
| 88 | is set, then an attempt is made to copy the content digest value from the | ||
| 89 | .Dv CMS_ContentInfo | ||
| 90 | structure: to add a signer to an existing structure. | ||
| 91 | An error occurs if a matching digest value cannot be found to copy. | ||
| 92 | The returned | ||
| 93 | .Dv CMS_ContentInfo | ||
| 94 | structure will be valid and finalized when this flag is set. | ||
| 95 | .Pp | ||
| 96 | If | ||
| 97 | .Dv CMS_PARTIAL | ||
| 98 | is set in addition to | ||
| 99 | .Dv CMS_REUSE_DIGEST | ||
| 100 | then the | ||
| 101 | .Vt CMS_SignerInfo | ||
| 102 | structure will not be finalized so additional attributes can be added. | ||
| 103 | In this case an explicit call to | ||
| 104 | .Fn CMS_SignerInfo_sign | ||
| 105 | is needed to finalize it. | ||
| 106 | .Pp | ||
| 107 | If | ||
| 108 | .Dv CMS_NOCERTS | ||
| 109 | is set, the signer's certificate will not be included in the | ||
| 110 | .Vt CMS_ContentInfo | ||
| 111 | structure, the signer's certificate must still be supplied in the | ||
| 112 | .Fa signcert | ||
| 113 | parameter though. | ||
| 114 | This can reduce the size of the signature if the signers certificate can | ||
| 115 | be obtained by other means: for example a previously signed message. | ||
| 116 | .Pp | ||
| 117 | The SignedData structure includes several CMS signedAttributes including | ||
| 118 | the signing time, the CMS content type and the supported list of ciphers | ||
| 119 | in an SMIMECapabilities attribute. | ||
| 120 | If | ||
| 121 | .Dv CMS_NOATTR | ||
| 122 | is set, then no signedAttributes will be used. | ||
| 123 | If | ||
| 124 | .Dv CMS_NOSMIMECAP | ||
| 125 | is set, then just the SMIMECapabilities are omitted. | ||
| 126 | .Pp | ||
| 127 | OpenSSL will by default identify signing certificates using issuer name | ||
| 128 | and serial number. | ||
| 129 | If | ||
| 130 | .Dv CMS_USE_KEYID | ||
| 131 | is set, it will use the subject key identifier value instead. | ||
| 132 | An error occurs if the signing certificate does not have a subject key | ||
| 133 | identifier extension. | ||
| 134 | .Pp | ||
| 135 | If present, the SMIMECapabilities attribute indicates support for the | ||
| 136 | following algorithms in preference order: 256 bit AES, Gost R3411-94, | ||
| 137 | Gost 28147-89, 192 bit AES, 128 bit AES, triple DES, 128 bit RC2, 64 bit | ||
| 138 | RC2, DES and 40 bit RC2. | ||
| 139 | If any of these algorithms is not available then it will not be | ||
| 140 | included: for example the GOST algorithms will not be included if | ||
| 141 | the GOST ENGINE is not loaded. | ||
| 142 | .Pp | ||
| 143 | .Fn CMS_add1_signer | ||
| 144 | returns an internal pointer to the | ||
| 145 | .Dv CMS_SignerInfo | ||
| 146 | structure just added. | ||
| 147 | This can be used to set additional attributes before it is finalized. | ||
| 148 | .Sh RETURN VALUES | ||
| 149 | .Fn CMS_add1_signer | ||
| 150 | returns an internal pointer to the | ||
| 151 | .Vt CMS_SignerInfo | ||
| 152 | structure just added or | ||
| 153 | .Dv NULL | ||
| 154 | if an error occurs. | ||
| 155 | .Sh SEE ALSO | ||
| 156 | .Xr CMS_final 3 , | ||
| 157 | .Xr CMS_sign 3 , | ||
| 158 | .Xr ERR_get_error 3 | ||
| 159 | .Sh HISTORY | ||
| 160 | .Fn CMS_add1_signer | ||
| 161 | was added to OpenSSL 0.9.8. | ||
