diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/man/CMS_add1_recipient_cert.3 | 115 |
1 files changed, 115 insertions, 0 deletions
diff --git a/src/lib/libcrypto/man/CMS_add1_recipient_cert.3 b/src/lib/libcrypto/man/CMS_add1_recipient_cert.3 new file mode 100644 index 0000000000..4e848446a6 --- /dev/null +++ b/src/lib/libcrypto/man/CMS_add1_recipient_cert.3 | |||
| @@ -0,0 +1,115 @@ | |||
| 1 | .Dd $Mdocdate: November 11 2015 $ | ||
| 2 | .Dt CMS_ADD1_RECIPIENT_CERT 3 | ||
| 3 | .Os | ||
| 4 | .Sh NAME | ||
| 5 | .Nm CMS_add1_recipient_cert , | ||
| 6 | .Nm CMS_add0_recipient_key | ||
| 7 | .Nd add recipients to a CMS enveloped data structure | ||
| 8 | .Sh SYNOPSIS | ||
| 9 | .In openssl/cms.h | ||
| 10 | .Ft CMS_RecipientInfo * | ||
| 11 | .Fo CMS_add1_recipient_cert | ||
| 12 | .Fa "CMS_ContentInfo *cms" | ||
| 13 | .Fa "X509 *recip" | ||
| 14 | .Fa "unsigned int flags" | ||
| 15 | .Fc | ||
| 16 | .Ft CMS_RecipientInfo * | ||
| 17 | .Fo CMS_add0_recipient_key | ||
| 18 | .Fa "CMS_ContentInfo *cms" | ||
| 19 | .Fa "int nid" | ||
| 20 | .Fa "unsigned char *key" | ||
| 21 | .Fa "size_t keylen" | ||
| 22 | .Fa "unsigned char *id" | ||
| 23 | .Fa "size_t idlen" | ||
| 24 | .Fa "ASN1_GENERALIZEDTIME *date" | ||
| 25 | .Fa "ASN1_OBJECT *otherTypeId" | ||
| 26 | .Fa "ASN1_TYPE *otherType" | ||
| 27 | .Fc | ||
| 28 | .Sh DESCRIPTION | ||
| 29 | .Fn CMS_add1_recipient_cert | ||
| 30 | adds recipient | ||
| 31 | .Fa recip | ||
| 32 | to the | ||
| 33 | .Vt CMS_ContentInfo | ||
| 34 | enveloped data structure | ||
| 35 | .Fa cms | ||
| 36 | as a KeyTransRecipientInfo structure. | ||
| 37 | .Pp | ||
| 38 | .Fn CMS_add0_recipient_key | ||
| 39 | adds the symmetric key | ||
| 40 | .Fa key | ||
| 41 | of length | ||
| 42 | .Fa keylen | ||
| 43 | using the wrapping algorithm | ||
| 44 | .Fa nid , | ||
| 45 | identifier | ||
| 46 | .Fa id | ||
| 47 | of length | ||
| 48 | .Fa idlen | ||
| 49 | and optional values | ||
| 50 | .Fa date , | ||
| 51 | .Fa otherTypeId , | ||
| 52 | and | ||
| 53 | .Fa otherType | ||
| 54 | to the | ||
| 55 | .Vt CMS_ContentInfo | ||
| 56 | enveloped data structure | ||
| 57 | .Fa cms | ||
| 58 | as a KEKRecipientInfo structure. | ||
| 59 | .Pp | ||
| 60 | The | ||
| 61 | .Vt CMS_ContentInfo | ||
| 62 | structure should be obtained from an initial call to | ||
| 63 | .Xr CMS_encrypt 3 | ||
| 64 | with the flag | ||
| 65 | .Dv CMS_PARTIAL | ||
| 66 | set. | ||
| 67 | .Sh NOTES | ||
| 68 | The main purpose of this function is to provide finer control over a CMS | ||
| 69 | enveloped data structure where the simpler | ||
| 70 | .Xr CMS_encrypt 3 | ||
| 71 | function defaults are not appropriate. | ||
| 72 | For example if one or more KEKRecipientInfo structures need to be added. | ||
| 73 | New attributes can also be added using the returned | ||
| 74 | .Vt CMS_RecipientInfo | ||
| 75 | structure and the CMS attribute utility functions. | ||
| 76 | .Pp | ||
| 77 | OpenSSL will by default identify recipient certificates using issuer | ||
| 78 | name and serial number. | ||
| 79 | If | ||
| 80 | .Dv CMS_USE_KEYID | ||
| 81 | is set, it will use the subject key identifier value instead. | ||
| 82 | An error occurs if all recipient certificates do not have a subject key | ||
| 83 | identifier extension. | ||
| 84 | .Pp | ||
| 85 | Currently only AES based key wrapping algorithms are supported for | ||
| 86 | .Fa nid , | ||
| 87 | specifically: | ||
| 88 | .Dv NID_id_aes128_wrap , | ||
| 89 | .Dv NID_id_aes192_wrap , | ||
| 90 | and | ||
| 91 | .Dv NID_id_aes256_wrap . | ||
| 92 | If | ||
| 93 | .Fa nid | ||
| 94 | is set to | ||
| 95 | .Dv NID_undef , | ||
| 96 | then an AES wrap algorithm will be used consistent with | ||
| 97 | .Fa keylen . | ||
| 98 | .Sh RETURN VALUES | ||
| 99 | .Fn CMS_add1_recipient_cert | ||
| 100 | and | ||
| 101 | .Fn CMS_add0_recipient_key | ||
| 102 | return an internal pointer to the | ||
| 103 | .Vt CMS_RecipientInfo | ||
| 104 | structure just added or | ||
| 105 | .Dv NULL | ||
| 106 | if an error occurs. | ||
| 107 | .Sh SEE ALSO | ||
| 108 | .Xr CMS_decrypt 3 , | ||
| 109 | .Xr CMS_final 3 , | ||
| 110 | .Xr ERR_get_error 3 | ||
| 111 | .Sh HISTORY | ||
| 112 | .Fn CMS_add1_recipient_cert | ||
| 113 | and | ||
| 114 | .Fn CMS_add0_recipient_key | ||
| 115 | were added to OpenSSL 0.9.8. | ||
