Jump to content

Help with SSL intranet!


sicoobcooplivre

Recommended Posts

17 hours ago, Ario.Paxaz said:

@Abaksoft

Hi,

SSl_Error.jpg

Hello Ario,

Good.

1. For PC client ( intranet), you have to export your new certificate from your server with :

Win + R

MMC

Then import it to your PC client. That works fine for me.

 

2. For Android....Hummm... i did'nt succeed. I gave up.

I just say to my customers to continue with this not secure site, when runing the url from mobile browser.

 

 

  • Upvote 1
Link to comment
Share on other sites

  • 4 weeks later...

Hi Abaksoft,

 

Thanx for your PERFECT work .. i tried a lot! of things and found a solution for the Android Problem 😉

The maion problem is the "-extensions v3_req"

1. change in delphi:

  //A.2.2  root.pem
  stDays:=intToStr(365 * upYrears.Position);
  param:='req -x509  -days ' + stDays + ' -new -nodes -key root.key -out root.pem -config san.cnf -extensions v3_req';
  ShellExecute(Application.Handle ,PChar('RunAs'),PChar(Fichier),PChar(param),PChar(Dossier),SW_HIDE);
  sleep(300);


  //A.2.3  cert.pem
  param:='req -x509 -nodes -days ' + stDays + ' -newkey rsa:2048 -keyout key.pem -out cert.pem -config san.cnf -extensions v3_req';
  ShellExecute(Application.Handle ,PChar('RunAs'),PChar(Fichier),PChar(param),PChar(Dossier),SW_HIDE);
  sleep(300);

 

2. change in san.cnf

 

[req]
default_bits  = 2048
distinguished_name = req_distinguished_name
req_extensions = v3_req
x509_extensions = v3_req
prompt = no
[req_distinguished_name]
countryName = XX
stateOrProvinceName = N/A
localityName = N/A
organizationName = Self-signed certificate
commonName = Self-signed certificate
[req_ext]
subjectAltName = @alt_names
[v3_req]
subjectAltName = @alt_names
basicConstraints = critical,CA:true
[alt_names]
IP.1 =10.0.0.10

3. Export CA in Windows - and import it as CA in Android

 

.. Works 🙂

 

 

 

  • Thanks 3
Link to comment
Share on other sites

On 11/10/2023 at 3:00 PM, erich.wanker said:

Hi Abaksoft,

 

Thanx for your PERFECT work .. i tried a lot! of things and found a solution for the Android Problem 😉

The maion problem is the "-extensions v3_req"

1. change in delphi:

  //A.2.2  root.pem
  stDays:=intToStr(365 * upYrears.Position);
  param:='req -x509  -days ' + stDays + ' -new -nodes -key root.key -out root.pem -config san.cnf -extensions v3_req';
  ShellExecute(Application.Handle ,PChar('RunAs'),PChar(Fichier),PChar(param),PChar(Dossier),SW_HIDE);
  sleep(300);


  //A.2.3  cert.pem
  param:='req -x509 -nodes -days ' + stDays + ' -newkey rsa:2048 -keyout key.pem -out cert.pem -config san.cnf -extensions v3_req';
  ShellExecute(Application.Handle ,PChar('RunAs'),PChar(Fichier),PChar(param),PChar(Dossier),SW_HIDE);
  sleep(300);

 

2. change in san.cnf

 

[req]
default_bits  = 2048
distinguished_name = req_distinguished_name
req_extensions = v3_req
x509_extensions = v3_req
prompt = no
[req_distinguished_name]
countryName = XX
stateOrProvinceName = N/A
localityName = N/A
organizationName = Self-signed certificate
commonName = Self-signed certificate
[req_ext]
subjectAltName = @alt_names
[v3_req]
subjectAltName = @alt_names
basicConstraints = critical,CA:true
[alt_names]
IP.1 =10.0.0.10

3. Export CA in Windows - and import it as CA in Android

 

.. Works 🙂

 

 

 

 

Oh...Super !

Many Thx Erich

That works fine :)

 

Just for our friends, when importing the Certificate on Android, depending on your Android ;

1. Go to Parameters

2. Wifi

3. Additional settings

4. Certificates Installation

5. Explore your directory to select your Certificat

5. Using Certificate as :  VPN & Application   (not Wifi)

That' all  :)

 

NB:  I will post soon here, the program "Certificate in 3 secondes"  updated  with your great bring.

Thx again Erich

 

  • Thanks 1
Link to comment
Share on other sites

Hello,

Here is the updated "Certificate in 3 secondes"  program, with an embeded Light OpenSSL version.

(No need to install on your Customer Server OpenSSL).

Thanks to Erich Wanker, with this version, you can  use your Mobile with a secure portal.

 

After running the program,  you can check the Certificate with :  Win + R --> MMC   (see the video).

Have fun.

 

ice_video_20231114-134145.7z Prg_Certificate_2.7z

  • Like 1
Link to comment
Share on other sites

PS.

 

to install the certificate into Windows Trusted Root Certificates  - i use:

 

 // Add the cert.pem on the Windows Trusted Root Certificates
    cert_pem := Dossier +  'cert.pem';
    Chemin := ExtractFilePath( Application.ExeName ) + 'Data\OpenSSL\export.ps1';
    // prepare the Script
    MyText := TStringlist.create;
    try
      MyText.Add( '$CertificateName = "UNIGUI_All_OS"' );
      MyText.Add( '$Certificate = Get-ChildItem "CERT:\" -Recurse | ' );
      MyText.Add( '    Where-Object {$_.FriendlyName -eq "UNIGUI_All_OS"} ' );
      MyText.Add( 'Export-Certificate -Cert $Certificate -FilePath "'+ ExtractFilePath( Application.ExeName )+'\exportiertes_zertifikat\your_name.cer'+'" ' );
      MyText.SaveToFile( Chemin );

    finally
      MyText.Free
    end;
    sleep( 300 );

    // Execute the Script
    ch := '/K powershell.exe -executionpolicy bypass -file "' + Chemin + '"';
    Dossier := GetEnvironmentVariable( 'SYSTEMROOT' ) + '\System32';
    ShellExecute( Application.Handle, 'runas', 'cmd.exe', PChar( ch ), PChar( Dossier ), SW_HIDE );

 

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

A good news 😅

Incredible !

When opening the same app protected by our Self Signed Certificat, on a Customer   iphone , the secure padlock appears. Without importing certificate !

"Wow...the secure warning did'nt appear... ". I said

"Well it's an iphone..." He said.

It seems that extensions v3_req'  

Is a good recipe.

Link to comment
Share on other sites

  • 4 weeks later...
On 11/14/2023 at 1:53 PM, Abaksoft said:

Hello,

Here is the updated "Certificate in 3 secondes"  program, with an embeded Light OpenSSL version.

(No need to install on your Customer Server OpenSSL).

Thanks to Erich Wanker, with this version, you can  use your Mobile with a secure portal.

 

After running the program,  you can check the Certificate with :  Win + R --> MMC   (see the video).

Have fun.

 

ice_video_20231114-134145.7zUnavailable Prg_Certificate_2.7zUnavailable

Where can we foun it?

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...