Author: spouliot
Date: 2005-04-26 14:52:43 -0400 (Tue, 26 Apr 2005)
New Revision: 43615

Modified:
   
trunk/mcs/class/System.Security/System.Security.Cryptography.Pkcs/AlgorithmIdentifier.cs
   trunk/mcs/class/System.Security/System.Security.Cryptography.Pkcs/ChangeLog
   
trunk/mcs/class/System.Security/System.Security.Cryptography.Pkcs/ContentInfo.cs
   
trunk/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9ContentType.cs
   
trunk/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9DocumentDescription.cs
   
trunk/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9DocumentName.cs
   
trunk/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9MessageDigest.cs
   
trunk/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9SigningTime.cs
Log:
2005-04-26  Sebastien Pouliot  <[EMAIL PROTECTED]>

        * AlgorithmIdentifier.cs: Removed FIXME - seems "by design".
        * ContentInfo.cs: Applied fix for ArgumentNullException (was fixed in 
        beta2).
        * Pkcs9ContentType.cs: Added new override for CopyFrom.
        * Pkcs9DocumentDescription.cs: Added new override for CopyFrom. 
        Applied fix for ArgumentNullException (was fixed in beta2).
        * Pkcs9DocumentName.cs: Added new override for CopyFrom. 
        Applied fix for ArgumentNullException (was fixed in beta2).
        * Pkcs9MessageDigest.cs: Added new override for CopyFrom.
        * Pkcs9SigningTime.cs: Added new override for CopyFrom.



Modified: 
trunk/mcs/class/System.Security/System.Security.Cryptography.Pkcs/AlgorithmIdentifier.cs
===================================================================
--- 
trunk/mcs/class/System.Security/System.Security.Cryptography.Pkcs/AlgorithmIdentifier.cs
    2005-04-26 18:45:48 UTC (rev 43614)
+++ 
trunk/mcs/class/System.Security/System.Security.Cryptography.Pkcs/AlgorithmIdentifier.cs
    2005-04-26 18:52:43 UTC (rev 43615)
@@ -5,7 +5,7 @@
 //     Sebastien Pouliot  <[EMAIL PROTECTED]>
 //
 // (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
@@ -29,8 +29,6 @@
 
 #if NET_2_0
 
