From ba36b61d3db84adf6cd69431c702553ffd1c46c9 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Tue, 12 Nov 2002 18:20:28 +0000 Subject: [PATCH] Initial ASN1 generation documentation. --- doc/crypto/ASN1_generate_nconf.pod | 132 +++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 doc/crypto/ASN1_generate_nconf.pod diff --git a/doc/crypto/ASN1_generate_nconf.pod b/doc/crypto/ASN1_generate_nconf.pod new file mode 100644 index 0000000000..bdee4067c7 --- /dev/null +++ b/doc/crypto/ASN1_generate_nconf.pod @@ -0,0 +1,132 @@ +=pod + +=head1 NAME + +ASN1_generate_nconf, ASN1_generate_v3 - ASN1 generation functions + +=head1 SYNOPSIS + + ASN1_TYPE *ASN1_generate_nconf(char *str, CONF *nconf); + ASN1_TYPE *ASN1_generate_v3(char *str, X509V3_CTX *cnf); + +=head1 DESCRIPTION + +These functions generate the ASN1 encoding of a string +in an B structure. + +B contains the string to encode B or B contains +the optional configuration information where additional strings +will be read from. B will typically come from a config +file wherease B is obtained from an B structure +which will typically be used by X509 v3 certificate extension +functions. B or B can be set to B if no additional +configuration will be used. + +=head1 GENERATION STRING FORMAT + +The actual data encoded is determined by the string B and +the configuration information. The general format of the string +is: + + B<[modifier,]type[:value]> + +That is zero or more comma separated modifiers followed by a type +followed by an optional colon and a value. The formats of B, +B and B is explained below. + +=head2 SUPPORTED TYPES + +=over 2 + +=item B, B + +This encodes a boolean type. The B string is mandatory and +should be B or B. Additionally B, B, B, +B, B, B, B B, B, B, B and B +are acceptable. + +=item B + +Encode the B type, the B string must not be present. + +=item B, B + +Encodes an ASN1 B type. The B string represents +the value of the integer, it can be preceeded by a minus sign and +is normally interpreted as a decimal value unless the prefix B<0x> +is included. + +=item B, B + +Encodes the ASN1 B type, it is otherwise identical to +B. + +=item B, B + +Encodes an ASN1 B, the B string can be +a short name, a long name or numerical format. + +=item B, B + +Encodes an ASN1 B structure, the value should be in +the format B. + +=item B, B + +Encodes an ASN1 B structure, the value should be in +the format B. + +=item B, B + +Emcodes an ASN1 B. B represents the contents +of this structure, the format strings B and B can be +used to specify the format of B. + +=item B, B + +Emcodes an ASN1 B. B represents the contents +of this structure, the format strings B, B and B +can be used to specify the format of B. + +If the format is anything other than B the number of unused +bits is set to zero. + +=item B, B, B, B, B, +B, B, B, B, +B, B, B, B, +B, B + +These encode the corresponding string types. B represents the +contents of this structure. The format can be B or B. + +=item B, B, B + +Formats the result as an ASN1 B or B type. B +should be a section name which will contain the contents. The +field names are ignored and the values are in the generated +string format. If B is absent the the content will be empty. + +=cut + +=head2 MODIFIERS + +... + +=head1 RETURN VALUES + +ASN1_generate_nconf() and ASN1_generate_v3() return the encoded +data as an B structure or B if an error occurred. + +The error codes that can be obtained by L. + +X509_free() returns no value. + +=head1 SEE ALSO + +L, L + +=head1 HISTORY + +ASN1_generate_nconf() and ASN1_generate_v3() were added to OpenSSL 0.9.8 + +=cut -- 2.25.1