CryptoSys PKI Toolkit Manual

PFX_VerifySig

Verifies the signature in a pkcs-12 file.

VB6/VBA Syntax

Public Declare Function PFX_VerifySig Lib "diCrPKI.dll" (ByVal strPfxFile As String, ByVal strPassword As String, ByVal nOptions As Long) As Long

nRet = PFX_VerifySig(strPfxFile, strPassword, nOptions)

Parameters

strPfxFile
[in] String specifies the PKCS-12 filename to be checked.
strPassword
[in] String containing the password.
nOptions
[in] Long option flags: not used in this release. Specify zero.

C/C++ Syntax

long _stdcall PFX_VerifySig(const char *szFileName, const char *szPassword, long options);

Returns (VB6/C)

Long: If successful, the return value is zero; otherwise it returns a nonzero error code.

.NET Equivalent

Pfx.SignatureIsValid Method

Remarks

Just checks that the MacData signature is OK using the given password. Makes no other checks. The PFX file can be in either BER-encoded binary or PEM format. You can also pass the data directly as a PEM string in the strPfxFile parameter.

[New in v3.8] If there is no MacData signature in the PFX file and the supplied strPassword is empty, it will consider that to be a "valid" signature and return zero.

Example

See the example for PFX_MakeFile above.

See Also

PFX_MakeFile RSA_GetPrivateKeyFromPFX

[Contents] [Index]

[HOME]   [NEXT: PKI_CompileTime...]

Copyright © 2004-12 D.I. Management Services Pty Ltd. All rights reserved.