* 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
// 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
#if NET_2_0
-using System;
-
namespace System.Security.Cryptography.Pkcs {
public sealed class AlgorithmIdentifier {
// 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];
+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).
[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) {
get { return _contentType; }
}
+ // methods
+
+ public override void CopyFrom (AsnEncodedData asnEncodedData)
+ {
+ base.CopyFrom (asnEncodedData);
+ Decode (this.RawData);
+ }
+
// internal stuff
internal void Decode (byte[] attribute)
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;
get { return _desc; }
}
+ public override void CopyFrom (AsnEncodedData asnEncodedData)
+ {
+ base.CopyFrom (asnEncodedData);
+ Decode (this.RawData);
+ }
+
// internal stuff
internal void Decode (byte[] attribute)
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;
get { return _name; }
}
+ public override void CopyFrom (AsnEncodedData asnEncodedData)
+ {
+ base.CopyFrom (asnEncodedData);
+ Decode (this.RawData);
+ }
+
// internal stuff
internal void Decode (byte[] attribute)
get { return _messageDigest; }
}
+ // methods
+
+ public override void CopyFrom (AsnEncodedData asnEncodedData)
+ {
+ base.CopyFrom (asnEncodedData);
+ Decode (this.RawData);
+ }
+
// internal stuff
internal void Decode (byte[] attribute)
get { return _signingTime; }
}
+ public override void CopyFrom (AsnEncodedData asnEncodedData)
+ {
+ base.CopyFrom (asnEncodedData);
+ Decode (this.RawData);
+ }
+
// internal stuff
internal void Decode (byte[] attribute)