From 147c3ebea427a51b6a47a9e94e0a5bbfa0d97579 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Tue, 26 Mar 2013 19:50:24 -0500 Subject: [PATCH] ASN1: if an int val would be '' make it be "\0" --- phpseclib/File/ASN1.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/phpseclib/File/ASN1.php b/phpseclib/File/ASN1.php index 6bc1e93d..80f26fff 100644 --- a/phpseclib/File/ASN1.php +++ b/phpseclib/File/ASN1.php @@ -918,6 +918,9 @@ class File_ASN1 { } $value = new Math_BigInteger($value); $value = $value->toBytes(true); + if (!strlen($value)) { + $value = chr(0); + } } break; case FILE_ASN1_TYPE_UTC_TIME: