SslCrackCertificate function (schannel.h)

[The SslCrackCertificate function is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions. Instead, use the CertCreateCertificateContext function.]

Returns an X509Certificate structure with the information contained in the specified certificate BLOB.

This function has no associated import library. You must use the LoadLibrary and GetProcAddress functions to dynamically link to Schannel.dll.

Syntax

BOOL SslCrackCertificate(
  [in]  PUCHAR           pbCertificate,
  [in]  DWORD            cbCertificate,
  [in]  DWORD            dwFlags,
  [out] PX509Certificate *ppCertificate
);

Parameters

[in] pbCertificate

The certificate BLOB from which to create the new X509Certificate structure.

[in] cbCertificate

The length, in bytes, of the BLOB contained in the pbCertificate parameter.

[in] dwFlags

Set this value to CF_CERT_FROM_FILE to specify that the certificate BLOB contained in the pbCertificate parameter is from a file.

[out] ppCertificate

On return, receives the address of a pointer to the X509Certificate structure that this function creates.

When you have finished using the X509Certificate structure, free it by calling SslFreeCertificate.

Return value

Returns nonzero if this function successfully created an X509Certificate structure or zero otherwise.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header schannel.h
DLL Schannel.dll