Forum > Pas2JS

Indy e https certificate


Hi guys, I'm trying to create an https server with indy and lazarus and I've found some code for testing. But I clash with the first obstacle, I never created a self-signed https certificate. If you look at the piece of code below you will see that there are 3 files to go to the indy component. How can I generate them with openssl?
Thank you

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---  rootdir:='cert' + System.DirectorySeparator ;  ServerSSLIOHandler:=TIdServerIOHandlerSSLOpenSSL.Create(nil);  ServerSSLIOhandler.SSLOptions.RootCertFile:=rootdir+'ca.cert.pem';  ServerSSLIOhandler.SSLOptions.CertFile:=rootdir+'localhost.cert.pem';  ServerSSLIOhandler.SSLOptions.KeyFile:=rootdir+'localhost.key.pem';  ServerSSLIOhandler.SSLOptions.Method:=sslvSSLv23;  ServerSSLIOhandler.SSLOptions.Mode:=sslmServer;  ServerSSLIOhandler.OnGetPassword:=NIL;  ServerSSLIOhandler.OnVerifyPeer:=OnVerifyPeer;     

There are many tutorials out there, e.g.:

Since you want to specify the CA (Certification Authority, for RootCertFile), make sure you look for a tutorial that includes the CA part, like those above.

Thank you very much!


[0] Message Index

Go to full version