From 08ec613852e934b1b2dd43d3a6feb2b2c21d4a68 Mon Sep 17 00:00:00 2001 From: schwarze Date: Mon, 19 Feb 2018 07:59:23 +0000 Subject: [PATCH] In x509.h rev. 1.29 2018/02/17 15:50:42, jsing@ provided X509_get0_extensions(3). Merge the documentation from OpenSSL. --- lib/libcrypto/man/X509V3_get_d2i.3 | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/lib/libcrypto/man/X509V3_get_d2i.3 b/lib/libcrypto/man/X509V3_get_d2i.3 index 9ba4572a6bd..b28b84089cc 100644 --- a/lib/libcrypto/man/X509V3_get_d2i.3 +++ b/lib/libcrypto/man/X509V3_get_d2i.3 @@ -1,8 +1,9 @@ -.\" $OpenBSD: X509V3_get_d2i.3,v 1.6 2017/07/05 11:43:09 schwarze Exp $ -.\" OpenSSL 047dd81e Jul 4 23:03:17 2014 +0100 +.\" $OpenBSD: X509V3_get_d2i.3,v 1.7 2018/02/19 07:59:23 schwarze Exp $ +.\" full merge up to: OpenSSL 047dd81e Jul 4 23:03:17 2014 +0100 +.\" selective merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400 .\" .\" This file was written by Dr. Stephen Henson . -.\" Copyright (c) 2014, 2016 The OpenSSL Project. All rights reserved. +.\" Copyright (c) 2014, 2015, 2016 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 @@ -48,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: July 5 2017 $ +.Dd $Mdocdate: February 19 2018 $ .Dt X509V3_GET_D2I 3 .Os .Sh NAME @@ -61,7 +62,8 @@ .Nm X509_CRL_get_ext_d2i , .Nm X509_CRL_add1_ext_i2d , .Nm X509_REVOKED_get_ext_d2i , -.Nm X509_REVOKED_add1_ext_i2d +.Nm X509_REVOKED_add1_ext_i2d , +.Nm X509_get0_extensions .Nd X509 extension decode and encode functions .Sh SYNOPSIS .In openssl/x509v3.h @@ -135,6 +137,10 @@ .Fa "int crit" .Fa "unsigned long flags" .Fc +.Ft const STACK_OF(X509_EXTENSION) +.Fo X509_get0_extensions +.Fa "const X509 *x" +.Fc .Sh DESCRIPTION .Fn X509V3_get_d2i looks for an extension with OID @@ -228,6 +234,9 @@ structure and .Fn X509V3_add1_i2d 3 . .Pp +.Fn X509_get0_extensions +returns a stack of all the extensions of a certificate. +.Pp In almost all cases an extension can occur at most once and multiple occurrences is an error. Therefore the @@ -363,6 +372,9 @@ if an error occurs. returns 1 if the operation is successful, 0 if it fails due to a non-fatal error (extension not found, already exists, cannot be encoded), or -1 due to a fatal error such as a memory allocation failure. +.Pp +.Fn X509_get0_extensions +returns a stack of extensions. .Sh SEE ALSO .Xr d2i_X509 3 , .Xr d2i_X509_EXTENSION 3 , -- 2.20.1