#include "aes_icm.h"
#include "alloc.h"
+#ifdef _MSC_VER
+#pragma warning(disable:4100)
+#endif
debug_module_t mod_aes_icm = {
0, /* debugging is off by default */
for (i=0; i < (bytes_to_encr/sizeof(v128_t)); i++) {
/* fill buffer with new keystream */
- aes_icm_advance_ismacryp(c, forIsmacryp);
+ aes_icm_advance_ismacryp(c, (uint8_t)forIsmacryp);
/*
* add keystream into the data buffer (this would be a lot faster
if ((bytes_to_encr & 0xf) != 0) {
/* fill buffer with new keystream */
- aes_icm_advance_ismacryp(c, forIsmacryp);
+ aes_icm_advance_ismacryp(c, (uint8_t)forIsmacryp);
for (i=0; i < (bytes_to_encr & 0xf); i++)
*buf++ ^= c->keystream_buffer.v8[i];
test_case->ciphertext_length_octets));
/* compare the resulting ciphertext with that in the test case */
- if (len != test_case->ciphertext_length_octets)
+ if ((int)len != test_case->ciphertext_length_octets)
return err_status_algo_fail;
status = err_status_ok;
for (i=0; i < test_case->ciphertext_length_octets; i++)
test_case->plaintext_length_octets));
/* compare the resulting plaintext with that in the test case */
- if (len != test_case->plaintext_length_octets)
+ if ((int)len != test_case->plaintext_length_octets)
return err_status_algo_fail;
status = err_status_ok;
for (i=0; i < test_case->plaintext_length_octets; i++)
octet_string_hex_string(buffer, length));
/* compare the resulting plaintext with the original one */
- if (length != plaintext_len)
+ if ((int)length != plaintext_len)
return err_status_algo_fail;
status = err_status_ok;
for (i=0; i < plaintext_len; i++)
#include "null_cipher.h"
#include "alloc.h"
+#ifdef _MSC_VER
+#pragma warning(disable:4100)
+#endif
+
/* the null_cipher uses the cipher debug module */
extern debug_module_t mod_cipher;
#include "null_auth.h"
#include "alloc.h"
+#ifdef _MSC_VER
+#pragma warning(disable:4100)
+#endif
+
/* null_auth uses the auth debug module */
extern debug_module_t mod_auth;
*
*/
+#ifdef _MSC_VER
+#pragma warning(disable:4100)
+#endif
+
#include "err.h"
#ifdef ERR_REPORTING_SYSLOG
case ('E'): return 0xe;
case ('f'): return 0xf;
case ('F'): return 0xf;
- default: return -1; /* this flags an error */
}
- /* NOTREACHED */
- return -1; /* this keeps compilers from complaining */
+ /* this flags an error */
+ return -1;
}
int
tmp = hex_char_to_nibble(hex[0]);
if (tmp == -1)
return hex_len;
- x = (tmp << 4);
+ x = (uint8_t)(tmp << 4);
hex_len++;
tmp = hex_char_to_nibble(hex[1]);
if (tmp == -1)
return 63;
case '=':
return 64;
- default:
- return -1;
}
return -1;
}
tmp = base64_char_to_sextet(base64[0]);
if (tmp == -1)
return base64_len;
- x = (tmp << 6);
+ x = (uint8_t)(tmp << 6);
base64_len++;
tmp = base64_char_to_sextet(base64[1]);
if (tmp == -1)
ones_count = 0;
while (data < data_end) {
- ones_count += octet_get_weight(*data);
+ ones_count = (uint16_t)(ones_count + octet_get_weight(*data));
data++;
}
if (delta > 0) {
/* shift forward by delta */
- index_advance(&rdbx->index, delta);
+ index_advance(&rdbx->index, (sequence_number_t)delta);
v128_left_shift(&rdbx->bitmask, delta);
v128_set_bit(&rdbx->bitmask, 127);
} else {
#include "ut_sim.h"
+#ifdef _MSC_VER
+#pragma warning(disable:4100)
+#endif
int
ut_compar(const void *a, const void *b) {
/* rand() returns 0-32767 (ugh) */
/* Is this a good enough way to get random bytes?
It is if it passes FIPS-140... */
- *dst++ = val & 0xff;
+ *dst++ = (uint8_t)(val & 0xff);
len--;
}
#endif
#ifdef _MSC_VER
#pragma pack(4)
+#pragma warning(disable:4214)
#endif
#include "crypto_kernel.h"
RuntimeLibrary="3"\r
StructMemberAlignment="0"\r
UsePrecompiledHeader="0"\r
- WarningLevel="3"\r
+ WarningLevel="4"\r
+ WarnAsError="true"\r
Detect64BitPortabilityProblems="true"\r
DebugInformationFormat="3"\r
/>\r
RuntimeLibrary="2"\r
StructMemberAlignment="0"\r
UsePrecompiledHeader="0"\r
- WarningLevel="3"\r
+ WarningLevel="4"\r
+ WarnAsError="true"\r
Detect64BitPortabilityProblems="true"\r
DebugInformationFormat="3"\r
/>\r
RuntimeLibrary="3"\r
StructMemberAlignment="0"\r
UsePrecompiledHeader="0"\r
- WarningLevel="3"\r
+ WarningLevel="4"\r
+ WarnAsError="true"\r
Detect64BitPortabilityProblems="true"\r
DebugInformationFormat="4"\r
/>\r
RuntimeLibrary="2"\r
StructMemberAlignment="0"\r
UsePrecompiledHeader="0"\r
- WarningLevel="3"\r
+ WarningLevel="4"\r
+ WarnAsError="true"\r
Detect64BitPortabilityProblems="true"\r
DebugInformationFormat="3"\r
/>\r