There may be no subpackets
This commit is contained in:
parent
e3bc3757d1
commit
1c7f759798
@ -424,13 +424,13 @@ class OpenPGP_SignaturePacket extends OpenPGP_Packet {
|
||||
$body = chr(4).chr($this->signature_type).chr($this->key_algorithm).chr($this->hash_algorithm);
|
||||
|
||||
$hashed_subpackets = '';
|
||||
foreach($this->hashed_subpackets as $p) {
|
||||
foreach((array)$this->hashed_subpackets as $p) {
|
||||
$hashed_subpackets .= $p->to_bytes();
|
||||
}
|
||||
$body .= pack('n', strlen($hashed_subpackets)).$hashed_subpackets;
|
||||
|
||||
$unhashed_subpackets = '';
|
||||
foreach($this->unhashed_subpackets as $p) {
|
||||
foreach((array)$this->unhashed_subpackets as $p) {
|
||||
$unhashed_subpackets .= $p->to_bytes();
|
||||
}
|
||||
$body .= pack('n', strlen($unhashed_subpackets)).$unhashed_subpackets;
|
||||
|
Loading…
Reference in New Issue
Block a user