-/* $OpenBSD: rc4_test.c,v 1.1 2022/09/03 17:43:14 tb Exp $ */
+/* $OpenBSD: rc4_test.c,v 1.2 2022/09/05 21:34:23 tb Exp $ */
/*
* Copyright (c) 2022 Joshua Sing <joshua@hypera.dev>
*
goto failed;
}
+ if (!EVP_CIPHER_CTX_reset(ctx)) {
+ fprintf(stderr, "FAIL: EVP_CIPHER_CTX_reset failed\n");
+ goto failed;
+ }
+
if (memcmp(rt->out, out, rt->len) != 0) {
fprintf(stderr, "FAIL: EVP encryption mismatch\n");
goto failed;
goto failed;
}
+ if (!EVP_CIPHER_CTX_reset(ctx)) {
+ fprintf(stderr, "FAIL: EVP_CIPHER_CTX_reset failed\n");
+ goto failed;
+ }
+
if (memcmp(rt->out, out, rt->len) != 0) {
fprintf(stderr, "FAIL: EVP decryption mismatch\n");
goto failed;