Browse Source

Core: move OpenSSL library initialization into UCrypto

Herman Schoenfeld 6 years ago
parent
commit
0e6beeb710
2 changed files with 2 additions and 4 deletions
  1. 2 0
      src/core/UCrypto.pas
  2. 0 4
      src/gui-classic/UFRMWallet.pas

+ 2 - 0
src/core/UCrypto.pas

@@ -675,6 +675,8 @@ end;
 class procedure TCrypto.InitCrypto;
 class procedure TCrypto.InitCrypto;
 begin
 begin
 {$IFDEF Use_OpenSSL}
 {$IFDEF Use_OpenSSL}
+   // Load OpenSSL
+   if Not LoadSSLCrypt then raise Exception.Create('Cannot load '+SSL_C_LIB+#10+'To use this software make sure this file is available on you system or reinstall the application');
   _DoInit;
   _DoInit;
 {$ENDIF}
 {$ENDIF}
 end;
 end;

+ 0 - 4
src/gui-classic/UFRMWallet.pas

@@ -409,10 +409,6 @@ begin
   if FIsActivated then exit;
   if FIsActivated then exit;
   FIsActivated := true;
   FIsActivated := true;
   try
   try
-    // Check OpenSSL dll
-{$IFDEF Use_OpenSSL}
-    if Not LoadSSLCrypt then raise Exception.Create('Cannot load '+SSL_C_LIB+#10+'To use this software make sure this file is available on you system or reinstall the application');
-{$ENDIF}
     TCrypto.InitCrypto;
     TCrypto.InitCrypto;
     // Read Wallet
     // Read Wallet
     Try
     Try