2005-04-23 Sebastien Pouliot <sebastien@ximian.com>
authorSebastien Pouliot <sebastien@ximian.com>
Sat, 23 Apr 2005 14:22:03 +0000 (14:22 -0000)
committerSebastien Pouliot <sebastien@ximian.com>
Sat, 23 Apr 2005 14:22:03 +0000 (14:22 -0000)
* CmsRecipientTest.cs, CmsSignerTest.cs, EnvelopedCmsTest.cs,
Pkcs9AttributeTest.cs, Pkcs9DocumentDescriptionTest.cs,
Pkcs9DocumentNameTest.cs, Pkcs9SigningTimeTest.cs, SignedCmsTest.cs:
Adapted for class name changes in beta2 and re-activated some tests on
Windows that were fixed in beta2.

svn path=/trunk/mcs/; revision=43483

mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/ChangeLog
mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/CmsRecipientTest.cs
mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/CmsSignerTest.cs
mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/EnvelopedCmsTest.cs
mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/Pkcs9AttributeTest.cs
mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/Pkcs9DocumentDescriptionTest.cs
mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/Pkcs9DocumentNameTest.cs
mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/Pkcs9SigningTimeTest.cs
mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/SignedCmsTest.cs

index 4fad79e161ddd48d17eb47a7030dfac32f162740..a1a38280160cb13efdc6fe5b717cbb42736cd62a 100755 (executable)
@@ -1,3 +1,11 @@
+2005-04-23  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * CmsRecipientTest.cs, CmsSignerTest.cs, EnvelopedCmsTest.cs,
+       Pkcs9AttributeTest.cs, Pkcs9DocumentDescriptionTest.cs, 
+       Pkcs9DocumentNameTest.cs, Pkcs9SigningTimeTest.cs, SignedCmsTest.cs:
+       Adapted for class name changes in beta2 and re-activated some tests on
+       Windows that were fixed in beta2.
+
 2005-01-17  Sebastien Pouliot  <sebastien@ximian.com>
 
        * Pkcs9ContentTypeTest.cs: New. Unit tests for ContentType attribute.
index bd192dd569d7114e39bacdd65845330ad38383df..9cafb5437216ae859062e5c39f85fa7020760dde 100755 (executable)
@@ -64,15 +64,15 @@ namespace MonoTests.System.Security.Cryptography.Pkcs {
                        0x0F, 0xCE, 0x10, 0x28, 0x3D, 0x2A, 0x45, 0x64, 0x60, 0xE3, 0xB7, 0xE1, 0x76, 0x90, 0xEC, 0x5B, 0xC6, 0xA1, 0xF0, 0xC4, 0xE8, 0x12, 0xD9, 0xC6, 0x22, 0x80, 0xB5, 0x30, 0xE5, 0x17, 0xAE, 0x05, 0x96, 0xBB, 0x4E, 0xBB, 0x33, 0xBB, 0xB0, 0x63, 0x29, 0x74, 0x11, 0x06, 0x23, 0x36, 0xB4, 0xA1, 0x25, 0xD5, 0x2A, 0xF3, 0x90, 0x38, 0x18, 0x02, 0x62, 0x30, 0x3B, 0x30, 0x1F, 0x30, 0x07, 0x06, 0x05, 0x2B, 0x0E, 0x03, 0x02, 0x1A, 0x04, 0x14, 0xDC, 0x3A, 0xAB, 0x36, 0xD7, 0x3E, 0xF4, 0x6C, 0x52, 0xC9, 0x89, 0x37, 0xFE, 0x71, 0x71, 0x83, 0xC6, 0x09, 0x88, 0xDD, 0x04, 0x14, 0xF5, 0x76, 0xC2, 0xCC, 0xB9, 0xE5, 
                        0xF5, 0x28, 0xA3, 0x2D, 0x55, 0xDC, 0xDE, 0x3B, 0xCF, 0x53, 0xEE, 0x4B, 0x8F, 0x6F, 0x02, 0x02, 0x07, 0xD0 };
 
