8 Commits
Author SHA1 Message Date
Maxim Lipnin f602125d10 CoreFX import for ProtectedData type (Windows part) (#9375)
As part of #7589 

- CoreFX import only for Windows platform (no support for non-Windows platforms, see https://github.com/dotnet/corefx/issues/22510)
- left Mono managed implementation for non-Windows platforms
- removed DataProtectionScope parameter value check (no such a check in CoreFX and NET Framework, see https://github.com/dotnet/corefx/pull/30726) and couple of related unit tests
- added CoreFX xunit tests
2018-07-09 15:29:07 +02:00
Manuel de la Pena b73480af34 [Tests] Ensure that only a subset of the System.Security tests are ran on mobile platforms.
(cherry picked from commit 9f696f0eab)
2017-11-01 03:18:15 +01:00
Alexander Köplinger 70cb5fdd9f [System.Security] Fix CryptographicException from ProtectedData.Protect with multiple threads
The code in ManagedProtection.GetKey() instantiated a new RSACryptoServiceProvider singleton without proper
locking to avoid multiple threads running the initialization concurrently.
Since RSACryptoServiceProvider (or rather KeyPairPersistence underneath) uses an XML file with a name derived
from the parameters to store the data there could be a case where one thread writes while another tries to read
and gets garbage. This results in a CryptographicException later on.

Added locking to prevent this.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=38933
2016-03-01 07:24:02 +01:00
Alexander Köplinger 746650d1b9 [bcl] Remove more NET_2_0 checks from class libs 2015-01-17 05:45:39 +01:00
Sebastien Pouliot e6e724d234 2005-10-20 Sebastien Pouliot <[email protected]>
* CryptographicAttributeObjectCas.cs: New. CAS unit tests.
	* CryptographicAttributeObjectEnumeratorCas.cs: New. CAS unit tests.
	* CryptographicAttributeObjectEnumeratorTest.cs: New. Unit tests.
	* CryptographicAttributeObjectCollectionCas.cs: New. CAS unit tests.
	* CryptographicAttributeObjectCollectionTest.cs: New. Unit tests.
	* ProtectedDataCas.cs: New. CAS unit tests.
	* ProtectedDataTest.cs: Reworked/complete unit tests.
	* ProtectedMemoryCas.cs: New. CAS unit tests.
	* ProtectedMemoryTest.cs: Reworked/complete unit tests.


svn path=/trunk/mcs/; revision=51996
2005-10-20 18:40:44 +00:00
Ben Maurer 0e8decdb37 remove svn:executable from .cs files
svn path=/trunk/mcs/; revision=46562
2005-06-27 15:51:40 +00:00
Sebastien Pouliot 30598dc4b5 2005-04-27 Sebastien Pouliot <[email protected]>
* ProtectedDataTest.cs: Updated to NUnit 2.2 API to use Ignore it the 
	platform doesn't support ProtectedData.
	* ProtectedMemoryTest.cs: Updated to NUnit 2.2 API to use Ignore it 
	the platform doesn't support ProtectedData.


svn path=/trunk/mcs/; revision=43653
2005-04-27 14:15:06 +00:00
Sebastien Pouliot bbc7ffba39 2004-12-23 Sebastien Pouliot <[email protected]>
* System.Security.dll.sources: Added System.Security.Cryptography/
	ProtectedData.cs, ProtectedMemory.cs, DataProtectionScope.cs and
	MemoryProtectionScope.cs as they been moved from mscorlib to here.
	* System.Security_test.dll.sources : Added Test/System.Security.
	Cryptography/ProtectedDataTest.cs and ProtectedMemoryTest.cs for the 
	same reason.


svn path=/trunk/mcs/; revision=38060
2004-12-23 13:50:47 +00:00