Imported Upstream version 4.8.0.489

Former-commit-id: 711682279101ddc89ff7b3b8639a574568fd6a0f
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-02-15 10:05:45 +00:00
parent f38a7b4f5b
commit 702a3ab1af
41 changed files with 68 additions and 94 deletions

View File

@ -163,7 +163,7 @@ namespace Mono.Security.X509 {
cspParams.KeyContainerName = CryptoConvert.ToHex (certificate.Hash);
// Right now this seems to be the best way to know if we should use LM store.. ;)
if (_storePath.StartsWith (X509StoreManager.LocalMachinePath))
if (_storePath.StartsWith (X509StoreManager.LocalMachinePath) || _storePath.StartsWith(X509StoreManager.NewLocalMachinePath))
cspParams.Flags = CspProviderFlags.UseMachineKeyStore;
ImportPrivateKey (certificate, cspParams);
@ -338,7 +338,7 @@ namespace Mono.Security.X509 {
// If privateKey it's available, load it too..
CspParameters cspParams = new CspParameters ();
cspParams.KeyContainerName = CryptoConvert.ToHex (cert.Hash);
if (_storePath.StartsWith (X509StoreManager.LocalMachinePath))
if (_storePath.StartsWith (X509StoreManager.LocalMachinePath) || _storePath.StartsWith(X509StoreManager.NewLocalMachinePath))
cspParams.Flags = CspProviderFlags.UseMachineKeyStore;
KeyPairPersistence kpp = new KeyPairPersistence (cspParams);