From 2d34c291f0113aa728544abedee4e08c7c9c41cc Mon Sep 17 00:00:00 2001 From: Patrick Monnerat Date: Wed, 24 Oct 2012 11:42:13 +0200 Subject: [PATCH] ASN1: _decode_ber should now accept a FILE_ASN1_Element object as source. --- phpseclib/File/ASN1.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/phpseclib/File/ASN1.php b/phpseclib/File/ASN1.php index 5ff2bdf2..66b309b5 100644 --- a/phpseclib/File/ASN1.php +++ b/phpseclib/File/ASN1.php @@ -260,6 +260,10 @@ class File_ASN1 { { $decoded = array(); + if (is_object($encoded) && strtolower(get_class($encoded)) == 'file_asn1_element') { + $encoded = $encoded->element; + } + if ($start == 0) { $this->encoded = $encoded; }