diff options
author | Hans Nilsson <[email protected]> | 2018-11-16 16:16:17 +0100 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2018-11-30 14:51:43 +0100 |
commit | 21c3fbcbbd2971d8a7af0212162045ab778ab0eb (patch) | |
tree | e71b0dcfb4615a58da8720207094dd9339055e06 /lib/ssl/test | |
parent | dfce5316948c5085e659a9c5fefb10ff8fcdf959 (diff) | |
download | otp-21c3fbcbbd2971d8a7af0212162045ab778ab0eb.tar.gz otp-21c3fbcbbd2971d8a7af0212162045ab778ab0eb.tar.bz2 otp-21c3fbcbbd2971d8a7af0212162045ab778ab0eb.zip |
crypto: Update test engine with fake rsa support
We need to test the Engine interface not only for loading, key retrieval and hashing,
so it is complemented with a fake rsa method to check sign/verify also.
Diffstat (limited to 'lib/ssl/test')
-rw-r--r-- | lib/ssl/test/ssl_engine_SUITE.erl | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/ssl/test/ssl_engine_SUITE.erl b/lib/ssl/test/ssl_engine_SUITE.erl index e6c82d3eb5..a39a62e550 100644 --- a/lib/ssl/test/ssl_engine_SUITE.erl +++ b/lib/ssl/test/ssl_engine_SUITE.erl @@ -46,10 +46,17 @@ init_per_suite(Config) -> ssl_test_lib:clean_start(), case crypto:get_test_engine() of {ok, EngineName} -> - try crypto:engine_load(<<"dynamic">>, - [{<<"SO_PATH">>, EngineName}, - <<"LOAD">>], - []) of + try + %% The test engine has it's own fake rsa sign/verify that + %% you don't want to use, so exclude it from methods to load: + Methods = + crypto:engine_get_all_methods() -- [engine_method_rsa], + crypto:engine_load(<<"dynamic">>, + [{<<"SO_PATH">>, EngineName}, + <<"LOAD">>], + [], + Methods) + of {ok, Engine} -> [{engine, Engine} |Config]; {error, Reason} -> |