Fix minor errors in the afalg test
authorMatt Caswell <matt@openssl.org>
Thu, 3 Mar 2016 14:56:10 +0000 (14:56 +0000)
committerMatt Caswell <matt@openssl.org>
Mon, 7 Mar 2016 13:36:17 +0000 (13:36 +0000)
The new afalg test should have a copyright date of 2016. Also an
incorrect buffer was being sent to EVP_CipherFinal_ex when
decrypting.

Reviewed-by: Richard Levitte <levitte@openssl.org>
test/afalgtest.c
test/recipes/30-test_afalg.t

index d86c0900ac331635128499143578a29379d6df5c..1013fe0beb5b4cb7e47249a7bff8b63b2c4d6c45 100644 (file)
@@ -93,7 +93,7 @@ static int test_afalg_aes_128_cbc(ENGINE *e)
     if (       !EVP_CIPHER_CTX_reset(ctx)
             || !EVP_CipherInit_ex(ctx, cipher, e, key, iv, 0)
             || !EVP_CipherUpdate(ctx, dbuf, &decl, ebuf, encl)
-            || !EVP_CipherFinal_ex(ctx, ebuf+decl, &decf)) {
+            || !EVP_CipherFinal_ex(ctx, dbuf+decl, &decf)) {
         fprintf(stderr, "%s() failed decryption\n", __func__);
         goto end;
     }
index 68eb60b3fe7e73e1bd898aa29d9819f2827a4b5a..f69c9028a92da9c6ddbe82e85210482bc1a689f3 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 # ====================================================================
-# Copyright (c) 1998-2015 The OpenSSL Project.  All rights reserved.
+# Copyright (c) 2016 The OpenSSL Project.  All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions