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:
authorMaxim Lipnin <v-maxlip@microsoft.com>2018-05-14 13:09:50 +0300
committerMaxim Lipnin <v-maxlip@microsoft.com>2018-05-14 15:41:58 +0300
commitb338b6a1288b02ebcc7f8f55802a8a2cb86ffb44 (patch)
treebd21cf4a325c7c741b8c1c3c4f7860c10a456c63 /mcs/class/System.Security
parentc12803841c2359daf5131f6471de1a7896d94581 (diff)
[System.Security] CoreFX import for CmsRecipient, CmsRecipientCollection and CmsRecipientEnumerator classes.
Diffstat (limited to 'mcs/class/System.Security')
-rw-r--r--mcs/class/System.Security/System.Security.Cryptography.Pkcs/CmsRecipient.cs74
-rw-r--r--mcs/class/System.Security/System.Security.Cryptography.Pkcs/CmsRecipientCollection.cs114
-rw-r--r--mcs/class/System.Security/System.Security.Cryptography.Pkcs/CmsRecipientEnumerator.cs70
-rw-r--r--mcs/class/System.Security/System.Security_xtest.dll.sources5
-rw-r--r--mcs/class/System.Security/common_System.Security.dll.sources6
5 files changed, 7 insertions, 262 deletions
diff --git a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/CmsRecipient.cs b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/CmsRecipient.cs
deleted file mode 100644
index c6cf6f213b6..00000000000
--- a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/CmsRecipient.cs
+++ /dev/null
@@ -1,74 +0,0 @@
-//
-// System.Security.Cryptography.Pkcs.CmsRecipient class
-//
-// Author:
-// Sebastien Pouliot <sebastien@ximian.com>
-//
-// (C) 2003 Motus Technologies Inc. (http://www.motus.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
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-using System.Collections;
-using System.Security.Cryptography.X509Certificates;
-
-namespace System.Security.Cryptography.Pkcs {
-
- public sealed class CmsRecipient {
-
- private SubjectIdentifierType _recipient;
- private X509Certificate2 _certificate;
-
- // constructor
-
- public CmsRecipient (X509Certificate2 certificate)
- {
- if (certificate == null)
- throw new ArgumentNullException ("certificate");
- _recipient = SubjectIdentifierType.IssuerAndSerialNumber;
- _certificate = certificate;
- }
-
- public CmsRecipient (SubjectIdentifierType recipientIdentifierType, X509Certificate2 certificate)
- {
- if (certificate == null)
- throw new ArgumentNullException ("certificate");
-
- if (recipientIdentifierType == SubjectIdentifierType.Unknown)
- _recipient = SubjectIdentifierType.IssuerAndSerialNumber;
- else
- _recipient = recipientIdentifierType;
- _certificate = certificate;
- }
-
- // properties
-
- public X509Certificate2 Certificate {
- get { return _certificate; }
- }
-
- public SubjectIdentifierType RecipientIdentifierType {
- get { return _recipient; }
- }
- }
-}
-
diff --git a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/CmsRecipientCollection.cs b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/CmsRecipientCollection.cs
deleted file mode 100644
index 352b6a3b179..00000000000
--- a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/CmsRecipientCollection.cs
+++ /dev/null
@@ -1,114 +0,0 @@
-//
-// System.Security.Cryptography.Pkcs.CmsRecipientCollection class
-//
-// Author:
-// Sebastien Pouliot <sebastien@ximian.com>
-//
-// (C) 2003 Motus Technologies Inc. (http://www.motus.com)
-// Copyright (C) 2004-2005, 2008 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
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-#if SECURITY_DEP
-
-using System.Collections;
-using System.Security.Cryptography.X509Certificates;
-
-namespace System.Security.Cryptography.Pkcs {
-
- public sealed class CmsRecipientCollection : ICollection, IEnumerable {
-
- private ArrayList _list;
-
- // constructors
-
- public CmsRecipientCollection ()
- {
- _list = new ArrayList ();
- }
-
- public CmsRecipientCollection (CmsRecipient recipient)
- {
- _list.Add (recipient);
- }
-
- public CmsRecipientCollection (SubjectIdentifierType recipientIdentifierType, X509Certificate2Collection certificates)
- {
- // no null check, MS throws a NullReferenceException here
- foreach (X509Certificate2 x509 in certificates) {
- CmsRecipient p7r = new CmsRecipient (recipientIdentifierType, x509);
- _list.Add (p7r);
- }
- }
-
- // properties
-
- public int Count {
- get { return _list.Count; }
- }
-
- public bool IsSynchronized {
- get { return _list.IsSynchronized; }
- }
-
- public CmsRecipient this [int index] {
- get { return (CmsRecipient) _list [index]; }
- }
-
- public object SyncRoot {
- get { return _list.SyncRoot; }
- }
-
- // methods
-
- public int Add (CmsRecipient recipient)
- {
- return _list.Add (recipient);
- }
-
- public void CopyTo (Array array, int index)
- {
- _list.CopyTo (array, index);
- }
-
- public void CopyTo (CmsRecipient[] array, int index)
- {
- _list.CopyTo (array, index);
- }
-
- public CmsRecipientEnumerator GetEnumerator ()
- {
- return new CmsRecipientEnumerator (_list);
- }
-
- IEnumerator IEnumerable.GetEnumerator ()
- {
- return new CmsRecipientEnumerator (_list);
- }
-
- public void Remove (CmsRecipient recipient)
- {
- _list.Remove (recipient);
- }
- }
-}
-
-#endif
diff --git a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/CmsRecipientEnumerator.cs b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/CmsRecipientEnumerator.cs
deleted file mode 100644
index 7bfcf737b7e..00000000000
--- a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/CmsRecipientEnumerator.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-//
-// System.Security.Cryptography.Pkcs.CmsRecipientEnumerator
-//
-// Author:
-// Sebastien Pouliot <sebastien@ximian.com>
-//
-// (C) 2003 Motus Technologies Inc. (http://www.motus.com)
-// Copyright (C) 2004 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
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-using System;
-using System.Collections;
-
-namespace System.Security.Cryptography.Pkcs {
-
- public sealed class CmsRecipientEnumerator : IEnumerator {
-
- private IEnumerator enumerator;
-
- // constructors
-
- internal CmsRecipientEnumerator (IEnumerable enumerable)
- {
- enumerator = enumerable.GetEnumerator ();
- }
-
- // properties
-
- public CmsRecipient Current {
- get { return (CmsRecipient) enumerator.Current; }
- }
-
- object IEnumerator.Current {
- get { return enumerator.Current; }
- }
-
- // methods
-
- public bool MoveNext ()
- {
- return enumerator.MoveNext ();
- }
-
- public void Reset ()
- {
- enumerator.Reset ();
- }
- }
-}
-
diff --git a/mcs/class/System.Security/System.Security_xtest.dll.sources b/mcs/class/System.Security/System.Security_xtest.dll.sources
index 73765f2b4d5..cf68588c4d6 100644
--- a/mcs/class/System.Security/System.Security_xtest.dll.sources
+++ b/mcs/class/System.Security/System.Security_xtest.dll.sources
@@ -1,7 +1,10 @@
../../../external/corefx/src/System.Security.Cryptography.Pkcs/tests/CryptographicAttributeObjectCollectionTests.cs
+../../../external/corefx/src/System.Security.Cryptography.Pkcs/tests/CmsRecipientCollectionTests.cs
# Dependencies
../../../external/corefx/src/CoreFx.Private.TestUtilities/src/System/AssertExtensions.cs
+../../../external/corefx/src/Common/tests/System/Security/Cryptography/ByteUtils.cs
../../../external/corefx/src/System.Security.Cryptography.Pkcs/tests/Oids.cs
-../../../external/corefx/src/System.Security.Cryptography.Pkcs/tests/CertLoader.Settings.cs
../../../external/corefx/src/System.Security.Cryptography.Pkcs/tests/CertLoader.cs
+../../../external/corefx/src/System.Security.Cryptography.Pkcs/tests/CertLoader.Settings.cs
+../../../external/corefx/src/System.Security.Cryptography.Pkcs/tests/Certificates.cs
diff --git a/mcs/class/System.Security/common_System.Security.dll.sources b/mcs/class/System.Security/common_System.Security.dll.sources
index 4f1c5cdb965..0b6969311ca 100644
--- a/mcs/class/System.Security/common_System.Security.dll.sources
+++ b/mcs/class/System.Security/common_System.Security.dll.sources
@@ -16,9 +16,9 @@ System.Security.Cryptography/ProtectedData.cs
# System.Security.Cryptography.Pkcs
../../../external/corefx/src/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/AlgorithmIdentifier.cs
-System.Security.Cryptography.Pkcs/CmsRecipient.cs
-System.Security.Cryptography.Pkcs/CmsRecipientCollection.cs
-System.Security.Cryptography.Pkcs/CmsRecipientEnumerator.cs
+../../../external/corefx/src/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/CmsRecipient.cs
+../../../external/corefx/src/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/CmsRecipientCollection.cs
+../../../external/corefx/src/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/CmsRecipientEnumerator.cs
System.Security.Cryptography.Pkcs/ContentInfo.cs
System.Security.Cryptography.Pkcs/EnvelopedCms.cs
System.Security.Cryptography.Pkcs/KeyAgreeRecipientInfo.cs