Jump to content

Invalid self-signed certificate


Fernando Silva

Recommended Posts

Hello everyone, I use a self-signed certificate for the development environment created through openssl following unigui's own post (here). However, when running the application, any browser considers it insecure and in my case it makes the application slow. For now I disable ssl as it is only in the laboratory.

image.png.90d36e77770248feea345258e9c0ffb5.png

Is there any way around this?

Link to comment
Share on other sites

Hello @Abaksoft, your tip was of great help, however, in my case I don't need other devices to access the "server", just the computer itself that is compiling. So, I made a summary of the manual.

1 - Create the san.cnf file in the OpenSSL bin folder (C:\Program Files\OpenSSL-Win64\bin). The content of the file looks like this:
[req]
default_bits  = 2048
distinguished_name = req_distinguished_name
req_extensions = req_ext
x509_extensions = v3_req
prompt = no
[req_distinguished_name]
countryName = XX
stateOrProvinceName = XX
localityName = XXXX
organizationName = XXXX
commonName = 127.0.0.1: Self-signed certificate
[req_ext]
subjectAltName = @alt_names
[v3_req]
subjectAltName = @alt_names
[alt_names]
IP.1 =127.0.0.1

Replace the "X" with your parameters

 

2 - Open cmd as admin
2.1 - cd C:\Program Files\OpenSSL-Win64\bin


3 - Run command
openssl genrsa -out root.key 2048
openssl req -x509 -days 3650 -new -nodes -key root.key -out root.pem -config san.cnf
openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout key.pem -out cert.pem -config san.cnf



4 - You created the three files (root.pem, cert.pem, Key.pem) inside the bin folder.
Copy these three files to the root directory where the .exe of your unigui project is located.
 

5 - Finally, open the Windows certificate manager (certmgr.msc), navigate to the "trusted root certificate authorities" folder and import the cert.pem file

Close browser e run project.

image.png.b14a37b1a97c7fbaa4ca0d8453434e27.png

 

  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...