Address gnatprove issues in tls client

pull/7397/head
Daly Brown 2024-04-08 19:40:06 -04:00
parent 97e731f27b
commit 707e60aa79
No known key found for this signature in database
GPG Key ID: 7558DD8FD89F61CE
2 changed files with 11 additions and 4 deletions

View File

@ -47,12 +47,18 @@ package body Tls_Client with SPARK_Mode is
Ada.Text_IO.Put (Text);
end Put;
procedure Put (Number : Natural) is
procedure Put (Number : Natural)
with
Annotate => (GNATprove, Might_Not_Return)
is
begin
Natural_IO.Put (Item => Number, Width => 0, Base => 10);
end Put;
procedure Put (Number : Byte_Index) is
procedure Put (Number : Byte_Index)
with
Annotate => (GNATprove, Might_Not_Return)
is
begin
Natural_IO.Put (Item => Natural (Number), Width => 0, Base => 10);
end Put;
@ -137,7 +143,7 @@ package body Tls_Client with SPARK_Mode is
Output : WolfSSL.Write_Result;
Result : WolfSSL.Subprogram_Result;
DTLS : Boolean := False;
DTLS : Boolean;
begin
Result := WolfSSL.Initialize;
if Result /= Success then

View File

@ -32,6 +32,7 @@ package Tls_Client with SPARK_Mode is
Pre => (not Client.Exists and not
WolfSSL.Is_Valid (Ssl) and not WolfSSL.Is_Valid (Ctx)),
Post => (not Client.Exists and not WolfSSL.Is_Valid (Ssl) and
not WolfSSL.Is_Valid (Ctx));
not WolfSSL.Is_Valid (Ctx)),
Annotate => (GNATprove, Might_Not_Return);
end Tls_Client;