#1 2023-06-09 14:32:46

mrauter
Member
Registered: 2016-11-18
Posts: 4

How to use OpenSSL for https requests?

Hi everyone,

I am connecting to a https endpoint using TWinHttp, but there is a ploblem in SSL handshake on an windows server 2012 system, which I believe is related to winhttp.dll available ciphers.

How can I connect to a HTTPS endpoint using OpenSSL and Mormot?

I was able to complete the request using Indy with OpenSSL, but I believe mormot to be more robust and most of my implementation is already using mormot.

Offline

#2 2023-06-09 15:04:59

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,552
Website

Re: How to use OpenSSL for https requests?

Define USE_OPENSSL and FORCE_OPENSSL conditionals for your project.

Then you could use the socket client for HTTPS with no problem, e.g. via OpenHttp() from mormot.net.client.

Offline

#3 2023-06-09 19:46:02

mrauter
Member
Registered: 2016-11-18
Posts: 4

Re: How to use OpenSSL for https requests?

Are those Mormot 2 exclusive conditionals?

I am using mormot 1.1 and could not find any source file that use them, or mormot.net.client.

Offline

#4 2023-06-09 20:08:09

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,552
Website

Re: How to use OpenSSL for https requests?

Ah...

OpenSSL is supported only with mORMot 2.

On mORMot 1, you can use OpenSSL but with libcurl.

Offline

#5 2023-06-09 20:11:47

tbo
Member
Registered: 2015-04-20
Posts: 349

Re: How to use OpenSSL for https requests?

Oops, Arnaud was faster.

mrauter wrote:

How can I connect to a HTTPS endpoint using OpenSSL and Mormot?

Under mORMot1 with cUrl. Define USELIBCURL. With function SynCrtSock.HttpGet.

With best regards
Thoms

Last edited by tbo (2023-06-09 20:14:12)

Offline

Board footer

Powered by FluxBB