From c99d9cfef44d672189d3f45d16e2d4230ca6f4b5 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Mon, 2 Apr 2018 01:22:04 +0000 Subject: In x509_vfy.h rev. 1.25 2018/03/17 15:39:43, tb@ provided X509_OBJECT_get_type(3). It is undocumented in OpenSSL, so write some documentation from scratch. --- lib/libcrypto/man/X509_OBJECT_get0_X509.3 | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'lib/libcrypto/man') diff --git a/lib/libcrypto/man/X509_OBJECT_get0_X509.3 b/lib/libcrypto/man/X509_OBJECT_get0_X509.3 index 1008edc9c85..2b716d70906 100644 --- a/lib/libcrypto/man/X509_OBJECT_get0_X509.3 +++ b/lib/libcrypto/man/X509_OBJECT_get0_X509.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: X509_OBJECT_get0_X509.3,v 1.6 2018/03/27 17:35:50 schwarze Exp $ +.\" $OpenBSD: X509_OBJECT_get0_X509.3,v 1.7 2018/04/02 01:22:03 schwarze Exp $ .\" Copyright (c) 2018 Ingo Schwarze .\" .\" Permission to use, copy, modify, and distribute this software for any @@ -13,10 +13,11 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: March 27 2018 $ +.Dd $Mdocdate: April 2 2018 $ .Dt X509_OBJECT_GET0_X509 3 .Os .Sh NAME +.Nm X509_OBJECT_get_type , .Nm X509_OBJECT_up_ref_count , .Nm X509_OBJECT_free_contents , .Nm X509_OBJECT_get0_X509 , @@ -27,6 +28,10 @@ .Nd certificate, CRL, private key, and string wrapper for certificate stores .Sh SYNOPSIS .In openssl/x509_vfy.h +.Ft int +.Fo X509_OBJECT_get_type +.Fa "const X509_OBJECT *obj" +.Fc .Ft void .Fo X509_OBJECT_up_ref_count .Fa "X509_OBJECT *obj" @@ -72,7 +77,8 @@ certificate revocation list object, one private key object, or one .Vt char * string. -It also remembers which type of object it contains at any given time. +The type of object stored at any given time can be inspected with +.Fn X509_OBJECT_get_type . .Pp Each .Vt X509_STORE @@ -145,6 +151,16 @@ otherwise, it searches for an .Vt X509_OBJECT with a matching type. .Sh RETURN VALUES +.Fn X509_OBJECT_get_type +returns +.Dv X509_LU_X509 +if +.Fa obj +contains a certificate, +.Dv X509_LU_CRL +if it contains a certificate revocation list, +or 0 if an error occurs. +.Pp .Fn X509_OBJECT_get0_X509 returns an internal pointer to the certificate contained in .Fa obj @@ -229,7 +245,8 @@ and first appeared in OpenSSL 0.9.6 and have been available since .Ox 2.9 . .Pp -.Fn X509_OBJECT_get0_X509 +.Fn X509_OBJECT_get_type , +.Fn X509_OBJECT_get0_X509 , and .Fn X509_OBJECT_get0_X509_CRL first appeared in OpenSSL 1.1.0 and have been available since -- cgit v1.2.3