=== Test case: connect_SUITE:correct_features_are_advertised_for_optional_starttls/1 (click for source code)

=== Config value:

    [{watchdog,<0.10315.0>},
     {tls_module,fast_tls},
     {c2s_listener,#{access => c2s,module => mongoose_c2s_listener,
                     port => 5222,num_acceptors => 100,hibernate_after => 0,
                     backlog => 1024,
                     tls =>
                         #{module => fast_tls,mode => starttls,
                           certfile => "priv/ssl/fake_server.pem",
                           dhfile => "priv/ssl/fake_dh_server.pem",
                           ciphers => "TLSv1.2:TLSv1.3",verify_mode => none,
                           protocol_options =>
                               ["no_sslv2","no_sslv3","no_tlsv1",
                                "no_tlsv1_1"]},
                     shaper => c2s_shaper,max_stanza_size => 65536,
                     c2s_state_timeout => 5000,
                     backwards_compatible_session => true,proto => tcp,
                     ip_address => "0",max_connections => infinity,
                     ip_tuple => {0,0,0,0},
                     ip_version => 4,reuse_port => false,
                     proxy_protocol => false,connection_type => undefined}},
     {escalus_user_db,{module,escalus_ejabberd,[]}},
     {preset,"internal_mnesia"},
     {mim_data_dir,"/home/circleci/project/big_tests/tests/connect_SUITE_data"},
     {tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@c59750015bc7.2024-04-24_13.09.40/big_tests.tests.connect_SUITE.logs/run.2024-04-24_13.10.54/connect_suite.correct_features_are_advertised_for_optional_starttls.11268.html"},
     {tc_group_properties,[{name,starttls_optional},parallel]},
     {tc_group_path,[[{name,fast_tls}]]},
     {data_dir,"/home/circleci/project/big_tests/_build/default/lib/mongoose_tests/ebin/connect_SUITE_data/"},
     {priv_dir,"/home/circleci/project/big_tests/ct_report/ct_run.test@c59750015bc7.2024-04-24_13.09.40/big_tests.tests.connect_SUITE.logs/run.2024-04-24_13.10.54/log_private/"},
     {escalus_users,[{secure_joe,[{username,<<"secure_joe">>},
                                  {server,<<"localhost">>},
                                  {password,<<"break_me">>},
                                  {starttls,required}]},
                     {alice,[{username,<<"alicE">>},
                             {server,<<"localhost">>},
                             {password,<<"matygrysa">>}]}]}]

=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@c59750015bc7.2024-04-24_13.09.40"

=== Started at 2024-04-24 13:11:03


*** CT 2024-04-24 13:11:03.675 *** View log from node mongooseim@localhost when started🔗 mongooseim@localhost_295.html

*** User 2024-04-24 13:11:03.676 ***🔗
secure_joe_correct_features_are_advertised_for_optional_starttls_520@localhost out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2024-04-24 13:11:03.677 ***🔗
secure_joe_correct_features_are_advertised_for_optional_starttls_520@localhost in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='d05bef1bb2f4e582' from='localhost' version='1.0' xml:lang='en'>

*** User 2024-04-24 13:11:03.677 ***🔗
secure_joe_correct_features_are_advertised_for_optional_starttls_520@localhost in
<stream:features>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
	<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
		<mechanism>SCRAM-SHA-256</mechanism>
		<mechanism>PLAIN</mechanism>
	</mechanisms>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2024-04-24 13:11:03.677 ***🔗
secure_joe_correct_features_are_advertised_for_optional_starttls_520@localhost out
<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>



*** User 2024-04-24 13:11:03.677 ***🔗
secure_joe_correct_features_are_advertised_for_optional_starttls_520@localhost in
<proceed xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>



*** User 2024-04-24 13:11:03.686 ***🔗
secure_joe_correct_features_are_advertised_for_optional_starttls_520@localhost out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2024-04-24 13:11:03.686 ***🔗
secure_joe_correct_features_are_advertised_for_optional_starttls_520@localhost in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='fb372539ece39ab4' from='localhost' version='1.0' xml:lang='en'>

*** User 2024-04-24 13:11:03.686 ***🔗
secure_joe_correct_features_are_advertised_for_optional_starttls_520@localhost in
<stream:features>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
		<mechanism>SCRAM-SHA-256-PLUS</mechanism>
		<mechanism>SCRAM-SHA-256</mechanism>
		<mechanism>PLAIN</mechanism>
	</mechanisms>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2024-04-24 13:11:03.686 ***🔗
secure_joe_correct_features_are_advertised_for_optional_starttls_520@localhost out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AHNlY3VyZV9qb2VfY29ycmVjdF9mZWF0dXJlc19hcmVfYWR2ZXJ0aXNlZF9mb3Jfb3B0aW9uYWxfc3RhcnR0bHNfNTIwAGJyZWFrX21l</auth>



*** User 2024-04-24 13:11:03.687 ***🔗
secure_joe_correct_features_are_advertised_for_optional_starttls_520@localhost in
<failure xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
	<not-authorized/>
</failure>


*** CT 2024-04-24 13:11:03.688 *** View log from node mongooseim@localhost when finished🔗 mongooseim@localhost_295.html



=== Ended at 2024-04-24 13:11:03
=== successfully completed test case
=== === Returned value: {error,
                        {connection_step_failed,
                            {{escalus_session,authenticate},
                             {client,
                                 <<"secure_joe_correct_features_are_advertised_for_optional_starttls_520@localhost">>,
                                 escalus_tcp,<0.10365.0>,undefined,
                                 [{username,
                                      <<"secure_joe_correct_features_are_advertised_for_optional_starttls_520">>},
                                  {server,<<"localhost">>},
                                  {password,<<"break_me">>},
                                  {starttls,required},
                                  {ssl_opts,[{verify,verify_none}]},
                                  {host,<<"localhost">>},
                                  {stream_id,<<"fb372539ece39ab4">>}]},
                             [{compression,false},
                              {starttls,false},
                              {stream_management,true},
                              {advanced_message_processing,true},
                              {client_state_indication,false},
                              {sasl_mechanisms,
                                  [<<"SCRAM-SHA-256-PLUS">>,
                                   <<"SCRAM-SHA-256">>,<<"PLAIN">>]},
                              {caps,undefined}]},
                            {auth_failed,
                                <<"secure_joe_correct_features_are_advertised_for_optional_starttls_520">>,
                                {xmlel,<<"failure">>,
                                    [{<<"xmlns">>,
                                      <<"urn:ietf:params:xml:ns:xmpp-sasl">>}],
                                    [{xmlel,<<"not-authorized">>,[],[]}]}}}}