mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-07 05:49:53 +01:00
* Mail/SMime: fix not working storage of public key in mail account
We failed silently, when browser reported something different then "application/x-pkcs12" eg. "application/octet-stream". Now we let OpenSSL decide if file contains a valid SMime key.
This commit is contained in:
parent
5f21737a42
commit
cff725ebc6
@ -1034,8 +1034,7 @@ class admin_mail
|
|||||||
$smime = new Mail\Smime;
|
$smime = new Mail\Smime;
|
||||||
$content['acc_smime_username'] = $smime->getEmailFromKey($content['smime_cert']);
|
$content['acc_smime_username'] = $smime->getEmailFromKey($content['smime_cert']);
|
||||||
$AB_bo = new addressbook_bo();
|
$AB_bo = new addressbook_bo();
|
||||||
if (($pkcs12 = file_get_contents($content['smimeKeyUpload']['tmp_name'])) &&
|
if (($pkcs12 = file_get_contents($content['smimeKeyUpload']['tmp_name'])))
|
||||||
$content['smimeKeyUpload']['type'] == 'application/x-pkcs12')
|
|
||||||
{
|
{
|
||||||
$cert_info = Mail\Smime::extractCertPKCS12($pkcs12, $content['smime_pkcs12_password']);
|
$cert_info = Mail\Smime::extractCertPKCS12($pkcs12, $content['smime_pkcs12_password']);
|
||||||
if (is_array($cert_info))
|
if (is_array($cert_info))
|
||||||
|
Loading…
Reference in New Issue
Block a user