Fixes for building wolfSSL in Visual Studio. Adds missing files. Fix for type cast warnings.
This commit is contained in:
parent
2c9208b0c6
commit
db14914951
@ -272,6 +272,7 @@
|
|||||||
<ClCompile Include="..\..\wolfcrypt\src\hash.c" />
|
<ClCompile Include="..\..\wolfcrypt\src\hash.c" />
|
||||||
<ClCompile Include="..\..\wolfcrypt\src\hmac.c" />
|
<ClCompile Include="..\..\wolfcrypt\src\hmac.c" />
|
||||||
<ClCompile Include="..\..\wolfcrypt\src\integer.c" />
|
<ClCompile Include="..\..\wolfcrypt\src\integer.c" />
|
||||||
|
<ClCompile Include="..\..\wolfcrypt\src\pkcs7.c" />
|
||||||
<ClCompile Include="..\..\wolfcrypt\src\tfm.c" />
|
<ClCompile Include="..\..\wolfcrypt\src\tfm.c" />
|
||||||
<ClCompile Include="..\..\src\internal.c" />
|
<ClCompile Include="..\..\src\internal.c" />
|
||||||
<ClCompile Include="..\..\src\wolfio.c" />
|
<ClCompile Include="..\..\src\wolfio.c" />
|
||||||
|
@ -27050,7 +27050,7 @@ int DecodePrivateKey(WOLFSSL *ssl, word16* length)
|
|||||||
|| wolfSSL_CTX_IsPrivatePkSet(ssl->ctx)
|
|| wolfSSL_CTX_IsPrivatePkSet(ssl->ctx)
|
||||||
#endif
|
#endif
|
||||||
) {
|
) {
|
||||||
*length = GetPrivateKeySigSize(ssl);
|
*length = (word16)GetPrivateKeySigSize(ssl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -31582,7 +31582,7 @@ int SendCertificateVerify(WOLFSSL* ssl)
|
|||||||
if (ssl->buffers.key == NULL) {
|
if (ssl->buffers.key == NULL) {
|
||||||
#ifdef HAVE_PK_CALLBACKS
|
#ifdef HAVE_PK_CALLBACKS
|
||||||
if (wolfSSL_CTX_IsPrivatePkSet(ssl->ctx))
|
if (wolfSSL_CTX_IsPrivatePkSet(ssl->ctx))
|
||||||
args->length = GetPrivateKeySigSize(ssl);
|
args->length = (word16)GetPrivateKeySigSize(ssl);
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
ERROR_OUT(NO_PRIVATE_KEY, exit_scv);
|
ERROR_OUT(NO_PRIVATE_KEY, exit_scv);
|
||||||
@ -33555,7 +33555,7 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
|
|||||||
if (ssl->buffers.key == NULL) {
|
if (ssl->buffers.key == NULL) {
|
||||||
#ifdef HAVE_PK_CALLBACKS
|
#ifdef HAVE_PK_CALLBACKS
|
||||||
if (wolfSSL_CTX_IsPrivatePkSet(ssl->ctx))
|
if (wolfSSL_CTX_IsPrivatePkSet(ssl->ctx))
|
||||||
keySz = (word32)GetPrivateKeySigSize(ssl);
|
keySz = (word16)GetPrivateKeySigSize(ssl);
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
ERROR_OUT(NO_PRIVATE_KEY, exit_sske);
|
ERROR_OUT(NO_PRIVATE_KEY, exit_sske);
|
||||||
|
@ -7779,11 +7779,11 @@ int ProcessBuffer(WOLFSSL_CTX* ctx, const unsigned char* buff,
|
|||||||
|
|
||||||
#ifdef WOLF_PRIVATE_KEY_ID
|
#ifdef WOLF_PRIVATE_KEY_ID
|
||||||
if (ssl != NULL) {
|
if (ssl != NULL) {
|
||||||
ssl->buffers.keyType = keyType;
|
ssl->buffers.keyType = (byte)keyType;
|
||||||
ssl->buffers.keySz = keySz;
|
ssl->buffers.keySz = keySz;
|
||||||
}
|
}
|
||||||
else if (ctx != NULL) {
|
else if (ctx != NULL) {
|
||||||
ctx->privateKeyType = keyType;
|
ctx->privateKeyType = (byte)keyType;
|
||||||
ctx->privateKeySz = keySz;
|
ctx->privateKeySz = keySz;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -8633,7 +8633,7 @@ static int SendTls13CertificateVerify(WOLFSSL* ssl)
|
|||||||
if (ssl->buffers.key == NULL) {
|
if (ssl->buffers.key == NULL) {
|
||||||
#ifdef HAVE_PK_CALLBACKS
|
#ifdef HAVE_PK_CALLBACKS
|
||||||
if (wolfSSL_CTX_IsPrivatePkSet(ssl->ctx))
|
if (wolfSSL_CTX_IsPrivatePkSet(ssl->ctx))
|
||||||
args->length = GetPrivateKeySigSize(ssl);
|
args->length = (word16)GetPrivateKeySigSize(ssl);
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
ERROR_OUT(NO_PRIVATE_KEY, exit_scv);
|
ERROR_OUT(NO_PRIVATE_KEY, exit_scv);
|
||||||
|
@ -4627,7 +4627,7 @@ static int PKCS7_VerifySignedData(PKCS7* pkcs7, const byte* hashBuf,
|
|||||||
WOLFSSL_MSG("PKCS#7 signedData needs to be version 1 or 3");
|
WOLFSSL_MSG("PKCS#7 signedData needs to be version 1 or 3");
|
||||||
ret = ASN_VERSION_E;
|
ret = ASN_VERSION_E;
|
||||||
}
|
}
|
||||||
pkcs7->version = version;
|
pkcs7->version = (byte)version;
|
||||||
|
|
||||||
/* Get the set of DigestAlgorithmIdentifiers */
|
/* Get the set of DigestAlgorithmIdentifiers */
|
||||||
if (ret == 0 && GetSet(pkiMsg, &idx, &length, pkiMsgSz) < 0)
|
if (ret == 0 && GetSet(pkiMsg, &idx, &length, pkiMsgSz) < 0)
|
||||||
@ -4913,7 +4913,7 @@ static int PKCS7_VerifySignedData(PKCS7* pkcs7, const byte* hashBuf,
|
|||||||
if (multiPart) {
|
if (multiPart) {
|
||||||
pkcs7->stream->expected = contentLen + ASN_TAG_SZ;
|
pkcs7->stream->expected = contentLen + ASN_TAG_SZ;
|
||||||
}
|
}
|
||||||
pkcs7->stream->multi = multiPart;
|
pkcs7->stream->multi = (byte)multiPart;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
wc_PKCS7_ChangeState(pkcs7, WC_PKCS7_VERIFY_STAGE3);
|
wc_PKCS7_ChangeState(pkcs7, WC_PKCS7_VERIFY_STAGE3);
|
||||||
@ -5221,7 +5221,7 @@ static int PKCS7_VerifySignedData(PKCS7* pkcs7, const byte* hashBuf,
|
|||||||
pkcs7->stream = stream;
|
pkcs7->stream = stream;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
pkcs7->version = version;
|
pkcs7->version = (byte)version;
|
||||||
#ifdef ASN_BER_TO_DER
|
#ifdef ASN_BER_TO_DER
|
||||||
pkcs7->der = der;
|
pkcs7->der = der;
|
||||||
#endif
|
#endif
|
||||||
@ -7692,7 +7692,7 @@ static int wc_PKCS7_PwriKek_KeyWrap(PKCS7* pkcs7, const byte* kek, word32 kekSz,
|
|||||||
if (*outSz < (word32)outLen)
|
if (*outSz < (word32)outLen)
|
||||||
return BUFFER_E;
|
return BUFFER_E;
|
||||||
|
|
||||||
out[0] = cekSz;
|
out[0] = (byte)cekSz;
|
||||||
out[1] = ~cek[0];
|
out[1] = ~cek[0];
|
||||||
out[2] = ~cek[1];
|
out[2] = ~cek[1];
|
||||||
out[3] = ~cek[2];
|
out[3] = ~cek[2];
|
||||||
@ -10845,7 +10845,7 @@ WOLFSSL_API int wc_PKCS7_DecodeEnvelopedData(PKCS7* pkcs7, byte* in,
|
|||||||
byte* encryptedContent = NULL;
|
byte* encryptedContent = NULL;
|
||||||
int explicitOctet = 0;
|
int explicitOctet = 0;
|
||||||
word32 localIdx;
|
word32 localIdx;
|
||||||
byte tag;
|
byte tag = 0;
|
||||||
|
|
||||||
if (pkcs7 == NULL)
|
if (pkcs7 == NULL)
|
||||||
return BAD_FUNC_ARG;
|
return BAD_FUNC_ARG;
|
||||||
|
@ -299,6 +299,7 @@
|
|||||||
<ClCompile Include="wolfcrypt\src\curve25519.c" />
|
<ClCompile Include="wolfcrypt\src\curve25519.c" />
|
||||||
<ClCompile Include="wolfcrypt\src\curve448.c" />
|
<ClCompile Include="wolfcrypt\src\curve448.c" />
|
||||||
<ClCompile Include="wolfcrypt\src\cpuid.c" />
|
<ClCompile Include="wolfcrypt\src\cpuid.c" />
|
||||||
|
<ClCompile Include="wolfcrypt\src\cryptocb.c" />
|
||||||
<ClCompile Include="wolfcrypt\src\des3.c" />
|
<ClCompile Include="wolfcrypt\src\des3.c" />
|
||||||
<ClCompile Include="wolfcrypt\src\dh.c" />
|
<ClCompile Include="wolfcrypt\src\dh.c" />
|
||||||
<ClCompile Include="wolfcrypt\src\dsa.c" />
|
<ClCompile Include="wolfcrypt\src\dsa.c" />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user