U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ MT-multithreading and servers » Https refarance example doesn't work
Https refarance example doesn't work [message #61963] Wed, 01 April 2026 12:48 Go to next message
przem_kaz is currently offline  przem_kaz
Messages: 10
Registered: April 2010
Location: Poland
Promising Member
Hello!

Just to be sure, I’m starting a separate thread so it doesn’t get overlooked Wink
I’d like to report an issue with the HTTPS example from the reference:
1. First issue – the attached certificates have been invalid for some time now.

2. Even after connecting new valid certificates (self-signed), when I enter https://localhost:4000 into the browser, an error message appears in the browser window:

The localhost server is using an unsupported protocol.
ERR_SSL_VERSION_OR_CIPHER_MISMATCH


And in the application logs:

Connection accepted
SSL handshake failed: socket(568) / SSL handshake: Unknown error code.
===================================================== Waiting...

  
Re: Https refarance example doesn't work [message #61964 is a reply to message #61963] Wed, 01 April 2026 16:11 Go to previous messageGo to next message
zouql is currently offline  zouql
Messages: 21
Registered: December 2020
Location: China
Promising Member
Hi przem_kaz:

  Maybe the server.crt expiry date expired.

  You need to create a new server.crt and server.key file according to the following method.

//1. Gen CA file. myca.key, myca.cert
openssl genrsa -aes256 -out myca.key 2048
openssl rsa -in myca.key -out myca.key
openssl req -new -x509 -days 3650 -key myca.key -out myca.crt -subj "/C=CN/ST=SD/L=YT/O=xx/OU=CA/CN=MYCA/emailAddress=youremail@xxx.com"

//2. gen server.key and server.crt
openssl genrsa -aes256 -out server.key 2048
openssl rsa in server.key -out server.key

openssl req -new -key server.key -out server.csr -subj
"/C=CN/ST=SD/L=YT/O=xxx/OU=RD/CN=xxx/emailAddress=youremail@xxx.com"

openssl x509 -req -days 3650 -in server.csr -CA myca.crt -CAkey myca.key -CAcreateserial -out server.crt
Re: Https refarance example doesn't work [message #61965 is a reply to message #61964] Wed, 01 April 2026 21:15 Go to previous messageGo to next message
przem_kaz is currently offline  przem_kaz
Messages: 10
Registered: April 2010
Location: Poland
Promising Member
Hi zouql
Thank you for your suggestions.

I tried using the new certificate, as I mentioned in my first message
But just to be sure, I tried your suggestion using OpenSSL (on my first attempt, I used the XCA tool to create a new certificate)
I’m getting the same results – it doesn’t work.

Could you please try compiling the HTTPS reference code and let me know if it works for you?

BR
Przemek
Re: Https refarance example doesn't work [message #61967 is a reply to message #61965] Thu, 02 April 2026 03:05 Go to previous messageGo to next message
zouql is currently offline  zouql
Messages: 21
Registered: December 2020
Location: China
Promising Member
Hi przem_kaz:

   These are the server.crt and server.key files I generated. Replace the two files in the code directory, compile and run. This is the result in the browser.
  
 If you encounter a warning page, click "advanced", and then Continue to...,You will see the result page.


/forums/index.php?t=getfile&id=7146&private=0
/forums/index.php?t=getfile&id=7147&private=0
/forums/index.php?t=getfile&id=7148&private=0
Re: Https refarance example doesn't work [message #61975 is a reply to message #61967] Sun, 12 April 2026 15:29 Go to previous message
przem_kaz is currently offline  przem_kaz
Messages: 10
Registered: April 2010
Location: Poland
Promising Member
Hi Zouql,
I just realized today that I hadn't replied to your post.

I can confirm that the HTTPS reference app works fine with your certificate—I messed something up when I tried to create a new certificate using the XCA app.

Thanks for your help.
Przemek
Previous Topic: Websocket issue
Goto Forum:
  


Current Time: Sun Apr 26 08:32:41 GMT+2 2026

Total time taken to generate the page: 0.00646 seconds