diff options
author | Sebastien Pouliot <sebastien@ximian.com> | 2005-06-30 00:00:45 +0400 |
---|---|---|
committer | Sebastien Pouliot <sebastien@ximian.com> | 2005-06-30 00:00:45 +0400 |
commit | bb5056ac010e8f4390bb12246ff1e7cc5006a82b (patch) | |
tree | 96e0d84dd54e26f0de0d1badf23e7703ea2b81c3 /mcs/class/Mono.Security/Mono.Security.X509/X509CRL.cs | |
parent | 75f4941ff76c675bd95ccd5229d8a3348413ed7c (diff) |
2005-06-29 Sebastien Pouliot <sebastien@ximian.com>
* X509CRL.cs: Fix the case where no entry are present in the CRL (as
the structure is optional).
svn path=/trunk/mcs/; revision=46732
Diffstat (limited to 'mcs/class/Mono.Security/Mono.Security.X509/X509CRL.cs')
-rw-r--r-- | mcs/class/Mono.Security/Mono.Security.X509/X509CRL.cs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/mcs/class/Mono.Security/Mono.Security.X509/X509CRL.cs b/mcs/class/Mono.Security/Mono.Security.X509/X509CRL.cs index d3a86fc9e28..e58f52a1186 100644 --- a/mcs/class/Mono.Security/Mono.Security.X509/X509CRL.cs +++ b/mcs/class/Mono.Security/Mono.Security.X509/X509CRL.cs @@ -167,9 +167,14 @@ namespace Mono.Security.X509 { } // CertificateList / TBSCertList / revokedCertificates SEQUENCE OF SEQUENCE { entries = new ArrayList (); - ASN1 revokedCertificates = next; - for (int i=0; i < revokedCertificates.Count; i++) { - entries.Add (new X509CrlEntry (revokedCertificates [i])); + // this is OPTIONAL so it may not be present if no entries exists + if (next.Tag == 0x30) { + ASN1 revokedCertificates = next; + for (int i=0; i < revokedCertificates.Count; i++) { + entries.Add (new X509CrlEntry (revokedCertificates [i])); + } + } else { + n--; } // CertificateList / TBSCertList / crlExtensions [0] Extensions OPTIONAL } ASN1 extns = toBeSigned [n]; |