-using System;
-
 namespace System.Security.Cryptography.Pkcs {
 
        public sealed class AlgorithmIdentifier {
@@ -41,16 +39,20 @@
 
                // constructors
 
-               public AlgorithmIdentifier () : this (new Oid 
("1.2.840.113549.3.7", "3des")) {}
+               public AlgorithmIdentifier ()
+               {
+                       _oid = new Oid ("1.2.840.113549.3.7", "3des");
+                       _params = new byte [0];
+               }
 
-               public AlgorithmIdentifier (Oid algorithm) : this (algorithm, 
0) {}
+               public AlgorithmIdentifier (Oid algorithm)
+               {
+                       _oid = algorithm;
+                       _params = new byte [0];
+               }
 
                public AlgorithmIdentifier (Oid algorithm, int keyLength)
                {
-// FIXME: compatibility with fx 1.2.3400.0
-//                     if (algorithm == null)
-//                             throw new ArgumentNullException ("algorithm");
-
                        _oid = algorithm;
                        _length = keyLength;
                        _params = new byte [0];

Modified: 
trunk/mcs/class/System.Security/System.Security.Cryptography.Pkcs/ChangeLog
===================================================================
--- trunk/mcs/class/System.Security/System.Security.Cryptography.Pkcs/ChangeLog 
2005-04-26 18:45:48 UTC (rev 43614)
+++ trunk/mcs/class/System.Security/System.Security.Cryptography.Pkcs/ChangeLog 
2005-04-26 18:52:43 UTC (rev 43615)
@@ -1,3 +1,16 @@
+2005-04-26  Sebastien Pouliot  <[EMAIL PROTECTED]>
+
+       * AlgorithmIdentifier.cs: Removed FIXME - seems "by design".
+       * ContentInfo.cs: Applied fix for ArgumentNullException (was fixed in 
+       beta2).
+       * Pkcs9ContentType.cs: Added new override for CopyFrom.
+       * Pkcs9DocumentDescription.cs: Added new override for CopyFrom. 
+       Applied fix for ArgumentNullException (was fixed in beta2).
+       * Pkcs9DocumentName.cs: Added new override for CopyFrom. 
+       Applied fix for ArgumentNullException (was fixed in beta2).
+       * Pkcs9MessageDigest.cs: Added new override for CopyFrom.
+       * Pkcs9SigningTime.cs: Added new override for CopyFrom.
+
 2005-04-25  Sebastien Pouliot  <[EMAIL PROTECTED]>
 
        * SignedCms.cs: Fix compiler warning (unused variable).

Modified: 
trunk/mcs/class/System.Security/System.Security.Cryptography.Pkcs/ContentInfo.cs
===================================================================
--- 
trunk/mcs/class/System.Security/System.Security.Cryptography.Pkcs/ContentInfo.cs
    2005-04-26 18:45:48 UTC (rev 43614)
+++ 
trunk/mcs/class/System.Security/System.Security.Cryptography.Pkcs/ContentInfo.cs
    2005-04-26 18:52:43 UTC (rev 43615)
@@ -86,10 +86,9 @@
                [MonoTODO("Incomplete OID support")]
                public static Oid GetContentType (byte[] encodedMessage)
                {
-// FIXME: compatibility with fx 1.2.3400.0
                        if (encodedMessage == null)
-                               throw new NullReferenceException ();
-//                             throw new ArgumentNullException ("algorithm");
+                               throw new ArgumentNullException ("algorithm");
+
                        try {
                                PKCS7.ContentInfo ci = new PKCS7.ContentInfo 
(encodedMessage);
                                switch (ci.ContentType) {

Modified: 
trunk/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9ContentType.cs
===================================================================
--- 
trunk/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9ContentType.cs
       2005-04-26 18:45:48 UTC (rev 43614)
+++ 
trunk/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9ContentType.cs
       2005-04-26 18:52:43 UTC (rev 43615)
@@ -71,6 +71,14 @@
                        get { return _contentType; }
                }
 
+               // methods
+
+               public override void CopyFrom (AsnEncodedData asnEncodedData)
+               {
+                       base.CopyFrom (asnEncodedData);
+                       Decode (this.RawData);
+               }
+
                // internal stuff
 
                internal void Decode (byte[] attribute)

Modified: 
trunk/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9DocumentDescription.cs
===================================================================
--- 
trunk/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9DocumentDescription.cs
       2005-04-26 18:45:48 UTC (rev 43614)
+++ 
trunk/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9DocumentDescription.cs
       2005-04-26 18:52:43 UTC (rev 43615)
@@ -51,8 +51,7 @@
                public Pkcs9DocumentDescription (string documentDescription)
                {
                        if (documentDescription == null)
-                               throw new NullReferenceException 
("documentName");
-// match MS                    throw new ArgumentNullException 
("documentName");
+                               throw new ArgumentNullException 
("documentName");
 
                        (this as AsnEncodedData).Oid = new Oid (oid, 
friendlyName);
                        _desc = documentDescription;
@@ -73,6 +72,12 @@
                        get { return _desc; }
                }
 
+               public override void CopyFrom (AsnEncodedData asnEncodedData)
+               {
+                       base.CopyFrom (asnEncodedData);
+                       Decode (this.RawData);
+               }
+
                // internal stuff
 
                internal void Decode (byte[] attribute)

Modified: 
trunk/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9DocumentName.cs
===================================================================
--- 
trunk/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9DocumentName.cs
      2005-04-26 18:45:48 UTC (rev 43614)
+++ 
trunk/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9DocumentName.cs
      2005-04-26 18:52:43 UTC (rev 43615)
@@ -51,8 +51,7 @@
                public Pkcs9DocumentName (string documentName) 
                {
                        if (documentName == null)
-                               throw new NullReferenceException 
("documentName");
-// match MS                    throw new ArgumentNullException 
("documentName");
+                               throw new ArgumentNullException 
("documentName");
 
                        (this as AsnEncodedData).Oid = new Oid (oid, 
friendlyName);
                        _name = documentName;
@@ -73,6 +72,12 @@
                        get { return _name; }
                }
 
+               public override void CopyFrom (AsnEncodedData asnEncodedData)
+               {
+                       base.CopyFrom (asnEncodedData);
+                       Decode (this.RawData);
+               }
+
                // internal stuff
 
                internal void Decode (byte[] attribute)

Modified: 
trunk/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9MessageDigest.cs
===================================================================
--- 
trunk/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9MessageDigest.cs
     2005-04-26 18:45:48 UTC (rev 43614)
+++ 
trunk/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9MessageDigest.cs
     2005-04-26 18:52:43 UTC (rev 43615)
@@ -70,6 +70,14 @@
                        get { return _messageDigest; }
                }
 
+               // methods
+
+               public override void CopyFrom (AsnEncodedData asnEncodedData)
+               {
+                       base.CopyFrom (asnEncodedData);
+                       Decode (this.RawData);
+               }
+
                // internal stuff
 
                internal void Decode (byte[] attribute)

Modified: 
trunk/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9SigningTime.cs
===================================================================
--- 
trunk/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9SigningTime.cs
       2005-04-26 18:45:48 UTC (rev 43614)
+++ 
trunk/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9SigningTime.cs
       2005-04-26 18:52:43 UTC (rev 43615)
@@ -72,6 +72,12 @@
                        get { return _signingTime; }
                }
 
+               public override void CopyFrom (AsnEncodedData asnEncodedData)
+               {
+                       base.CopyFrom (asnEncodedData);
+                       Decode (this.RawData);
+               }
+
                // internal stuff
 
                internal void Decode (byte[] attribute)

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to