zhu qun-ying wrote:
> 
> I encounter a error while trying to compile a small test program to read a
> pkcs12 formatted file. The line below gives compiler err:
>    if (!(authsafes = M_PKCS12_unpack_authsafes (p12)))
> 
> error C2664: 'ASN1_seq_unpack' : cannot convert parameter 4 from
>  'void (struct pkcs7_st *)' to 'void (__cdecl *)(void)'
> 
> I copy part of the code from the apps\pkcs12.c, I don't know why it cannot
> compile since the openssl.exe compiled without problem. Any compile time options
> that I need to set before I can compiled this one?
> 
> The current options are:
> /nologo /G6 /MD /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"
> /D "_MBCS" /D "MONOLITH" /D "WIN32_LEAN_AND_MEAN" /Fp"Debug/rsa.pch"
> /Yu"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
> 

Let me guess? You're compiling it as C++? Thats the usual problem with
these macros.

However you shouldn't be using them because they are only used for
diagnostic purposes in apps/pkcs12.c, it has to pull apart a PKCS#12
file manually so it can print out all the info.

There is a *much* easier way to parse PKCS#12 files using the function
PKCS12_parse(). There is info in doc/openssl.txt

Steve.
-- 
Dr Stephen N. Henson.   http://www.drh-consultancy.demon.co.uk/
Personal Email: [EMAIL PROTECTED] 
Senior crypto engineer, Celo Communications: http://www.celocom.com/
Core developer of the   OpenSSL project: http://www.openssl.org/
Business Email: [EMAIL PROTECTED] PGP key: via homepage.

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to