diff options
author | Atsushi Eno <atsushieno@gmail.com> | 2006-09-20 20:35:24 +0400 |
---|---|---|
committer | Atsushi Eno <atsushieno@gmail.com> | 2006-09-20 20:35:24 +0400 |
commit | 92fa75bd2cb80300ddd15fe6f76b4788c3d2615f (patch) | |
tree | b6ad8c94cd2bb44bfca6ee9660c33b8fdf6063d3 /mcs/class/System.Security/System.Security.Cryptography.Xml | |
parent | 1b468a8a7501f8dbb062bdaae24dddef8c6971d7 (diff) |
2006-09-20 Atsushi Enomoto <atsushi@ximian.com>
* SignedXml.cs : handle KeyInfoX509Data in GetPublicKey(). Fixed #1 of
bug #79454.
svn path=/trunk/mcs/; revision=65727
Diffstat (limited to 'mcs/class/System.Security/System.Security.Cryptography.Xml')
-rw-r--r-- | mcs/class/System.Security/System.Security.Cryptography.Xml/ChangeLog | 5 | ||||
-rw-r--r-- | mcs/class/System.Security/System.Security.Cryptography.Xml/SignedXml.cs | 7 |
2 files changed, 12 insertions, 0 deletions
diff --git a/mcs/class/System.Security/System.Security.Cryptography.Xml/ChangeLog b/mcs/class/System.Security/System.Security.Cryptography.Xml/ChangeLog index 8c811d144d3..66f417a6dee 100644 --- a/mcs/class/System.Security/System.Security.Cryptography.Xml/ChangeLog +++ b/mcs/class/System.Security/System.Security.Cryptography.Xml/ChangeLog @@ -1,3 +1,8 @@ +2006-09-20 Atsushi Enomoto <atsushi@ximian.com> + + * SignedXml.cs : handle KeyInfoX509Data in GetPublicKey(). Fixed #1 of + bug #79454. + 2006-09-07 Atsushi Enomoto <atsushi@ximian.com> * EncryptedXml.cs : DecryptData() should not pass block size to diff --git a/mcs/class/System.Security/System.Security.Cryptography.Xml/SignedXml.cs b/mcs/class/System.Security/System.Security.Cryptography.Xml/SignedXml.cs index ef8f1895489..50718164a58 100644 --- a/mcs/class/System.Security/System.Security.Cryptography.Xml/SignedXml.cs +++ b/mcs/class/System.Security/System.Security.Cryptography.Xml/SignedXml.cs @@ -685,6 +685,13 @@ namespace System.Security.Cryptography.Xml { AsymmetricAlgorithm key = null; KeyInfoClause kic = (KeyInfoClause) pkEnumerator.Current; +#if NET_2_0 + if (kic is KeyInfoX509Data) { + foreach (X509Certificate cert in ((KeyInfoX509Data) kic).Certificates) + // FIXME: this GetRawCertData() should not be required, but it somehow causes crash. + return new X509Certificate2 (cert.GetRawCertData ()).PublicKey.Key; + } +#endif if (kic is DSAKeyValue) key = DSA.Create (); else if (kic is RSAKeyValue) |