47 references to HasPrivateKey
dotnet-svcutil-lib (1)
CmdCredentialsProvider.cs (1)
83if (certificate.HasPrivateKey)
Microsoft.AspNetCore.DataProtection (1)
XmlEncryption\EncryptedXmlDecryptor.cs (1)
151if (!keyDecryptionCert.HasPrivateKey)
Microsoft.AspNetCore.DataProtection.Extensions.Tests (3)
DataProtectionProviderTests.cs (3)
136Assert.True(certificate.HasPrivateKey, "Cert should have a private key"); 177Assert.False(certWithoutKey.HasPrivateKey, "Cert should not have private key"); 189Assert.False(certInStore.HasPrivateKey, "Cert should not have private key");
Microsoft.AspNetCore.DeveloperCertificates.XPlat.Tests (6)
CertificateManagerTests.cs (6)
54Assert.False(exportedCertificate.HasPrivateKey); 58Assert.True(httpsCertificate.HasPrivateKey); 153Assert.True(exportedCertificate.HasPrivateKey); 187Assert.True(exportedCertificate.HasPrivateKey); 220Assert.False(exportedCertificate.HasPrivateKey); 349Assert.True(exportedCertificate.HasPrivateKey);
Microsoft.AspNetCore.Server.Kestrel.Core (5)
CertificateLoader.cs (1)
107=> certificate.HasPrivateKey;
Middleware\HttpsConnectionMiddleware.cs (4)
98if (!certificate.HasPrivateKey) 253Debug.Assert(!certificate.HasPrivateKey, "This should only be called with certificates that don't have a private key"); 282if (certs.Count > 0 && certs[0].HasPrivateKey) 298if (certs.Count > 0 && certs[0].HasPrivateKey)
PresentationUI (1)
MS\Internal\Documents\DocumentSignatureManager.cs (1)
937if (!collection[i].HasPrivateKey)
System.Net.Http (1)
src\libraries\Common\src\System\Net\Security\CertificateHelper.cs (1)
38if (!cert.HasPrivateKey)
System.Net.Quic (1)
System\Net\Quic\Internal\MsQuicConfiguration.cs (1)
17=> certificate is X509Certificate2 certificate2 && certificate2.Handle != IntPtr.Zero && certificate2.HasPrivateKey;
System.Net.Security (4)
System\Net\Security\SslAuthenticationOptions.cs (1)
121if (certificateWithKey != null && certificateWithKey.HasPrivateKey)
System\Net\Security\SslStream.Protocol.cs (2)
199if (certEx.HasPrivateKey) 237if (cert.HasPrivateKey)
System\Net\Security\SslStreamCertificateContext.cs (1)
42if (!target.HasPrivateKey)
System.Security.Cryptography (22)
src\libraries\Common\src\System\Security\Cryptography\X509Certificates\X509CertificateLoader.cs (4)
121/// certificate where <see cref="X509Certificate2.HasPrivateKey" /> is 180/// certificate where <see cref="X509Certificate2.HasPrivateKey" /> is 251/// certificate where <see cref="X509Certificate2.HasPrivateKey" /> is 313/// certificate where <see cref="X509Certificate2.HasPrivateKey" /> is
System\Security\Cryptography\X509Certificates\CertificateExtensionsCommon.cs (1)
54if (!certificate.HasPrivateKey || oidValue != certificate.PublicKey.Oid.Value)
System\Security\Cryptography\X509Certificates\CertificateRequest.cs (8)
485/// assert <see cref="X509Certificate2.HasPrivateKey" />. 554/// not assert <see cref="X509Certificate2.HasPrivateKey" />. 558/// The <see cref="X509Certificate2.HasPrivateKey"/> value for <paramref name="issuerCertificate"/> is false. 605/// not assert <see cref="X509Certificate2.HasPrivateKey" />. 609/// The <see cref="X509Certificate2.HasPrivateKey"/> value for <paramref name="issuerCertificate"/> is false. 633if (!issuerCertificate.HasPrivateKey) 753/// not assert <see cref="X509Certificate2.HasPrivateKey" />. 794/// not assert <see cref="X509Certificate2.HasPrivateKey" />.
System\Security\Cryptography\X509Certificates\CertificateRevocationListBuilder.Build.cs (1)
135if (!issuerCertificate.HasPrivateKey)
System\Security\Cryptography\X509Certificates\DSACertificateExtensions.cs (1)
38if (certificate.HasPrivateKey)
System\Security\Cryptography\X509Certificates\ECDsaCertificateExtensions.cs (1)
35if (certificate.HasPrivateKey)
System\Security\Cryptography\X509Certificates\OpenSslDirectoryBasedStoreProvider.cs (2)
150if (!copy.HasPrivateKey) 159if (fromFile.HasPrivateKey)
System\Security\Cryptography\X509Certificates\RSACertificateExtensions.cs (1)
35if (certificate.HasPrivateKey)
System\Security\Cryptography\X509Certificates\X509Certificate2.cs (3)
275if (!HasPrivateKey) 733/// A new ECDiffieHellman certificate with the <see cref="HasPrivateKey" /> property set to <see langword="true"/>. 753if (HasPrivateKey)
System.Security.Cryptography.Pkcs (1)
System\Security\Cryptography\Pkcs\CmsSigner.cs (1)
171if (PrivateKey == null && !Certificate.HasPrivateKey)
System.ServiceModel.Primitives (1)
System\IdentityModel\Tokens\X509AsymmetricSecurityKey.cs (1)
69if (_certificate.HasPrivateKey && _privateKey == null)