Lazarus

Programming => General => Topic started by: helio on June 29, 2020, 03:46:30 pm

Title: simpleserver ssl
Post by: helio on June 29, 2020, 03:46:30 pm
Trying to use "simpleserver", more receive these messages in the browser?
Title: Re: simpleserver ssl
Post by: jamie on June 29, 2020, 04:03:18 pm
I can't read your text due to language barriers here however, it looks like you may need the OpenSSL installed..

Just a guess however from the looks of it.
Title: Re: simpleserver ssl
Post by: Thaddy on June 29, 2020, 04:03:55 pm
I see you use a Chrome browser.
Can it be that your server has a ssl config that is too old? Chrome only accepts TLS1.1 or higher. So is ssl2/3/tls1.0 is specified on the serverside, Chrome will not accept a connection.

The simpleserver must specify tls1.1 at a minimum, since even recent openssl does not compile in those old and insecure protocols as standard.
Title: Re: simpleserver ssl
Post by: helio on June 29, 2020, 04:06:02 pm
the errors are with a red line in the image ... and yes openssl is installed .... Linux
Title: Re: simpleserver ssl
Post by: Thaddy on June 29, 2020, 04:06:43 pm
the errors are with a red line in the image ... and yes openssl is installed .... Linux
In a terminal, plz type openssl version and report that back.
Title: Re: simpleserver ssl
Post by: helio on June 29, 2020, 04:09:34 pm
Look
Title: Re: simpleserver ssl
Post by: helio on June 29, 2020, 04:11:16 pm
have some way of setting the ssltype TLS1.1?
Title: Re: simpleserver ssl
Post by: Thaddy on June 29, 2020, 05:13:53 pm
The ssl type can be set through sslsockets (unit) Tsslsockethandler.ssltype and set it to stTLSv1_1 ( I set it to stTLSv1_2)

You may need to add the units sslbase - declares ssltype- and sslsockets -declares Tsslsockethandler- , but I think they are already included in the example.

You should be able to do that from the same code you have now.
Do not forget to add a certificate, though: an ssl capable server needs a certificate!!

Also: use fpc 3.2 as a minimum
Title: Re: simpleserver ssl
Post by: helio on June 30, 2020, 12:18:47 am
It doesn't work for me, it still does
Title: Re: simpleserver ssl
Post by: trev on June 30, 2020, 01:37:31 am
Is your "simple server" using a certificate? As Thaddy mentioned, you need a certificate on the server for SSL.
Title: Re: simpleserver ssl
Post by: helio on June 30, 2020, 01:43:34 am
Does Simpleserve already generate a self-signed certificate? Do you have an example?
Title: Re: simpleserver ssl
Post by: mr-highball on June 30, 2020, 03:30:09 am
I think it does generate a self signed (however I don't know how to specify a custom certificate)
Does hitting the url via standard http work?
Title: Re: simpleserver ssl
Post by: helio on June 30, 2020, 02:02:59 pm
It seems to me that the self-signed certificate generated uses SHA1 encryption, the most modern browsers have depreciated.
TinyPortal © 2005-2018