> Likely you are already in a Perl script?  What about copying a
> template config to a scratch file, making appropriate substitutions
> from the form data?  Or if your form processor isn't a convenient
> place to do this, you could fork a command that pipes the template
> through e.g. sed. 

Actually PHP.  I did it this way, based on info posted here, and it 
works well ($dn is an array with the CSR data in it):

$csrconfig = <<<EOT
[ req ]
default_bits           = 1024
distinguished_name     = req_distinguished_name
prompt                 = no

[ req_distinguished_name ]
C                      = {$dn['country']}
ST                     = {$dn['state']}
L                      = {$dn['city']}
O                      = {$dn['company']}
CN                     = {$dn['domain']}
emailAddress           = {$dn['email']}
EOT;

Then I write the above to $domain.cnf and run a req with -config 
$domain.cnf, and then delete the .cnf file.

--
Tom



______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to