diff options
author | Matt Caswell <matt@openssl.org> | 2020-01-02 16:15:26 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2020-01-13 13:44:27 +0000 |
commit | 0ae5d4d6f8a0cd17fb9beb5876827f311c1b350c (patch) | |
tree | 97e4560467f8b8d9b997b8ac0dd1f45029964b8c /test | |
parent | 291850b473ef5d83ac7d90bdcd7f68d186515348 (diff) |
Deprecate the Low Level CAST APIs
Applications should instead use the higher level EVP APIs, e.g.
EVP_Encrypt*() and EVP_Decrypt*().
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/10742)
Diffstat (limited to 'test')
-rw-r--r-- | test/build.info | 13 | ||||
-rw-r--r-- | test/casttest.c | 6 | ||||
-rw-r--r-- | test/recipes/05-test_cast.t | 11 |
3 files changed, 24 insertions, 6 deletions
diff --git a/test/build.info b/test/build.info index de618b51d9..c54b7bc5a4 100644 --- a/test/build.info +++ b/test/build.info @@ -37,7 +37,7 @@ IF[{- !$disabled{tests} -}] hmactest \ rc2test rc4test rc5test \ destest mdc2test \ - dhtest enginetest casttest \ + dhtest enginetest \ 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 \ @@ -152,10 +152,6 @@ IF[{- !$disabled{tests} -}] INCLUDE[enginetest]=../include ../apps/include DEPEND[enginetest]=../libcrypto libtestutil.a - SOURCE[casttest]=casttest.c - INCLUDE[casttest]=../include ../apps/include - DEPEND[casttest]=../libcrypto libtestutil.a - SOURCE[ssltest_old]=ssltest_old.c INCLUDE[ssltest_old]=.. ../include ../apps/include DEPEND[ssltest_old]=../libcrypto ../libssl @@ -212,7 +208,8 @@ IF[{- !$disabled{tests} -}] IF[{- !$disabled{"deprecated"} || (defined $config{"api"} && $config{"api"} < 30000) -}] - PROGRAMS{noinst}=igetest bftest + PROGRAMS{noinst}=igetest bftest casttest + SOURCE[igetest]=igetest.c INCLUDE[igetest]=../include ../apps/include DEPEND[igetest]=../libcrypto libtestutil.a @@ -220,6 +217,10 @@ IF[{- !$disabled{tests} -}] SOURCE[bftest]=bftest.c INCLUDE[bftest]=../include ../apps/include DEPEND[bftest]=../libcrypto libtestutil.a + + SOURCE[casttest]=casttest.c + INCLUDE[casttest]=../include ../apps/include + DEPEND[casttest]=../libcrypto libtestutil.a ENDIF SOURCE[v3nametest]=v3nametest.c diff --git a/test/casttest.c b/test/casttest.c index 0d7595cc99..09435bde45 100644 --- a/test/casttest.c +++ b/test/casttest.c @@ -7,6 +7,12 @@ * https://www.openssl.org/source/license.html */ +/* + * CAST low level APIs are deprecated for public use, but still ok for + * internal use. + */ +#include "internal/deprecated.h" + #include <stdio.h> #include <string.h> #include <stdlib.h> diff --git a/test/recipes/05-test_cast.t b/test/recipes/05-test_cast.t index b8b88d075e..b1b909db7a 100644 --- a/test/recipes/05-test_cast.t +++ b/test/recipes/05-test_cast.t @@ -7,6 +7,17 @@ # https://www.openssl.org/source/license.html +use strict; +use warnings; + use OpenSSL::Test::Simple; +use OpenSSL::Test; +use OpenSSL::Test::Utils; + +setup("test_cast"); + +plan skip_all => "Low-level CAST APIs are disabled in this build" + if disabled("deprecated") + && (!defined config("api") || config("api") >= 30000); simple_test("test_cast", "casttest", "cast"); |