1

I am trying to find a way to use /n Software's IPWorks server/client components with a self-signed SSL certificate.

I am trying this on the client side:

cl.SSLCertStoreType := cstPFXFile;
cl.SSLCertStore := 'cert.pfx';
cl.SSLCertStorePassword := 'password';
cl.Connect('localhost',5050);

And this on the server side:

server.SSLCertStoreType :=  cstPFXFile;
server.SSLCertStore := 'cert.pfx';
server.SSLCertStorePassword := 'password';
server.LocalPort:= 5050;
server.SSLEnabled:=true;
server.Listening := true;

The PFX file is valid, but the app gives an error that it's not a valid certificate.

Does somebody have a working example ?

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
abluka
  • 11
  • 2
  • As per this document on IPWorks site, the self-signed certificate can be generated using CertMgr class provided by same IPWorks library. https://www.nsoftware.com/kb/xml/11080101.rst > To generate a certificate, simply call the CreateCertificate method of > the CertMgr component included in IPWorks SSL. This method takes a > subject and a serial number as arguments: > > CertMgr1.CreateCertificate "CN=My Cert Subject", 0000001 May be use this certificate instead of any other method.. Not adding this as answer, as not tried yet – Sagar S. Dec 28 '21 at 10:34

1 Answers1

0

As per this document on IPWorks site, the self-signed certificate can be generated using CertMgr class provided by same IPWorks library.

https://www.nsoftware.com/kb/xml/11080101.rst

To generate a certificate, simply call the CreateCertificate method of the CertMgr component included in IPWorks SSL. This method takes a subject and a serial number as arguments:

CertMgr1.CreateCertificate "CN=My Cert Subject", 0000001

Certmgr certMgr1 = new Certmgr();
certMgr1.RuntimeLicense = ""; //Assign your license, otherwise you'll get exception
certMgr1.CreateCertificate("CN=My Cert Subject", 000001);
//Use certMgr1.Cert property to use generated Self-signed certificate
Sagar S.
  • 193
  • 1
  • 4
  • 15