mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-08 14:55:10 +02:00
W.I.P of SMIME support for mail application:
- Add a method for extracting public-key from a certificate
This commit is contained in:
@ -69,4 +69,17 @@ class Smime extends Horde_Crypt_Smime
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extract public key from certificate
|
||||
*
|
||||
* @param type $cert
|
||||
* @return string returns public key
|
||||
*/
|
||||
public function get_publickey ($cert)
|
||||
{
|
||||
$handle = openssl_get_publickey($cert);
|
||||
$keyData = openssl_pkey_get_details($handle);
|
||||
return $keyData['key'];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user