Changes between 0.9.4 and 0.9.5 [xx XXX 2000]
+ *) Add some PEM_write_X509_REQ_NEW() functions and a command line
+ argument to 'req'. This is not because the function is newer or
+ better than others it just uses the work 'NEW' in the certificate
+ request header lines. Some software needs this.
+ [Steve Henson]
+
*) Reorganise password command line arguments: now passwords can be
obtained from various sources. Delete the PEM_cb function and make
it the default behaviour: i.e. if the callback is NULL and the
int i,badops=0,newreq=0,newkey= -1,pkey_type=0;
BIO *in=NULL,*out=NULL;
int informat,outformat,verify=0,noout=0,text=0,keyform=FORMAT_PEM;
- int nodes=0,kludge=0;
+ int nodes=0,kludge=0,newhdr=0;
char *infile,*outfile,*prog,*keyfile=NULL,*template=NULL,*keyout=NULL;
char *extensions = NULL;
char *req_exts = NULL;
newreq=1;
}
+ else if (strcmp(*argv,"-newhdr") == 0)
+ newhdr=1;
else if (strcmp(*argv,"-modulus") == 0)
modulus=1;
else if (strcmp(*argv,"-verify") == 0)
BIO_printf(bio_err," -new new request.\n");
BIO_printf(bio_err," -x509 output a x509 structure instead of a cert. req.\n");
BIO_printf(bio_err," -days number of days a x509 generated by -x509 is valid for.\n");
+ BIO_printf(bio_err," -newhdr output \"NEW\" in the header lines\n");
BIO_printf(bio_err," -asn1-kludge Output the 'request' in a format that is wrong but some CA's\n");
BIO_printf(bio_err," have been reported as requiring\n");
BIO_printf(bio_err," -extensions .. specify certificate extension section (override value in config file)\n");
{
if (outformat == FORMAT_ASN1)
i=i2d_X509_REQ_bio(out,req);
- else if (outformat == FORMAT_PEM)
- i=PEM_write_bio_X509_REQ(out,req);
- else {
+ else if (outformat == FORMAT_PEM) {
+ if(newhdr) i=PEM_write_bio_X509_REQ_NEW(out,req);
+ else i=PEM_write_bio_X509_REQ(out,req);
+ } else {
BIO_printf(bio_err,"bad output format specified for outfile\n");
goto end;
}
DECLARE_PEM_rw(X509_AUX, X509)
DECLARE_PEM_rw(X509_REQ, X509_REQ)
+DECLARE_PEM_write(X509_REQ_NEW, X509_REQ)
DECLARE_PEM_rw(X509_CRL, X509_CRL)
IMPLEMENT_PEM_rw(X509_REQ, X509_REQ, PEM_STRING_X509_REQ, X509_REQ)
+IMPLEMENT_PEM_write(X509_REQ_NEW, X509_REQ, PEM_STRING_X509_REQ_OLD, X509_REQ)
+
IMPLEMENT_PEM_rw(X509_CRL, X509_CRL, PEM_STRING_X509_CRL, X509_CRL)
IMPLEMENT_PEM_rw(PKCS7, PKCS7, PEM_STRING_PKCS7, PKCS7)
[B<-config filename>]
[B<-x509>]
[B<-days n>]
-[B<-noasn1-kludge>]
+[B<-asn1-kludge>]
+[B<-newhdr>]
[B<-extensions section>]
[B<-reqexts section>]
It should be noted that very few CAs still require the use of this option.
+=item B<-newhdr>
+
+Adds the word B<NEW> to the PEM file header and footer lines on the outputed
+request. Some software (Netscape certificate server) and some CAs need this.
+
=back
=head1 CONFIGURATION FILE FORMAT
This allows external programs (e.g. GUI based) to generate a template file
with all the field names and values and just pass it to B<req>. An example
-of this kind of configuration files is contained in the B<EXAMPLES> section.
+of this kind of configuration file is contained in the B<EXAMPLES> section.
-Alternatively if the B<prompt> option is absent or not set to B<no> the the
+Alternatively if the B<prompt> option is absent or not set to B<no> then the
file contains field prompting information. It consists of lines of the form:
fieldName="prompt"
Some fields (such as organizationName) can be used more than once
in a DN. This presents a problem because configuration files will
not recognize the same name occurring twice. To avoid this problem
-if the fieldName contains an some characters followed by a full stop
+if the fieldName contains some characters followed by a full stop
they will be ignored. So for example a second organizationName can
be input by calling it "1.organizationName".
long names. These are compiled into OpenSSL and include the usual
values such as commonName, countryName, localityName, organizationName,
organizationUnitName, stateOrPrivinceName. Additionally emailAddress
-is include as well as name, surname, givenName initials and dnQualifier
-are supported.
+is include as well as name, surname, givenName initials and dnQualifier.
Additional object identifiers can be defined with the B<oid_file> or
B<oid_section> options in the configuration file. Any additional fields
=head1 NOTES
-The header and footer lines in the B<PEM> format are respectively:
+The header and footer lines in the B<PEM> format are normally:
-----BEGIN CERTIFICATE REQUEST----
-----END CERTIFICATE REQUEST----
-----BEGIN NEW CERTIFICATE REQUEST----
-----END NEW CERTIFICATE REQUEST----
-but is otherwise compatible. Either form is accepted on input.
+which is produced with the B<-newhdr> option but is otherwise compatible.
+Either form is accepted transparently on input.
The certificate requests generated by B<Xenroll> with MSIE have extensions
added. It includes the B<keyUsage> extension which determines the type of
AUTHORITY_INFO_ACCESS_new 2247
CRYPTO_get_mem_debug_options 2248
des_crypt 2249
+PEM_write_bio_X509_REQ_NEW 2250
+PEM_write_X509_REQ_NEW 2251
}
$funcs{"PEM_read_bio_${1}"} = 1;
$funcs{"PEM_write_bio_${1}"} = 1;
+ } elsif (/^DECLARE_PEM_write\s*\(\s*(\w*)\s*,/ ||
+ /^DECLARE_PEM_write_cb\s*\(\s*(\w*)\s*,/ ) {
+ if($W32) {
+ $funcs{"PEM_write_${1}"} = 1;
+ }
+ $funcs{"PEM_write_bio_${1}"} = 1;
+ } elsif (/^DECLARE_PEM_read\s*\(\s*(\w*)\s*,/ ||
+ /^DECLARE_PEM_read_cb\s*\(\s*(\w*)\s*,/ ) {
+ if($W32) {
+ $funcs{"PEM_read_${1}"} = 1;
+ }
+ $funcs{"PEM_read_bio_${1}"} = 1;
} elsif (
($tag{'TRUE'} != -1) &&
($tag{'FreeBSD'} != 1) &&