Skip to content

Commit

Permalink
wizard: fix cert create for openvpn
Browse files Browse the repository at this point in the history
(cherry picked from commit 0bba9c6)
(cherry picked from commit fad3268)
  • Loading branch information
fichtner committed Feb 3, 2016
1 parent 1f4fab9 commit 5dba115
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/etc/inc/openvpn_wizard.inc
Original file line number Diff line number Diff line change
Expand Up @@ -532,11 +532,14 @@ function step12_submitphpaction() {
'localityName' => $pconfig['step9']['city'],
'organizationName' => $pconfig['step9']['organization'],
'emailAddress' => $pconfig['step9']['email'],
'commonName' => $pconfig['step9']['certname']);
'commonName' => $pconfig['step9']['certname']
);

cert_create($cert, $ca['refid'], $pconfig['step9']['keylength'], $pconfig['step9']['lifetime'], $dn, 'server', "sha256");
if (!is_array($config['cert']))
cert_create($cert, $ca['refid'], $pconfig['step9']['keylength'], $pconfig['step9']['lifetime'], $dn, 'sha256', 'server_cert');

if (!is_array($config['cert'])) {
$config['cert'] = array();
}

$config['cert'][] = $cert;
} else if (!isset($pconfig['step9']['uselist']) && empty($pconfig['step9']['authcertname'])) {
Expand Down

0 comments on commit 5dba115

Please sign in to comment.