-               private X509CertificateEx GetCertificate (bool includePrivateKey) 
+               private X509Certificate2 GetCertificate (bool includePrivateKey) 
                {
-                       return new X509CertificateEx (farscape_p12_pfx, "farscape");
+                       return new X509Certificate2 (farscape_p12_pfx, "farscape");
                }
 
                [Test]
                public void IssuerAndSerialNumber () 
                {
-                       X509CertificateEx x509 = GetCertificate (true);
+                       X509Certificate2 x509 = GetCertificate (true);
                        CmsRecipient p7r = new CmsRecipient (SubjectIdentifierType.IssuerAndSerialNumber, x509);
                        AssertEquals ("RecipientIdentifierType", SubjectIdentifierType.IssuerAndSerialNumber, p7r.RecipientIdentifierType);
                        AssertEquals ("Certificate", x509.Thumbprint, p7r.Certificate.Thumbprint);
@@ -81,7 +81,7 @@ namespace MonoTests.System.Security.Cryptography.Pkcs {
                [Test]
                public void SubjectKeyIdentifier () 
                {
-                       X509CertificateEx x509 = GetCertificate (true);
+                       X509Certificate2 x509 = GetCertificate (true);
                        CmsRecipient p7r = new CmsRecipient (SubjectIdentifierType.SubjectKeyIdentifier, x509);
                        AssertEquals ("RecipientIdentifierType", SubjectIdentifierType.SubjectKeyIdentifier, p7r.RecipientIdentifierType);
                        AssertEquals ("Certificate", x509.Thumbprint, p7r.Certificate.Thumbprint);
@@ -90,7 +90,7 @@ namespace MonoTests.System.Security.Cryptography.Pkcs {
                [Test]
                public void Unknown () 
                {
-                       X509CertificateEx x509 = GetCertificate (true);
+                       X509Certificate2 x509 = GetCertificate (true);
                        CmsRecipient p7r = new CmsRecipient (SubjectIdentifierType.Unknown, x509);
                        AssertEquals ("RecipientIdentifierType", SubjectIdentifierType.IssuerAndSerialNumber, p7r.RecipientIdentifierType);
                        AssertEquals ("Certificate", x509.Thumbprint, p7r.Certificate.Thumbprint);
index bbe8287db89056b3739cd060f9d6680c94de7d4b..9082ee26a399dec461f7cd39c39b73a03d0ac71a 100755 (executable)
@@ -106,16 +106,16 @@ namespace MonoTests.System.Security.Cryptography.Pkcs {
                }
 
                // TODO: return valid x509 certifiate with private key
-               private X509CertificateEx GetValidCertificateWithPrivateKey () 
+               private X509Certificate2 GetValidCertificateWithPrivateKey () 
                {
-                       X509CertificateEx x509 = new X509CertificateEx ();
+                       X509Certificate2 x509 = new X509Certificate2 ();
                        return x509;
                }
 
                [Test]
                public void ConstructorX509CertificateEx () 
                {
-                       X509CertificateEx x509 = GetValidCertificateWithPrivateKey ();
+                       X509Certificate2 x509 = GetValidCertificateWithPrivateKey ();
                        CmsSigner ps = new CmsSigner (x509);
                        // default properties
                        AssertEquals ("SignedAttributes", 0, ps.SignedAttributes.Count);
@@ -130,7 +130,7 @@ namespace MonoTests.System.Security.Cryptography.Pkcs {
                [Test]
                public void ConstructorX509CertificateExEmpty () 
                {
-                       X509CertificateEx x509 = new X509CertificateEx (); // empty
+                       X509Certificate2 x509 = new X509Certificate2 (); // empty
                        CmsSigner ps = new CmsSigner (x509);
                        // default properties
                        AssertEquals ("SignedAttributes", 0, ps.SignedAttributes.Count);
@@ -146,7 +146,7 @@ namespace MonoTests.System.Security.Cryptography.Pkcs {
                //BUG [ExpectedException (typeof (ArgumentNullException))]
                public void ConstructorX509CertificateExNull () 
                {
-                       X509CertificateEx x509 = null;
+                       X509Certificate2 x509 = null;
                        CmsSigner ps = new CmsSigner (x509);
                        // default properties
                        AssertEquals ("SignedAttributes", 0, ps.SignedAttributes.Count);
@@ -161,7 +161,7 @@ namespace MonoTests.System.Security.Cryptography.Pkcs {
                [Test]
                public void ConstructorIssuerAndSerialNumberX509CertificateEx () 
                {
-                       X509CertificateEx x509 = GetValidCertificateWithPrivateKey ();
+                       X509Certificate2 x509 = GetValidCertificateWithPrivateKey ();
                        CmsSigner ps = new CmsSigner (SubjectIdentifierType.IssuerAndSerialNumber, x509);
                        // default properties
                        AssertEquals ("SignedAttributes", 0, ps.SignedAttributes.Count);
@@ -176,7 +176,7 @@ namespace MonoTests.System.Security.Cryptography.Pkcs {
                [Test]
                public void ConstructorSubjectKeyIdentifierX509CertificateEx () 
                {
-                       X509CertificateEx x509 = GetValidCertificateWithPrivateKey ();
+                       X509Certificate2 x509 = GetValidCertificateWithPrivateKey ();
                        CmsSigner ps = new CmsSigner (SubjectIdentifierType.SubjectKeyIdentifier, x509);
                        // default properties
                        AssertEquals ("SignedAttributes", 0, ps.SignedAttributes.Count);
@@ -191,7 +191,7 @@ namespace MonoTests.System.Security.Cryptography.Pkcs {
                [Test]
                public void ConstructorUnknownX509CertificateEx () 
                {
-                       X509CertificateEx x509 = GetValidCertificateWithPrivateKey ();
+                       X509Certificate2 x509 = GetValidCertificateWithPrivateKey ();
                        CmsSigner ps = new CmsSigner (SubjectIdentifierType.Unknown, x509);
                        // default properties
                        AssertEquals ("SignedAttributes", 0, ps.SignedAttributes.Count);
index 57520c19b4d570403e9f5671a2bc9596c4a02e3a..99657645a4f41086d0380fcee3e718c73b7b77fe 100755 (executable)
@@ -85,9 +85,9 @@ namespace MonoTests.System.Security.Cryptography.Pkcs {
                        AssertEquals ("Version", version, ep.Version);
                }
 
-               private X509CertificateEx GetCertificate (bool includePrivateKey) 
+               private X509Certificate2 GetCertificate (bool includePrivateKey) 
                {
-                       return new X509CertificateEx (farscape_p12_pfx, "farscape");
+                       return new X509Certificate2 (farscape_p12_pfx, "farscape");
                }
 
                [Test]
@@ -233,8 +233,8 @@ namespace MonoTests.System.Security.Cryptography.Pkcs {
                        EnvelopedCms ep = new EnvelopedCms ();
                        ep.Decode (encoded);
 
-                       X509CertificateEx x509 = GetCertificate (true);
-                       X509CertificateExCollection xc = new X509CertificateExCollection ();
+                       X509Certificate2 x509 = GetCertificate (true);
+                       X509Certificate2Collection xc = new X509Certificate2Collection ();
                        xc.Add (x509);
                        ep.Decrypt (xc);
                        // properties
@@ -273,7 +273,7 @@ namespace MonoTests.System.Security.Cryptography.Pkcs {
                public void DecryptX509CertificateExCollectionNull () 
                {
                        EnvelopedCms ep = new EnvelopedCms ();
-                       X509CertificateExCollection xec = null; // do not confuse compiler
+                       X509Certificate2Collection xec = null; // do not confuse compiler
                        ep.Decrypt (xec);
                }
 
@@ -282,7 +282,7 @@ namespace MonoTests.System.Security.Cryptography.Pkcs {
                public void DecryptRecipientInfoX509CertificateExCollectionNull () 
                {
                        EnvelopedCms ep = new EnvelopedCms ();
-                       X509CertificateExCollection xec = new X509CertificateExCollection ();
+                       X509Certificate2Collection xec = new X509Certificate2Collection ();
                        ep.Decrypt (null, xec);
                }
 
@@ -297,7 +297,7 @@ namespace MonoTests.System.Security.Cryptography.Pkcs {
 
                private void RoundTrip (byte[] encoded) 
                {
-                       X509CertificateExCollection xc = new X509CertificateExCollection ();
+                       X509Certificate2Collection xc = new X509Certificate2Collection ();
                        xc.Add (GetCertificate (true));
                        EnvelopedCms ep = new EnvelopedCms ();
                        ep.Decode (encoded);
@@ -311,7 +311,7 @@ namespace MonoTests.System.Security.Cryptography.Pkcs {
                        ContentInfo ci = new ContentInfo (asnNull);
                        EnvelopedCms ep = new EnvelopedCms (SubjectIdentifierType.IssuerAndSerialNumber, ci);
 
-                       X509CertificateEx x509 = GetCertificate (false);
+                       X509Certificate2 x509 = GetCertificate (false);
                        CmsRecipient p7r = new CmsRecipient (SubjectIdentifierType.IssuerAndSerialNumber, x509);
                        ep.Encrypt (p7r);
                        byte[] encoded = ep.Encode ();
@@ -329,7 +329,7 @@ namespace MonoTests.System.Security.Cryptography.Pkcs {
                        ContentInfo ci = new ContentInfo (asnNull);
                        EnvelopedCms ep = new EnvelopedCms (SubjectIdentifierType.IssuerAndSerialNumber, ci);
 
-                       X509CertificateEx x509 = GetCertificate (false);
+                       X509Certificate2 x509 = GetCertificate (false);
                        CmsRecipient p7r = new CmsRecipient (SubjectIdentifierType.SubjectKeyIdentifier, x509);
                        ep.Encrypt (p7r);
                        byte[] encoded = ep.Encode ();
@@ -347,7 +347,7 @@ namespace MonoTests.System.Security.Cryptography.Pkcs {
                        ContentInfo ci = new ContentInfo (asnNull);
                        EnvelopedCms ep = new EnvelopedCms (SubjectIdentifierType.IssuerAndSerialNumber, ci);
 
-                       X509CertificateEx x509 = GetCertificate (false);
+                       X509Certificate2 x509 = GetCertificate (false);
                        CmsRecipient p7r = new CmsRecipient (SubjectIdentifierType.Unknown, x509);
                        ep.Encrypt (p7r);
                        byte[] encoded = ep.Encode ();
index 0355ca61c444d2abf99ea991c96c38b34931207f..2a11d0de0fad8df455f5ee736405b2655a8a76cc 100755 (executable)
@@ -39,7 +39,7 @@ using System.Security.Cryptography.Pkcs;
 namespace MonoTests.System.Security.Cryptography.Pkcs {
 
        [TestFixture]
-       public class Pkcs9AttributeTest {
+       public class Pkcs9AttributeObjectTest {
 
                static string defaultOid = "1.2.840.113549.1.7.1";
                static string defaultName = "PKCS 7 Data";
@@ -47,7 +47,7 @@ namespace MonoTests.System.Security.Cryptography.Pkcs {
                [Test]
                public void ConstructorEmpty () 
                {
-                       Pkcs9Attribute a = new Pkcs9Attribute ();
+                       Pkcs9AttributeObject a = new Pkcs9AttributeObject ();
                        Assert.IsNull (a.Oid, "Oid");
                        Assert.IsNull (a.RawData, "RawData");
                }
@@ -56,14 +56,14 @@ namespace MonoTests.System.Security.Cryptography.Pkcs {
                [ExpectedException (typeof (ArgumentNullException))]
                public void ConstructorAsnEncodedDataNull () 
                {
-                       Pkcs9Attribute a = new Pkcs9Attribute (null);
+                       Pkcs9AttributeObject a = new Pkcs9AttributeObject (null);
                }
 
                [Test]
                public void ConstructorOidArray () 
                {
                        Oid o = new Oid (defaultOid);
-                       Pkcs9Attribute a = new Pkcs9Attribute (o, new byte [0]);
+                       Pkcs9AttributeObject a = new Pkcs9AttributeObject (o, new byte[0]);
                        Assert.AreEqual (defaultName, a.Oid.FriendlyName, "Oid.FriendlyName");
                        Assert.AreEqual (defaultOid, a.Oid.Value, "Oid.Value");
                        Assert.AreEqual (0, a.RawData.Length, "RawData");
@@ -74,7 +74,7 @@ namespace MonoTests.System.Security.Cryptography.Pkcs {
                public void ConstructorOidNullArray ()
                {
                        Oid o = null;
-                       Pkcs9Attribute a = new Pkcs9Attribute (o, new byte [0]);
+                       Pkcs9AttributeObject a = new Pkcs9AttributeObject (o, new byte[0]);
                }
 
                [Test]
@@ -82,13 +82,13 @@ namespace MonoTests.System.Security.Cryptography.Pkcs {
                public void ConstructorOidArrayNull ()
                {
                        Oid o = new Oid (defaultOid);
-                       Pkcs9Attribute a = new Pkcs9Attribute (o, null);
+                       Pkcs9AttributeObject a = new Pkcs9AttributeObject (o, null);
                }
 
                [Test]
                public void ConstructorStringArray ()
                {
-                       Pkcs9Attribute a = new Pkcs9Attribute (defaultOid, new byte [0]);
+                       Pkcs9AttributeObject a = new Pkcs9AttributeObject (defaultOid, new byte[0]);
                        Assert.AreEqual (defaultName, a.Oid.FriendlyName, "Oid.FriendlyName");
                        Assert.AreEqual (defaultOid, a.Oid.Value, "Oid.Value");
                        Assert.AreEqual (0, a.RawData.Length, "RawData");
@@ -99,14 +99,14 @@ namespace MonoTests.System.Security.Cryptography.Pkcs {
                public void ConstructorStringNullArray ()
                {
                        string s = null;
-                       Pkcs9Attribute a = new Pkcs9Attribute (s, new byte [0]);
+                       Pkcs9AttributeObject a = new Pkcs9AttributeObject (s, new byte[0]);
                }
 
                [Test]
                [ExpectedException (typeof (ArgumentNullException))]
                public void ConstructorStringArrayNull ()
                {
-                       Pkcs9Attribute a = new Pkcs9Attribute (defaultOid, null);
+                       Pkcs9AttributeObject a = new Pkcs9AttributeObject (defaultOid, null);
                }
        }
 }
index 64d725b9842e15e4b66665e665df03dadd89ae8d..a43030f3b1ab4140a2e7d35e29917b5d04e1b597 100755 (executable)
@@ -5,7 +5,7 @@
 //     Sebastien Pouliot  <sebastien@ximian.com>
 //
 // (C) 2003 Motus Technologies Inc. (http://www.motus.com)
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
@@ -75,9 +75,7 @@ namespace MonoTests.System.Security.Cryptography.Pkcs {
                }
 
                [Test]
-               [ExpectedException (typeof (NullReferenceException))]
-               // MSBUG [ExpectedException (typeof (ArgumentNullException))]
-               // reported as 
+               [ExpectedException (typeof (ArgumentNullException))]
                public void Constructor_StringNull () 
                {
                        string desc = null;
index b24e36a9823bdf2a3a4878d38de628e44ec054fd..0a683e9e554a841384f92aa826e8e3477e983110 100755 (executable)
@@ -5,7 +5,7 @@
 //     Sebastien Pouliot  <sebastien@ximian.com>
 //
 // (C) 2003 Motus Technologies Inc. (http://www.motus.com)
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
@@ -75,9 +75,7 @@ namespace MonoTests.System.Security.Cryptography.Pkcs {
                }
 
                [Test]
-               [ExpectedException (typeof (NullReferenceException))]
-               // MSBUG [ExpectedException (typeof (ArgumentNullException))]
-               // reported as 
+               [ExpectedException (typeof (ArgumentNullException))]
                public void Constructor_StringNull ()
                {
                        string name = null;
index 0aae1bc92f2506889fc20c50e267106fed6c89f5..1767d49992ba160671a36866f97a6714907acbd5 100755 (executable)
@@ -188,7 +188,7 @@ namespace MonoTests.System.Security.Cryptography.Pkcs {
                }
 
                [Test]
-               [Ignore ("MS returns bad results (original time) - Mono needs to override CopyFrom to fix")]
+//             [Ignore ("MS returns bad results (original time) - Mono needs to override CopyFrom to fix")]
                // http://lab.msdn.microsoft.com/ProductFeedback/viewfeedback.aspx?feedbackid=66943396-ad73-497f-82ae-090b87ffcb4e
                public void CopyFrom () 
                {
@@ -210,7 +210,7 @@ namespace MonoTests.System.Security.Cryptography.Pkcs {
                }
 
                [Test]
-               [Ignore ("MS doesn't throw but returns bad results - Mono needs to override CopyFrom to fix")]
+//             [Ignore ("MS doesn't throw but returns bad results - Mono needs to override CopyFrom to fix")]
                // http://lab.msdn.microsoft.com/ProductFeedback/viewfeedback.aspx?feedbackid=66943396-ad73-497f-82ae-090b87ffcb4e
                [ExpectedException (typeof (CryptographicException))]
                public void CopyFrom_Bad ()
index 3b5ccabe5487c0b122cb99dc7b360eeff1ee2159..a45681d75dd3ce3e19e766dc3c175a27c6e285cf 100755 (executable)
@@ -92,15 +92,15 @@ namespace MonoTests.System.Security.Cryptography.Pkcs {
                        AssertEquals ("Version", version, sp.Version);
                }
 
-               private X509CertificateEx GetCertificate (bool includePrivateKey) 
+               private X509Certificate2 GetCertificate (bool includePrivateKey) 
                {
-                       return new X509CertificateEx (farscape_p12_pfx, "farscape");
+                       return new X509Certificate2 (farscape_p12_pfx, "farscape");
                }
 
-               private void AddChain (X509CertificateExCollection coll)
+               private void AddChain (X509Certificate2Collection coll)
                {
-                       coll.Add (new X509CertificateEx (intca_cer));
-                       coll.Add (new X509CertificateEx (root_cer));
+                       coll.Add (new X509Certificate2 (intca_cer));
+                       coll.Add (new X509Certificate2 (root_cer));
                }
 
                [Test]
@@ -305,8 +305,8 @@ namespace MonoTests.System.Security.Cryptography.Pkcs {
                        SignedCms sp = new SignedCms (ci);
 
                        CmsSigner signer = new CmsSigner (SubjectIdentifierType.IssuerAndSerialNumber, GetCertificate (true));
-                       signer.Certificates.Add (new X509CertificateEx (intca_cer));
-                       signer.Certificates.Add (new X509CertificateEx (root_cer));
+                       signer.Certificates.Add (new X509Certificate2 (intca_cer));
+                       signer.Certificates.Add (new X509Certificate2 (root_cer));
                        sp.ComputeSignature (signer);
 
                        byte[] encoded = sp.Encode ();
@@ -326,8 +326,8 @@ namespace MonoTests.System.Security.Cryptography.Pkcs {
                        SignedCms sp = new SignedCms (ci);
 
                        CmsSigner signer = new CmsSigner (SubjectIdentifierType.SubjectKeyIdentifier, GetCertificate (true));
-                       signer.Certificates.Add (new X509CertificateEx (intca_cer));
-                       signer.Certificates.Add (new X509CertificateEx (root_cer));
+                       signer.Certificates.Add (new X509Certificate2 (intca_cer));
+                       signer.Certificates.Add (new X509Certificate2 (root_cer));
                        sp.ComputeSignature (signer);
 
                        byte[] encoded = sp.Encode ();
@@ -347,8 +347,8 @@ namespace MonoTests.System.Security.Cryptography.Pkcs {
                        SignedCms sp = new SignedCms (ci);
 
                        CmsSigner signer = new CmsSigner (SubjectIdentifierType.Unknown, GetCertificate (true));
-                       signer.Certificates.Add (new X509CertificateEx (intca_cer));
-                       signer.Certificates.Add (new X509CertificateEx (root_cer));
+                       signer.Certificates.Add (new X509Certificate2 (intca_cer));
+                       signer.Certificates.Add (new X509Certificate2 (root_cer));
                        sp.ComputeSignature (signer);
 
                        byte[] encoded = sp.Encode ();