[reSIProcate] Issue compiling Security.cxx
Dario Bozzali
Dario.Bozzali at ifmgroup.it
Mon Sep 9 11:23:12 CDT 2013
Hi all,
I got the latest trunk revision of Resiprocate repository (10430), but
I'm facing an issue while compiling Security.cxx using Visual Studio
2005.
In particular the error that I obtain is the following one:
1>.\ssl\Security.cxx(177) : error C3861: 'snprintf': identifier not
found
I think that it could be necessary to use _snprintf instead of snprintf
function, for example using a define like in the excerpt of code that I
reported below.
What do you think about that?
Best regards,
Dario.
extern "C"
{
+ #ifdef WIN32
+ #define snprintf _snprintf
+ #endif
static int
verifyCallback(int iInCode, X509_STORE_CTX *pInStore)
{
char cBuf1[257];
char cBuf2[501];
X509 *pErrCert;
int iErr = 0;
int iDepth = 0;
pErrCert = X509_STORE_CTX_get_current_cert(pInStore);
iErr = X509_STORE_CTX_get_error(pInStore);
iDepth = X509_STORE_CTX_get_error_depth(pInStore);
if (NULL != pErrCert)
X509_NAME_oneline(X509_get_subject_name(pErrCert),cBuf1,256);
snprintf(cBuf2, 500, ", depth=%d %s\n", iDepth, cBuf1);
if(!iInCode)
ErrLog(<< "Error when verifying server's chain of certificates: "
<< X509_verify_cert_error_string(pInStore->error) << cBuf2 );
return iInCode;
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20130909/bbbbb5d0/attachment.htm>
More information about the resiprocate-devel
mailing list