fail on all errors.
authorUlf Möller <ulf@openssl.org>
Sat, 22 Jan 2000 21:25:36 +0000 (21:25 +0000)
committerUlf Möller <ulf@openssl.org>
Sat, 22 Jan 2000 21:25:36 +0000 (21:25 +0000)
crypto/des/destest.c

index 7efd83dc30d77a9ad5e429d97cefbb0d297775f7..d84676df4219a903993dceb9237718a4cd01b38c 100644 (file)
@@ -449,7 +449,10 @@ int main(int argc, char *argv[])
        des_ncbc_encrypt(cbc_data,cbc_out,strlen((char *)cbc_data)+1,ks,
                         &iv3,DES_ENCRYPT);
        if (memcmp(cbc_out,cbc_ok,32) != 0)
+               {
                printf("cbc_encrypt encrypt error\n");
+               err=1;
+               }
 
        memcpy(iv3,cbc_iv,sizeof(cbc_iv));
        des_ncbc_encrypt(cbc_out,cbc_in,strlen((char *)cbc_data)+1,ks,
@@ -475,6 +478,7 @@ int main(int argc, char *argv[])
        if (memcmp(cbc_out,xcbc_ok,32) != 0)
                {
                printf("des_xcbc_encrypt encrypt error\n");
+               err=1;
                }
        memcpy(iv3,cbc_iv,sizeof(cbc_iv));
        des_xcbc_encrypt(cbc_out,cbc_in,strlen((char *)cbc_data)+1,ks,
@@ -781,7 +785,6 @@ plain[8+4], plain[8+5], plain[8+6], plain[8+7]);
                }
        printf("\n");
        exit(err);
-       return(0);
        }
 
 static char *pt(unsigned char *p)