293 references to StoreName
aspire (38)
Certificates\CertificateGeneration\CertificateManager.cs (17)
133StoreName storeName, 253ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true, requireExportable: true); 288var allCurrentUserCertificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true, requireExportable: true); 289var allLocalMachineCertificates = ListCertificates(StoreName.My, StoreLocation.LocalMachine, isValid: true, requireExportable: true); 544var certificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false, requireExportable: false); 610var certificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false); 630protected abstract X509Certificate2 SaveCertificateCore(X509Certificate2 certificate, StoreName storeName, StoreLocation storeLocation); 639protected abstract IList<X509Certificate2> GetCertificatesToRemove(StoreName storeName, StoreLocation storeLocation); 858var name = StoreName.My; 892internal void RemoveAllCertificates(StoreName storeName, StoreLocation storeLocation) 897var removeLocation = storeName == StoreName.My ? RemoveLocations.Local : RemoveLocations.Trusted; 1021using var store = new X509Store(StoreName.My, StoreLocation.CurrentUser); 1055/// Given a certificate, usually from the <see cref="StoreName.My"/> store, try to find the 1056/// corresponding certificate in <paramref name="store"/> (usually the <see cref="StoreName.Root"/> store)."/> 1104public void ListCertificatesStart(StoreLocation location, StoreName storeName) => 1164public void SaveCertificateInStoreStart(string certificate, StoreName name, StoreLocation location) =>
Certificates\CertificateGeneration\MacOSCertificateManager.cs (4)
317protected override X509Certificate2 SaveCertificateCore(X509Certificate2 certificate, StoreName storeName, StoreLocation storeLocation) 427protected override IList<X509Certificate2> GetCertificatesToRemove(StoreName storeName, StoreLocation storeLocation) 429return ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false); 434if (store.Name! == StoreName.My.ToString() && store.Location == StoreLocation.CurrentUser && Directory.Exists(s_macOSUserHttpsCertificateLocation))
Certificates\CertificateGeneration\UnixCertificateManager.cs (5)
195protected override X509Certificate2 SaveCertificateCore(X509Certificate2 certificate, StoreName storeName, StoreLocation storeLocation) 233using var store = new X509Store(StoreName.Root, StoreLocation.CurrentUser); 472using var store = new X509Store(StoreName.Root, StoreLocation.CurrentUser); 563protected override IList<X509Certificate2> GetCertificatesToRemove(StoreName storeName, StoreLocation storeLocation) 565return ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false, requireExportable: false);
Certificates\CertificateGeneration\WindowsCertificateManager.cs (5)
55protected override X509Certificate2 SaveCertificateCore(X509Certificate2 certificate, StoreName storeName, StoreLocation storeLocation) 78using var store = new X509Store(StoreName.Root, StoreLocation.CurrentUser); 107using var store = new X509Store(StoreName.Root, StoreLocation.CurrentUser); 124var isTrusted = ListCertificates(StoreName.Root, StoreLocation.CurrentUser, isValid: true, requireExportable: false) 129protected override IList<X509Certificate2> GetCertificatesToRemove(StoreName storeName, StoreLocation storeLocation)
Certificates\NativeCertificateToolRunner.cs (3)
25StoreName.My, StoreLocation.CurrentUser, isValid: true); 94StoreName.My, StoreLocation.CurrentUser, isValid: true); 204StoreName.My, StoreLocation.CurrentUser, isValid: false, requireExportable: false);
src\Shared\X509Certificate2Extensions.cs (3)
91(StoreName.Root, StoreLocation.CurrentUser), 92(StoreName.Root, StoreLocation.LocalMachine), 151using var rootStore = new X509Store(StoreName.Root, StoreLocation.CurrentUser);
Utils\EnvironmentChecker\DcpConnectionChecker.cs (1)
412var certificates = certificateManager.ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true);
Aspire.Cli.Tests (2)
Certificates\NativeCertificateToolRunnerTests.cs (2)
156protected override X509Certificate2 SaveCertificateCore(X509Certificate2 certificate, StoreName storeName, StoreLocation storeLocation) 176protected override IList<X509Certificate2> GetCertificatesToRemove(StoreName storeName, StoreLocation storeLocation) => [];
Aspire.Hosting (5)
ApplicationModel\CertificateAuthorityCollectionResourceExtensions.cs (1)
117public static IResourceBuilder<CertificateAuthorityCollection> WithCertificatesFromStore(this IResourceBuilder<CertificateAuthorityCollection> builder, StoreName storeName, StoreLocation storeLocation, Func<X509Certificate2, bool>? filter = null)
DeveloperCertificateService.cs (1)
35using var store = new X509Store(StoreName.My, StoreLocation.CurrentUser);
src\Shared\X509Certificate2Extensions.cs (3)
91(StoreName.Root, StoreLocation.CurrentUser), 92(StoreName.Root, StoreLocation.LocalMachine), 151using var rootStore = new X509Store(StoreName.Root, StoreLocation.CurrentUser);
Aspire.Playground.Tests (4)
src\Shared\X509Certificate2Extensions.cs (3)
91(StoreName.Root, StoreLocation.CurrentUser), 92(StoreName.Root, StoreLocation.LocalMachine), 151using var rootStore = new X509Store(StoreName.Root, StoreLocation.CurrentUser);
tests\Aspire.TestUtilities\RequiresFeatureAttribute.cs (1)
76using var store = new X509Store(StoreName.My, StoreLocation.CurrentUser);
Aspire.TestUtilities (4)
RequiresFeatureAttribute.cs (1)
76using var store = new X509Store(StoreName.My, StoreLocation.CurrentUser);
src\Shared\X509Certificate2Extensions.cs (3)
91(StoreName.Root, StoreLocation.CurrentUser), 92(StoreName.Root, StoreLocation.LocalMachine), 151using var rootStore = new X509Store(StoreName.Root, StoreLocation.CurrentUser);
Binding.UDS.IntegrationTests (1)
ServiceHelper.cs (1)
50using (var store = new X509Store(StoreName.My, StoreLocation.CurrentUser))
Binding.WS.TransportWithMessageCredentialSecurity.IntegrationTests (5)
BasicHttpsTransportWithMessageCredentialSecurityTests.cs (1)
34StoreName.My,
BasicHttpTransportWithMessageCredentialSecurityTests.cs (1)
35StoreName.My,
WS2007HttpTransportWithMessageCredentialsSecurityTests.cs (1)
39StoreName.My,
WSHttpTransportWithMessageCredentialSecurityTests.cs (1)
40StoreName.My,
WSNetTcpTransportWithMessageCredentialSecurityTests.cs (1)
42StoreName.My,
Client.ChannelLayer.IntegrationTests (3)
DuplexChannelWithSynchronizationContext.cs (3)
48StoreName.My, 110StoreName.My, 187StoreName.My,
dotnet-dev-certs (34)
Program.cs (3)
306var certificates = certificateManager.ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true); 367var availableCertificates = CertificateManager.Instance.ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true); 382var certificates = manager.ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true, exportPath.HasValue());
src\aspnetcore\src\Shared\CertificateGeneration\CertificateManager.cs (17)
134StoreName storeName, 254ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true, requireExportable: true); 289var allCurrentUserCertificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true, requireExportable: true); 290var allLocalMachineCertificates = ListCertificates(StoreName.My, StoreLocation.LocalMachine, isValid: true, requireExportable: true); 546var certificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false, requireExportable: false); 612var certificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false); 632protected abstract X509Certificate2 SaveCertificateCore(X509Certificate2 certificate, StoreName storeName, StoreLocation storeLocation); 641protected abstract IList<X509Certificate2> GetCertificatesToRemove(StoreName storeName, StoreLocation storeLocation); 860var name = StoreName.My; 894internal void RemoveAllCertificates(StoreName storeName, StoreLocation storeLocation) 899var removeLocation = storeName == StoreName.My ? RemoveLocations.Local : RemoveLocations.Trusted; 1023using var store = new X509Store(StoreName.My, StoreLocation.CurrentUser); 1057/// Given a certificate, usually from the <see cref="StoreName.My"/> store, try to find the 1058/// corresponding certificate in <paramref name="store"/> (usually the <see cref="StoreName.Root"/> store)."/> 1097public void ListCertificatesStart(StoreLocation location, StoreName storeName) => WriteEvent(1, location, storeName); 1143public void SaveCertificateInStoreStart(string certificate, StoreName name, StoreLocation location) => WriteEvent(20, certificate, name, location);
src\aspnetcore\src\Shared\CertificateGeneration\MacOSCertificateManager.cs (4)
303protected override X509Certificate2 SaveCertificateCore(X509Certificate2 certificate, StoreName storeName, StoreLocation storeLocation) 369protected override IList<X509Certificate2> GetCertificatesToRemove(StoreName storeName, StoreLocation storeLocation) 371return ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false); 376if (store.Name! == StoreName.My.ToString() && store.Location == StoreLocation.CurrentUser && Directory.Exists(MacOSUserHttpsCertificateLocation))
src\aspnetcore\src\Shared\CertificateGeneration\UnixCertificateManager.cs (5)
172protected override X509Certificate2 SaveCertificateCore(X509Certificate2 certificate, StoreName storeName, StoreLocation storeLocation) 209using var store = new X509Store(StoreName.Root, StoreLocation.CurrentUser); 448using var store = new X509Store(StoreName.Root, StoreLocation.CurrentUser); 536protected override IList<X509Certificate2> GetCertificatesToRemove(StoreName storeName, StoreLocation storeLocation) 538return ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false, requireExportable: false);
src\aspnetcore\src\Shared\CertificateGeneration\WindowsCertificateManager.cs (5)
59protected override X509Certificate2 SaveCertificateCore(X509Certificate2 certificate, StoreName storeName, StoreLocation storeLocation) 81using var store = new X509Store(StoreName.Root, StoreLocation.CurrentUser); 110using var store = new X509Store(StoreName.Root, StoreLocation.CurrentUser); 127var isTrusted = ListCertificates(StoreName.Root, StoreLocation.CurrentUser, isValid: true, requireExportable: false) 132protected override IList<X509Certificate2> GetCertificatesToRemove(StoreName storeName, StoreLocation storeLocation)
dotnet-svcutil-lib (16)
CmdCredentialsProvider.cs (1)
76X509Store certificateStore = new X509Store(StoreName.My, StoreLocation.CurrentUser);
FrameworkFork\System.ServiceModel\System\IdentityModel\Selectors\X509SecurityTokenProvider.cs (1)
27public X509SecurityTokenProvider(StoreLocation storeLocation, StoreName storeName, X509FindType findType, object findValue)
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\SecurityUtils.cs (4)
882internal static X509Certificate2 GetCertificateFromStore(StoreName storeName, StoreLocation storeLocation, 892internal static bool TryGetCertificateFromStore(StoreName storeName, StoreLocation storeLocation, 899private static X509Certificate2 GetCertificateFromStoreCore(StoreName storeName, StoreLocation storeLocation, 934private static Exception CreateCertificateLoadException(StoreName storeName, StoreLocation storeLocation,
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\X509CertificateInitiatorClientCredential.cs (4)
12internal const StoreName DefaultStoreName = StoreName.My; 42public void SetCertificate(string subjectName, StoreLocation storeLocation, StoreName storeName) 51public void SetCertificate(StoreLocation storeLocation, StoreName storeName, X509FindType findType, object findValue)
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\X509CertificateRecipientClientCredential.cs (6)
16internal const StoreName DefaultStoreName = StoreName.My; 88public void SetDefaultCertificate(string subjectName, StoreLocation storeLocation, StoreName storeName) 97public void SetDefaultCertificate(StoreLocation storeLocation, StoreName storeName, X509FindType findType, object findValue) 107public void SetScopedCertificate(string subjectName, StoreLocation storeLocation, StoreName storeName, Uri targetService) 116public void SetScopedCertificate(StoreLocation storeLocation, StoreName storeName, X509FindType findType, object findValue, Uri targetService)
Infrastructure.Common (9)
CertificateManager.cs (9)
47using (var store = new X509Store(StoreName.Root, StoreLocation.LocalMachine)) 88public static X509Certificate2 AddToStoreIfNeeded(StoreName storeName, 176private static X509Certificate2 CertificateFromThumbprint(StoreName storeName, 208return CertificateFromThumbprint(StoreName.Root, PlatformSpecificRootStoreLocation, thumbprint, validOnly); 214return CertificateFromThumbprint(StoreName.My, StoreLocation.CurrentUser, thumbprint, validOnly); 220return CertificateFromThumbprint(StoreName.TrustedPeople, StoreLocation.CurrentUser, thumbprint, validOnly); 235certificate = AddToStoreIfNeeded(StoreName.Root, PlatformSpecificRootStoreLocation, certificate); 247certificate = AddToStoreIfNeeded(StoreName.My, StoreLocation.CurrentUser, certificate); 260certificate = AddToStoreIfNeeded(StoreName.TrustedPeople, StoreLocation.CurrentUser, certificate);
Microsoft.AspNetCore.DeveloperCertificates.XPlat (29)
src\aspnetcore\src\Shared\CertificateGeneration\CertificateManager.cs (15)
134StoreName storeName, 254ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true, requireExportable: true); 289var allCurrentUserCertificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true, requireExportable: true); 290var allLocalMachineCertificates = ListCertificates(StoreName.My, StoreLocation.LocalMachine, isValid: true, requireExportable: true); 546var certificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false, requireExportable: false); 612var certificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false); 632protected abstract X509Certificate2 SaveCertificateCore(X509Certificate2 certificate, StoreName storeName, StoreLocation storeLocation); 641protected abstract IList<X509Certificate2> GetCertificatesToRemove(StoreName storeName, StoreLocation storeLocation); 860var name = StoreName.My; 894internal void RemoveAllCertificates(StoreName storeName, StoreLocation storeLocation) 899var removeLocation = storeName == StoreName.My ? RemoveLocations.Local : RemoveLocations.Trusted; 1023using var store = new X509Store(StoreName.My, StoreLocation.CurrentUser); 1097public void ListCertificatesStart(StoreLocation location, StoreName storeName) => WriteEvent(1, location, storeName); 1143public void SaveCertificateInStoreStart(string certificate, StoreName name, StoreLocation location) => WriteEvent(20, certificate, name, location);
src\aspnetcore\src\Shared\CertificateGeneration\MacOSCertificateManager.cs (4)
303protected override X509Certificate2 SaveCertificateCore(X509Certificate2 certificate, StoreName storeName, StoreLocation storeLocation) 369protected override IList<X509Certificate2> GetCertificatesToRemove(StoreName storeName, StoreLocation storeLocation) 371return ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false); 376if (store.Name! == StoreName.My.ToString() && store.Location == StoreLocation.CurrentUser && Directory.Exists(MacOSUserHttpsCertificateLocation))
src\aspnetcore\src\Shared\CertificateGeneration\UnixCertificateManager.cs (5)
172protected override X509Certificate2 SaveCertificateCore(X509Certificate2 certificate, StoreName storeName, StoreLocation storeLocation) 209using var store = new X509Store(StoreName.Root, StoreLocation.CurrentUser); 448using var store = new X509Store(StoreName.Root, StoreLocation.CurrentUser); 536protected override IList<X509Certificate2> GetCertificatesToRemove(StoreName storeName, StoreLocation storeLocation) 538return ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false, requireExportable: false);
src\aspnetcore\src\Shared\CertificateGeneration\WindowsCertificateManager.cs (5)
59protected override X509Certificate2 SaveCertificateCore(X509Certificate2 certificate, StoreName storeName, StoreLocation storeLocation) 81using var store = new X509Store(StoreName.Root, StoreLocation.CurrentUser); 110using var store = new X509Store(StoreName.Root, StoreLocation.CurrentUser); 127var isTrusted = ListCertificates(StoreName.Root, StoreLocation.CurrentUser, isValid: true, requireExportable: false) 132protected override IList<X509Certificate2> GetCertificatesToRemove(StoreName storeName, StoreLocation storeLocation)
Microsoft.AspNetCore.Server.Kestrel.Core (36)
Internal\Certificates\CertificateConfigLoader.cs (1)
327var storeName = string.IsNullOrEmpty(certInfo.Store) ? StoreName.My.ToString() : certInfo.Store;
KestrelServerOptions.cs (1)
391var certs = CertificateManager.Instance.ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true, requireExportable: false);
ListenOptionsHttpsExtensions.cs (4)
82public static ListenOptions UseHttps(this ListenOptions listenOptions, StoreName storeName, string subject) 93public static ListenOptions UseHttps(this ListenOptions listenOptions, StoreName storeName, string subject, bool allowInvalid) 105public static ListenOptions UseHttps(this ListenOptions listenOptions, StoreName storeName, string subject, bool allowInvalid, StoreLocation location) 118public static ListenOptions UseHttps(this ListenOptions listenOptions, StoreName storeName, string subject, bool allowInvalid, StoreLocation location,
Middleware\HttpsConnectionMiddleware.cs (1)
292var store = new X509Store(StoreName.My, storeLocation);
src\aspnetcore\src\Shared\CertificateGeneration\CertificateManager.cs (15)
134StoreName storeName, 254ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true, requireExportable: true); 289var allCurrentUserCertificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true, requireExportable: true); 290var allLocalMachineCertificates = ListCertificates(StoreName.My, StoreLocation.LocalMachine, isValid: true, requireExportable: true); 546var certificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false, requireExportable: false); 612var certificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false); 632protected abstract X509Certificate2 SaveCertificateCore(X509Certificate2 certificate, StoreName storeName, StoreLocation storeLocation); 641protected abstract IList<X509Certificate2> GetCertificatesToRemove(StoreName storeName, StoreLocation storeLocation); 860var name = StoreName.My; 894internal void RemoveAllCertificates(StoreName storeName, StoreLocation storeLocation) 899var removeLocation = storeName == StoreName.My ? RemoveLocations.Local : RemoveLocations.Trusted; 1023using var store = new X509Store(StoreName.My, StoreLocation.CurrentUser); 1097public void ListCertificatesStart(StoreLocation location, StoreName storeName) => WriteEvent(1, location, storeName); 1143public void SaveCertificateInStoreStart(string certificate, StoreName name, StoreLocation location) => WriteEvent(20, certificate, name, location);
src\aspnetcore\src\Shared\CertificateGeneration\MacOSCertificateManager.cs (4)
303protected override X509Certificate2 SaveCertificateCore(X509Certificate2 certificate, StoreName storeName, StoreLocation storeLocation) 369protected override IList<X509Certificate2> GetCertificatesToRemove(StoreName storeName, StoreLocation storeLocation) 371return ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false); 376if (store.Name! == StoreName.My.ToString() && store.Location == StoreLocation.CurrentUser && Directory.Exists(MacOSUserHttpsCertificateLocation))
src\aspnetcore\src\Shared\CertificateGeneration\UnixCertificateManager.cs (5)
172protected override X509Certificate2 SaveCertificateCore(X509Certificate2 certificate, StoreName storeName, StoreLocation storeLocation) 209using var store = new X509Store(StoreName.Root, StoreLocation.CurrentUser); 448using var store = new X509Store(StoreName.Root, StoreLocation.CurrentUser); 536protected override IList<X509Certificate2> GetCertificatesToRemove(StoreName storeName, StoreLocation storeLocation) 538return ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false, requireExportable: false);
src\aspnetcore\src\Shared\CertificateGeneration\WindowsCertificateManager.cs (5)
59protected override X509Certificate2 SaveCertificateCore(X509Certificate2 certificate, StoreName storeName, StoreLocation storeLocation) 81using var store = new X509Store(StoreName.Root, StoreLocation.CurrentUser); 110using var store = new X509Store(StoreName.Root, StoreLocation.CurrentUser); 127var isTrusted = ListCertificates(StoreName.Root, StoreLocation.CurrentUser, isValid: true, requireExportable: false) 132protected override IList<X509Certificate2> GetCertificatesToRemove(StoreName storeName, StoreLocation storeLocation)
Microsoft.Build.Tasks.Core (3)
ManifestUtil\SecurityUtil.cs (2)
911var personalStore = new X509Store(StoreName.My, StoreLocation.CurrentUser); 930var personalStore = new X509Store(StoreName.My, StoreLocation.CurrentUser);
ResolveKeySource.cs (1)
183var personalStore = new X509Store(StoreName.My, StoreLocation.CurrentUser);
netstandard (1)
netstandard.cs (1)
1949[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.X509Certificates.StoreName))]
NuGet.CommandLine.XPlat (5)
Commands\Signing\SignCommand.cs (5)
152StoreName storeName = ValidateAndParseStoreName(storeValue); 237private static StoreName ValidateAndParseStoreName(string? storeValue) 239StoreName storeName = StoreName.My; 248string.Join(",", Enum.GetValues<StoreName>().ToList())));
NuGet.Commands (4)
ClientCertificatesCommand\ClientCertArgsExtensions.cs (2)
36public static StoreName? GetStoreName(this IClientCertArgsWithStoreData args) 38if (Enum.TryParse(args.StoreName, ignoreCase: true, result: out StoreName value))
SignCommand\CertificateFindOptions.cs (1)
31public StoreName StoreName { get; set; }
SignCommand\SignArgs.cs (1)
37public StoreName CertificateStoreName { get; set; }
NuGet.Configuration (15)
Settings\Items\StoreClientCertItem.cs (15)
25private const StoreName DefaultStoreName = StoreName.My; 32public static string GetString(StoreName storeName) 45StoreName? storeName = null, 138public StoreName StoreName 142if (Enum.TryParse(Attributes[ConfigurationConstants.StoreNameAttribute], ignoreCase: true, result: out StoreName result)) 176GetString(StoreName.AddressBook), 177GetString(StoreName.AuthRoot), 178GetString(StoreName.CertificateAuthority), 179GetString(StoreName.Disallowed), 180GetString(StoreName.My), 181GetString(StoreName.Root), 182GetString(StoreName.TrustedPeople), 183GetString(StoreName.TrustedPublisher) 265StoreName? storeName = null,
RepoTasks (29)
src\aspnetcore\src\Shared\CertificateGeneration\CertificateManager.cs (15)
134StoreName storeName, 254ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true, requireExportable: true); 289var allCurrentUserCertificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true, requireExportable: true); 290var allLocalMachineCertificates = ListCertificates(StoreName.My, StoreLocation.LocalMachine, isValid: true, requireExportable: true); 546var certificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false, requireExportable: false); 612var certificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false); 632protected abstract X509Certificate2 SaveCertificateCore(X509Certificate2 certificate, StoreName storeName, StoreLocation storeLocation); 641protected abstract IList<X509Certificate2> GetCertificatesToRemove(StoreName storeName, StoreLocation storeLocation); 860var name = StoreName.My; 894internal void RemoveAllCertificates(StoreName storeName, StoreLocation storeLocation) 899var removeLocation = storeName == StoreName.My ? RemoveLocations.Local : RemoveLocations.Trusted; 1023using var store = new X509Store(StoreName.My, StoreLocation.CurrentUser); 1097public void ListCertificatesStart(StoreLocation location, StoreName storeName) => WriteEvent(1, location, storeName); 1143public void SaveCertificateInStoreStart(string certificate, StoreName name, StoreLocation location) => WriteEvent(20, certificate, name, location);
src\aspnetcore\src\Shared\CertificateGeneration\MacOSCertificateManager.cs (4)
303protected override X509Certificate2 SaveCertificateCore(X509Certificate2 certificate, StoreName storeName, StoreLocation storeLocation) 369protected override IList<X509Certificate2> GetCertificatesToRemove(StoreName storeName, StoreLocation storeLocation) 371return ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false); 376if (store.Name! == StoreName.My.ToString() && store.Location == StoreLocation.CurrentUser && Directory.Exists(MacOSUserHttpsCertificateLocation))
src\aspnetcore\src\Shared\CertificateGeneration\UnixCertificateManager.cs (5)
172protected override X509Certificate2 SaveCertificateCore(X509Certificate2 certificate, StoreName storeName, StoreLocation storeLocation) 209using var store = new X509Store(StoreName.Root, StoreLocation.CurrentUser); 448using var store = new X509Store(StoreName.Root, StoreLocation.CurrentUser); 536protected override IList<X509Certificate2> GetCertificatesToRemove(StoreName storeName, StoreLocation storeLocation) 538return ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false, requireExportable: false);
src\aspnetcore\src\Shared\CertificateGeneration\WindowsCertificateManager.cs (5)
59protected override X509Certificate2 SaveCertificateCore(X509Certificate2 certificate, StoreName storeName, StoreLocation storeLocation) 81using var store = new X509Store(StoreName.Root, StoreLocation.CurrentUser); 110using var store = new X509Store(StoreName.Root, StoreLocation.CurrentUser); 127var isTrusted = ListCertificates(StoreName.Root, StoreLocation.CurrentUser, isValid: true, requireExportable: false) 132protected override IList<X509Certificate2> GetCertificatesToRemove(StoreName storeName, StoreLocation storeLocation)
Security.TransportSecurity.IntegrationTests (9)
Https\HttpsTests.4.1.0.cs (5)
44StoreName.My, 377StoreName.My, 426StoreName.My, 488StoreName.My, 548StoreName.My,
Tcp\ClientCredentialTypeTests.4.1.0.cs (2)
41StoreName.My, 93StoreName.My,
Tcp\ClientCredentialTypeTests.4.1.1.cs (1)
252StoreName.My,
Tcp\ClientCredentialTypeTests.OSX.cs (1)
153using (store = new X509Store(StoreName.Disallowed, StoreLocation.CurrentUser))
System (1)
parent\ref\System.cs (1)
860[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.X509Certificates.StoreName))]
System.Net.Http (1)
src\runtime\src\libraries\Common\src\System\Net\Security\CertificateHelper.Unix.cs (1)
14using (var myStore = new X509Store(StoreName.My, StoreLocation.CurrentUser))
System.Net.Http.WinHttpHandler (1)
src\runtime\src\libraries\Common\src\System\Net\Security\CertificateHelper.Windows.cs (1)
14using (var myStore = new X509Store(StoreName.My, StoreLocation.CurrentUser))
System.Net.Security (1)
System\Net\CertificateValidationPal.Unix.cs (1)
184X509Store store = new X509Store(StoreName.My, storeLocation);
System.Security.Cryptography (11)
System\Security\Cryptography\X509Certificates\X509Store.cs (11)
27public X509Store(StoreName storeName) 37public X509Store(StoreName storeName, StoreLocation storeLocation) 44StoreName.AddressBook => "AddressBook", 45StoreName.AuthRoot => "AuthRoot", 46StoreName.CertificateAuthority => IntermediateCAStoreName, 47StoreName.Disallowed => DisallowedStoreName, 48StoreName.My => MyStoreName, 49StoreName.Root => RootStoreName, 50StoreName.TrustedPeople => "TrustedPeople", 51StoreName.TrustedPublisher => "TrustedPublisher", 57public X509Store(StoreName storeName, StoreLocation storeLocation, OpenFlags flags)
System.Security.Cryptography.Pkcs (7)
Internal\Cryptography\Pal\AnyOS\ManagedPal.cs (2)
20certs.AddRange(PkcsHelpers.GetStoreCertificates(StoreName.My, StoreLocation.CurrentUser, openExistingOnly: false)); 26PkcsHelpers.GetStoreCertificates(StoreName.My, StoreLocation.LocalMachine, openExistingOnly: false));
Internal\Cryptography\Pal\Windows\DecryptorPalWindows.Decrypt.cs (2)
220candidateCerts.AddRange(PkcsHelpers.GetStoreCertificates(StoreName.AddressBook, StoreLocation.CurrentUser, openExistingOnly: true)); 221candidateCerts.AddRange(PkcsHelpers.GetStoreCertificates(StoreName.AddressBook, StoreLocation.LocalMachine, openExistingOnly: true));
Internal\Cryptography\Pal\Windows\PkcsPalWindows.cs (2)
59certs.AddRange(PkcsHelpers.GetStoreCertificates(StoreName.My, StoreLocation.CurrentUser, openExistingOnly: true)); 60certs.AddRange(PkcsHelpers.GetStoreCertificates(StoreName.My, StoreLocation.LocalMachine, openExistingOnly: true));
Internal\Cryptography\PkcsHelpers.cs (1)
153public static X509Certificate2Collection GetStoreCertificates(StoreName storeName, StoreLocation storeLocation, bool openExistingOnly)
System.Security.Cryptography.X509Certificates (1)
System.Security.Cryptography.X509Certificates.cs (1)
12[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.X509Certificates.StoreName))]
System.ServiceModel.Http (1)
System\ServiceModel\Channels\HttpsChannelFactory.cs (1)
298using (var store = new X509Store(StoreName.My, StoreLocation.CurrentUser))
System.ServiceModel.Primitives (17)
System\IdentityModel\Selectors\X509CertificateValidator.cs (3)
122private static bool StoreContainsCertificate(StoreName storeName, X509Certificate2 certificate) 163if (!StoreContainsCertificate(StoreName.TrustedPeople, certificate)) 170if (StoreContainsCertificate(StoreName.Disallowed, certificate))
System\ServiceModel\Security\SecurityUtils.cs (4)
845internal static X509Certificate2 GetCertificateFromStore(StoreName storeName, StoreLocation storeLocation, 857internal static bool TryGetCertificateFromStore(StoreName storeName, StoreLocation storeLocation, 864private static X509Certificate2 GetCertificateFromStoreCore(StoreName storeName, StoreLocation storeLocation, 900internal static Exception CreateCertificateLoadException(StoreName storeName, StoreLocation storeLocation,
System\ServiceModel\Security\X509CertificateInitiatorClientCredential.cs (4)
13internal const StoreName DefaultStoreName = StoreName.My; 54public void SetCertificate(string subjectName, StoreLocation storeLocation, StoreName storeName) 64public void SetCertificate(StoreLocation storeLocation, StoreName storeName, X509FindType findType, object findValue)
System\ServiceModel\Security\X509CertificateRecipientClientCredential.cs (6)
16internal const StoreName DefaultStoreName = StoreName.My; 75public void SetDefaultCertificate(string subjectName, StoreLocation storeLocation, StoreName storeName) 84public void SetDefaultCertificate(StoreLocation storeLocation, StoreName storeName, X509FindType findType, object findValue) 94public void SetScopedCertificate(string subjectName, StoreLocation storeLocation, StoreName storeName, Uri targetService) 103public void SetScopedCertificate(StoreLocation storeLocation, StoreName storeName, X509FindType findType, object findValue, Uri targetService)