[Glass] How to get a working https request ?
Norm Green
norm.green at gemtalksystems.com
Mon Oct 23 06:15:03 PDT 2023
I don't have Zinc loaded so I can't try this, but....
You have to tell OpenSSL where the list of certificates is on your
system. On Ubuntu it's /etc/ssl/certs. Once you know that then run this
code before creating the socket:
GsSecureSocket useCACertificateDirectoryForClients: '/etc/ssl/certs'.
See the example code in GsSecureSocket class >> httpsClientExample.
Norm Green
On 10/23/2023 4:45 AM, Jupiter Jones via Glass wrote:
> Good question :) I’m sure I’ve done this, but I can find any code examples. Hopefully someone else will chime in and enlighten us.
>
>> On 23 Oct 2023, at 10:19 pm, Marten Felddtmann <m at feldtmann.online> wrote:
>>
>> That would be a nice solution for the first attempts ... But, what if I want to enable that verification ?
>>
>> Marten
>>
>> On 23.10.23 13:13, Jupiter Jones wrote:
>>> Hi Marten,
>>>
>>> Try:
>>>
>>> GsSecureSocket disableCertificateVerificationOnClient.
>>>
>>> Then your connection should work.
>>>
>>> Cheers,
>>>
>>> Jupiter
>>>
>>>> On 23 Oct 2023, at 8:52 pm, Marten Felddtmann via Glass <glass at lists.gemtalksystems.com> wrote:
>>>>
>>>> Hey,
>>>>
>>>> when doing some experiments with an external system I had to call the external system - on my home machine all stuff is http and localhost, so no problems ... but then I moved it to the internet system to play there I ran into a problem I never thought of - all https requests a failing.
>>>>
>>>>
>>>> I can choose all possible Gemstone version 3.6.x and try to get the content of a https call and it always fails. Does anyone knows HOW to do a https request in Gemstone ?
>>>>
>>>>
>>>> | aZnClient |
>>>>
>>>> aZnClient := ZnClient new.
>>>> aZnClient
>>>> beOneShot;
>>>> url: 'https://gemtalksystems.com' ;
>>>> method: #GET ;
>>>> execute
>>>>
>>>> results into:
>>>>
>>>>
>>>> a SecureSocketError occurred (error 2755), socket error , secureConnect failed, error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1921:
>>>>
>>>>
>>>> Any concrete ideas ?
>>>>
>>>>
>>>> Marten
>>>>
>>>> _______________________________________________
>>>> Glass mailing list
>>>> Glass at lists.gemtalksystems.com
>>>> https://lists.gemtalksystems.com/mailman/listinfo/glass
>>
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> https://lists.gemtalksystems.com/mailman/listinfo/glass
More information about the Glass
mailing list