CSR patch

I was having trouble creating a CSR with a custom key size. I ended making the following patch:

*** csr.cgi.old Sat Jan 14 20:29:29 2006
— csr.cgi Sat Jan 14 20:21:37 2006


*** 18,23 ****
— 18,24 ----

Generate the private key

$d->{‘ssl_csr’} ||= “$d->{‘home’}/ssl.csr”;
$d->{‘ssl_newkey’} ||= “$d->{‘home’}/ssl.newkey”;

  • $size = $in{‘size_def’} ? “” : $in{‘size’};
    unlink($d->{‘ssl_newkey’});
    $out = &backquote_logged(“openssl genrsa -out “.quotemeta($d->{‘ssl_newkey’}).” $size 2>&1[/dev/null”);
    chown($d->{‘uid’}, $d->{‘ugid’}, $d->{‘ssl_newkey’});

Dave Dunkin
gottathink.com