Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Pouliot <sebastien@ximian.com>2005-04-26 22:52:43 +0400
committerSebastien Pouliot <sebastien@ximian.com>2005-04-26 22:52:43 +0400
commita7e797ce40a954c8152346fe4757ef195082f092 (patch)
tree0d3d4de383ad028801d53ebbae5586f3dfbb8bdb /mcs/class/System.Security/System.Security.Cryptography.Pkcs
parentd59143c0783ce8140176aeb36b70eafa99f749d4 (diff)
2005-04-26 Sebastien Pouliot <sebastien@ximian.com>
* 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. svn path=/trunk/mcs/; revision=43615
Diffstat (limited to 'mcs/class/System.Security/System.Security.Cryptography.Pkcs')
-rwxr-xr-xmcs/class/System.Security/System.Security.Cryptography.Pkcs/AlgorithmIdentifier.cs20
-rwxr-xr-xmcs/class/System.Security/System.Security.Cryptography.Pkcs/ChangeLog13
-rwxr-xr-xmcs/class/System.Security/System.Security.Cryptography.Pkcs/ContentInfo.cs5
-rwxr-xr-xmcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9ContentType.cs8
-rwxr-xr-xmcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9DocumentDescription.cs9
-rwxr-xr-xmcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9DocumentName.cs9
-rwxr-xr-xmcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9MessageDigest.cs8
-rwxr-xr-xmcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9SigningTime.cs6
8 files changed, 62 insertions, 16 deletions
diff --git a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/AlgorithmIdentifier.cs b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/AlgorithmIdentifier.cs
index 44b4eaaa97a..62ebcb640f8 100755
--- a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/AlgorithmIdentifier.cs
+++ b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/AlgorithmIdentifier.cs
@@ -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
@@ -29,8 +29,6 @@
#if NET_2_0
-using System;
-
namespace System.Security.Cryptography.Pkcs {
public sealed class AlgorithmIdentifier {
@@ -41,16 +39,20 @@ namespace System.Security.Cryptography.Pkcs {
// 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];
diff --git a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/ChangeLog b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/ChangeLog
index 6cba928700c..3dcf83637ca 100755
--- a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/ChangeLog
+++ b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/ChangeLog
@@ -1,3 +1,16 @@
+2005-04-26 Sebastien Pouliot <sebastien@ximian.com>
+
+ * 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 <sebastien@ximian.com>
* SignedCms.cs: Fix compiler warning (unused variable).
diff --git a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/ContentInfo.cs b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/ContentInfo.cs
index b5e9d25162e..66e111bd9a4 100755
--- a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/ContentInfo.cs
+++ b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/ContentInfo.cs
@@ -86,10 +86,9 @@ namespace System.Security.Cryptography.Pkcs {
[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) {
diff --git a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9ContentType.cs b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9ContentType.cs
index 7cf9b2b416c..015164ab671 100755
--- a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9ContentType.cs
+++ b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9ContentType.cs
@@ -71,6 +71,14 @@ namespace System.Security.Cryptography.Pkcs {
get { return _contentType; }
}
+ // methods
+
+ public override void CopyFrom (AsnEncodedData asnEncodedData)
+ {
+ base.CopyFrom (asnEncodedData);
+ Decode (this.RawData);
+ }
+
// internal stuff
internal void Decode (byte[] attribute)
diff --git a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9DocumentDescription.cs b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9DocumentDescription.cs
index b52e42e4539..5fa64fe964d 100755
--- a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9DocumentDescription.cs
+++ b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9DocumentDescription.cs
@@ -51,8 +51,7 @@ namespace System.Security.Cryptography.Pkcs {
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 @@ namespace System.Security.Cryptography.Pkcs {
get { return _desc; }
}
+ public override void CopyFrom (AsnEncodedData asnEncodedData)
+ {
+ base.CopyFrom (asnEncodedData);
+ Decode (this.RawData);
+ }
+
// internal stuff
internal void Decode (byte[] attribute)
diff --git a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9DocumentName.cs b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9DocumentName.cs
index b083067d315..0d8b910205a 100755
--- a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9DocumentName.cs
+++ b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9DocumentName.cs
@@ -51,8 +51,7 @@ namespace System.Security.Cryptography.Pkcs {
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 @@ namespace System.Security.Cryptography.Pkcs {
get { return _name; }
}
+ public override void CopyFrom (AsnEncodedData asnEncodedData)
+ {
+ base.CopyFrom (asnEncodedData);
+ Decode (this.RawData);
+ }
+
// internal stuff
internal void Decode (byte[] attribute)
diff --git a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9MessageDigest.cs b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9MessageDigest.cs
index 1307c920b75..eef1f7f3602 100755
--- a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9MessageDigest.cs
+++ b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9MessageDigest.cs
@@ -70,6 +70,14 @@ namespace System.Security.Cryptography.Pkcs {
get { return _messageDigest; }
}
+ // methods
+
+ public override void CopyFrom (AsnEncodedData asnEncodedData)
+ {
+ base.CopyFrom (asnEncodedData);
+ Decode (this.RawData);
+ }
+
// internal stuff
internal void Decode (byte[] attribute)
diff --git a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9SigningTime.cs b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9SigningTime.cs
index 59e28f6178d..e2df1870ac0 100755
--- a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9SigningTime.cs
+++ b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9SigningTime.cs
@@ -72,6 +72,12 @@ namespace System.Security.Cryptography.Pkcs {
get { return _signingTime; }
}
+ public override void CopyFrom (AsnEncodedData asnEncodedData)
+ {
+ base.CopyFrom (asnEncodedData);
+ Decode (this.RawData);
+ }
+
// internal stuff
internal void Decode (byte[] attribute)