Now, I would like to have the same functionality using the TLS certificates. I generated the certificates as you have shown in the example folder of this repository. But I am facing an error of "1006 ws connection error" It is working with setupCentralSystem() function but not with setupTlsChargePoint function.
Sounds like a certificate issue, if the same code works before introducing TLS.
What's the exact error message you are seeing?
What go version are you using?
Are you passing the correct certificates to the two endpoints? I have to assume you used the sample script for generating the self-signed certificates, but you may want to run openssl x509 -in <cert-path> -text to check for validity
I am using a simultor and it is working with this code snippet: https://github.com/lorenzodonini/ocpp-go/issues/103#issuecomment-881927977
Now, I would like to have the same functionality using the TLS certificates. I generated the certificates as you have shown in the example folder of this repository. But I am facing an error of "1006 ws connection error" It is working with setupCentralSystem() function but not with setupTlsChargePoint function.