[Pkg-mono-svn-commits] [SCM] mono branch, master, updated. debian/2.10.5-1-10-g4067135
Mirco Bauer
meebey at meebey.net
Mon Jan 16 06:01:28 UTC 2012
The following commit has been merged in the master branch:
commit d864bceab01376569953a74d56df502ef48cee39
Author: Sebastien Pouliot <sebastien at ximian.com>
Date: Mon Apr 4 11:32:05 2011 -0400
Avoid throwing an ANE on an invalid X.509 extension
* X509ExtensionCollection.cs: Avoid throwing an ArgumentNullException
when processing an invalid X.509 extension (e.g. where the value is not
encoded in an OCTETSTRING). See E37A3466C703DCB14E6E16E416E51DC04A42A52B
in bnc #682619
(cherry picked from commit eb02ba9d97a2b02cc4b0dc1512012377b648c830)
diff --git a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509ExtensionCollection.cs b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509ExtensionCollection.cs
index 9a46770..0013d96 100644
--- a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509ExtensionCollection.cs
+++ b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509ExtensionCollection.cs
@@ -39,6 +39,7 @@ namespace System.Security.Cryptography.X509Certificates {
public sealed class X509ExtensionCollection : ICollection, IEnumerable {
+ static byte[] Empty = new byte [0];
private ArrayList _list;
// constructors
@@ -84,13 +85,13 @@ namespace System.Security.Cryptography.X509Certificates {
break;
}
#else
- parameters [0] = new AsnEncodedData (oid, raw_data);
+ parameters [0] = new AsnEncodedData (oid, raw_data ?? Empty);
parameters [1] = critical;
newt = (X509Extension) CryptoConfig.CreateFromName (oid, parameters);
#endif
if (newt == null) {
// not registred in CryptoConfig, using default
- newt = new X509Extension (oid, raw_data, critical);
+ newt = new X509Extension (oid, raw_data ?? Empty, critical);
}
_list.Add (newt);
}
--
mono
More information about the Pkg-mono-svn-commits
mailing list