PFXVerifyPassword (Compact 2013)

3/28/2014

This function attempts to decode the outer layer of a BLOB as a Personal Information Exchange (PFX) packet and to decrypt it with the given password. No data from the BLOB is imported.

PFX format is also known as Public-Key Cryptography Standards #12 (PKCS #12) format.

Syntax

BOOL WINAPI PFXVerifyPassword(
  CRYPT_DATA_BLOB* pPFX,
  LPCWSTR szPassword,
  DWORD dwFlags
);

Parameters

  • pPFX
    [in] Pointer to a CRYPT_DATA_BLOB structure that the function will attempt to decode as a PFX packet.
  • szPassword
    [in] String password to be checked. For this function to succeed, this password must be exactly the same as the password used to encrypt the packet.
  • dwFlags
    [in] Reserved; set to 0 (zero).

Return Value

The function returns TRUE if the password appears correct; otherwise, it returns FALSE.

Remarks

When you have finished using szPassword, clear the password from memory by calling the SecureZeroMemory function.

Requirements

Header

wincrypt.h

Library

crypt32.lib

See Also

Reference

Certificates Functions