From 45734ee0c332277435eb2f4e6a09abb400d1487a Mon Sep 17 00:00:00 2001 From: schwarze Date: Fri, 16 Feb 2018 17:24:33 +0000 Subject: [PATCH] Add missing RETURN VALUES sections; from Paul Yang via OpenSSL commit 1f13ad31 Dec 25 17:50:39 2017 +0800, tweaked by me. --- lib/libcrypto/man/X509_LOOKUP_hash_dir.3 | 26 ++++++++---- .../man/X509_NAME_ENTRY_get_object.3 | 40 +++++++++++++++++-- lib/libcrypto/man/X509_NAME_print_ex.3 | 27 +++++++++++-- 3 files changed, 78 insertions(+), 15 deletions(-) diff --git a/lib/libcrypto/man/X509_LOOKUP_hash_dir.3 b/lib/libcrypto/man/X509_LOOKUP_hash_dir.3 index cfa8f0dc78b..f25f86fad5e 100644 --- a/lib/libcrypto/man/X509_LOOKUP_hash_dir.3 +++ b/lib/libcrypto/man/X509_LOOKUP_hash_dir.3 @@ -1,9 +1,9 @@ -.\" $OpenBSD: X509_LOOKUP_hash_dir.3,v 1.3 2017/01/06 22:46:06 schwarze Exp $ -.\" OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400 +.\" $OpenBSD: X509_LOOKUP_hash_dir.3,v 1.4 2018/02/16 17:24:33 schwarze Exp $ +.\" full merge up to: OpenSSL 61f805c1 Jan 16 01:01:46 2018 +0800 .\" .\" This file was written by Victor B. Wagner .\" and Claus Assmann. -.\" Copyright (c) 2015, 2016 The OpenSSL Project. All rights reserved. +.\" Copyright (c) 2015, 2016, 2017 The OpenSSL Project. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -49,7 +49,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED .\" OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: January 6 2017 $ +.Dd $Mdocdate: February 16 2018 $ .Dt X509_LOOKUP_HASH_DIR 3 .Os .Sh NAME @@ -141,9 +141,6 @@ filename causes these functions to load the default certificate store file (see .Xr X509_STORE_set_default_paths 3 ) . .Pp -These functions return the number of objects loaded from file or 0 -in case of error. -.Pp Both methods support adding several certificate locations into one .Sy X509_STORE . .Pp @@ -211,6 +208,21 @@ sequence number greater than that of the already cached CRL. Note that the hash algorithm used for subject name hashing changed in OpenSSL 1.0.0, and all certificate stores have to be rehashed when moving from OpenSSL 0.9.8 to 1.0.0. +.Sh RETURN VALUES +.Fn X509_LOOKUP_hash_dir +and +.Fn X509_LOOKUP_file +always return a pointer to a static +.Vt X509_LOOKUP_METHOD +structure. +.Pp +.Fn X509_load_cert_file , +.Fn X509_load_crl_file , +and +.Fn X509_load_cert_crl_file +return the number of objects loaded from the +.Fa file +or 0 on error. .Sh SEE ALSO .Xr d2i_X509_bio 3 , .Xr PEM_read_PrivateKey 3 , diff --git a/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 b/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 index e11a4b77082..ca33f2a56a1 100644 --- a/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 +++ b/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 @@ -1,5 +1,6 @@ -.\" $OpenBSD: X509_NAME_ENTRY_get_object.3,v 1.6 2016/12/25 22:15:10 schwarze Exp $ -.\" OpenSSL aebb9aac Jul 19 09:27:53 2016 -0400 +.\" $OpenBSD: X509_NAME_ENTRY_get_object.3,v 1.7 2018/02/16 17:24:33 schwarze Exp $ +.\" full merge up to: OpenSSL aebb9aac Jul 19 09:27:53 2016 -0400 +.\" selective merge up to: OpenSSL 61f805c1 Jan 16 01:01:46 2018 +0800 .\" .\" This file is a derived work. .\" The changes are covered by the following Copyright and license: @@ -19,7 +20,8 @@ .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" .\" The original file was written by Dr. Stephen Henson . -.\" Copyright (c) 2002, 2005, 2006 The OpenSSL Project. All rights reserved. +.\" Copyright (c) 2002, 2005, 2006, 2017 The OpenSSL Project. +.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -65,7 +67,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED .\" OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: December 25 2016 $ +.Dd $Mdocdate: February 16 2018 $ .Dt X509_NAME_ENTRY_GET_OBJECT 3 .Os .Sh NAME @@ -220,6 +222,36 @@ but in the case of .Fn X509_NAME_ENTRY_set_data the field type must be set first so the relevant field information can be looked up internally. +.Sh RETURN VALUES +.Fn X509_NAME_ENTRY_new , +.Fn X509_NAME_ENTRY_create_by_txt , +.Fn X509_NAME_ENTRY_create_by_NID , +and +.Fn X509_NAME_ENTRY_create_by_OBJ +return a valid +.Vt X509_NAME_ENTRY +structure on success or +.Dv NULL +if an error occurred. +.Pp +.Fn X509_NAME_ENTRY_get_object +returns a valid +.Vt ASN1_OBJECT +structure if it is set or +.Dv NULL +if an error occurred. +.Pp +.Fn X509_NAME_ENTRY_get_data +returns a valid +.Vt ASN1_STRING +structure if it is set or +.Dv NULL +if an error occurred. +.Pp +.Fn X509_NAME_ENTRY_set_object +and +.Fn X509_NAME_ENTRY_set_data +return 1 on success or 0 on error. .Sh SEE ALSO .Xr ERR_get_error 3 , .Xr OBJ_nid2obj 3 , diff --git a/lib/libcrypto/man/X509_NAME_print_ex.3 b/lib/libcrypto/man/X509_NAME_print_ex.3 index 1342a200adc..7761d875045 100644 --- a/lib/libcrypto/man/X509_NAME_print_ex.3 +++ b/lib/libcrypto/man/X509_NAME_print_ex.3 @@ -1,8 +1,9 @@ -.\" $OpenBSD: X509_NAME_print_ex.3,v 1.6 2016/12/25 22:15:10 schwarze Exp $ -.\" OpenSSL aebb9aac Jul 19 09:27:53 2016 -0400 +.\" $OpenBSD: X509_NAME_print_ex.3,v 1.7 2018/02/16 17:24:33 schwarze Exp $ +.\" full merge up to: OpenSSL aebb9aac Jul 19 09:27:53 2016 -0400 +.\" selective merge up to: OpenSSL 61f805c1 Jan 16 01:01:46 2018 +0800 .\" .\" This file was written by Dr. Stephen Henson . -.\" Copyright (c) 2002, 2004, 2007, 2016 The OpenSSL Project. +.\" Copyright (c) 2002, 2004, 2007, 2016, 2017 The OpenSSL Project. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -49,7 +50,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED .\" OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: December 25 2016 $ +.Dd $Mdocdate: February 16 2018 $ .Dt X509_NAME_PRINT_EX 3 .Os .Sh NAME @@ -248,6 +249,24 @@ uses a format identical to in fact it calls .Fn X509_NAME_print internally. +.Sh RETURN VALUES +.Fn X509_NAME_print_ex +and +.Fn X509_NAME_print_ex_fp +return 1 on success or 0 on error if +.Dv XN_FLAG_COMPAT +is set in +.Fa flags . +Otherwise, they return the number of printed bytes including the +indentation or \-1 on error. +.Pp +.Fn X509_NAME_oneline +returns a valid string on success or +.Dv NULL +on error. +.Pp +.Fn X509_NAME_print +returns 1 on success or 0 on error. .Sh SEE ALSO .Xr ASN1_STRING_print_ex 3 , .Xr d2i_X509_NAME 3 , -- 2.20.1