diff options
| author | Luke Bakken <lbakken@pivotal.io> | 2020-05-20 19:02:04 -0700 |
|---|---|---|
| committer | Luke Bakken <lbakken@pivotal.io> | 2020-05-20 19:03:03 -0700 |
| commit | 03c4a59d568c34e376e21762fdec21e17e82cd94 (patch) | |
| tree | c29d79ec53463008faf4f7bba021416441ccf002 /test | |
| parent | 52853f604864646b1d4d25ba192b52ff74f8bc2f (diff) | |
| download | rabbitmq-server-git-03c4a59d568c34e376e21762fdec21e17e82cd94.tar.gz | |
Fix rabbit_pbe and rabbit_control_pbe to take credentials-obfuscation 2.0 into account
Diffstat (limited to 'test')
| -rw-r--r-- | test/unit_config_value_encryption_SUITE.erl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/unit_config_value_encryption_SUITE.erl b/test/unit_config_value_encryption_SUITE.erl index 1d808c4993..53e809b95e 100644 --- a/test/unit_config_value_encryption_SUITE.erl +++ b/test/unit_config_value_encryption_SUITE.erl @@ -83,14 +83,14 @@ do_decrypt_config(Algo = {C, H, I, P}) -> msg_store_credit_disc_bound]], %% Special case: encrypt a value in a list. {ok, [LoopbackUser]} = application:get_env(rabbit, loopback_users), - EncLoopbackUser = rabbit_pbe:encrypt_term(C, H, I, P, LoopbackUser), + {encrypted, EncLoopbackUser} = rabbit_pbe:encrypt_term(C, H, I, P, LoopbackUser), application:set_env(rabbit, loopback_users, [{encrypted, EncLoopbackUser}]), %% Special case: encrypt a value in a key/value list. {ok, TCPOpts} = application:get_env(rabbit, tcp_listen_options), {_, Backlog} = lists:keyfind(backlog, 1, TCPOpts), {_, Linger} = lists:keyfind(linger, 1, TCPOpts), - EncBacklog = rabbit_pbe:encrypt_term(C, H, I, P, Backlog), - EncLinger = rabbit_pbe:encrypt_term(C, H, I, P, Linger), + {encrypted, EncBacklog} = rabbit_pbe:encrypt_term(C, H, I, P, Backlog), + {encrypted, EncLinger} = rabbit_pbe:encrypt_term(C, H, I, P, Linger), TCPOpts1 = lists:keyreplace(backlog, 1, TCPOpts, {backlog, {encrypted, EncBacklog}}), TCPOpts2 = lists:keyreplace(linger, 1, TCPOpts1, {linger, {encrypted, EncLinger}}), application:set_env(rabbit, tcp_listen_options, TCPOpts2), @@ -103,7 +103,7 @@ do_decrypt_config(Algo = {C, H, I, P}) -> encrypt_value(Key, {C, H, I, P}) -> {ok, Value} = application:get_env(rabbit, Key), - EncValue = rabbit_pbe:encrypt_term(C, H, I, P, Value), + {encrypted, EncValue} = rabbit_pbe:encrypt_term(C, H, I, P, Value), application:set_env(rabbit, Key, {encrypted, EncValue}). decrypt_start_app(Config) -> |
