X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=engines%2Fccgost%2Fgost2814789test.c;h=8384d66bd09e7194d9ef0b1904a9238834c8fd23;hp=ecbfa808955aaa2cf189ce2a425f79296289a2f8;hb=d6fbb194095312f4722c81c9362dbd0de66cb656;hpb=6f1a93ad111c7dfe36a09a976c4c009079b19ea1 diff --git a/engines/ccgost/gost2814789test.c b/engines/ccgost/gost2814789test.c index ecbfa80895..8384d66bd0 100644 --- a/engines/ccgost/gost2814789test.c +++ b/engines/ccgost/gost2814789test.c @@ -1250,91 +1250,6 @@ int main(int argc, char *argv[]) } } - /* - * Internal function test on GostR3411_94_TestParamSet - */ -# if 0 && defined(OPENSSL_NO_DYNAMIC_ENGINE) - { - gost_ctx ctx; - - for (t = 0; t < sizeof(tcs) / sizeof(tcs[0]); t++) { - const gost_subst_block *pSubst = NULL; - - if (1024 < tcs[t].ullLen) { - /* Key meshing check by engine tests */ - continue; - } - memset(bTest, 0xc3, sizeof(bTest)); - if (0 == strcmp(tcs[t].szParamSet, - "id-GostR3410-94-TestParamSet")) { - pSubst = &GostR3411_94_TestParamSet; - } else if (0 == strcmp(tcs[t].szParamSet, - "id-Gost28147-89-CryptoPro-A-ParamSet")) { - pSubst = &Gost28147_CryptoProParamSetA; - } else if (0 == strcmp(tcs[t].szParamSet, - "id-Gost28147-89-CryptoPro-B-ParamSet")) { - pSubst = &Gost28147_CryptoProParamSetB; - } else if (0 == strcmp(tcs[t].szParamSet, - "id-Gost28147-89-CryptoPro-C-ParamSet")) { - pSubst = &Gost28147_CryptoProParamSetC; - } else if (0 == strcmp(tcs[t].szParamSet, - "id-Gost28147-89-CryptoPro-D-ParamSet")) { - pSubst = &Gost28147_CryptoProParamSetD; - } - gost_init(&ctx, pSubst); - gost_key(&ctx, tcs[t].bRawKey); - switch (tcs[t].gMode) { - case G89_ECB: - gost_enc(&ctx, tcs[t].bIn, bTest, - (int)((tcs[t].ullLen + G89_BLOCK_LEN - 1) / - G89_BLOCK_LEN)); - l = (size_t)tcs[t].ullLen; - break; - case G89_CFB: - gost_enc_cfb(&ctx, tcs[t].bIV, tcs[t].bIn, - bTest, - (int)((tcs[t].ullLen + G89_BLOCK_LEN - 1) / - G89_BLOCK_LEN)); - l = (size_t)tcs[t].ullLen; - break; - case G89_CNT: - /* - * GOST 28147-89 cipher CNT mode check by engine tests - */ - continue; - case G89_IMIT: - gost_mac(&ctx, 32, tcs[t].bIn, - (unsigned int)tcs[t].ullLen, bTest); - gost_mac_iv(&ctx, 32, tcs[t].bIV, tcs[t].bIn, - (unsigned int)tcs[t].ullLen, bTest1); - if (0 != memcmp(bTest, bTest1, 4)) { - fflush(NULL); - fprintf(stderr, "\nInternal test t=%d len=" FMT64 - " failed (gost_mac_iv).\n", t, tcs[t].ullLen); - if (!ignore) { - return 2; - } - } - l = 4; - break; - } - gost_destroy(&ctx); - - if (0 != memcmp(tcs[t].bOut, bTest, l)) { - fflush(NULL); - fprintf(stderr, "\nInternal test t=%d len=" FMT64 - " failed.\n", t, tcs[t].ullLen); - if (!ignore) { - return 3; - } - } else { - printf(","); - fflush(NULL); - } - } - } -# endif - /* * ccgost engine test on GostR3411_94_CryptoProParamSet */