From 3e4d1f7b0d46ca99f7ecc05e6ec29c1d17ff8d2c Mon Sep 17 00:00:00 2001 From: Jean-Sebastien Pedron Date: Wed, 10 Dec 2014 11:25:59 +0100 Subject: Now that empty keys are dropped, we can always add ssl_* keys If the connection isn't over SSL, ssl_* keys will be empty and dropped anyway. --- src/rabbit_reader.erl | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/rabbit_reader.erl b/src/rabbit_reader.erl index 0c5f0232..e1ffb704 100644 --- a/src/rabbit_reader.erl +++ b/src/rabbit_reader.erl @@ -60,10 +60,7 @@ -define(AUTH_NOTIFICATION_INFO_KEYS, [host, vhost, name, peer_host, peer_port, protocol, auth_mechanism, - ssl]). - --define(AUTH_NOTIFICATION_SSL_INFO_KEYS, - [ssl_protocol, ssl_cipher, peer_cert_issuer, peer_cert_subject, + ssl, ssl_protocol, ssl_cipher, peer_cert_issuer, peer_cert_subject, peer_cert_validity]). -define(IS_RUNNING(State), @@ -1118,13 +1115,6 @@ notify_auth_result(Username, AuthResult, ExtraProps, State) -> name -> {connection_name, i(name, State)}; _ -> {Item, i(Item, State)} end || Item <- ?AUTH_NOTIFICATION_INFO_KEYS] ++ - case i(ssl, State) of - false -> []; - true -> [case Item of - name -> {connection_name, i(name, State)}; - _ -> {Item, i(Item, State)} - end || Item <- ?AUTH_NOTIFICATION_SSL_INFO_KEYS] - end ++ [{name, case Username of none -> ''; _ -> Username end}] ++ ExtraProps, rabbit_event:notify(AuthResult, [P || {_, V} = P <- EventProps, V =/= '']). -- cgit v1.2.1