Commit Graph
238 Commits
Author SHA1 Message Date
Sebastien Pouliot 58fe0c6aba CryptoConfig.cs: Inverse name and oid when reading them from machine.config. Part of the fix for #346536
svn path=/trunk/mcs/; revision=94458
2008-01-31 13:53:35 +00:00
Marek Safar f8477b12e6 Warnings cleanup
svn path=/trunk/mcs/; revision=89670
2007-11-15 11:51:57 +00:00
Sebastien Pouliot 039fd253a6 2007-08-17 Sebastien Pouliot <[email protected]>
* CryptoStream.cs: Write cannot depend on buffer.Length (fix #82428)


svn path=/trunk/mcs/; revision=84281
2007-08-17 14:26:40 +00:00
Sebastien Pouliot c821640cdf 2007-05-16 Sebastien Pouliot <[email protected]>
* CryptoStream.cs: Fix another problem that can occurs with WriteByte.


svn path=/trunk/mcs/; revision=77516
2007-05-16 22:19:45 +00:00
Sebastien Pouliot 62bb959e67 2007-05-11 Sebastien Pouliot <[email protected]>
* CryptoStream.cs: Ensure TransformFinalBlock isn't called multiple 
	times. Fix bug #81597.


svn path=/trunk/mcs/; revision=77262
2007-05-11 20:48:42 +00:00
Sebastien Pouliot 71b24f99df 2007-05-10 Sebastien Pouliot <[email protected]>
* SHA1CryptoServiceProvider.cs: Reduce by half the number of required
	memory allocations to produce a hash (in >90% of the cases) by reusing
	an existing memory buffer (instead of always allocating a new one).


svn path=/trunk/mcs/; revision=77161
2007-05-10 20:17:47 +00:00
Sebastien Pouliot c317b646d7 2007-05-08 Randolph Chung <[email protected]>
* DSACryptoServiceProvider.cs: Implement the ImportCspBlob and
	ExportCspBlob methods by calling into CryptoConvert.


svn path=/trunk/mcs/; revision=76980
2007-05-09 02:47:15 +00:00
Alp Toker 2ce100cb9e 2007-04-03 Alp Toker <[email protected]>
* CryptoConfig.cs: CreateFromName(string,object[]) is params in 2.0.


svn path=/trunk/mcs/; revision=75336
2007-04-03 10:09:37 +00:00
Sebastien Pouliot 5da746e517 2007-03-28 Sebastien Pouliot <[email protected]>
* RIPEMD160Managed.cs: Fix endian issue (take good code path).


svn path=/trunk/mcs/; revision=75092
2007-03-28 17:51:09 +00:00
Sebastien Pouliot d9fd1d5239 2007-03-22 Sebastien Pouliot <[email protected]>
* Rfc2898DeriveBytes.cs: Fixed endian bug in F (thanks to Roei Erez)
	and reduced the number of memory allocations.

svn path=/trunk/mcs/; revision=74843
2007-03-22 20:57:14 +00:00
Sebastien Pouliot c6035d7213 2007-03-22 Sebastien Pouliot <[email protected]>
* PasswordDeriveBytes.cs: Reset method was fixed in fx 2.0.

svn path=/trunk/mcs/; revision=74829
2007-03-22 19:43:04 +00:00
Sebastien Pouliot 89e0ca7f94 2007-03-22 Sebastien Pouliot <[email protected]>
* CryptoStream.cs: 2.0 introduce different exceptions/behaviors in 
	corner cases.

svn path=/trunk/mcs/; revision=74817
2007-03-22 16:48:06 +00:00
Sebastien Pouliot bd3e5f27df 2007-03-22 Sebastien Pouliot <[email protected]>
* CryptoConfig.cs: Names are case-insensitive only since fx 2.0.


svn path=/trunk/mcs/; revision=74809
2007-03-22 14:49:47 +00:00
Sebastien Pouliot eb606ae477 2007-03-05 Sebastien Pouliot <[email protected]>
* CryptoStream.cs: Rework Write to buffer the last block correctly.
	The new code also reduce memory allocations. Fix for #81008.


svn path=/trunk/mcs/; revision=73712
2007-03-05 14:26:04 +00:00
Sebastien Pouliot 647714a2f4 2007-02-14 Sebastien Pouliot <[email protected]>
* HMAC.cs: Handle BlockSizeValue correctly.
	* HMACSHA384.cs: Add support for forthcoming ProduceLegacyHmacValues
	property (in the next service pack).
	* HMACSHA512.cs: Add support for forthcoming ProduceLegacyHmacValues
	property (in the next service pack).


svn path=/trunk/mcs/; revision=72894
2007-02-15 02:03:38 +00:00
Atsushi Eno 7bce9d1c7d 2007-01-22 Atsushi Enomoto <[email protected]>
* CryptoConfig.cs: Fixed incorrect exchange in urlExcC14N and
	  urlExcC14NWithComments.


svn path=/trunk/mcs/; revision=71450
2007-01-22 17:39:57 +00:00
Sebastien Pouliot 06882c4e64 2006-11-24 Sebastien Pouliot <[email protected]>
* CryptoConfig.cs: Add support for (2.0) custom X.509 chains.


svn path=/trunk/mcs/; revision=68429
2006-11-24 14:45:18 +00:00
Sebastien Pouliot 78406f8413 2006-11-08 Sebastien Pouliot <[email protected]>
* CryptoConfig.cs: Add support for (2.0) X.509 extensions in 
	CreateFromName method. This allows the framework to be extensible with
	new certificate extensions (syntax is missing from machine.config).


svn path=/trunk/mcs/; revision=67524
2006-11-08 14:26:00 +00:00
Sebastien Pouliot 436fc7d87a 2006-10-12 Sebastien Pouliot <[email protected]>
* CryptoConfig.cs: Use SmallXmlParser with a custom handler to reduce
	memory requirements to process machine.config. Fix #79653 (beagle).


svn path=/trunk/mcs/; revision=66639
2006-10-13 00:58:50 +00:00
Sebastien Pouliot 7358d6140e 2006-10-11 Sebastien Pouliot <[email protected]>
* CryptoConfig.cs: Accept lower/mixed-case algorithm names in 
	CreateFromName and MapNameToOID methods (fix bug #79641). Removed OID
	mappings in 2.0 for DSA and 3DES (they were part of the betas but not
	in the final 2.0 release of the framework).


svn path=/trunk/mcs/; revision=66547
2006-10-11 12:44:43 +00:00
Kazuki Oikawa 1ae0c4d7ac 2006-09-20 Kazuki Oikawa <[email protected]>
* RijndaelManaged.cs: improves the performance.


svn path=/trunk/mcs/; revision=65696
2006-09-20 04:28:25 +00:00
Sebastien Pouliot 0779aca901 2006-09-08 Sebastien Pouliot <[email protected]>
* RSAOAEPKeyExchangeDeformatter.cs: Throw a CryptographicException, 
	instead of returning null, when a padding error occurs on decryption.
	* RSAPKCS1KeyExchangeDeformatter.cs: Throw a CryptographicException, 
	instead of returning null, when a padding error occurs on decryption.


svn path=/trunk/mcs/; revision=65098
2006-09-08 14:21:27 +00:00
Sebastien Pouliot 1e77aa5a9d 2006-07-01 Sebastien Pouliot <[email protected]>
* AsymmetricSignatureDeformatter.cs: Set the hash algorithm name from
	the hash instance. Fix for bug #78744 by Diego Mesa Tabares.


svn path=/trunk/mcs/; revision=62172
2006-07-01 14:52:03 +00:00
Sebastien Pouliot 674af570bf 2006-06-15 Sebastien Pouliot <[email protected]>
* HashAlgorithm.cs: Changed the order of BlockCopy + HashCore to
	HashCore + BlockCopy. Fx 2.0 now allows using a null output buffer
	(without exception) while previous 1.x versions crashed the runtime
	(mono won't crash the runtime, so we always do like 2.0).


svn path=/trunk/mcs/; revision=61765
2006-06-15 19:15:17 +00:00
Sebastien Pouliot 129324b2ca 2006-05-30 Sebastien Pouliot <[email protected]>
* AsymmetricKeyExchangeDeformatter.cs: Under 2.0 the ctor is 
	protected.
	* AsymmetricKeyExchangeFormatter.cs: Under 2.0 the ctor is protected.
	* AsymmetricSignatureDeformatter.cs: Under 2.0 the ctor is protected.
	* AsymmetricSignatureFormatter.cs: Under 2.0 the ctor is protected.
	* DES.cs: Under 2.0 the ctor is protected.
	* HashAlgorithm.cs: Under 2.0 the HashValue field is protected 
	internal.
	* RandomNumberGenerator.cs: Under 2.0 the ctor is protected.
	* RC2.cs: Under 2.0 the ctor is protected.
	* Rijndael.cs: Under 2.0 the ctor is protected.
	* RSA.cs: Under 2.0 the ctor is protected.
	* SHA256.cs: Under 2.0 the ctor is protected.
	* SHA384.cs: Under 2.0 the ctor is protected.
	* SHA512.cs: Under 2.0 the ctor is protected.
	* SymmetricAlgorithm.cs: Under 2.0 the ctor is protected.
	* TripleDES.cs: Under 2.0 the ctor is protected.


svn path=/trunk/mcs/; revision=61270
2006-05-30 17:57:47 +00:00
Zoltan Varga 61fdcc0f23 2006-02-03 Zoltan Varga <[email protected]>
* CryptoStream.cs: Add 'override' keyword to Dispose (bool) method in 2.0.

svn path=/trunk/mcs/; revision=56525
2006-02-03 14:12:56 +00:00
Sebastien Pouliot cfee5144b6 SymmetricAlgorithm.cs: Changing (not setting) BlockSize must re-generate a new IV (so the properties are kept valid). Note that changing or setting (same value) the KeySize always re-generate a key.
svn path=/trunk/mcs/; revision=54449
2005-12-15 13:46:37 +00:00
Sebastien Pouliot d19e9e8266 duh
svn path=/trunk/mcs/; revision=53819
2005-12-02 05:09:49 +00:00
Sebastien Pouliot 73b71062a7 another endian fix
svn path=/trunk/mcs/; revision=53815
2005-12-02 03:42:56 +00:00
Sebastien Pouliot 0fdea232ca 2005-12-01 Sebastien Pouliot <[email protected]>
* RIPEMD160Managed.cs: Endianess fix.


svn path=/trunk/mcs/; revision=53767
2005-12-01 15:09:55 +00:00
Sebastien Pouliot 6167c93063 2005-11-22 Sebastien Pouliot <[email protected]>
* DSAManaged.cs: Don't output J in the XML if it's not exported (i.e.
	if it wasn't imported too but instead calculated from the other 
	parameters ;-).


svn path=/trunk/mcs/; revision=53356
2005-11-22 19:05:17 +00:00
Sebastien Pouliot 64fef67648 2005-11-09 Sebastien Pouliot <[email protected]>
* KeyNumber.cs: Added missing [Serializable] present in 2.0.


svn path=/trunk/mcs/; revision=52785
2005-11-09 15:04:04 +00:00
Sebastien Pouliot a1b49ce673 2005-10-21 Sebastien Pouliot <[email protected]>
* DESCryptoServiceProvider.cs: Don't change the instance key/iv when
	creating an encryptor or decryptor specifying them. Generate a new key
	if null is specified (not really useful but compatible with MS 
	behaviour). Check for weak/semi-weak key when creating transforms.
	* RC2CryptoServiceProvider.cs: Don't change the instance key/iv when 
	creating an encryptor or decryptor specifying them. Check legal key
	sizes when creating transforms.
	* RijndaelManaged.cs: Don't change the instance key/iv when creating 
	an encryptor or decryptor specifying them. Check legal key sizes when
	creating transforms.
	* TripleDESCryptoServiceProvider.cs: Don't change the instance key/iv
	when creating an encryptor or decryptor specifying them. Generate a 
	new key if null is specified (not really useful but compatible with MS
	behaviour). Check for weak key when creating transforms.


svn path=/trunk/mcs/; revision=52043
2005-10-21 19:09:44 +00:00
Sebastien Pouliot fdf24fd92f 2005-09-29 Sebastien Pouliot <[email protected]>
* HMACSHA1.cs: Added the new 2.0 ctor that let the programmer choose
	between the managed and unmanaged SHA1 algorithm used in the HMAC 
	(that doesn't change much thing in the default config for Mono).
	* PasswordDeriveBytes.cs: Added [Obsolete] on GetBytes (2.0) as new
	applications should be using Rfc2898DeriveBytes to get PKCS#5 v2
	support.


svn path=/trunk/mcs/; revision=51010
2005-09-29 21:04:21 +00:00
Kornél Pál 431f1b3485 Moved assembly version and assembly reference constants to a common Consts.cs file. Updated 2.0.3600.0 assembly versions to 2.0.0.0. Updated some old beta version numbers to recent ones. Fixed hard coded assembly references to use constants with the appropriate version number.
svn path=/trunk/mcs/; revision=48519
2005-08-18 19:36:17 +00:00
Sebastien Pouliot a00e552da3 2005-08-17 Sebastien Pouliot <[email protected]>
* FromBase64Transform.cs: Check that the TransformFinal can be called
	with only whitespace (with FromBase64TransformMode.IgnoreWhiteSpaces)
	so that we must return new byte [0].


svn path=/trunk/mcs/; revision=48473
2005-08-17 18:27:45 +00:00
Sebastien Pouliot e0907a4717 2005-06-14 Sebastien Pouliot <[email protected]>
* FromBase64Transform.cs: Removed memory allocations during the 
	transform. It's now just the accumulator (ctor) and the 
	TransformFinalBlock that allocates memory. The transform is now
	between 3 to 4 times faster than before.


svn path=/trunk/mcs/; revision=45947
2005-06-14 10:56:00 +00:00
Sebastien Pouliot 8153b6a33a Forgot 2 ComVisible
svn path=/trunk/mcs/; revision=45777
2005-06-10 16:43:46 +00:00
Sebastien Pouliot ccfef2f152 2005-06-10 Sebastien Pouliot <[email protected]>
* all: 2.0 beta2 fixes, i.e. mostly added [ComVisible(true)]


svn path=/trunk/mcs/; revision=45759
2005-06-10 14:42:08 +00:00
Sebastien Pouliot 1f0adb6ab6 2005-06-09 Sebastien Pouliot <[email protected]>
* HMAC.cs: BlockSizeValue has changed from a protected member to
	a protected property.


svn path=/trunk/mcs/; revision=45704
2005-06-09 14:38:34 +00:00
Sebastien Pouliot cddf5fb076 2005-06-06 Sebastien Pouliot <[email protected]>
* CspProviderFlags.cs: UseExistingKey was added in 1.1 SP1. Added
	ComVisible attribute for 2.0.


svn path=/trunk/mcs/; revision=45508
2005-06-06 17:30:18 +00:00
Sebastien Pouliot 6d616545ae 2005-05-19 Sebastien Pouliot <[email protected]>
* CryptoConfig.cs: Don't use the global hashtables until the 
	initialization is complete.


svn path=/trunk/mcs/; revision=44752
2005-05-19 14:30:23 +00:00
Sebastien Pouliot f52b213aba 2005-05-18 Sebastien Pouliot <[email protected]>
* CryptoConfig.cs: Changed lock pattern to second version of
	http://www.skeet.org.uk/csharp/singleton.html


svn path=/trunk/mcs/; revision=44682
2005-05-18 14:07:55 +00:00
Sebastien Pouliot 5a4ca148d7 2005-05-16 Sebastien Pouliot <[email protected]>
* CryptoConfig.cs: Initialization wasn't threadsafe as the "checked" 
	value was assigned at the start of the initialization.


svn path=/trunk/mcs/; revision=44560
2005-05-16 13:20:35 +00:00
Raja R Harinath e0cfa4925e Set svn:eol-style=native, delete svn:executable.
Fix line endings of System/Decimal.cs (only actual "change" in text, to force recompile of mscorlib to reflect changes in decimal constant handling in the compiler)


svn path=/trunk/mcs/; revision=44558
2005-05-16 12:23:26 +00:00
Sebastien Pouliot d9979d9eb2 2005-04-25 Sebastien Pouliot <[email protected]>
* CryptoConfig.cs: Removed RSA OID and added null check in EncodeOID
	in NET_2_0 to match beta2.
	* DES.cs: Added null check for IsWeakKey and IsSemiWeakKey in NET_2_0
	to match beta2.
	* SymmetricAlgorithm.cs: Throw CryptographicException when feedback is
	zero in NET_2_0 to match beta2
	* TripleDES.cs: Added null check for IsWeakKey in NET_2_0 to match 
	beta2.


svn path=/trunk/mcs/; revision=43554
2005-04-25 17:22:53 +00:00
Sebastien Pouliot c104d45fa3 2005-04-05 Sebastien Pouliot <[email protected]>
* CryptoConfig.cs: Added Assert for FileIOPermission to LoadConfig so 
	the configuration can be read under partial trust.


svn path=/trunk/mcs/; revision=42585
2005-04-05 22:43:35 +00:00
Sebastien Pouliot 4c4bf86b0a 2005-03-24 Sebastien Pouliot <[email protected]>
* CryptoConfig.cs: Added LinkDemand for unrestricted to CreateFromName
	when used to create instance with object[] parameters.
	* CryptoAPITransform.cs: Added Demand for UnmanagedCode to KeyHandle 
	property.


svn path=/trunk/mcs/; revision=42205
2005-03-24 13:16:29 +00:00
Sebastien Pouliot e3deffda56 2005-03-07 Sebastien Pouliot <[email protected]>
* MD5CryptoServiceProvider.cs: Fixed #73404 to return right results
	if the data length is bigger than 2^32 bits.
	* SHA1CryptoServiceProvider.cs: Fixed #73404 to return right results
	if the data length is bigger than 2^32 bits.
	* SHA256Managed.cs: Fixed #73404 to return right results if the data
	length is bigger than 2^32 bits.


svn path=/trunk/mcs/; revision=41524
2005-03-07 14:46:30 +00:00
Sebastien Pouliot 71e8c506bb 2005-03-03 Sebastien Pouliot <[email protected]>
* RNGCryptoServiceProvider.cs: Added a new call in the static ctor
	to check if we're using a global handle. In that case we lock before
	calling the RNG.


svn path=/trunk/mcs/; revision=41403
2005-03-03 16:43:30 +00:00