hb_sendmail TLS-Version

190 views
Skip to first unread message

Michael Hagl

unread,
May 26, 2021, 1:14:28 PMMay 26
to
Hi,

how can I tell which TLS version hb_sendmail () is using. My provider requires version 1.2 or 1.3.

I´m using latest xhb.com version and linking TipSSL.lib, Libeay32.lib and SSLeay32.lib

Thank you for some help!

Michael Hagl


Claudio H

unread,
Jun 4, 2021, 2:56:42 AMJun 4
to
Michael

The LIBs you are linking only support TLS up to ver 1.1

You should link LibCrypto.lib and LibSSL.lib included in last OpenSSL version, and have libcrypto-1_1.dll and libssl-1_1.dll available to your exe file (these support up to last TLS version)

Regards
Claudio H

Michael Hagl

unread,
Jun 4, 2021, 4:10:13 AMJun 4
to
Hello Claudio,

thank you for your answer!

instead of linking
[C:\xHb\Lib\TipSSL.lib]
[C:\xHb\Lib\libeay32.lib]
[C:\xHb\Lib\ssleay32.lib]

now linking
[C:\xHb\Lib\libcrypto.lib]
[C:\xHb\Lib\libssl.lib]

(and using the -1_1.dlls)
but when try to send a email with hb_sendmail, there is a errormessage (using old libs, it works)

20210604-09:43:02 :INETCONNECT( smtp.strato.de, 465 )
>> B43C740 <<
20210604-09:43:02 :INETERRORCODE( B43C740 )
>> 0 <<
20210604-09:43:02 :INETSENDALL( B43C740, 25, HELO csauf@......de )
>> 25 <<
20210604-09:43:02 :INETRECVLINE( B43C740, , 512 )
>> NIL <<
20210604-09:43:02 :INETERRORCODE( B43C740 )
>> 10054 <<

Michael Hagl

Enrico Maria Giordano

unread,
Jun 4, 2021, 4:47:36 AMJun 4
to


Il 04/06/2021 10:10, Michael Hagl ha scritto:

> Hello Claudio,
>
> thank you for your answer!
>
> instead of linking
> [C:\xHb\Lib\TipSSL.lib]
> [C:\xHb\Lib\libeay32.lib]
> [C:\xHb\Lib\ssleay32.lib]
>
> now linking
> [C:\xHb\Lib\libcrypto.lib]
> [C:\xHb\Lib\libssl.lib]
>
> (and using the -1_1.dlls)
> but when try to send a email with hb_sendmail, there is a errormessage (using old libs, it works)

I'm not sure, bu I think you have to rebuild xHarbour with the new
OpenSSL directory installed. If this is true, you have to ask xHarbour.com.

EMG

http://www.emagsoftware.it
http://www.emagsoftware.it/emgmusic
http://www.emagsoftware.it/spectrum
http://www.emagsoftware.it/tbosg

Michael Hagl

unread,
Jun 4, 2021, 6:35:10 AMJun 4
to
Hi,

maybe the hb-sendmail function (or the whole tip-source) is to old.

Do i have the correct lib files?
libssl.lib size is 1382366 Bytes
libcrypto.lib is 5012232 Bytes

Michael Hagl

Enrico Maria Giordano

unread,
Jun 4, 2021, 6:49:17 AMJun 4
to


Il 04/06/2021 12:35, Michael Hagl ha scritto:

> Hi,
>
> maybe the hb-sendmail function (or the whole tip-source) is to old.

It maybe.

> Do i have the correct lib files?
> libssl.lib size is 1382366 Bytes
> libcrypto.lib is 5012232 Bytes

Yes, you have to recreate the LIB from the new DLL.

Claudio H

unread,
Jun 4, 2021, 3:57:08 PMJun 4
to
Michael

You have to use a newer TipSSL.lib than the obsolete one provided by xharbour.com in it's last build.

I took it from Mel's site for PellesC 32 bits version and works flawlessly.

Regards

Claudio H

Michael Hagl

unread,
Jun 7, 2021, 6:03:30 AMJun 7
to

Hi Claudio,

does not work!

Im linking:
tip.lib (275KB, 14.12.2020)
tipssl.lib (162KB, 14.12.2020)
libcrypto.lib (4.77MB, 04.06.2021)
libssl.lib (1.32MB, 04.06.2021)

and
libcrypto-1_1.dll (2.4MB, 04.06.2021)
libssl-1_1.dll (519KB, 04.06.2021)

when deleting the dll-files and start the exe, it does not ask for the lib*.dlls

Claudio H

unread,
Jun 7, 2021, 3:31:38 PMJun 7
to
Michael

You have to link these and in this exact order, and DO NOT include tip.lib :

tipssl.lib 29/10/2020
libcrypto.lib 21/04/2020
libssl.lib 21/04/2020
xhb.lib 14/03/2017

