mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-08 00:47:04 +03:00
No default passphrase for self-signed #259
This commit is contained in:
parent
f53d9ed6c3
commit
f181863d50
1 changed files with 2 additions and 1 deletions
|
|
@ -32,11 +32,12 @@ trait SMime
|
||||||
*/
|
*/
|
||||||
$sName = $this->GetActionParam('name', '') ?: $oAccount->Name();
|
$sName = $this->GetActionParam('name', '') ?: $oAccount->Name();
|
||||||
$sEmail = $this->GetActionParam('email', '') ?: $oAccount->Email();
|
$sEmail = $this->GetActionParam('email', '') ?: $oAccount->Email();
|
||||||
|
$sPassphrase = $this->GetActionParam('passphrase', '');
|
||||||
|
|
||||||
$cert = new Certificate();
|
$cert = new Certificate();
|
||||||
$cert->distinguishedName['commonName'] = $sName;
|
$cert->distinguishedName['commonName'] = $sName;
|
||||||
$cert->distinguishedName['emailAddress'] = $sEmail;
|
$cert->distinguishedName['emailAddress'] = $sEmail;
|
||||||
$result = $cert->createSelfSigned('demo');
|
$result = $cert->createSelfSigned($sPassphrase);
|
||||||
return $this->DefaultResponse($result ?: false);
|
return $this->DefaultResponse($result ?: false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue