Skip to content

Latest commit

 

History

History
79 lines (62 loc) · 3.54 KB

nf-wincrypt-pfxverifypassword.md

File metadata and controls

79 lines (62 loc) · 3.54 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:wincrypt.PFXVerifyPassword
PFXVerifyPassword function (wincrypt.h)
The PFXVerifyPassword 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.
PFXVerifyPassword
PFXVerifyPassword function [Security]
_crypto2_pfxverifypassword
security.pfxverifypassword
wincrypt/PFXVerifyPassword
security\pfxverifypassword.htm
security
47560192-547e-4440-9f10-43327355e1a0
12/05/2018
PFXVerifyPassword, PFXVerifyPassword function [Security], _crypto2_pfxverifypassword, security.pfxverifypassword, wincrypt/PFXVerifyPassword
wincrypt.h
Windows
Windows XP [desktop apps \| UWP apps]
Windows Server 2003 [desktop apps \| UWP apps]
Crypt32.lib
Crypt32.dll
Windows
19H1
PFXVerifyPassword
wincrypt/PFXVerifyPassword
c++
APIRef
kbSyntax
DllExport
Crypt32.dll
PFXVerifyPassword

PFXVerifyPassword function

-description

The PFXVerifyPassword 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.

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

-parameters

-param pPFX [in]

A pointer to a CRYPT_DATA_BLOB structure that the function will attempt to decode as a PFX packet.

-param 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.

If you set this value to an empty string or NULL, this function typically attempts to decrypt the password embedded in the PFX BLOB by using the empty string or NULL.

However, beginning with Windows 8 and Windows Server 2012, if a NULL or empty password was specified when the PFX BLOB was created and the application also specified that the password should be protected to an Active Directory (AD) principal, the Cryptography API (CAPI) randomly generates a password, encrypts it to the AD principal and embeds it in the PFX BLOB. The PFXVerifyPassword function will then try to use the specified AD principal (current user, computer, or AD group member) to decrypt the password. For more information about protecting PFX to an AD principal, see the pvPara parameter and the PKCS12_PROTECT_TO_DOMAIN_SIDS flag of the PFXExportCertStoreEx function.

When you have finished using the password, clear the password from memory by calling the SecureZeroMemory function. For more information about protecting passwords, see Handling Passwords.

-param dwFlags [in]

Reserved for future use.

-returns

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