Pascal Scripting: DownloadTemporaryFileWithISSigVerify

Prototype:

function DownloadTemporaryFileWithISSigVerify(const Url, ISSigUrl, BaseName: String; const AllowedKeysRuntimeIDs: TStringList; const OnDownloadProgress: TOnDownloadProgress): Int64;

Description:

Like DownloadTemporaryFile, but downloads an .issig signature file first from the specified second URL and uses it to verify the main file downloaded from the first URL.

If the second URL is an empty string, Setup will instead append ".issig" (without quotes) to the path portion of the first URL. It will then use the result as the URL to download the .issig signature file from.

Verification uses the specified allowed keys, looked up using [ISSigKeys] section parameter RuntimeID. To allow all keys set AllowedKeysRuntimeIDs to nil.

An exception will be raised if there was an error. Otherwise, returns the number of bytes downloaded for the main file from the first URL. Returns 0 if the main file was already downloaded and still verified.

Example:
[Code]
function InitializeSetup: Boolean;
begin
  try
    DownloadTemporaryFileWithISSigVerify(
      'https://jrsoftware.org/download.php/myprog-extrareadmes.7z', '',
      'myprog-extrareadmes.7z', nil, nil);
    Result := True;
  except
    Log(GetExceptionMessage);
    Result := False;
  end;
end;
See also:

DownloadTemporaryFile
.issig Signatures: Introduction
ISSigVerify