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