(dates are from the ones I'm using, anyone after them should work)

Your exe is not asking for the DLLs because when linking tip.lib before tipssl.lib the methods using ssl/tls routines are not included.

Claudio H

Michael Hagl

unread,
Jun 8, 2021, 2:26:13 AMJun 8
to
Hi Claudio,


does not work!
Without tip.lib, there is a linking error and exe is not build.
Maybe, I do not have the correct libs (tipssl.lib is from mel´s xhb10264_pellesc)

Type: C >>>xlink.exe -NOEXPOBJ -MAP -FORCE:MULTIPLE -NOIMPLIB -subsystem:console -LIBPATH:"c:\xhb\lib" -LIBPATH:"C:\xHB\c_lib" -LIBPATH:"C:\xHB\c_lib\win" "AUFX.obj" "ZUGRIFF1.obj" "ABSCHLUS.obj" "ADRDRU.obj" "APRG.obj" "ARTDRUCK.obj" "ARTIKEL2.obj" "ARTIKEL3.obj" "ARTIKEL.obj" "ARTSTLIS.obj" "AUFDRU2.obj" "AUFDRUCK.obj" "AUFINI.obj" "AUFLIB.obj" "BARVERK.obj" "CALC.obj" "CHARGE.obj" "DATEIPFL.obj" "DD4.obj" "EDI.obj" "EDIT.obj" "ERROR.obj" "EXPORT.obj" "FAKT.obj" "FAKTNEU.obj" "FAKTPOS2.obj" "FAKTPOS.obj" "FAKTSTL.obj" "FELDIO2.obj" "FELDIOX.obj" "FERTIG.obj" "FORMULAR.obj" "FORMWIN.obj" "FPLAN.obj" "FUNLIB.obj" "GRUPPEN.obj" "INVENTUR.obj" "KONTRAKT.obj" "KUNDEN.obj" "LAGER2.obj" "LAGER.obj" "LASTSCHR.obj" "LIB1.obj" "MAXCHO.obj" "MAXFIL.obj" "MAXMOV.obj" "MAXSCO.obj" "MIET.obj" "NEUSCO.obj" "OBJEKT.obj" "OPOS.obj" "PROGWAHL.obj" "SERNUM.obj" "STAMM.obj" "UPDATE.obj" "VERSAND.obj" "VORGANG.obj" "ZEIT.obj" "GETHB.obj" "XHB.obj" "XML.obj" "NOGTVW.obj" "LGIMPORT.obj" "ADS.obj" "TPSCRIPx.obj" "BARCODE.obj" "BROWSE.obj" "DATANORM.obj" "lgplatz.obj" "CPROG.obj" "Fertigband.obj" "msoffice.obj" "MEMOEDIT.obj" "TEDITOR.obj" "debug.obj" "versuch.obj" "internet.obj" "rufimport.obj" "Montage.obj" "tbrowse.obj" "tbcolumn.obj" "TSE.obj" "Service.obj" "xhb-cFuncs.obj" "C:\xHb\Lib\TipSSL.lib" "C:\xHb\Lib\libcrypto.lib" "C:\xHb\Lib\libssl.lib" "C:\xHB\lib\xHB.lib" "C:\xHB\lib\xHBCommDll.lib" "C:\xHB\lib\xHBCOMM.lib" "C:\xHB\lib\WINAPI.LIB" "C:\xHB\Lib\xHBZipDll.lib" "C:\xHB\Lib\xHBZIP.lib" "C:\xHb\Lib\rddads.lib" "C:\xHB\lib\VXH.lib" "ads.lib" "ace32.lib" "xhb.lib" "dbf.lib" "nsx.lib" "ntx.lib" "cdx.lib" "rmdbfcdx.lib" "ct3comm.lib" crt.lib kernel32.lib user32.lib winspool.lib ole32.lib oleaut32.lib odbc32.lib odbccp32.lib uuid.lib wsock32.lib ws2_32.lib wininet.lib advapi32.lib shlwapi.lib msimg32.lib mpr.lib OleDlg.lib version.lib -out:"aufpm-ssl.exe"<<<

CRT: unhandled exception (main) -- terminating

Type: C >>>Couldn't build: aufpm-ssl.exe<<<
Type: C >>>TMAKEPROJECT<<<
Type: C >>>TMAKEPROJECT:REFRESH<<<
Type: N >>> 1428<<<

Claudio H

unread,
Jun 8, 2021, 5:02:43 PMJun 8
to
Michael

Don't know which xhb.com's build you are using, but just in case compile and link all the PRGs from xharbour.org's contrib\tipssl

Regards
Claudio H

Michael Hagl

unread,
Jun 11, 2021, 7:12:43 AMJun 11
to
Hi Claudio,
sorry for delay!
I will do some tests the next days

Michael Hagl
Reply all
Reply to author
Forward
0 new messages