X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=doc%2Fcrypto%2FASN1_generate_nconf.pod;h=f21f189a38cc720f6530fc32e57c73b4a97c2947;hp=ba6e3c2e81401a375c8c99c8535ad9185fe160c1;hb=dcca7b13e9066443237dd3001ae52fd103151c98;hpb=a8f5b2ed50f0aedc618d0364fa5b517b50216f48 diff --git a/doc/crypto/ASN1_generate_nconf.pod b/doc/crypto/ASN1_generate_nconf.pod index ba6e3c2e81..f21f189a38 100644 --- a/doc/crypto/ASN1_generate_nconf.pod +++ b/doc/crypto/ASN1_generate_nconf.pod @@ -6,6 +6,8 @@ ASN1_generate_nconf, ASN1_generate_v3 - ASN1 generation functions =head1 SYNOPSIS + #include + ASN1_TYPE *ASN1_generate_nconf(char *str, CONF *nconf); ASN1_TYPE *ASN1_generate_v3(char *str, X509V3_CTX *cnf); @@ -28,7 +30,11 @@ 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]> +=over 2 + +=item B<[modifier,]type[:value]> + +=back That is zero or more comma separated modifiers followed by a type followed by an optional colon and a value. The formats of B, @@ -55,7 +61,7 @@ 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 +the value of the integer, it can be preceded by a minus sign and is normally interpreted as a decimal value unless the prefix B<0x> is included. @@ -81,13 +87,13 @@ the format B. =item B, B -Emcodes an ASN1 B. B represents the contents +Encodes 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 +=item B, B -Emcodes an ASN1 B. B represents the contents +Encodes 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. @@ -97,7 +103,8 @@ bits is set to zero. =item B, B, B, B, B, B, 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. @@ -147,10 +154,11 @@ bits is set to zero. This specifies the format of the ultimate value. It should be followed by a colon and one of the strings B, B, B or B. -If no format specifier is included then B is used. If B is specified -then the value string must be a valid B string. For B the output must -be a set of hex digits. B (which is only valid for a BIT STRING) is a -comma separated list of set bits. +If no format specifier is included then B is used. If B is +specified then the value string must be a valid B string. For B the +output must be a set of hex digits. B (which is only valid for a BIT +STRING) is a comma separated list of the indices of the set bits, all other +bits are zero. =back @@ -168,16 +176,20 @@ An IA5String explicitly tagged using APPLICATION tagging: EXPLICIT:0A,IA5STRING:Hello World +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: -asn1 = SEQUENCE:seq_section + asn1 = SEQUENCE:seq_section -[seq_section] + [seq_section] -field1 = BOOLEAN:TRUE -field2 = OID:commonName -field3 = UTF8:Third field + field1 = BOOLEAN:TRUE + field2 = OID:commonName + field3 = UTF8:Third field This example produces an RSAPrivateKey structure, this is the key contained in the file client.pem in all OpenSSL distributions