Conveniance function to get issuer

This commit is contained in:
Stephen Paul Weber 2010-04-01 18:03:12 -05:00
parent 1e81ed0bb1
commit b42ec74ab4

View File

@ -489,6 +489,16 @@ class OpenPGP_SignaturePacket extends OpenPGP_Packet {
return self::$hash_algorithms[$this->hash_algorithm];
}
function issuer() {
foreach($this->hashed_subpackets as $p) {
if($p instanceof OpenPGP_SignaturePacket_IssuerPacket) return $p->data;
}
foreach($this->unhashed_subpackets as $p) {
if($p instanceof OpenPGP_SignaturePacket_IssuerPacket) return $p->data;
}
return NULL;
}
/**
* @see http://tools.ietf.org/html/rfc4880#section-5.2.3.1
*/