forked from wolfSSL/wolfssl
Address gnatprove issues in tls client
This commit is contained in:
@ -47,12 +47,18 @@ package body Tls_Client with SPARK_Mode is
|
|||||||
Ada.Text_IO.Put (Text);
|
Ada.Text_IO.Put (Text);
|
||||||
end Put;
|
end Put;
|
||||||
|
|
||||||
procedure Put (Number : Natural) is
|
procedure Put (Number : Natural)
|
||||||
|
with
|
||||||
|
Annotate => (GNATprove, Might_Not_Return)
|
||||||
|
is
|
||||||
begin
|
begin
|
||||||
Natural_IO.Put (Item => Number, Width => 0, Base => 10);
|
Natural_IO.Put (Item => Number, Width => 0, Base => 10);
|
||||||
end Put;
|
end Put;
|
||||||
|
|
||||||
procedure Put (Number : Byte_Index) is
|
procedure Put (Number : Byte_Index)
|
||||||
|
with
|
||||||
|
Annotate => (GNATprove, Might_Not_Return)
|
||||||
|
is
|
||||||
begin
|
begin
|
||||||
Natural_IO.Put (Item => Natural (Number), Width => 0, Base => 10);
|
Natural_IO.Put (Item => Natural (Number), Width => 0, Base => 10);
|
||||||
end Put;
|
end Put;
|
||||||
@ -137,7 +143,7 @@ package body Tls_Client with SPARK_Mode is
|
|||||||
Output : WolfSSL.Write_Result;
|
Output : WolfSSL.Write_Result;
|
||||||
|
|
||||||
Result : WolfSSL.Subprogram_Result;
|
Result : WolfSSL.Subprogram_Result;
|
||||||
DTLS : Boolean := False;
|
DTLS : Boolean;
|
||||||
begin
|
begin
|
||||||
Result := WolfSSL.Initialize;
|
Result := WolfSSL.Initialize;
|
||||||
if Result /= Success then
|
if Result /= Success then
|
||||||
|
@ -32,6 +32,7 @@ package Tls_Client with SPARK_Mode is
|
|||||||
Pre => (not Client.Exists and not
|
Pre => (not Client.Exists and not
|
||||||
WolfSSL.Is_Valid (Ssl) and not WolfSSL.Is_Valid (Ctx)),
|
WolfSSL.Is_Valid (Ssl) and not WolfSSL.Is_Valid (Ctx)),
|
||||||
Post => (not Client.Exists and not WolfSSL.Is_Valid (Ssl) and
|
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;
|
end Tls_Client;
|
||||||
|
Reference in New Issue
Block a user