100 references to X509KeyUsageFlags
dotnet-dev-certs (2)
src\Shared\CertificateGeneration\CertificateManager.cs (2)
653var keyUsage = new X509KeyUsageExtension(X509KeyUsageFlags.KeyEncipherment | X509KeyUsageFlags.DigitalSignature, critical: true);
dotnet-svcutil-lib (1)
CmdCredentialsProvider.cs (1)
94digitalSignatureUsage = (keyUsage.KeyUsages & X509KeyUsageFlags.DigitalSignature) != 0;
HttpStress (1)
Program.cs (1)
401certReq.CertificateExtensions.Add(new X509KeyUsageExtension(X509KeyUsageFlags.DigitalSignature, false));
IIS.FunctionalTests (2)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\ClientCertificateFixture.cs (2)
42new X509KeyUsageExtension(X509KeyUsageFlags.DigitalSignature | X509KeyUsageFlags.NonRepudiation, critical: true));
IIS.LongTests (2)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\ClientCertificateFixture.cs (2)
42new X509KeyUsageExtension(X509KeyUsageFlags.DigitalSignature | X509KeyUsageFlags.NonRepudiation, critical: true));
IIS.NewHandler.FunctionalTests (2)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\ClientCertificateFixture.cs (2)
42new X509KeyUsageExtension(X509KeyUsageFlags.DigitalSignature | X509KeyUsageFlags.NonRepudiation, critical: true));
IIS.NewShim.FunctionalTests (2)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\ClientCertificateFixture.cs (2)
42new X509KeyUsageExtension(X509KeyUsageFlags.DigitalSignature | X509KeyUsageFlags.NonRepudiation, critical: true));
IIS.ShadowCopy.Tests (2)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\ClientCertificateFixture.cs (2)
42new X509KeyUsageExtension(X509KeyUsageFlags.DigitalSignature | X509KeyUsageFlags.NonRepudiation, critical: true));
IISExpress.FunctionalTests (2)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\ClientCertificateFixture.cs (2)
42new X509KeyUsageExtension(X509KeyUsageFlags.DigitalSignature | X509KeyUsageFlags.NonRepudiation, critical: true));
InMemory.FunctionalTests (8)
src\Servers\Kestrel\shared\test\CertHelper.cs (3)
19X509KeyUsageFlags.DigitalSignature | X509KeyUsageFlags.KeyEncipherment | X509KeyUsageFlags.DataEncipherment,
src\Servers\Kestrel\shared\test\CertificateAuthority.cs (5)
54X509KeyUsageFlags.KeyCertSign | X509KeyUsageFlags.CrlSign, 59X509KeyUsageFlags.DigitalSignature | X509KeyUsageFlags.KeyEncipherment | X509KeyUsageFlags.DataEncipherment,
Microsoft.AspNetCore.Authentication.Test (1)
src\Shared\test\Certificates\Certificates.cs (1)
64new X509KeyUsageExtension(X509KeyUsageFlags.DigitalSignature, true);
Microsoft.AspNetCore.DeveloperCertificates.XPlat (2)
src\Shared\CertificateGeneration\CertificateManager.cs (2)
653var keyUsage = new X509KeyUsageExtension(X509KeyUsageFlags.KeyEncipherment | X509KeyUsageFlags.DigitalSignature, critical: true);
Microsoft.AspNetCore.DeveloperCertificates.XPlat.Tests (2)
CertificateManagerTests.cs (2)
78keyUsage.KeyUsages == (X509KeyUsageFlags.KeyEncipherment | X509KeyUsageFlags.DigitalSignature));
Microsoft.AspNetCore.HttpOverrides.Tests (1)
src\Shared\test\Certificates\Certificates.cs (1)
64new X509KeyUsageExtension(X509KeyUsageFlags.DigitalSignature, true);
Microsoft.AspNetCore.Server.Kestrel.Core (2)
src\Shared\CertificateGeneration\CertificateManager.cs (2)
653var keyUsage = new X509KeyUsageExtension(X509KeyUsageFlags.KeyEncipherment | X509KeyUsageFlags.DigitalSignature, critical: true);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (8)
src\Servers\Kestrel\shared\test\CertHelper.cs (3)
19X509KeyUsageFlags.DigitalSignature | X509KeyUsageFlags.KeyEncipherment | X509KeyUsageFlags.DataEncipherment,
src\Servers\Kestrel\shared\test\CertificateAuthority.cs (5)
54X509KeyUsageFlags.KeyCertSign | X509KeyUsageFlags.CrlSign, 59X509KeyUsageFlags.DigitalSignature | X509KeyUsageFlags.KeyEncipherment | X509KeyUsageFlags.DataEncipherment,
netstandard (1)
netstandard.cs (1)
1975[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.X509Certificates.X509KeyUsageFlags))]
PresentationUI (1)
MS\Internal\Documents\DocumentSignatureManager.cs (1)
925collection = collection.Find(X509FindType.FindByKeyUsage, X509KeyUsageFlags.DigitalSignature, false /*validOnly*/);
System (1)
src\libraries\shims\System\ref\System.cs (1)
882[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.X509Certificates.X509KeyUsageFlags))]
System.Net.Http (2)
src\libraries\Common\src\System\Net\Security\CertificateHelper.cs (2)
104const X509KeyUsageFlags RequiredUsages = X509KeyUsageFlags.DigitalSignature;
System.Security.Cryptography (37)
System\Security\Cryptography\X509Certificates\CertificateRequest.cs (1)
693if (keyUsage != null && (keyUsage.KeyUsages & X509KeyUsageFlags.KeyCertSign) == 0)
System\Security\Cryptography\X509Certificates\CertificateRevocationListBuilder.Build.cs (2)
77/// <see cref="X509KeyUsageFlags.CrlSign" /> usage. 169if (keyUsage != null && (keyUsage.KeyUsages & X509KeyUsageFlags.CrlSign) == 0)
System\Security\Cryptography\X509Certificates\ECDsaCertificateExtensions.cs (6)
61if ((ext.KeyUsages & X509KeyUsageFlags.KeyAgreement) == 0) 72const X509KeyUsageFlags ecdsaFlags = 73X509KeyUsageFlags.DigitalSignature | 74X509KeyUsageFlags.NonRepudiation | 75X509KeyUsageFlags.KeyCertSign | 76X509KeyUsageFlags.CrlSign;
System\Security\Cryptography\X509Certificates\FindPal.cs (18)
15private static readonly Dictionary<string, X509KeyUsageFlags> s_keyUsages = 16new Dictionary<string, X509KeyUsageFlags>(NamedKeyUsageFlagsCount, StringComparer.OrdinalIgnoreCase) 18{ "DigitalSignature", X509KeyUsageFlags.DigitalSignature }, 19{ "NonRepudiation", X509KeyUsageFlags.NonRepudiation }, 20{ "KeyEncipherment", X509KeyUsageFlags.KeyEncipherment }, 21{ "DataEncipherment", X509KeyUsageFlags.DataEncipherment }, 22{ "KeyAgreement", X509KeyUsageFlags.KeyAgreement }, 23{ "KeyCertSign", X509KeyUsageFlags.KeyCertSign }, 24{ "CrlSign", X509KeyUsageFlags.CrlSign }, 25{ "EncipherOnly", X509KeyUsageFlags.EncipherOnly }, 26{ "DecipherOnly", X509KeyUsageFlags.DecipherOnly }, 144X509KeyUsageFlags keyUsage = ConfirmedX509KeyUsage(findValue); 184private static X509KeyUsageFlags ConfirmedX509KeyUsage(object findValue) 186if (findValue is X509KeyUsageFlags) 187return (X509KeyUsageFlags)findValue; 190return (X509KeyUsageFlags)(int)findValue; 193return (X509KeyUsageFlags)(uint)findValue; 197X509KeyUsageFlags usageFlags;
System\Security\Cryptography\X509Certificates\IFindPal.cs (1)
25void FindByKeyUsage(X509KeyUsageFlags keyUsage);
System\Security\Cryptography\X509Certificates\ManagedCertificateFinder.cs (1)
248public void FindByKeyUsage(X509KeyUsageFlags keyUsage)
System\Security\Cryptography\X509Certificates\X509Certificate2.cs (1)
1518return ((ext.KeyUsages & X509KeyUsageFlags.KeyAgreement) != 0);
System\Security\Cryptography\X509Certificates\X509KeyUsageExtension.cs (7)
22public X509KeyUsageExtension(X509KeyUsageFlags keyUsages, bool critical) 27public X509KeyUsageFlags KeyUsages 46private static byte[] EncodeX509KeyUsageExtension(X509KeyUsageFlags keyUsages) 64private static void DecodeX509KeyUsageExtension(byte[] encoded, out X509KeyUsageFlags keyUsages) 103(X509KeyUsageFlags)ReverseBitOrder((byte)keyUsagesAsn) | 104(X509KeyUsageFlags)(ReverseBitOrder((byte)(((ushort)keyUsagesAsn >> 8))) << 8); 110private X509KeyUsageFlags _keyUsages;
System.Security.Cryptography.Pkcs (3)
System\Security\Cryptography\Pkcs\SignerInfo.cs (3)
721const X509KeyUsageFlags SufficientFlags = 722X509KeyUsageFlags.DigitalSignature | 723X509KeyUsageFlags.NonRepudiation;
System.Security.Cryptography.X509Certificates (1)
System.Security.Cryptography.X509Certificates.cs (1)
39[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.X509Certificates.X509KeyUsageFlags))]
System.Security.Cryptography.Xml (2)
System\Security\Cryptography\Xml\SignedXml.cs (2)
352bool validKeyUsage = (keyUsage.KeyUsages & X509KeyUsageFlags.DigitalSignature) != 0 || 353(keyUsage.KeyUsages & X509KeyUsageFlags.NonRepudiation) != 0;
Templates.Blazor.Tests (2)
src\Shared\CertificateGeneration\CertificateManager.cs (2)
653var keyUsage = new X509KeyUsageExtension(X509KeyUsageFlags.KeyEncipherment | X509KeyUsageFlags.DigitalSignature, critical: true);
Templates.Blazor.WebAssembly.Auth.Tests (2)
src\Shared\CertificateGeneration\CertificateManager.cs (2)
653var keyUsage = new X509KeyUsageExtension(X509KeyUsageFlags.KeyEncipherment | X509KeyUsageFlags.DigitalSignature, critical: true);
Templates.Blazor.WebAssembly.Tests (2)
src\Shared\CertificateGeneration\CertificateManager.cs (2)
653var keyUsage = new X509KeyUsageExtension(X509KeyUsageFlags.KeyEncipherment | X509KeyUsageFlags.DigitalSignature, critical: true);
Templates.Mvc.Tests (2)
src\Shared\CertificateGeneration\CertificateManager.cs (2)
653var keyUsage = new X509KeyUsageExtension(X509KeyUsageFlags.KeyEncipherment | X509KeyUsageFlags.DigitalSignature, critical: true);
Templates.Tests (2)
src\Shared\CertificateGeneration\CertificateManager.cs (2)
653var keyUsage = new X509KeyUsageExtension(X509KeyUsageFlags.KeyEncipherment | X509KeyUsageFlags.DigitalSignature, critical: true);
WebTransportInteractiveSampleApp (1)
Program.cs (1)
190req.CertificateExtensions.Add(new X509KeyUsageExtension(X509KeyUsageFlags.DigitalSignature, false));
WebTransportSampleApp (1)
Program.cs (1)
76req.CertificateExtensions.Add(new X509KeyUsageExtension(X509KeyUsageFlags.DigitalSignature, false));