Recent

Author Topic: simpleserver ssl  (Read 623 times)

helio

  • New Member
  • *
  • Posts: 19
simpleserver ssl
« on: June 29, 2020, 03:46:30 pm »
Trying to use "simpleserver", more receive these messages in the browser?

jamie

  • Hero Member
  • *****
  • Posts: 3242
Re: simpleserver ssl
« Reply #1 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.
The only true wisdom is knowing you know nothing

Thaddy

  • Hero Member
  • *****
  • Posts: 10271
Re: simpleserver ssl
« Reply #2 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.
« Last Edit: June 29, 2020, 04:06:02 pm by Thaddy »
I am more like donkey than shrek

helio

  • New Member
  • *
  • Posts: 19
Re: simpleserver ssl
« Reply #3 on: June 29, 2020, 04:06:02 pm »
the errors are with a red line in the image ... and yes openssl is installed .... Linux

Thaddy

  • Hero Member
  • *****
  • Posts: 10271
Re: simpleserver ssl
« Reply #4 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.
I am more like donkey than shrek

helio

  • New Member
  • *
  • Posts: 19
Re: simpleserver ssl
« Reply #5 on: June 29, 2020, 04:09:34 pm »
Look

helio

  • New Member
  • *
  • Posts: 19
Re: simpleserver ssl
« Reply #6 on: June 29, 2020, 04:11:16 pm »
have some way of setting the ssltype TLS1.1?

Thaddy

  • Hero Member
  • *****
  • Posts: 10271
Re: simpleserver ssl
« Reply #7 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
« Last Edit: June 29, 2020, 05:35:26 pm by Thaddy »
I am more like donkey than shrek

helio

  • New Member
  • *
  • Posts: 19
Re: simpleserver ssl
« Reply #8 on: June 30, 2020, 12:18:47 am »
It doesn't work for me, it still does

trev

  • Hero Member
  • *****
  • Posts: 814
  • Former Delphi 1-7 and 10.2 User
Re: simpleserver ssl
« Reply #9 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.
o Lazarus v2.1.0 r63598, FPC v3.3.1 r45778, macOS 10.14.6 (with sup update), Xcode 11.3.1
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.1 amd64 (Parallels VM)
o FPC 3.0.4, FreeBSD 12-STABLE r361007 amd64
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 18.04 (Parallels VM)

helio

  • New Member
  • *
  • Posts: 19
Re: simpleserver ssl
« Reply #10 on: June 30, 2020, 01:43:34 am »
Does Simpleserve already generate a self-signed certificate? Do you have an example?

mr-highball

  • Full Member
  • ***
  • Posts: 179
    • Highball Github
Re: simpleserver ssl
« Reply #11 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?

helio

  • New Member
  • *
  • Posts: 19
Re: simpleserver ssl
« Reply #12 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