mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 12:39:25 +01:00
S/MIME:
- Keep private key encrypted - Show password field always
This commit is contained in:
parent
b0cd55f0b6
commit
63440ddbc5
@ -310,12 +310,12 @@
|
||||
<row>
|
||||
<description value="Certificate file in p12 format"/>
|
||||
<vbox>
|
||||
<file id="smimeKeyUpload" accept=".key,.p12" onchange="app.admin.et2.getWidgetById('smime_pkcs12_password').set_disabled(false);"/>
|
||||
<passwd id="smime_pkcs12_password" size="32" maxlength="128" autocomplete="off" blur="Password to unlock encrypted p12" disabled="true"/>
|
||||
<file id="smimeKeyUpload" accept=".p12,.pfx"/>
|
||||
<passwd id="smime_pkcs12_password" size="32" maxlength="128" blur="Password to unlock encrypted p12" autocomplete="off"/>
|
||||
</vbox>
|
||||
</row>
|
||||
<row>
|
||||
<description value="Paste your private key as text here or upload your .key/.p12 file"/>
|
||||
<description value="Paste your private key as text here or upload your .p12 file"/>
|
||||
<textbox multiline="true" id="acc_smime_password" height="130" resize_ratio="0" class="et2_fullWidth"/>
|
||||
</row>
|
||||
<row>
|
||||
|
@ -158,9 +158,11 @@ class Smime extends Horde_Crypt_Smime
|
||||
*/
|
||||
public function extractCertPKCS12 ($pkcs12, $passphrase = '')
|
||||
{
|
||||
$certs = array ();
|
||||
$certs = $out = array ();
|
||||
if (openssl_pkcs12_read($pkcs12, $certs, $passphrase))
|
||||
{
|
||||
openssl_pkey_export($certs['pkey'], $out, $passphrase);
|
||||
$certs['pkey'] = $out;
|
||||
return $certs;
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user