Merge pull request #1863 from tmael/mingw32Fix
Fixed MINGW32 build errors
This commit is contained in:
commit
846ae06ae9
@ -1296,7 +1296,7 @@ int EmbedOcspLookup(void* ctx, const char* url, int urlSz,
|
||||
httpBuf, httpBufSz);
|
||||
|
||||
ret = wolfIO_TcpConnect(&sfd, domainName, port, io_timeout_sec);
|
||||
if ((ret != 0) || (sfd < 0)) {
|
||||
if ((ret != 0) || ((int)sfd < 0)) {
|
||||
WOLFSSL_MSG("OCSP Responder connection failed");
|
||||
}
|
||||
else if (wolfIO_Send(sfd, (char*)httpBuf, httpBufSz, 0) !=
|
||||
|
@ -1120,17 +1120,18 @@ const ecc_set_type ecc_sets[] = {
|
||||
#ifndef USE_WINDOWS_API
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
#else
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
{0},{0},{0},{0},{0},{0},{0},{0},
|
||||
#endif
|
||||
0, 0, 0
|
||||
},
|
||||
#endif
|
||||
{
|
||||
0, -1,
|
||||
0,
|
||||
ECC_CURVE_INVALID,
|
||||
#ifndef USE_WINDOWS_API
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
#else
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
{0},{0},{0},{0},{0},{0},{0},{0},
|
||||
#endif
|
||||
0, 0, 0
|
||||
}
|
||||
@ -6459,7 +6460,7 @@ int wc_ecc_export_ex(ecc_key* key, byte* qx, word32* qxLen,
|
||||
|
||||
/* private key, d */
|
||||
if (d != NULL) {
|
||||
if (dLen == NULL ||
|
||||
if (dLen == NULL ||
|
||||
(key->type != ECC_PRIVATEKEY && key->type != ECC_PRIVATEKEY_ONLY))
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
|
@ -568,9 +568,9 @@ int wc_ecc_import_unsigned(ecc_key* key, byte* qx, byte* qy,
|
||||
#endif /* HAVE_ECC_KEY_IMPORT */
|
||||
|
||||
#ifdef HAVE_ECC_KEY_EXPORT
|
||||
WOLFSSL_API
|
||||
WOLFSSL_API
|
||||
int wc_ecc_export_ex(ecc_key* key, byte* qx, word32* qxLen,
|
||||
byte* qy, word32* qyLen, byte* d, word32* dLen,
|
||||
byte* qy, word32* qyLen, byte* d, word32* dLen,
|
||||
int encType);
|
||||
WOLFSSL_API
|
||||
int wc_ecc_export_private_only(ecc_key* key, byte* out, word32* outLen);
|
||||
|
@ -43,19 +43,19 @@
|
||||
*/
|
||||
|
||||
#if defined(BUILDING_WOLFSSL)
|
||||
#if defined(HAVE_VISIBILITY) && HAVE_VISIBILITY
|
||||
#define WOLFSSL_API __attribute__ ((visibility("default")))
|
||||
#define WOLFSSL_LOCAL __attribute__ ((visibility("hidden")))
|
||||
#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
|
||||
#define WOLFSSL_API __global
|
||||
#define WOLFSSL_LOCAL __hidden
|
||||
#elif defined(_MSC_VER) || defined(__MINGW32__)
|
||||
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||
#if defined(WOLFSSL_DLL)
|
||||
#define WOLFSSL_API __declspec(dllexport)
|
||||
#else
|
||||
#define WOLFSSL_API
|
||||
#endif
|
||||
#define WOLFSSL_LOCAL
|
||||
#elif defined(HAVE_VISIBILITY) && HAVE_VISIBILITY
|
||||
#define WOLFSSL_API __attribute__ ((visibility("default")))
|
||||
#define WOLFSSL_LOCAL __attribute__ ((visibility("hidden")))
|
||||
#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
|
||||
#define WOLFSSL_API __global
|
||||
#define WOLFSSL_LOCAL __hidden
|
||||
#else
|
||||
#define WOLFSSL_API
|
||||
#define WOLFSSL_LOCAL
|
||||
|
Loading…
x
Reference in New Issue
Block a user