summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorschwarze <>2016-12-25 14:38:55 +0000
committerschwarze <>2016-12-25 14:38:55 +0000
commit9a8331c777966b9f0bb29f2ba224f1d443f509ae (patch)
treeff3c66f75c069046cb7395141fb6c84a3bd8c586 /src/lib
parent042129ea4be88b53a8d4b3951fb253a0374045c4 (diff)
downloadopenbsd-9a8331c777966b9f0bb29f2ba224f1d443f509ae.tar.gz
openbsd-9a8331c777966b9f0bb29f2ba224f1d443f509ae.tar.bz2
openbsd-9a8331c777966b9f0bb29f2ba224f1d443f509ae.zip
Clarify what DSAparams_dup(3) does.
Add STANDARDS references. Add cross references to manual pages documenting conversion functions that are used by the functions documented here. Mark up the names of custom ASN.1 datatypes that are defined in standards with .Vt, allowing to search for them. Do not mark up basic ASN.1 data types. They stand out by being ALL CAPS anyway, and searching for them would be pointless.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/man/d2i_DSAPublicKey.366
1 files changed, 47 insertions, 19 deletions
diff --git a/src/lib/libcrypto/man/d2i_DSAPublicKey.3 b/src/lib/libcrypto/man/d2i_DSAPublicKey.3
index 3468131178..660159b376 100644
--- a/src/lib/libcrypto/man/d2i_DSAPublicKey.3
+++ b/src/lib/libcrypto/man/d2i_DSAPublicKey.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: d2i_DSAPublicKey.3,v 1.7 2016/12/24 23:22:52 schwarze Exp $ 1.\" $OpenBSD: d2i_DSAPublicKey.3,v 1.8 2016/12/25 14:38:55 schwarze Exp $
2.\" OpenSSL bb9ad09e Jun 6 00:43:05 2016 -0400 2.\" OpenSSL bb9ad09e Jun 6 00:43:05 2016 -0400
3.\" 3.\"
4.\" This file was written by Dr. Stephen Henson <steve@openssl.org>. 4.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
@@ -49,7 +49,7 @@
49.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 49.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
50.\" OF THE POSSIBILITY OF SUCH DAMAGE. 50.\" OF THE POSSIBILITY OF SUCH DAMAGE.
51.\" 51.\"
52.Dd $Mdocdate: December 24 2016 $ 52.Dd $Mdocdate: December 25 2016 $
53.Dt D2I_DSAPUBLICKEY 3 53.Dt D2I_DSAPUBLICKEY 3
54.Os 54.Os
55.Sh NAME 55.Sh NAME
@@ -194,13 +194,10 @@ If
194.Fa val_in->write_params 194.Fa val_in->write_params
195is zero, only the 195is zero, only the
196.Fa val_in->pub_key 196.Fa val_in->pub_key
197field is encoded as an 197field is encoded as an ASN.1 INTEGER.
198.Sy INTEGER .
199If 198If
200.Fa val_in->write_params 199.Fa val_in->write_params
201is 1, then a 200is 1, then a SEQUENCE consisting of the
202.Sy SEQUENCE
203consisting of the
204.Fa val_in->p , 201.Fa val_in->p ,
205.Fa val_in->q , 202.Fa val_in->q ,
206.Fa val_in->g , 203.Fa val_in->g ,
@@ -211,8 +208,11 @@ fields is encoded.
211.Fn d2i_DSA_PUBKEY 208.Fn d2i_DSA_PUBKEY
212and 209and
213.Fn i2d_DSA_PUBKEY 210.Fn i2d_DSA_PUBKEY
214decode and encode a DSA public key using a SubjectPublicKeyInfo 211decode and encode a DSA public key using an ASN.1
215(certificate public key) structure. 212.Vt SubjectPublicKeyInfo
213structure defined in RFC 5280 section 4.1
214and documented in
215.Xr X509_PUBKEY_new 3 .
216.Fn d2i_DSA_PUBKEY_bio , 216.Fn d2i_DSA_PUBKEY_bio ,
217.Fn d2i_DSA_PUBKEY_fp , 217.Fn d2i_DSA_PUBKEY_fp ,
218.Fn i2d_DSA_PUBKEY_bio , 218.Fn i2d_DSA_PUBKEY_bio ,
@@ -261,23 +261,35 @@ pointer.
261.Fn d2i_DSAparams 261.Fn d2i_DSAparams
262and 262and
263.Fn i2d_DSAparams 263.Fn i2d_DSAparams
264decode and encode the DSA parameters using a 264decode and encode the DSA parameters using an ASN.1
265.Sy Dss-Parms 265.Vt Dss-Parms
266structure as defined in RFC 2459. 266structure defined in RFC 3279 section 2.3.2
267and used for the parameters field of the ASN.1
268.Vt AlgorithmIdentifier
269structure defined in RFC 5280 section 4.1.1.2.
270.Pp
267.Fn DSAparams_dup 271.Fn DSAparams_dup
268copies 272allocates and initializes an empty
269.Fa dsa 273.Vt DSA
270by calling 274object and copies the DSA parameters from
275.Fa val_in
276to it by calling
271.Fn i2d_DSAparams 277.Fn i2d_DSAparams
272and 278and
273.Fn d2i_DSAparams . 279.Fn d2i_DSAparams .
280If a private or public key are present in
281.Fa val_in ,
282they are not copied.
274.Pp 283.Pp
275.Fn d2i_DSA_SIG 284.Fn d2i_DSA_SIG
276and 285and
277.Fn i2d_DSA_SIG 286.Fn i2d_DSA_SIG
278decode and encode a DSA signature using a 287decode and encode a DSA signature using an ASN.1
279.Sy Dss-Sig-Value 288.Vt Dss-Sig-Value
280structure as defined in RFC 2459. 289structure as defined in RFC 3279 section 2.2.2
290and used for the signatureValue field of the ASN.1
291.Vt Certificate
292structure described in RFC 5280 sections 4.1.1.3 and 5.1.1.3.
281.Sh RETURN VALUES 293.Sh RETURN VALUES
282.Fn d2i_DSAPublicKey , 294.Fn d2i_DSAPublicKey ,
283.Fn d2i_DSA_PUBKEY , 295.Fn d2i_DSA_PUBKEY ,
@@ -305,4 +317,20 @@ if an error occurs.
305.Xr ASN1_item_d2i 3 , 317.Xr ASN1_item_d2i 3 ,
306.Xr DSA_new 3 , 318.Xr DSA_new 3 ,
307.Xr DSA_SIG_new 3 , 319.Xr DSA_SIG_new 3 ,
308.Xr PEM_write_DSAPrivateKey 3 320.Xr EVP_PKEY_set1_DSA 3 ,
321.Xr PEM_write_DSAPrivateKey 3 ,
322.Xr X509_PUBKEY_new 3
323.Sh STANDARDS
324RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
325Certificate Revocation List (CRL) Profile,
326section 4.1: Basic Certificate Fields
327.Pp
328RFC 3279: Algorithms and Identifiers for the Internet X.509 Public
329Key Infrastructure Certificate and Certificate Revocation List (CRL)
330Profile:
331.Bl -dash -compact
332.It
333section 2.2.2: DSA Signature Algorithm
334.It
335section 2.3.2: DSA Signature Keys
336.El