Import OpenSSL 1.1.0f
This commit is contained in:
@@ -8,8 +8,8 @@ ASN1_generate_nconf, ASN1_generate_v3 - ASN1 generation functions
|
||||
|
||||
#include <openssl/asn1.h>
|
||||
|
||||
ASN1_TYPE *ASN1_generate_nconf(char *str, CONF *nconf);
|
||||
ASN1_TYPE *ASN1_generate_v3(char *str, X509V3_CTX *cnf);
|
||||
ASN1_TYPE *ASN1_generate_nconf(const char *str, CONF *nconf);
|
||||
ASN1_TYPE *ASN1_generate_v3(const char *str, X509V3_CTX *cnf);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
@@ -19,7 +19,7 @@ in an B<ASN1_TYPE> structure.
|
||||
B<str> contains the string to encode B<nconf> or B<cnf> contains
|
||||
the optional configuration information where additional strings
|
||||
will be read from. B<nconf> will typically come from a config
|
||||
file wherease B<cnf> is obtained from an B<X509V3_CTX> structure
|
||||
file whereas B<cnf> is obtained from an B<X509V3_CTX> structure
|
||||
which will typically be used by X509 v3 certificate extension
|
||||
functions. B<cnf> or B<nconf> can be set to B<NULL> if no additional
|
||||
configuration will be used.
|
||||
@@ -30,7 +30,7 @@ The actual data encoded is determined by the string B<str> and
|
||||
the configuration information. The general format of the string
|
||||
is:
|
||||
|
||||
=over 2
|
||||
=over 4
|
||||
|
||||
=item B<[modifier,]type[:value]>
|
||||
|
||||
@@ -40,19 +40,19 @@ That is zero or more comma separated modifiers followed by a type
|
||||
followed by an optional colon and a value. The formats of B<type>,
|
||||
B<value> and B<modifier> are explained below.
|
||||
|
||||
=head2 SUPPORTED TYPES
|
||||
=head2 Supported Types
|
||||
|
||||
The supported types are listed below. Unless otherwise specified
|
||||
only the B<ASCII> format is permissible.
|
||||
|
||||
=over 2
|
||||
=over 4
|
||||
|
||||
=item B<BOOLEAN>, B<BOOL>
|
||||
|
||||
This encodes a boolean type. The B<value> string is mandatory and
|
||||
should be B<TRUE> or B<FALSE>. Additionally B<TRUE>, B<true>, B<Y>,
|
||||
B<y>, B<YES>, B<yes>, B<FALSE>, B<false>, B<N>, B<n>, B<NO> and B<no>
|
||||
are acceptable.
|
||||
are acceptable.
|
||||
|
||||
=item B<NULL>
|
||||
|
||||
@@ -78,12 +78,12 @@ a short name, a long name or numerical format.
|
||||
=item B<UTCTIME>, B<UTC>
|
||||
|
||||
Encodes an ASN1 B<UTCTime> structure, the value should be in
|
||||
the format B<YYMMDDHHMMSSZ>.
|
||||
the format B<YYMMDDHHMMSSZ>.
|
||||
|
||||
=item B<GENERALIZEDTIME>, B<GENTIME>
|
||||
|
||||
Encodes an ASN1 B<GeneralizedTime> structure, the value should be in
|
||||
the format B<YYYYMMDDHHMMSSZ>.
|
||||
the format B<YYYYMMDDHHMMSSZ>.
|
||||
|
||||
=item B<OCTETSTRING>, B<OCT>
|
||||
|
||||
@@ -119,14 +119,14 @@ will be encoded.
|
||||
|
||||
=back
|
||||
|
||||
=head2 MODIFIERS
|
||||
=head2 Modifiers
|
||||
|
||||
Modifiers affect the following structure, they can be used to
|
||||
add EXPLICIT or IMPLICIT tagging, add wrappers or to change
|
||||
the string format of the final type and value. The supported
|
||||
formats are documented below.
|
||||
|
||||
=over 2
|
||||
=over 4
|
||||
|
||||
=item B<EXPLICIT>, B<EXP>
|
||||
|
||||
@@ -181,7 +181,7 @@ A BITSTRING with bits 1 and 5 set and all others zero:
|
||||
FORMAT:BITLIST,BITSTRING:1,5
|
||||
|
||||
A more complex example using a config file to produce a
|
||||
SEQUENCE consiting of a BOOL an OID and a UTF8String:
|
||||
SEQUENCE consisting of a BOOL an OID and a UTF8String:
|
||||
|
||||
asn1 = SEQUENCE:seq_section
|
||||
|
||||
@@ -252,14 +252,19 @@ structure:
|
||||
ASN1_generate_nconf() and ASN1_generate_v3() return the encoded
|
||||
data as an B<ASN1_TYPE> structure or B<NULL> if an error occurred.
|
||||
|
||||
The error codes that can be obtained by L<ERR_get_error(3)|ERR_get_error(3)>.
|
||||
The error codes that can be obtained by L<ERR_get_error(3)>.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<ERR_get_error(3)|ERR_get_error(3)>
|
||||
L<ERR_get_error(3)>
|
||||
|
||||
=head1 HISTORY
|
||||
=head1 COPYRIGHT
|
||||
|
||||
ASN1_generate_nconf() and ASN1_generate_v3() were added to OpenSSL 0.9.8
|
||||
Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
|
||||
Licensed under the OpenSSL license (the "License"). You may not use
|
||||
this file except in compliance with the License. You can obtain a copy
|
||||
in the file LICENSE in the source distribution or at
|
||||
L<https://www.openssl.org/source/license.html>.
|
||||
|
||||
=cut
|
||||
|
||||
Reference in New Issue
Block a user