summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2020-01-02 14:25:27 +0000
committerMatt Caswell <matt@openssl.org>2020-01-08 11:25:25 +0000
commit03047e7b7f64b054fa85d101e7097af5daf7a865 (patch)
tree38c18f72c1a38605c1dcf885d8b25df45e161ef8 /test
parent339638b586e77c189e8294f931b99b03d1f08dbd (diff)
Deprecate Low Level Blowfish APIs
Applications should instead use the higher level EVP APIs, e.g. EVP_Encrypt*() and EVP_Decrypt*(). Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/10740)
Diffstat (limited to 'test')
-rw-r--r--test/bftest.c5
-rw-r--r--test/build.info12
-rw-r--r--test/recipes/05-test_bf.t10
3 files changed, 19 insertions, 8 deletions
diff --git a/test/bftest.c b/test/bftest.c
index 5b489251c0..f350ce7f58 100644
--- a/test/bftest.c
+++ b/test/bftest.c
@@ -8,9 +8,10 @@
*/
/*
- * This has been a quickly hacked 'ideatest.c'. When I add tests for other
- * RC2 modes, more of the code will be uncommented.
+ * BF low level APIs are deprecated for public use, but still ok for internal
+ * use.
*/
+#include "internal/deprecated.h"
#include <stdio.h>
#include <string.h>
diff --git a/test/build.info b/test/build.info
index 11419caf05..601059f385 100644
--- a/test/build.info
+++ b/test/build.info
@@ -38,7 +38,7 @@ IF[{- !$disabled{tests} -}]
rc2test rc4test rc5test \
destest mdc2test \
dhtest enginetest casttest \
- bftest ssltest_old dsatest dsa_no_digest_size_test exptest rsa_test \
+ ssltest_old dsatest dsa_no_digest_size_test exptest rsa_test \
evp_pkey_provided_test evp_test evp_extra_test evp_fetch_prov_test \
v3nametest v3ext \
crltest danetest bad_dtls_test lhash_test sparse_array_test \
@@ -156,10 +156,6 @@ IF[{- !$disabled{tests} -}]
INCLUDE[casttest]=../include ../apps/include
DEPEND[casttest]=../libcrypto libtestutil.a
- SOURCE[bftest]=bftest.c
- INCLUDE[bftest]=../include ../apps/include
- DEPEND[bftest]=../libcrypto libtestutil.a
-
SOURCE[ssltest_old]=ssltest_old.c
INCLUDE[ssltest_old]=.. ../include ../apps/include
DEPEND[ssltest_old]=../libcrypto ../libssl
@@ -216,10 +212,14 @@ IF[{- !$disabled{tests} -}]
IF[{- !$disabled{"deprecated"}
|| (defined $config{"api"} && $config{"api"} < 30000) -}]
- PROGRAMS{noinst}=igetest
+ PROGRAMS{noinst}=igetest bftest
SOURCE[igetest]=igetest.c
INCLUDE[igetest]=../include ../apps/include
DEPEND[igetest]=../libcrypto libtestutil.a
+
+ SOURCE[bftest]=bftest.c
+ INCLUDE[bftest]=../include ../apps/include
+ DEPEND[bftest]=../libcrypto libtestutil.a
ENDIF
SOURCE[v3nametest]=v3nametest.c
diff --git a/test/recipes/05-test_bf.t b/test/recipes/05-test_bf.t
index 35bfef6836..1c7c005f22 100644
--- a/test/recipes/05-test_bf.t
+++ b/test/recipes/05-test_bf.t
@@ -6,7 +6,17 @@
# in the file LICENSE in the source distribution or at
# https://www.openssl.org/source/license.html
+use strict;
+use warnings;
use OpenSSL::Test::Simple;
+use OpenSSL::Test;
+use OpenSSL::Test::Utils;
+
+setup("test_bf");
+
+plan skip_all => "Low-level Blowfish APIs are disabled in this build"
+ if disabled("deprecated")
+ && (!defined config("api") || config("api") >= 30000);
simple_test("test_bf", "bftest", "bf");