Skip to content

Latest commit

 

History

History
67 lines (44 loc) · 2.03 KB

certificate-hasprivatekey.md

File metadata and controls

67 lines (44 loc) · 2.03 KB
description ms.assetid title ms.topic ms.date topic_type api_name api_type api_location
Determines whether the certificate has a private key associated with it. The method determines this by checking whether the CERT\_KEY\_PROV\_INFO\_PROP\_ID property is present.
80478956-1ed7-4c25-9ae3-d7176649e6d7
ICertificate2::HasPrivateKey method
reference
05/31/2018
APIRef
kbSyntax
Certificate.HasPrivateKey
ICertificate2.HasPrivateKey
ICertificate.HasPrivateKey
COM
Capicom.dll

ICertificate2::HasPrivateKey method

[CAPICOM is a 32-bit only component that is available for use in the following operating systems: Windows Server 2008, Windows Vista, and Windows XP. Instead, use the X509Certificate2 Class in the System.Security.Cryptography.X509Certificates namespace.]

The HasPrivateKey method determines whether the certificate has a private key associated with it. The method determines this by checking whether the CERT_KEY_PROV_INFO_PROP_ID property is present.

Syntax

Certificate.HasPrivateKey()

Parameters

This method has no parameters.

Requirements

Requirement Value
End of client support
Windows Vista
End of server support
Windows Server 2008
Redistributable
CAPICOM 2.0 or later on Windows Server 2003 and Windows XP
DLL
Capicom.dll

See also

PrivateKey.Open

Cryptography Objects

Certificate