File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -139,10 +139,6 @@ package body Tls_Server with SPARK_Mode is
139139 return 0 ;
140140 end if ;
141141
142- put_line (Interfaces.C.Strings.Value
143- (Item => Identity,
144- Length => Identity_String'Length) );
145-
146142 Interfaces.C.Strings.Update
147143 (Item => Key,
148144 Offset => 0 ,
@@ -261,13 +257,15 @@ package body Tls_Server with SPARK_Mode is
261257 if not PSK then
262258 -- Require mutual authentication.
263259 WolfSSL.Set_Verify
264- (Context => Ctx,
260+ (Context => Ctx,
265261 Mode => WolfSSL.Verify_Peer or WolfSSL.Verify_Fail_If_No_Peer_Cert);
266262
267263 -- Check verify is set correctly (GitHub #7461)
268264 if WolfSSL.Get_Verify(Context => Ctx) /= (WolfSSL.Verify_Peer or WolfSSL.Verify_Fail_If_No_Peer_Cert) then
269- Put (" Error: Verify does not match requested" );
270- New_Line;
265+ Put_Line (" Error: Verify does not match requested" );
266+ SPARK_Sockets.Close_Socket (L);
267+ WolfSSL.Free (Context => Ctx);
268+ Set (Exit_Status_Failure);
271269 return ;
272270 end if ;
273271
You can’t perform that action at this time.
0 commit comments