From 67128047df7652762716f09d2c4bdd5adfc569cf Mon Sep 17 00:00:00 2001 From: schwarze <> Date: Sun, 27 Nov 2016 18:22:25 +0000 Subject: Add Copyright and license. Document i2t_ASN1_OBJECT(3), from OpenSSL. Merge more info about what NIDs are from OpenSSL. --- src/lib/libcrypto/man/OBJ_nid2obj.3 | 77 +++++++++++++++++++++++++++++++++++-- 1 file changed, 74 insertions(+), 3 deletions(-) (limited to 'src/lib/libcrypto/man/OBJ_nid2obj.3') diff --git a/src/lib/libcrypto/man/OBJ_nid2obj.3 b/src/lib/libcrypto/man/OBJ_nid2obj.3 index 22cc572323..6183831784 100644 --- a/src/lib/libcrypto/man/OBJ_nid2obj.3 +++ b/src/lib/libcrypto/man/OBJ_nid2obj.3 @@ -1,6 +1,55 @@ -.\" $OpenBSD: OBJ_nid2obj.3,v 1.3 2016/11/22 21:38:18 jmc Exp $ +.\" $OpenBSD: OBJ_nid2obj.3,v 1.4 2016/11/27 18:22:25 schwarze Exp $ +.\" OpenSSL c264592d May 14 11:28:00 2006 +0000 .\" -.Dd $Mdocdate: November 22 2016 $ +.\" This file was written by Dr. Stephen Henson . +.\" Copyright (c) 2002, 2006, 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 +.\" are met: +.\" +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in +.\" the documentation and/or other materials provided with the +.\" distribution. +.\" +.\" 3. All advertising materials mentioning features or use of this +.\" software must display the following acknowledgment: +.\" "This product includes software developed by the OpenSSL Project +.\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" +.\" +.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to +.\" endorse or promote products derived from this software without +.\" prior written permission. For written permission, please contact +.\" openssl-core@openssl.org. +.\" +.\" 5. Products derived from this software may not be called "OpenSSL" +.\" nor may "OpenSSL" appear in their names without prior written +.\" permission of the OpenSSL Project. +.\" +.\" 6. Redistributions of any form whatsoever must retain the following +.\" acknowledgment: +.\" "This product includes software developed by the OpenSSL Project +.\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY +.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR +.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +.\" OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.Dd $Mdocdate: November 27 2016 $ .Dt OBJ_NID2OBJ 3 .Os .Sh NAME @@ -16,7 +65,8 @@ .Nm OBJ_cmp , .Nm OBJ_dup , .Nm OBJ_create , -.Nm OBJ_cleanup +.Nm OBJ_cleanup , +.Nm i2t_ASN1_OBJECT .Nd ASN.1 object utility functions .Sh SYNOPSIS .In openssl/objects.h @@ -77,11 +127,25 @@ .Fc .Ft void .Fn OBJ_cleanup void +.In openssl/asn1.h +.Ft int +.Fo i2t_ASN1_OBJECT +.Fa "char *buf" +.Fa "int buf_len" +.Fa "ASN1_OBJECT *a" +.Fc .Sh DESCRIPTION The ASN.1 object utility functions process .Vt ASN1_OBJECT structures which are a representation of the ASN.1 OBJECT IDENTIFIER (OID) type. +For convenience, OIDs are usually represented in source code as +numeric identifiers, or NIDs. +OpenSSL has an internal table of OIDs that are generated when the +library is built, and their corresponding NIDs are available as +defined constants. +For the functions below, application code should treat all returned +values \(em OIDs, NIDs, or names \(em as constants. .Pp .Fn OBJ_nid2obj , .Fn OBJ_nid2ln , @@ -146,6 +210,13 @@ If is 0 and the object has a long or short name, then that will be used, otherwise the numerical form will be used. .Pp +.Fn i2t_ASN1_OBJECT +is the same as +.Fn OBJ_obj2txt +with +.Fa no_name +set to 0. +.Pp .Fn OBJ_cmp compares .Fa a -- cgit v1.2.3-55-g6feb