Jump to content

JavierBechir

Members
  • Content Count

    4
  • Joined

  • Last visited

Community Reputation

0 Neutral
  1. JavierBechir

    Rad Studoi 11.2 Installation

    I've installed 11.1 version of Rad Studio, but into GetIt package manager doesn´t see the new 11.2 version. I supose, must download and install as trial, and when installing, recognizes the 11.1 version and uses same licence.... or not? Can I tread down the 11.1 with 11.2 withot lost any? I need explanation about it. Thanks!
  2. JavierBechir

    Loading p12 certificate fails

    I use LoadFromP12File. I see a new variable: GSSL_DLL_DIR; GSSL_DLL_DIR := Copy(ExtractFileDir(GetModuleName(HInstance)),5,255) +'\'; Now it's ok, but raises error when load certificate: access denied, but folder has R/W permissions ... I'll be investigating more. Thanks
  3. JavierBechir

    Loading p12 certificate fails

    I've downloaded the 8.65 version, installed and runed... libeay32 and ssleay32 are replaced by libcrypto-1_1 and libssl-1_1 dlls. Now is worst. Both in development pc, and server same exception is raised "Failed to load OpenSSL file libcrypto-1_1.dll ". Both dll are in same folder than my application!! 😞
  4. JavierBechir

    Loading p12 certificate fails

    I've installed component suit from overbyteics 8.16 in XE8 Delphi (Rad Studio). When i want to open a p12 file in developer computer, it loads, but when application runs on Windows Server 2012 R2 raises "\r\nError on opening file \"c:\\Files\\certif\\clientkstore.p12\"\r\nerror:02001005:system library:fopen:Input\/output error\r\nerror:2006D002:BIO routines:BIO_new_file:system lib\r\n" message. Development pc has openssl64 installed. W2012 R2 server: not. c:\Files folder has high permissions for application users, for reading and writing. The error is raised from OverbyteIcsWSocket unit: 2procedure myprocedure(myKey: string; var X: PPKC512; var Y: PX509); var path: string; FileBio : PBIO; PKey : PEVP_PKEY; ca: PSTACK; begin path := 'c:\Files\certif\clientkstore.p12'; // read from ini or register InitializeSsl; FileBio := OpenFileBio(path, bomRead); //<-- here raises. See next function down try if not Assigned(FileBio) then raise EX509Exception.Create('BIO not assigned'); X := f_d2i_PKCS12_bio(FileBio, nil); if not Assigned(X) then RaiseLastOpenSslError(EX509Exception, TRUE, 'Error reading certificate from BIO PKC512'); try if IncludePrivateKey then begin f_BIO_ctrl(FileBio, BIO_CTRL_RESET, 0, nil); PKey := f_PEM_read_bio_PrivateKey(FileBio, nil, nil, PAnsiChar(AnsiString(Password))); if not Assigned(PKey) then RaiseLastOpenSslError(EX509Exception, TRUE, 'Error reading private key from BIO'); try X509 := X; PrivateKey := PKey; finally f_EVP_PKEY_free(PKey); end; end else P12 := X; f_PKCS12_parse(P12, myKey, PKey, Y, ca); X509 := Y; finally f_PKCS12_free(X); end; finally f_bio_free(FileBio); end; end; //........................................................................................// function TX509Base.OpenFileBio( const FileName : String; Methode : TBioOpenMethode): PBIO; begin if (Filename = '') then raise EX509Exception.Create('File name not specified'); if (Methode = bomRead) and (not FileExists(Filename)) then raise EX509Exception.Create('File not found "' + Filename + '"'); if Methode = bomRead then Result := f_BIO_new_file(PAnsiChar(AnsiString(Filename)), PAnsiChar('r+')) //<------ here raises else Result := f_BIO_new_file(PAnsiChar(AnsiString(Filename)), PAnsiChar('w+')); if (Result = nil) then RaiseLastOpenSslError(EX509Exception, TRUE, 'Error on opening file "' + Filename + '"'); end; ssleay32.dll and libeay32.dll are in same folder than app. How can solve it?
×