~ubuntu-branches/ubuntu/lucid/openssl/lucid-proposed

« back to all changes in this revision

Viewing changes to doc/crypto/ASN1_generate_nconf.pod

  • Committer: Bazaar Package Importer
  • Author(s): Kurt Roeckx
  • Date: 2009-06-13 18:15:46 UTC
  • mto: (11.1.5 squeeze)
  • mto: This revision was merged to the branch mainline in revision 34.
  • Revision ID: james.westby@ubuntu.com-20090613181546-vbfntai3b009dl1u
Tags: upstream-0.9.8k
ImportĀ upstreamĀ versionĀ 0.9.8k

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
the configuration information. The general format of the string
29
29
is:
30
30
 
31
 
 B<[modifier,]type[:value]>
 
31
=over 2
 
32
 
 
33
=item B<[modifier,]type[:value]>
 
34
 
 
35
=back
32
36
 
33
37
That is zero or more comma separated modifiers followed by a type
34
38
followed by an optional colon and a value. The formats of B<type>,
81
85
 
82
86
=item B<OCTETSTRING>, B<OCT>
83
87
 
84
 
Emcodes an ASN1 B<OCTET STRING>. B<value> represents the contents
 
88
Encodes an ASN1 B<OCTET STRING>. B<value> represents the contents
85
89
of this structure, the format strings B<ASCII> and B<HEX> can be
86
90
used to specify the format of B<value>.
87
91
 
88
 
=item B<BITSRING>, B<BITSTR>
 
92
=item B<BITSTRING>, B<BITSTR>
89
93
 
90
 
Emcodes an ASN1 B<BIT STRING>. B<value> represents the contents
 
94
Encodes an ASN1 B<BIT STRING>. B<value> represents the contents
91
95
of this structure, the format strings B<ASCII>, B<HEX> and B<BITLIST>
92
96
can be used to specify the format of B<value>.
93
97
 
147
151
This specifies the format of the ultimate value. It should be followed
148
152
by a colon and one of the strings B<ASCII>, B<UTF8>, B<HEX> or B<BITLIST>.
149
153
 
150
 
If no format specifier is included then B<ASCII> is used. If B<UTF8> is specified
151
 
then the value string must be a valid B<UTF8> string. For B<HEX> the output must
152
 
be a set of hex digits. B<BITLIST> (which is only valid for a BIT STRING) is a
153
 
comma separated list of set bits.
 
154
If no format specifier is included then B<ASCII> is used. If B<UTF8> is
 
155
specified then the value string must be a valid B<UTF8> string. For B<HEX> the
 
156
output must be a set of hex digits. B<BITLIST> (which is only valid for a BIT
 
157
STRING) is a comma separated list of the indices of the set bits, all other
 
158
bits are zero.
154
159
 
155
160
=back
156
161
 
168
173
 
169
174
 EXPLICIT:0A,IA5STRING:Hello World
170
175
 
 
176
A BITSTRING with bits 1 and 5 set and all others zero:
 
177
 
 
178
 FORMAT=BITLIST,BITSTRING:1,5
 
179
 
171
180
A more complex example using a config file to produce a
172
181
SEQUENCE consiting of a BOOL an OID and a UTF8String:
173
182
 
174
 
asn1 = SEQUENCE:seq_section
175
 
 
176
 
[seq_section]
177
 
 
178
 
field1 = BOOLEAN:TRUE
179
 
field2 = OID:commonName
180
 
field3 = UTF8:Third field
 
183
 asn1 = SEQUENCE:seq_section
 
184
 
 
185
 [seq_section]
 
186
 
 
187
 field1 = BOOLEAN:TRUE
 
188
 field2 = OID:commonName
 
189
 field3 = UTF8:Third field
181
190
 
182
191
This example produces an RSAPrivateKey structure, this is the
183
192
key contained in the file client.pem in all OpenSSL distributions