File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -101,9 +101,9 @@ package body Tls_Client with SPARK_Mode is
101101
102102 Any_Inet_Addr : Inet_Addr_Type renames SPARK_Sockets.Any_Inet_Addr;
103103
104- CERT_FILE : constant String := " ../certs/client-cert.pem" ;
105- KEY_FILE : constant String := " ../certs/client-key.pem" ;
106- CA_FILE : constant String := " ../certs/ca-cert.pem" ;
104+ CERT_FILE : constant String := " ../../../ certs/client-cert.pem" ;
105+ KEY_FILE : constant String := " ../../../ certs/client-key.pem" ;
106+ CA_FILE : constant String := " ../../../ certs/ca-cert.pem" ;
107107
108108 subtype Byte_Array is WolfSSL.Byte_Array;
109109
Original file line number Diff line number Diff line change @@ -87,9 +87,9 @@ package body Tls_Server with SPARK_Mode is
8787
8888 Any_Inet_Addr : Inet_Addr_Type renames SPARK_Sockets.Any_Inet_Addr;
8989
90- CERT_FILE : constant String := " ../certs/server-cert.pem" ;
91- KEY_FILE : constant String := " ../certs/server-key.pem" ;
92- CA_FILE : constant String := " ../certs/client-cert.pem" ;
90+ CERT_FILE : constant String := " ../../../ certs/server-cert.pem" ;
91+ KEY_FILE : constant String := " ../../../ certs/server-key.pem" ;
92+ CA_FILE : constant String := " ../../../ certs/client-cert.pem" ;
9393
9494 subtype Byte_Array is WolfSSL.Byte_Array;
9595
@@ -305,7 +305,11 @@ package body Tls_Server with SPARK_Mode is
305305 Put_Line (" ERROR: failed to write full response." );
306306 end if ;
307307
308- Result := WolfSSL.Shutdown (Ssl);
308+ for I in 1 .. 3 loop
309+ Result := WolfSSL.Shutdown (Ssl);
310+ exit when Result = Success;
311+ delay 0.001 ; -- Delay is expressed in seconds.
312+ end loop ;
309313 if Result /= Success then
310314 Put_Line (" ERROR: Failed to shutdown WolfSSL context." );
311315 end if ;
You can’t perform that action at this time.
0 commit comments