]> git.cryptolib.org Git - arm-crypto-lib.git/blobdiff - test_src/cmacvs.c
added arcfour/rc4
[arm-crypto-lib.git] / test_src / cmacvs.c
index 393d2808d9934974c8a9022f0196294fa11da2ee..adb3fad26cd18c2346a281630e9cc01423b35a5e 100644 (file)
@@ -158,7 +158,7 @@ int32_t getValue(char* key){
                        if(*str2=='='){
                                do{
                                        str2++;
-                               }while(*str2 && !isdigit(*str2));
+                               }while(*str2 && !isdigit((uint8_t)(*str2)));
                                val=(uint32_t)strtoul(str2, NULL, 10);
                                return val;
                        }
@@ -322,7 +322,7 @@ void cmacvs_test1(void){ /* Gen tests */
                cli_putstr("\r\n");
 #endif
                while((c=cli_getc_cecho())!='M' && c!='m'){
-                       if(!isspace(c)){
+                       if(!isspace((uint8_t)c)){
                                cli_putstr("\r\nERROR: wrong input (1) [0x");
                                cli_hexdump(&c, 1);
                                cli_putstr("]!\r\n");
@@ -341,7 +341,7 @@ void cmacvs_test1(void){ /* Gen tests */
                                return;
                }
                while((c=cli_getc_cecho())!='='){
-                       if(!isspace(c)){
+                       if(!isspace((uint8_t)c)){
                                cli_putstr("\r\nERROR: wrong input (4)!\r\n");
                                bcal_cmac_free(&(cmacvs_ctx.ctx));
                                return;
@@ -487,7 +487,7 @@ void cmacvs_test2(void){ /* Ver tests */
                cli_putstr("\r\n");
 #endif
                while((c=cli_getc_cecho())!='M' && c!='m'){
-                       if(!isspace(c)){
+                       if(!isspace((uint8_t)c)){
                                cli_putstr("\r\nERROR: wrong input (1) [0x");
                                cli_hexdump(&c, 1);
                                cli_putstr("]!\r\n");
@@ -506,7 +506,7 @@ void cmacvs_test2(void){ /* Ver tests */
                                return;
                }
                while((c=cli_getc_cecho())!='='){
-                       if(!isspace(c)){
+                       if(!isspace((uint8_t)c)){
                                cli_putstr("\r\nERROR: wrong input (4)!\r\n");
                                bcal_cmac_free(&(cmacvs_ctx.ctx));
                                return;