summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschwarze <>2016-12-14 02:03:50 +0000
committerschwarze <>2016-12-14 02:03:50 +0000
commitae8c27c4410d3494a37f436b324383ac1f79f7c5 (patch)
tree60f525c97efb22169c410dbc4b537594af7b76cc
parent7d87870581103bf8006f12ad8538d3725795dde6 (diff)
downloadopenbsd-ae8c27c4410d3494a37f436b324383ac1f79f7c5.tar.gz
openbsd-ae8c27c4410d3494a37f436b324383ac1f79f7c5.tar.bz2
openbsd-ae8c27c4410d3494a37f436b324383ac1f79f7c5.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.
-rw-r--r--src/lib/libcrypto/man/ESS_SIGNING_CERT_new.3107
-rw-r--r--src/lib/libcrypto/man/Makefile4
-rw-r--r--src/lib/libcrypto/man/TS_REQ_new.3169
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
43The signing certificate may be included in the signedAttributes
44field of a SignerInfo structure to mitigate simple substitution and
45re-issue attacks.
46.Pp
47.Fn ESS_SIGNING_CERT_new
48allocates and initializes an empty
49.Vt ESS_SIGNING_CERT
50object, representing an ASN.1 SigningCertificate structure
51defined in RFC 2634 section 5.4.
52It can hold the certificate used for signing the data,
53additional authorization certificates that can be used during
54validation, and policies applying to the certificate.
55.Fn ESS_SIGNING_CERT_free
56frees
57.Fa signing_cert .
58.Pp
59.Fn ESS_CERT_ID_new
60allocates and initializes an empty
61.Vt ESS_CERT_ID
62object, representing an ASN.1 ESSCertID structure
63defined in RFC 2634 section 5.4.1.
64Such objects can be used inside
65.Vt ESS_SIGNING_CERT
66objects, and each one can hold an SHA1 hash of one certificate.
67.Fn ESS_CERT_ID_free
68frees
69.Fa cert_id .
70.Pp
71.Fn ESS_ISSUER_SERIAL_new
72allocates and initializes an empty
73.Vt ESS_ISSUER_SERIAL
74object, representing an ASN.1 IssuerSerial structure
75defined in RFC 2634 section 5.4.1.
76It can hold an issuer name and a serial number and can be included in an
77.Vt ESS_CERT_ID
78object, which is useful for additional authorization certificates,
79but redundant for the signing certificate itself.
80.Fn ESS_ISSUER_SERIAL_free
81frees
82.Fa issuer_serial .
83.Sh RETURN VALUES
84.Fn ESS_SIGNING_CERT_new ,
85.Fn ESS_CERT_ID_new ,
86and
87.Fn ESS_ISSUER_SERIAL_new
88return the new
89.Vt ESS_SIGNING_CERT ,
90.Vt ESS_CERT_ID ,
91or
92.Vt ESS_ISSUER_SERIAL
93object, respectively, or
94.Dv NULL
95if an error occurred.
96.Sh STANDARDS
97RFC 2634: Enhanced Security Services for S/MIME,
98section 5: Signing Certificate Attribute
99.Pp
100Note that RFC 2634 has been updated by RFC 5035:
101Enhanced Security Services (ESS) Update:
102Adding CertID Algorithm Agility.
103But the current implementation only supports the
104Signing Certificate Attribute Definition Version 1
105according to RFC 2634, not the
106Signing Certificate Attribute Definition Version 2
107according 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
61A time-stamping authority is a trusted third party allowing its
62clients to prove that specific data existed at a particular point
63in time. Clients send time-stamping requests to the time-stamping
64server, which returns time-stamp tokens to the clients.
65.Pp
66.Fn TS_REQ_new
67allocates and initializes an empty
68.Vt TS_REQ
69object, representing an ASN.1 TimeStampReq structure
70defined in RFC 3161 section 2.4.1.
71It can hold a hash of the datum to be time-stamped and some
72auxiliary, optional information.
73.Fn TS_REQ_free
74frees
75.Fa req .
76.Pp
77.Fn TS_RESP_new
78allocates and initializes an empty
79.Vt TS_RESP
80object, representing an ASN.1 TimeStampResp structure
81defined in RFC 3161 section 2.4.2.
82It can hold status information and a time-stamp token.
83.Fn TS_RESP_free
84frees
85.Fa resp .
86.Pp
87.Fn TS_STATUS_INFO_new
88allocates and initializes an empty
89.Vt TS_STATUS_INFO
90object, representing an ASN.1 PKIStatusInfo structure
91defined in RFC 3161 section 2.4.2.
92It is used inside
93.Vt TS_RESP
94and describes the outcome of one time-stamp request.
95.Fn TS_STATUS_INFO_free
96frees
97.Fa status .
98.Pp
99.Fn TS_TST_INFO_new
100allocates and initializes an empty
101.Vt TS_TST_INFO
102object, representing an ASN.1 TSTInfo structure
103defined in RFC 3161 section 2.4.2.
104It is the time-stamp token included in a
105.Vt TS_RESP
106object in case of success, and it can hold the hash of the datum
107copied from a request, the time of generation, and some auxiliary
108information.
109.Fn TS_TST_INFO_free
110frees
111.Fa token .
112.Pp
113.Fn TS_ACCURACY_new
114allocates and initializes an empty
115.Vt TS_ACCURACY
116object, representing an ASN.1 Accuracy structure
117defined in RFC 3161 section 2.4.2.
118It can be used inside a
119.Vt TS_TST_INFO
120object and indicates the maximum error of the time stated in the token.
121.Fn TS_ACCURACY_free
122frees
123.Fa accuracy .
124.Pp
125.Fn TS_MSG_IMPRINT_new
126allocates and initializes an empty
127.Vt TS_MSG_IMPRINT
128object, representing an ASN.1 MessageImprint structure
129defined in RFC 3161 section 2.4.1.
130It is used inside
131.Vt TS_REQ
132and
133.Vt TS_RESP
134objects.
135It specifies a hash algorithm and stores the hash value of the datum.
136.Fn TS_MSG_IMPRINT_free
137frees
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 ,
145and
146.Fn TS_MSG_IMPRINT_new
147return the new
148.Vt TS_REQ ,
149.Vt TS_RESP ,
150.Vt TS_STATUS_INFO ,
151.Vt TS_TST_INFO ,
152.Vt TS_ACCURACY ,
153or
154.Vt TS_MSG_IMPRINT
155object, respectively, or
156.Dv NULL
157if an error occurred.
158.Sh SEE ALSO
159.Xr ESS_SIGNING_CERT_new 3
160.Sh STANDARDS
161RFC 3161: Internet X.509 Public Key Infrastructure Time-Stamp Protocol
162.Pp
163Note that RFC 3161 has been updated
164by RFC 5816: ESSCertIDv2 Update for RFC 3161.
165That update allows using the Signing Certificate Attribute Definition
166Version 2 according to RFC 5035, but the current implementation
167only supports the Signing Certificate Attribute Definition Version
1681 according to RFC 2634, and hence only supports RFC 3161, but not
169RFC 5816 functionality.