Back to product page

HasPrivateKey property


Determines if certificate has associated private key.

Type

A Boolean value. Set to True when private key exists.

Syntax

  • Basic
object.HasPrivateKey
The HasPrivateKey(object) syntax has these parts:
objectAn expression evaluating to an object of type Certificate.

Remarks

When working with certificates that are stored in Microsoft stores (in registry, files, etc..) sometimes you cannot directly access private key data. Rather, Windows just allow you to obtain handle to the key (without actual sensitive data) that should be used for signing, decrypting, etc...

To determine if selected certificate will be appropriate to use for the SSL connection, this property must return True. If not, wodCertificate will soon return an error.

Platforms

Windows