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 );