anchor.diff:      test_node_starter:clean_environment(Config).
   
   init_per_testcase(_, Config) ->
  -    application:start(ssl2),
  +    ssl:start(),
       Config.
   
   end_per_testcase(_, _Config) ->
  -    application:stop(ssl2).
  +    ssl:stop().
   
   %%%===================================================================
   %%% Internal functions
  
positive.code:                     Body, [SSLOpts, insecure | Options]);
              % @todo for now, in rest we only use the root macaroon
              ({_, {Macaroon, []}}, URN, Method, Headers, Body, Options) ->
                  AuthHdr =
                      http_client:request(Method, Url ++ URN, [
                          {<<"content-type">>, <<"application/json">>},
                          {<<"macaroon">>, Macaroon} | Headers
                      ], Body, [SSLOpts, insecure | Options])
          end
      ).
  
  
negative.code:     TokenAuthMessageRaw = messages:encode_msg(TokenAuthMessage),
  
      % when
      {ok, Sock} = ssl:connect(utils:get_host(Node), Port, [{packet, 4}, {active, true}]),
      ok = ssl:send(Sock, TokenAuthMessageRaw),
  
      % then
      HandshakeResponse = receive_server_message(),
      ?assertMatch(#'ServerMessage'{message_body = {handshake_response, #'HandshakeResponse'{}}}, HandshakeResponse),
      {ok, Sock}.
  
  receive_server_message() ->
      receive_server_message([message_stream_reset]).
  
  receive_server_message(IgnoredMsgList) ->
      receive
          {_, _, Data} ->
              % ignore listed messages
              Msg = messages:decode_msg(Data, 'ServerMessage'),
              MsgType = element(1, Msg#'ServerMessage'.message_body),
              case lists:member(MsgType, IgnoredMsgList) of
                  true ->
                      receive_server_message(IgnoredMsgList);
                  false -> Msg
              end
      after timer:seconds(5) ->
          {error, timeout}
      end.
  
  mock_gr_certificates(Config) ->
      [Worker1, _] = Workers = ?config(op_worker_nodes, Config),
      Url = rpc:call(Worker1, gr_plugin, get_gr_url, []),
      KeyPath = ?TEST_FILE(Config, "grpkey.pem"),
      CertPath = ?TEST_FILE(Config, "grpcert.pem"),
      SSLOpts = {ssl_options, [{keyfile, KeyPath}, {certfile, CertPath}]},
  
      ct:print("KeyPath: ~p", [KeyPath]),
      ct:print("CertPath: ~p", [CertPath]),
  
      test_utils:mock_new(Workers, gr_endpoint),
      test_utils:mock_expect(Workers, gr_endpoint, auth_request,
  