diff options
| author | schwarze <> | 2016-12-14 02:03:50 +0000 |
|---|---|---|
| committer | schwarze <> | 2016-12-14 02:03:50 +0000 |
| commit | 14b9b01b2b81fd7eccea9dd3fc84a79407c285a2 (patch) | |
| tree | 60f525c97efb22169c410dbc4b537594af7b76cc /src | |
| parent | 9c26438891836e1d7379d33470c61dc3a21d6af0 (diff) | |
| download | openbsd-14b9b01b2b81fd7eccea9dd3fc84a79407c285a2.tar.gz openbsd-14b9b01b2b81fd7eccea9dd3fc84a79407c285a2.tar.bz2 openbsd-14b9b01b2b81fd7eccea9dd3fc84a79407c285a2.zip | |
New manuals ESS_SIGNING_CERT_new(3) and TS_REQ_new(3) written
from scratch. All these functions are listed in <openssl/ts.h>
and in OpenSSL doc/man3/X509_dup.pod.
Note that the OpenSSL documentation specifies the wrong header file.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/man/ESS_SIGNING_CERT_new.3 | 107 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/Makefile | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/TS_REQ_new.3 | 169 |
3 files changed, 279 insertions, 1 deletions
diff --git a/src/lib/libcrypto/man/ESS_SIGNING_CERT_new.3 b/src/lib/libcrypto/man/ESS_SIGNING_CERT_new.3 new file mode 100644 index 0000000000..d942a03e34 --- /dev/null +++ b/src/lib/libcrypto/man/ESS_SIGNING_CERT_new.3 | |||
| @@ -0,0 +1,107 @@ | |||
| 1 | .\" $OpenBSD: ESS_SIGNING_CERT_new.3,v 1.1 2016/12/14 02:03:50 schwarze Exp $ | ||
| 2 | .\" | ||
| 3 | .\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org> | ||
| 4 | .\" | ||
| 5 | .\" Permission to use, copy, modify, and distribute this software for any | ||
| 6 | .\" purpose with or without fee is hereby granted, provided that the above | ||
| 7 | .\" copyright notice and this permission notice appear in all copies. | ||
| 8 | .\" | ||
| 9 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 10 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 11 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 12 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 13 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 16 | .\" | ||
| 17 | .Dd $Mdocdate: December 14 2016 $ | ||
| 18 | .Dt ESS_SIGNING_CERT_NEW 3 | ||
| 19 | .Os | ||
| 20 | .Sh NAME | ||
| 21 | .Nm ESS_SIGNING_CERT_new , | ||
| 22 | .Nm ESS_SIGNING_CERT_free , | ||
| 23 | .Nm ESS_CERT_ID_new , | ||
| 24 | .Nm ESS_CERT_ID_free , | ||
| 25 | .Nm ESS_ISSUER_SERIAL_new , | ||
| 26 | .Nm ESS_ISSUER_SERIAL_free | ||
| 27 | .Nd signing certificates for S/MIME | ||
| 28 | .Sh SYNOPSIS | ||
| 29 | .In openssl/ts.h | ||
| 30 | .Ft ESS_SIGNING_CERT * | ||
| 31 | .Fn ESS_SIGNING_CERT_new void | ||
| 32 | .Ft void | ||
| 33 | .Fn ESS_SIGNING_CERT_free "ESS_SIGNING_CERT *signing_cert" | ||
| 34 | .Ft ESS_CERT_ID * | ||
| 35 | .Fn ESS_CERT_ID_new void | ||
| 36 | .Ft void | ||
| 37 | .Fn ESS_CERT_ID_free "ESS_CERT_ID *cert_id" | ||
| 38 | .Ft ESS_ISSUER_SERIAL * | ||
| 39 | .Fn ESS_ISSUER_SERIAL_new void | ||
| 40 | .Ft void | ||
| 41 | .Fn ESS_ISSUER_SERIAL_free "ESS_ISSUER_SERIAL *issuer_serial" | ||
| 42 | .Sh DESCRIPTION | ||
| 43 | The signing certificate may be included in the signedAttributes | ||
| 44 | field of a SignerInfo structure to mitigate simple substitution and | ||
| 45 | re-issue attacks. | ||
| 46 | .Pp | ||
| 47 | .Fn ESS_SIGNING_CERT_new | ||
| 48 | allocates and initializes an empty | ||
| 49 | .Vt ESS_SIGNING_CERT | ||
| 50 | object, representing an ASN.1 SigningCertificate structure | ||
| 51 | defined in RFC 2634 section 5.4. | ||
| 52 | It can hold the certificate used for signing the data, | ||
| 53 | additional authorization certificates that can be used during | ||
| 54 | validation, and policies applying to the certificate. | ||
| 55 | .Fn ESS_SIGNING_CERT_free | ||
| 56 | frees | ||
| 57 | .Fa signing_cert . | ||
| 58 | .Pp | ||
| 59 | .Fn ESS_CERT_ID_new | ||
| 60 | allocates and initializes an empty | ||
| 61 | .Vt ESS_CERT_ID | ||
| 62 | object, representing an ASN.1 ESSCertID structure | ||
| 63 | defined in RFC 2634 section 5.4.1. | ||
| 64 | Such objects can be used inside | ||
| 65 | .Vt ESS_SIGNING_CERT | ||
| 66 | objects, and each one can hold an SHA1 hash of one certificate. | ||
| 67 | .Fn ESS_CERT_ID_free | ||
| 68 | frees | ||
| 69 | .Fa cert_id . | ||
| 70 | .Pp | ||
| 71 | .Fn ESS_ISSUER_SERIAL_new | ||
| 72 | allocates and initializes an empty | ||
| 73 | .Vt ESS_ISSUER_SERIAL | ||
| 74 | object, representing an ASN.1 IssuerSerial structure | ||
| 75 | defined in RFC 2634 section 5.4.1. | ||
| 76 | It can hold an issuer name and a serial number and can be included in an | ||
| 77 | .Vt ESS_CERT_ID | ||
| 78 | object, which is useful for additional authorization certificates, | ||
| 79 | but redundant for the signing certificate itself. | ||
| 80 | .Fn ESS_ISSUER_SERIAL_free | ||
| 81 | frees | ||
| 82 | .Fa issuer_serial . | ||
| 83 | .Sh RETURN VALUES | ||
| 84 | .Fn ESS_SIGNING_CERT_new , | ||
| 85 | .Fn ESS_CERT_ID_new , | ||
| 86 | and | ||
| 87 | .Fn ESS_ISSUER_SERIAL_new | ||
| 88 | return the new | ||
| 89 | .Vt ESS_SIGNING_CERT , | ||
| 90 | .Vt ESS_CERT_ID , | ||
| 91 | or | ||
| 92 | .Vt ESS_ISSUER_SERIAL | ||
| 93 | object, respectively, or | ||
| 94 | .Dv NULL | ||
| 95 | if an error occurred. | ||
| 96 | .Sh STANDARDS | ||
| 97 | RFC 2634: Enhanced Security Services for S/MIME, | ||
| 98 | section 5: Signing Certificate Attribute | ||
| 99 | .Pp | ||
| 100 | Note that RFC 2634 has been updated by RFC 5035: | ||
| 101 | Enhanced Security Services (ESS) Update: | ||
| 102 | Adding CertID Algorithm Agility. | ||
| 103 | But the current implementation only supports the | ||
| 104 | Signing Certificate Attribute Definition Version 1 | ||
| 105 | according to RFC 2634, not the | ||
| 106 | Signing Certificate Attribute Definition Version 2 | ||
| 107 | according to RFC 5035. | ||
diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile index 02895f010a..426b3c4c9b 100644 --- a/src/lib/libcrypto/man/Makefile +++ b/src/lib/libcrypto/man/Makefile | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # $OpenBSD: Makefile,v 1.77 2016/12/13 20:41:35 schwarze Exp $ | 1 | # $OpenBSD: Makefile,v 1.78 2016/12/14 02:03:50 schwarze Exp $ |
| 2 | 2 | ||
| 3 | .include <bsd.own.mk> | 3 | .include <bsd.own.mk> |
| 4 | 4 | ||
| @@ -94,6 +94,7 @@ MAN= \ | |||
| 94 | ERR_put_error.3 \ | 94 | ERR_put_error.3 \ |
| 95 | ERR_remove_state.3 \ | 95 | ERR_remove_state.3 \ |
| 96 | ERR_set_mark.3 \ | 96 | ERR_set_mark.3 \ |
| 97 | ESS_SIGNING_CERT_new.3 \ | ||
| 97 | EVP_AEAD_CTX_init.3 \ | 98 | EVP_AEAD_CTX_init.3 \ |
| 98 | EVP_BytesToKey.3 \ | 99 | EVP_BytesToKey.3 \ |
| 99 | EVP_DigestInit.3 \ | 100 | EVP_DigestInit.3 \ |
| @@ -172,6 +173,7 @@ MAN= \ | |||
| 172 | SHA1.3 \ | 173 | SHA1.3 \ |
| 173 | SMIME_read_PKCS7.3 \ | 174 | SMIME_read_PKCS7.3 \ |
| 174 | SMIME_write_PKCS7.3 \ | 175 | SMIME_write_PKCS7.3 \ |
| 176 | TS_REQ_new.3 \ | ||
| 175 | UI_new.3 \ | 177 | UI_new.3 \ |
| 176 | X509V3_get_d2i.3 \ | 178 | X509V3_get_d2i.3 \ |
| 177 | X509_ALGOR_dup.3 \ | 179 | X509_ALGOR_dup.3 \ |
diff --git a/src/lib/libcrypto/man/TS_REQ_new.3 b/src/lib/libcrypto/man/TS_REQ_new.3 new file mode 100644 index 0000000000..0613279b57 --- /dev/null +++ b/src/lib/libcrypto/man/TS_REQ_new.3 | |||
| @@ -0,0 +1,169 @@ | |||
| 1 | .\" $OpenBSD: TS_REQ_new.3,v 1.1 2016/12/14 02:03:50 schwarze Exp $ | ||
| 2 | .\" | ||
| 3 | .\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org> | ||
| 4 | .\" | ||
| 5 | .\" Permission to use, copy, modify, and distribute this software for any | ||
| 6 | .\" purpose with or without fee is hereby granted, provided that the above | ||
| 7 | .\" copyright notice and this permission notice appear in all copies. | ||
| 8 | .\" | ||
| 9 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 10 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 11 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 12 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 13 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 16 | .\" | ||
| 17 | .Dd $Mdocdate: December 14 2016 $ | ||
| 18 | .Dt TS_REQ_NEW 3 | ||
| 19 | .Os | ||
| 20 | .Sh NAME | ||
| 21 | .Nm TS_REQ_new , | ||
| 22 | .Nm TS_REQ_free , | ||
| 23 | .Nm TS_RESP_new , | ||
| 24 | .Nm TS_RESP_free , | ||
| 25 | .Nm TS_STATUS_INFO_new , | ||
| 26 | .Nm TS_STATUS_INFO_free , | ||
| 27 | .Nm TS_TST_INFO_new , | ||
| 28 | .Nm TS_TST_INFO_free , | ||
| 29 | .Nm TS_ACCURACY_new , | ||
| 30 | .Nm TS_ACCURACY_free , | ||
| 31 | .Nm TS_MSG_IMPRINT_new , | ||
| 32 | .Nm TS_MSG_IMPRINT_free , | ||
| 33 | .Nd X.509 time-stamp protocol | ||
| 34 | .Sh SYNOPSIS | ||
| 35 | .In openssl/ts.h | ||
| 36 | .Ft TS_REQ * | ||
| 37 | .Fn TS_REQ_new void | ||
| 38 | .Ft void | ||
| 39 | .Fn TS_REQ_free "TS_REQ *req" | ||
| 40 | .Ft TS_RESP * | ||
| 41 | .Fn TS_RESP_new void | ||
| 42 | .Ft void | ||
| 43 | .Fn TS_RESP_free "TS_RESP *resp" | ||
| 44 | .Ft TS_STATUS_INFO * | ||
| 45 | .Fn TS_STATUS_INFO_new void | ||
| 46 | .Ft void | ||
| 47 | .Fn TS_STATUS_INFO_free "TS_STATUS_INFO *status" | ||
| 48 | .Ft TS_TST_INFO * | ||
| 49 | .Fn TS_TST_INFO_new void | ||
| 50 | .Ft void | ||
| 51 | .Fn TS_TST_INFO_free "TS_TST_INFO *token" | ||
| 52 | .Ft TS_ACCURACY * | ||
| 53 | .Fn TS_ACCURACY_new void | ||
| 54 | .Ft void | ||
| 55 | .Fn TS_ACCURACY_free "TS_ACCURACY *accuracy" | ||
| 56 | .Ft TS_MSG_IMPRINT * | ||
| 57 | .Fn TS_MSG_IMPRINT_new void | ||
| 58 | .Ft void | ||
| 59 | .Fn TS_MSG_IMPRINT_free "TS_MSG_IMPRINT *imprint" | ||
| 60 | .Sh DESCRIPTION | ||
| 61 | A time-stamping authority is a trusted third party allowing its | ||
| 62 | clients to prove that specific data existed at a particular point | ||
| 63 | in time. Clients send time-stamping requests to the time-stamping | ||
| 64 | server, which returns time-stamp tokens to the clients. | ||
| 65 | .Pp | ||
| 66 | .Fn TS_REQ_new | ||
| 67 | allocates and initializes an empty | ||
| 68 | .Vt TS_REQ | ||
| 69 | object, representing an ASN.1 TimeStampReq structure | ||
| 70 | defined in RFC 3161 section 2.4.1. | ||
| 71 | It can hold a hash of the datum to be time-stamped and some | ||
| 72 | auxiliary, optional information. | ||
| 73 | .Fn TS_REQ_free | ||
| 74 | frees | ||
| 75 | .Fa req . | ||
| 76 | .Pp | ||
| 77 | .Fn TS_RESP_new | ||
| 78 | allocates and initializes an empty | ||
| 79 | .Vt TS_RESP | ||
| 80 | object, representing an ASN.1 TimeStampResp structure | ||
| 81 | defined in RFC 3161 section 2.4.2. | ||
| 82 | It can hold status information and a time-stamp token. | ||
| 83 | .Fn TS_RESP_free | ||
| 84 | frees | ||
| 85 | .Fa resp . | ||
| 86 | .Pp | ||
| 87 | .Fn TS_STATUS_INFO_new | ||
| 88 | allocates and initializes an empty | ||
| 89 | .Vt TS_STATUS_INFO | ||
| 90 | object, representing an ASN.1 PKIStatusInfo structure | ||
| 91 | defined in RFC 3161 section 2.4.2. | ||
| 92 | It is used inside | ||
| 93 | .Vt TS_RESP | ||
| 94 | and describes the outcome of one time-stamp request. | ||
| 95 | .Fn TS_STATUS_INFO_free | ||
| 96 | frees | ||
| 97 | .Fa status . | ||
| 98 | .Pp | ||
| 99 | .Fn TS_TST_INFO_new | ||
| 100 | allocates and initializes an empty | ||
| 101 | .Vt TS_TST_INFO | ||
| 102 | object, representing an ASN.1 TSTInfo structure | ||
| 103 | defined in RFC 3161 section 2.4.2. | ||
| 104 | It is the time-stamp token included in a | ||
| 105 | .Vt TS_RESP | ||
| 106 | object in case of success, and it can hold the hash of the datum | ||
| 107 | copied from a request, the time of generation, and some auxiliary | ||
| 108 | information. | ||
| 109 | .Fn TS_TST_INFO_free | ||
| 110 | frees | ||
| 111 | .Fa token . | ||
| 112 | .Pp | ||
| 113 | .Fn TS_ACCURACY_new | ||
| 114 | allocates and initializes an empty | ||
| 115 | .Vt TS_ACCURACY | ||
| 116 | object, representing an ASN.1 Accuracy structure | ||
| 117 | defined in RFC 3161 section 2.4.2. | ||
| 118 | It can be used inside a | ||
| 119 | .Vt TS_TST_INFO | ||
| 120 | object and indicates the maximum error of the time stated in the token. | ||
| 121 | .Fn TS_ACCURACY_free | ||
| 122 | frees | ||
| 123 | .Fa accuracy . | ||
| 124 | .Pp | ||
| 125 | .Fn TS_MSG_IMPRINT_new | ||
| 126 | allocates and initializes an empty | ||
| 127 | .Vt TS_MSG_IMPRINT | ||
| 128 | object, representing an ASN.1 MessageImprint structure | ||
| 129 | defined in RFC 3161 section 2.4.1. | ||
| 130 | It is used inside | ||
| 131 | .Vt TS_REQ | ||
| 132 | and | ||
| 133 | .Vt TS_RESP | ||
| 134 | objects. | ||
| 135 | It specifies a hash algorithm and stores the hash value of the datum. | ||
| 136 | .Fn TS_MSG_IMPRINT_free | ||
| 137 | frees | ||
| 138 | .Fa imprint . | ||
| 139 | .Sh RETURN VALUES | ||
| 140 | .Fn TS_REQ_new , | ||
| 141 | .Fn TS_RESP_new , | ||
| 142 | .Fn TS_STATUS_INFO_new , | ||
| 143 | .Fn TS_TST_INFO_new , | ||
| 144 | .Fn TS_ACCURACY_new , | ||
| 145 | and | ||
| 146 | .Fn TS_MSG_IMPRINT_new | ||
| 147 | return the new | ||
| 148 | .Vt TS_REQ , | ||
| 149 | .Vt TS_RESP , | ||
| 150 | .Vt TS_STATUS_INFO , | ||
| 151 | .Vt TS_TST_INFO , | ||
| 152 | .Vt TS_ACCURACY , | ||
| 153 | or | ||
| 154 | .Vt TS_MSG_IMPRINT | ||
| 155 | object, respectively, or | ||
| 156 | .Dv NULL | ||
| 157 | if an error occurred. | ||
| 158 | .Sh SEE ALSO | ||
| 159 | .Xr ESS_SIGNING_CERT_new 3 | ||
| 160 | .Sh STANDARDS | ||
| 161 | RFC 3161: Internet X.509 Public Key Infrastructure Time-Stamp Protocol | ||
| 162 | .Pp | ||
| 163 | Note that RFC 3161 has been updated | ||
| 164 | by RFC 5816: ESSCertIDv2 Update for RFC 3161. | ||
| 165 | That update allows using the Signing Certificate Attribute Definition | ||
| 166 | Version 2 according to RFC 5035, but the current implementation | ||
| 167 | only supports the Signing Certificate Attribute Definition Version | ||
| 168 | 1 according to RFC 2634, and hence only supports RFC 3161, but not | ||
| 169 | RFC 5816 functionality. | ||
