lorenzodonini / ocpp-go

Open Charge Point Protocol implementation in Go
MIT License
275 stars 126 forks source link

1006 ws connection error with tls certificates #131

Open Shakirsadiq6 opened 2 years ago

Shakirsadiq6 commented 2 years ago

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.

lorenzodonini commented 2 years ago

Sounds like a certificate issue, if the same code works before introducing TLS.

  1. What's the exact error message you are seeing?
  2. What go version are you using?
  3. 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