@@ -95,11 +95,12 @@ init_processor_state(#state{socket=Sock, peername=PeerAddr, auth_hd=AuthHd}) ->
95
95
ok
96
96
end ,
97
97
98
+ SSLLogin = application :get_env (rabbitmq_stomp , ssl_cert_login , false ),
99
+ StompConfig0 = # stomp_configuration {ssl_cert_login = SSLLogin , implicit_connect = false },
98
100
UseHTTPAuth = application :get_env (rabbitmq_web_stomp , use_http_auth , false ),
99
- StompConfig0 = # stomp_configuration {implicit_connect = false },
100
101
UserConfig = application :get_env (rabbitmq_stomp , default_user , undefined ),
101
102
StompConfig1 = rabbit_stomp :parse_default_user (UserConfig , StompConfig0 ),
102
- StompConfig = case UseHTTPAuth of
103
+ StompConfig2 = case UseHTTPAuth of
103
104
true ->
104
105
case AuthHd of
105
106
undefined ->
@@ -118,10 +119,11 @@ init_processor_state(#state{socket=Sock, peername=PeerAddr, auth_hd=AuthHd}) ->
118
119
end ,
119
120
120
121
AdapterInfo = amqp_connection :socket_adapter_info (Sock , {'Web STOMP' , 0 }),
121
-
122
+ RealSocket = rabbit_net :unwrap_socket (Sock ),
123
+ SSLLoginName = rabbit_stomp_reader :ssl_login_name (RealSocket , StompConfig2 ),
122
124
ProcessorState = rabbit_stomp_processor :initial_state (
123
- StompConfig ,
124
- {SendFun , AdapterInfo , none , PeerAddr }),
125
+ StompConfig2 ,
126
+ {SendFun , AdapterInfo , SSLLoginName , PeerAddr }),
125
127
{ok , ProcessorState }.
126
128
127
129
websocket_handle ({text , Data }, State ) ->
0 commit comments