forked from extern/egroupware
W.I.P of SMIME support for mail application:
- Add a method for extracting public-key from a certificate
This commit is contained in:
parent
d8163bbbf7
commit
2b99050d99
@ -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'];
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user