@@ -504,6 +504,15 @@ channel_server_offers_but_client_does_not_take_is_ok(_Config) ->
504504 {continue , _ , _ } = fast_scram :mech_step (ServerState2 , YesGS2Flag ).
505505
506506channel_not_advertise_but_client_could_is_ok (_Config ) ->
507+ {ok , ClientState1 } = fast_scram :mech_new (
508+ #{
509+ entity => client ,
510+ hash_method => sha ,
511+ username => <<" user" >>,
512+ channel_binding => {none , <<>>},
513+ auth_data => #{password => <<" pencil" >>}
514+ }
515+ ),
507516 {ok , ServerState2 } = fast_scram :mech_new (
508517 #{
509518 entity => server ,
@@ -518,8 +527,11 @@ channel_not_advertise_but_client_could_is_ok(_Config) ->
518527 end
519528 }
520529 ),
521- YesGS2Flag = <<" y,,n=user,r=fyko+d2lbbFgONRv9qkxdawL" >>,
522- {continue , _ , _ } = fast_scram :mech_step (ServerState2 , YesGS2Flag ).
530+ {continue , ClientFirst , ClientState3 } = fast_scram :mech_step (ClientState1 , <<>>),
531+ {continue , ServerFirst , ServerState4 } = fast_scram :mech_step (ServerState2 , ClientFirst ),
532+ {continue , ClientFinal , ClientState5 } = fast_scram :mech_step (ClientState3 , ServerFirst ),
533+ {ok , ServerFinal , _ } = fast_scram :mech_step (ServerState4 , ClientFinal ),
534+ {ok , _ , _ } = fast_scram :mech_step (ClientState5 , ServerFinal ).
523535
524536% % If the channel binding flag was "p" and the server does not support
525537% % the indicated channel binding type, then the server MUST fail authentication.
0 commit comments