summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorschwarze <>2016-12-25 18:39:35 +0000
committerschwarze <>2016-12-25 18:39:35 +0000
commitf75416634e50d0e872512d4248c52af59ba54ba3 (patch)
tree93daed70f8fbffbe5dad3e92cf0884781750e7a9 /src/lib
parentb2f86408e8e75c40843e1aa1b516e0ce1d9e4142 (diff)
downloadopenbsd-f75416634e50d0e872512d4248c52af59ba54ba3.tar.gz
openbsd-f75416634e50d0e872512d4248c52af59ba54ba3.tar.bz2
openbsd-f75416634e50d0e872512d4248c52af59ba54ba3.zip
Correct the DESCRIPTION of ECParameters_dup(3).
Clarify requirements for o2i_ECPublicKey(3). Add STANDARDS references for d2i_ECPrivateKey(3) and d2i_EC_PUBKEY(3). Trim some excessive cross references that are only tangentially related and add some more relevant ones instead.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/man/d2i_ECPKParameters.370
1 files changed, 59 insertions, 11 deletions
diff --git a/src/lib/libcrypto/man/d2i_ECPKParameters.3 b/src/lib/libcrypto/man/d2i_ECPKParameters.3
index 3ad7c16cab..51080d6918 100644
--- a/src/lib/libcrypto/man/d2i_ECPKParameters.3
+++ b/src/lib/libcrypto/man/d2i_ECPKParameters.3
@@ -1,7 +1,24 @@
1.\" $OpenBSD: d2i_ECPKParameters.3,v 1.8 2016/12/25 17:05:59 schwarze Exp $ 1.\" $OpenBSD: d2i_ECPKParameters.3,v 1.9 2016/12/25 18:39:35 schwarze Exp $
2.\" OpenSSL 05ea606a May 20 20:52:46 2016 -0400 2.\" OpenSSL 05ea606a May 20 20:52:46 2016 -0400
3.\" 3.\"
4.\" This file was written by Matt Caswell <matt@openssl.org>. 4.\" This file is a derived work.
5.\" The changes are covered by the following Copyright and license:
6.\"
7.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
8.\"
9.\" Permission to use, copy, modify, and distribute this software for any
10.\" purpose with or without fee is hereby granted, provided that the above
11.\" copyright notice and this permission notice appear in all copies.
12.\"
13.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
14.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
15.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
16.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
17.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
18.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
19.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20.\"
21.\" The original file was written by Matt Caswell <matt@openssl.org>.
5.\" Copyright (c) 2013, 2015 The OpenSSL Project. All rights reserved. 22.\" Copyright (c) 2013, 2015 The OpenSSL Project. All rights reserved.
6.\" 23.\"
7.\" Redistribution and use in source and binary forms, with or without 24.\" Redistribution and use in source and binary forms, with or without
@@ -263,17 +280,28 @@ for input instead of
263.Fa val_in . 280.Fa val_in .
264.Pp 281.Pp
265.Fn ECParameters_dup 282.Fn ECParameters_dup
266copies 283allocates and initializes an empty
284.Vt EC_KEY
285object and copies the EC parameters from
267.Fa val_in 286.Fa val_in
268by calling 287to it by calling
269.Fn i2d_ECParameters 288.Fn i2d_ECParameters
270and 289and
271.Fn d2i_ECParameters . 290.Fn d2i_ECParameters .
291If a private or public key or any flags are present in
292.Fa val_in ,
293they are not copied.
272.Pp 294.Pp
273.Fn d2i_ECPrivateKey 295.Fn d2i_ECPrivateKey
274and 296and
275.Fn i2d_ECPrivateKey 297.Fn i2d_ECPrivateKey
276decode and encode an EC private key. 298decode and encode an EC private key using an ASN.1
299.Vt ECPrivateKey
300structure defined in RFC 5915 section 3 and used for the privateKey
301field of the ASN.1
302.Vt PrivateKeyInfo
303structure defined in RFC 5208 section 5, see
304.Xr PKCS8_PRIV_KEY_INFO_new 3 .
277.Fn d2i_ECPrivateKey_bio , 305.Fn d2i_ECPrivateKey_bio ,
278.Fn i2d_ECPrivateKey_bio , 306.Fn i2d_ECPrivateKey_bio ,
279.Fn d2i_ECPrivateKey_fp , 307.Fn d2i_ECPrivateKey_fp ,
@@ -289,8 +317,16 @@ pointer.
289and 317and
290.Fn i2o_ECPublicKey 318.Fn i2o_ECPublicKey
291decode and encode an EC public key. 319decode and encode an EC public key.
320In contrast to
321.Xr ASN1_item_d2i 3 ,
292.Fn o2i_ECPublicKey 322.Fn o2i_ECPublicKey
293can store a key into an existing object. 323requires
324.Fa val_out ,
325.Pf * Fa val_out ,
326and
327.Po Pf * Fa val_out Pc Ns -> Ns Fa group
328to be
329.Pf non- Dv NULL .
294.Pp 330.Pp
295.Fn ECPKParameters_print 331.Fn ECPKParameters_print
296and 332and
@@ -318,7 +354,10 @@ or
318.Fn d2i_EC_PUBKEY 354.Fn d2i_EC_PUBKEY
319and 355and
320.Fn i2d_EC_PUBKEY 356.Fn i2d_EC_PUBKEY
321decode and encode an EC public key. 357decode and encode an EC public key using an ASN.1
358.Vt SubjectPublicKeyInfo
359structure defined in RFC 5280 section 4.1 and documented in
360.Xr X509_PUBKEY_new 3 .
322.Fn d2i_EC_PUBKEY_bio , 361.Fn d2i_EC_PUBKEY_bio ,
323.Fn i2d_EC_PUBKEY_bio , 362.Fn i2d_EC_PUBKEY_bio ,
324.Fn d2i_EC_PUBKEY_fp , 363.Fn d2i_EC_PUBKEY_fp ,
@@ -379,10 +418,19 @@ and
379return 1 for success or 0 if an error occurs. 418return 1 for success or 0 if an error occurs.
380.Sh SEE ALSO 419.Sh SEE ALSO
381.Xr ASN1_item_d2i 3 , 420.Xr ASN1_item_d2i 3 ,
382.Xr EC_GFp_simple_method 3 ,
383.Xr EC_GROUP_copy 3 , 421.Xr EC_GROUP_copy 3 ,
384.Xr EC_GROUP_new 3 , 422.Xr EC_GROUP_new 3 ,
385.Xr EC_KEY_new 3 , 423.Xr EC_KEY_new 3 ,
386.Xr EC_POINT_add 3 , 424.Xr EVP_PKEY_set1_EC_KEY 3 ,
387.Xr EC_POINT_new 3 , 425.Xr PEM_write_ECPrivateKey 3 ,
388.Xr ECDSA_SIG_new 3 426.Xr PKCS8_PRIV_KEY_INFO_new 3 ,
427.Xr X509_PUBKEY_new 3
428.Sh STANDARDS
429RFC 5915: Elliptic Curve Private Key Structure
430.Pp
431RFC 5208: Public-Key Cryptography Standards (PKCS) #8:
432Private-Key Information Syntax Specification
433.Pp
434RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
435Certificate Revocation List (CRL) Profile,
436section 4.1: Basic Certificate Fields