Prechádzať zdrojové kódy

Make TRUSTALL and older Delphi versions work again.

Martijn Laan 4 mesiacov pred
rodič
commit
b521a29344
1 zmenil súbory, kde vykonal 5 pridanie a 2 odobranie
  1. 5 2
      Components/TrustFunc.pas

+ 5 - 2
Components/TrustFunc.pas

@@ -19,9 +19,13 @@ function LoadTrustedLibrary(const FileName: String; const TrustAllOnDebug: Boole
 implementation
 implementation
 
 
 uses
 uses
-  Winapi.Windows, System.SysUtils {$IFNDEF TRUSTALL}, System.Classes, ECDSA, SHA256, ISSigFunc {$ENDIF};
+  Winapi.Windows, System.SysUtils, System.Classes {$IFNDEF TRUSTALL}, ECDSA, SHA256, ISSigFunc {$ENDIF};
 
 
 procedure CheckFileTrust(const FileName: String; const CheckExists: Boolean);
 procedure CheckFileTrust(const FileName: String; const CheckExists: Boolean);
+{$IFNDEF TRUSTALL}
+var
+  AllowedKeys: array of TECDSAKey;
+{$ENDIF}
 begin
 begin
   if CheckExists then begin
   if CheckExists then begin
     var Attr := GetFileAttributes(PChar(FileName));
     var Attr := GetFileAttributes(PChar(FileName));
@@ -44,7 +48,6 @@ begin
         raise Exception.Create('ISSigImportKeyText failed');
         raise Exception.Create('ISSigImportKeyText failed');
     end;
     end;
 
 
-    var AllowedKeys: array of TECDSAKey;
     if Key2 <> nil then
     if Key2 <> nil then
       AllowedKeys := [Key1, Key2]
       AllowedKeys := [Key1, Key2]
     else
     else