183 references to CurrentUser
Binding.UDS.IntegrationTests (1)
ServiceHelper.cs (1)
50using (var store = new X509Store(StoreName.My, StoreLocation.CurrentUser))
Certificate.Optional.Sample (1)
Program.cs (1)
27"localhost", "My", StoreLocation.CurrentUser,
Client.ChannelLayer.IntegrationTests (3)
DuplexChannelWithSynchronizationContext.cs (3)
46StoreLocation.CurrentUser, 107StoreLocation.CurrentUser, 183StoreLocation.CurrentUser,
dotnet-dev-certs (14)
Program.cs (2)
272var certificates = certificateManager.ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true); 345var certificates = manager.ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true, exportPath.HasValue());
src\Shared\CertificateGeneration\CertificateManager.cs (6)
170ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true, requireExportable: true); 184var currentUserCertificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true, requireExportable: true); 372var certificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false, requireExportable: false); 428var certificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false); 655var location = StoreLocation.CurrentUser; 790using var store = new X509Store(StoreName.My, StoreLocation.CurrentUser);
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (2)
373return ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false); 378if (store.Name! == StoreName.My.ToString() && store.Location == StoreLocation.CurrentUser && Directory.Exists(MacOSUserHttpsCertificateLocation))
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
70return ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false, requireExportable: false);
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (3)
78using var store = new X509Store(StoreName.Root, StoreLocation.CurrentUser); 105using var store = new X509Store(StoreName.Root, StoreLocation.CurrentUser); 127return ListCertificates(StoreName.Root, StoreLocation.CurrentUser, isValid: true, requireExportable: false)
dotnet-svcutil-lib (4)
CmdCredentialsProvider.cs (1)
76X509Store certificateStore = new X509Store(StoreName.My, StoreLocation.CurrentUser);
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\X509CertificateInitiatorClientCredential.cs (1)
11internal const StoreLocation DefaultStoreLocation = StoreLocation.CurrentUser;
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\X509CertificateRecipientClientCredential.cs (1)
15internal const StoreLocation DefaultStoreLocation = StoreLocation.CurrentUser;
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\X509ServiceCertificateAuthentication.cs (1)
15internal const StoreLocation DefaultTrustedStoreLocation = StoreLocation.CurrentUser;
Http3SampleApp (1)
Program.cs (1)
27var cert = CertificateLoader.LoadFromStoreCert("localhost", StoreName.My.ToString(), StoreLocation.CurrentUser, false);
Infrastructure.Common (6)
CertificateManager.cs (6)
55s_PlatformSpecificRootStoreLocation = StoreLocation.CurrentUser; 60s_PlatformSpecificRootStoreLocation = StoreLocation.CurrentUser; 212return CertificateFromThumbprint(StoreName.My, StoreLocation.CurrentUser, thumbprint, validOnly); 218return CertificateFromThumbprint(StoreName.TrustedPeople, StoreLocation.CurrentUser, thumbprint, validOnly); 245certificate = AddToStoreIfNeeded(StoreName.My, StoreLocation.CurrentUser, certificate); 258certificate = AddToStoreIfNeeded(StoreName.TrustedPeople, StoreLocation.CurrentUser, certificate);
InMemory.FunctionalTests (2)
HttpsConnectionMiddlewareTests.cs (1)
806using (var store = new X509Store(StoreName.CertificateAuthority, StoreLocation.CurrentUser))
src\Servers\Kestrel\shared\test\CertHelper.cs (1)
86using (X509Store store = new X509Store(StoreName.CertificateAuthority, StoreLocation.CurrentUser))
Kestrel.SampleApp (1)
Startup.cs (1)
128var localhostCert = CertificateLoader.LoadFromStoreCert("localhost", "My", StoreLocation.CurrentUser, allowInvalid: true);
Microsoft.AspNetCore.DataProtection (1)
XmlEncryption\CertificateResolver.cs (1)
31return GetCertificateFromStore(StoreLocation.CurrentUser, thumbprint)
Microsoft.AspNetCore.DataProtection.Extensions.Tests (7)
DataProtectionProviderTests.cs (7)
117[X509StoreIsAvailable(StoreName.My, StoreLocation.CurrentUser)] 124using (var store = new X509Store(StoreName.My, StoreLocation.CurrentUser)) 133var certificateStore = new X509Store(StoreName.My, StoreLocation.CurrentUser); 170[X509StoreIsAvailable(StoreName.My, StoreLocation.CurrentUser)] 173using (var store = new X509Store(StoreName.My, StoreLocation.CurrentUser)) 184using (var certificateStore = new X509Store(StoreName.My, StoreLocation.CurrentUser)) 268using (var store = new X509Store(StoreName.My, StoreLocation.CurrentUser))
Microsoft.AspNetCore.DeveloperCertificates.XPlat (12)
src\Shared\CertificateGeneration\CertificateManager.cs (6)
170ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true, requireExportable: true); 184var currentUserCertificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true, requireExportable: true); 372var certificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false, requireExportable: false); 428var certificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false); 655var location = StoreLocation.CurrentUser; 790using var store = new X509Store(StoreName.My, StoreLocation.CurrentUser);
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (2)
373return ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false); 378if (store.Name! == StoreName.My.ToString() && store.Location == StoreLocation.CurrentUser && Directory.Exists(MacOSUserHttpsCertificateLocation))
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
70return ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false, requireExportable: false);
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (3)
78using var store = new X509Store(StoreName.Root, StoreLocation.CurrentUser); 105using var store = new X509Store(StoreName.Root, StoreLocation.CurrentUser); 127return ListCertificates(StoreName.Root, StoreLocation.CurrentUser, isValid: true, requireExportable: false)
Microsoft.AspNetCore.DeveloperCertificates.XPlat.Tests (16)
CertificateManagerTests.cs (16)
56var httpsCertificates = _manager.ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false); 113using (var store = new X509Store(StoreName.My, StoreLocation.CurrentUser)) 143var httpsCertificate = _manager.ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false).Single(c => c.Subject == TestCertificateSubject); 175var httpsCertificate = _manager.ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false).Single(c => c.Subject == TestCertificateSubject); 208var httpsCertificate = _manager.ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false).Single(c => c.Subject == TestCertificateSubject); 239var httpsCertificate = _manager.ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false).Single(c => c.Subject == TestCertificateSubject); 251var importedCertificate = Assert.Single(_manager.ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false)); 272var httpsCertificate = _manager.ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false).Single(c => c.Subject == TestCertificateSubject); 298var httpsCertificate = _manager.ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false).Single(c => c.Subject == TestCertificateSubject); 327var httpsCertificateList = _manager.ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true); 345var httpsCertificateList = _manager.ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true); 362var httpsCertificateList = _manager.ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true); 380var httpsCertificateList = _manager.ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true); 403var httpsCertificateList = _manager.ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true); 470Manager.RemoveAllCertificates(StoreName.My, StoreLocation.CurrentUser); 473Manager.RemoveAllCertificates(StoreName.Root, StoreLocation.CurrentUser);
Microsoft.AspNetCore.Server.Kestrel.Core (19)
Internal\Certificates\CertificateConfigLoader.cs (1)
182var storeLocation = StoreLocation.CurrentUser;
KestrelServerOptions.cs (1)
378var certs = CertificateManager.Instance.ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true, requireExportable: false);
ListenOptionsHttpsExtensions.cs (1)
90=> listenOptions.UseHttps(storeName, subject, allowInvalid, StoreLocation.CurrentUser);
Middleware\HttpsConnectionMiddleware.cs (4)
287store = OpenStore(StoreLocation.CurrentUser); 297_logger.FoundCertWithPrivateKey(certs[0], StoreLocation.CurrentUser); 603var storeLocationString = storeLocation == StoreLocation.LocalMachine ? nameof(StoreLocation.LocalMachine) : nameof(StoreLocation.CurrentUser); 618var storeLocationString = storeLocation == StoreLocation.LocalMachine ? nameof(StoreLocation.LocalMachine) : nameof(StoreLocation.CurrentUser);
src\Shared\CertificateGeneration\CertificateManager.cs (6)
170ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true, requireExportable: true); 184var currentUserCertificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true, requireExportable: true); 372var certificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false, requireExportable: false); 428var certificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false); 655var location = StoreLocation.CurrentUser; 790using var store = new X509Store(StoreName.My, StoreLocation.CurrentUser);
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (2)
373return ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false); 378if (store.Name! == StoreName.My.ToString() && store.Location == StoreLocation.CurrentUser && Directory.Exists(MacOSUserHttpsCertificateLocation))
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
70return ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false, requireExportable: false);
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (3)
78using var store = new X509Store(StoreName.Root, StoreLocation.CurrentUser); 105using var store = new X509Store(StoreName.Root, StoreLocation.CurrentUser); 127return ListCertificates(StoreName.Root, StoreLocation.CurrentUser, isValid: true, requireExportable: false)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
src\Servers\Kestrel\shared\test\CertHelper.cs (1)
86using (X509Store store = new X509Store(StoreName.CertificateAuthority, StoreLocation.CurrentUser))
Microsoft.Build.Tasks.Core (3)
ManifestUtil\SecurityUtil.cs (2)
888var personalStore = new X509Store(StoreName.My, StoreLocation.CurrentUser); 907var personalStore = new X509Store(StoreName.My, StoreLocation.CurrentUser);
ResolveKeySource.cs (1)
178var personalStore = new X509Store(StoreName.My, StoreLocation.CurrentUser);
Microsoft.Build.Tasks.UnitTests (1)
SecurityUtil_Tests.cs (1)
55private static readonly X509Store s_personalStore = new(StoreName.My, StoreLocation.CurrentUser);
PresentationUI (1)
MS\Internal\Documents\DocumentSignatureManager.cs (1)
922X509Store store = new X509Store(StoreLocation.CurrentUser);
Security.TransportSecurity.IntegrationTests (9)
Https\HttpsTests.4.1.0.cs (5)
43StoreLocation.CurrentUser, 376StoreLocation.CurrentUser, 425StoreLocation.CurrentUser, 486StoreLocation.CurrentUser, 545StoreLocation.CurrentUser,
Tcp\ClientCredentialTypeTests.4.1.0.cs (2)
40StoreLocation.CurrentUser, 92StoreLocation.CurrentUser,
Tcp\ClientCredentialTypeTests.4.1.1.cs (1)
250StoreLocation.CurrentUser,
Tcp\ClientCredentialTypeTests.OSX.cs (1)
153using (store = new X509Store(StoreName.Disallowed, StoreLocation.CurrentUser))
System.Net.Http (1)
src\libraries\Common\src\System\Net\Security\CertificateHelper.Unix.cs (1)
14using (var myStore = new X509Store(StoreName.My, StoreLocation.CurrentUser))
System.Net.Security (2)
System\Net\CertificateValidationPal.cs (1)
35StoreLocation storeLocation = isMachineStore ? StoreLocation.LocalMachine : StoreLocation.CurrentUser;
System\Net\CertificateValidationPal.Unix.cs (1)
182Debug.Assert(storeLocation == StoreLocation.CurrentUser);
System.Security.Cryptography (8)
System\Security\Cryptography\X509Certificates\ChainPal.OpenSsl.cs (2)
111using (new X509Store(StoreName.Disallowed, StoreLocation.CurrentUser, OpenFlags.ReadOnly)) 205using (var userIntermediate = new X509Store(StoreName.CertificateAuthority, StoreLocation.CurrentUser))
System\Security\Cryptography\X509Certificates\StorePal.OpenSsl.cs (1)
144if (storeLocation == StoreLocation.CurrentUser)
System\Security\Cryptography\X509Certificates\X509Store.cs (5)
18: this("MY", StoreLocation.CurrentUser) 23: this(storeName, StoreLocation.CurrentUser) 28: this(storeName, StoreLocation.CurrentUser) 39if (storeLocation != StoreLocation.CurrentUser && storeLocation != StoreLocation.LocalMachine) 65if (storeLocation != StoreLocation.CurrentUser && storeLocation != StoreLocation.LocalMachine)
System.Security.Cryptography.Pkcs (1)
Internal\Cryptography\Pal\AnyOS\ManagedPal.cs (1)
20certs.AddRange(PkcsHelpers.GetStoreCertificates(StoreName.My, StoreLocation.CurrentUser, openExistingOnly: false));
System.Security.Cryptography.Xml (1)
System\Security\Cryptography\Xml\Utils.cs (1)
664stores[0] = new X509Store(storeName, StoreLocation.CurrentUser);
System.ServiceModel.Http (1)
System\ServiceModel\Channels\HttpsChannelFactory.cs (1)
298using (var store = new X509Store(StoreName.My, StoreLocation.CurrentUser))
System.ServiceModel.Primitives (4)
System\IdentityModel\Selectors\X509CertificateValidator.cs (1)
124X509Store store = new X509Store(storeName, StoreLocation.CurrentUser);
System\ServiceModel\Security\X509CertificateInitiatorClientCredential.cs (1)
12internal const StoreLocation DefaultStoreLocation = StoreLocation.CurrentUser;
System\ServiceModel\Security\X509CertificateRecipientClientCredential.cs (1)
15internal const StoreLocation DefaultStoreLocation = StoreLocation.CurrentUser;
System\ServiceModel\Security\X509ServiceCertificateAuthentication.cs (1)
18internal const StoreLocation DefaultTrustedStoreLocation = StoreLocation.CurrentUser;
Templates.Blazor.Tests (12)
src\Shared\CertificateGeneration\CertificateManager.cs (6)
170ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true, requireExportable: true); 184var currentUserCertificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true, requireExportable: true); 372var certificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false, requireExportable: false); 428var certificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false); 655var location = StoreLocation.CurrentUser; 790using var store = new X509Store(StoreName.My, StoreLocation.CurrentUser);
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (2)
373return ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false); 378if (store.Name! == StoreName.My.ToString() && store.Location == StoreLocation.CurrentUser && Directory.Exists(MacOSUserHttpsCertificateLocation))
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
70return ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false, requireExportable: false);
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (3)
78using var store = new X509Store(StoreName.Root, StoreLocation.CurrentUser); 105using var store = new X509Store(StoreName.Root, StoreLocation.CurrentUser); 127return ListCertificates(StoreName.Root, StoreLocation.CurrentUser, isValid: true, requireExportable: false)
Templates.Blazor.WebAssembly.Auth.Tests (12)
src\Shared\CertificateGeneration\CertificateManager.cs (6)
170ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true, requireExportable: true); 184var currentUserCertificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true, requireExportable: true); 372var certificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false, requireExportable: false); 428var certificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false); 655var location = StoreLocation.CurrentUser; 790using var store = new X509Store(StoreName.My, StoreLocation.CurrentUser);
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (2)
373return ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false); 378if (store.Name! == StoreName.My.ToString() && store.Location == StoreLocation.CurrentUser && Directory.Exists(MacOSUserHttpsCertificateLocation))
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
70return ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false, requireExportable: false);
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (3)
78using var store = new X509Store(StoreName.Root, StoreLocation.CurrentUser); 105using var store = new X509Store(StoreName.Root, StoreLocation.CurrentUser); 127return ListCertificates(StoreName.Root, StoreLocation.CurrentUser, isValid: true, requireExportable: false)
Templates.Blazor.WebAssembly.Tests (12)
src\Shared\CertificateGeneration\CertificateManager.cs (6)
170ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true, requireExportable: true); 184var currentUserCertificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true, requireExportable: true); 372var certificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false, requireExportable: false); 428var certificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false); 655var location = StoreLocation.CurrentUser; 790using var store = new X509Store(StoreName.My, StoreLocation.CurrentUser);
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (2)
373return ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false); 378if (store.Name! == StoreName.My.ToString() && store.Location == StoreLocation.CurrentUser && Directory.Exists(MacOSUserHttpsCertificateLocation))
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
70return ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false, requireExportable: false);
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (3)
78using var store = new X509Store(StoreName.Root, StoreLocation.CurrentUser); 105using var store = new X509Store(StoreName.Root, StoreLocation.CurrentUser); 127return ListCertificates(StoreName.Root, StoreLocation.CurrentUser, isValid: true, requireExportable: false)
Templates.Mvc.Tests (12)
src\Shared\CertificateGeneration\CertificateManager.cs (6)
170ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true, requireExportable: true); 184var currentUserCertificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true, requireExportable: true); 372var certificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false, requireExportable: false); 428var certificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false); 655var location = StoreLocation.CurrentUser; 790using var store = new X509Store(StoreName.My, StoreLocation.CurrentUser);
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (2)
373return ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false); 378if (store.Name! == StoreName.My.ToString() && store.Location == StoreLocation.CurrentUser && Directory.Exists(MacOSUserHttpsCertificateLocation))
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
70return ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false, requireExportable: false);
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (3)
78using var store = new X509Store(StoreName.Root, StoreLocation.CurrentUser); 105using var store = new X509Store(StoreName.Root, StoreLocation.CurrentUser); 127return ListCertificates(StoreName.Root, StoreLocation.CurrentUser, isValid: true, requireExportable: false)
Templates.Tests (12)
src\Shared\CertificateGeneration\CertificateManager.cs (6)
170ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true, requireExportable: true); 184var currentUserCertificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true, requireExportable: true); 372var certificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false, requireExportable: false); 428var certificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false); 655var location = StoreLocation.CurrentUser; 790using var store = new X509Store(StoreName.My, StoreLocation.CurrentUser);
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (2)
373return ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false); 378if (store.Name! == StoreName.My.ToString() && store.Location == StoreLocation.CurrentUser && Directory.Exists(MacOSUserHttpsCertificateLocation))
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
70return ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false, requireExportable: false);
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (3)
78using var store = new X509Store(StoreName.Root, StoreLocation.CurrentUser); 105using var store = new X509Store(StoreName.Root, StoreLocation.CurrentUser); 127return ListCertificates(StoreName.Root, StoreLocation.CurrentUser, isValid: true, requireExportable: false)
WebTransportInteractiveSampleApp (1)
Program.cs (1)
165var store = new X509Store("KestrelSampleWebTransportCertificates", StoreLocation.CurrentUser);
WebTransportSampleApp (1)
Program.cs (1)
50var store = new X509Store("KestrelSampleWebTransportCertificates", StoreLocation.CurrentUser);