1
0
mirror of https://github.com/danog/phpseclib.git synced 2024-12-12 09:09:39 +01:00

ASN1: Integers should by at least 1 byte long.

Fixes https://github.com/phpseclib/phpseclib/issues/126.
This commit is contained in:
Patrick Monnerat 2013-07-01 14:38:35 +02:00
parent e644c42efa
commit 23d48c4fc5

View File

@ -926,9 +926,9 @@ class File_ASN1 {
}
$value = new Math_BigInteger($value);
$value = $value->toBytes(true);
if (!strlen($value)) {
$value = chr(0);
}
}
if (!strlen($value)) {
$value = chr(0);
}
break;
case FILE_ASN1_TYPE_UTC_TIME: