mpous / basicstation

LoRa Basics™ Station - The LoRaWAN Gateway Software
https://doc.sm.tc/station
59 stars 30 forks source link

Invalide / Outdated TTN Root Certificate #10

Closed meese-evo closed 3 years ago

meese-evo commented 3 years ago

I followed your explanations from the Things Conference 2021, but ran into a problem that the gateway refused to connect due to problems with ssl root certificate. I had to exchange the URL given to curl in your startup script to the newer ISRG Root X1 Certificate:

https://letsencrypt.org/certs/isrgrootx1.pem.txt

Source: https://www.thethingsindustries.com/docs/reference/root-certificates/

mpous commented 3 years ago

Hello @fraterv could you please share here the logs with the error? What are you using as a board and concentrator?

Thanks

meese-evo commented 3 years ago

Yeah... I wanted to revert back to get some logs. So I pulled the latest version from the git-repo. But apperently something else is now broken. I will open another issue for that.

meese-evo commented 3 years ago

@mpous Here you go:

03.02.21 21:38:17 (+0100)  main  2021-02-03 20:38:17.654 [any:INFO] ./tc.trust: 
03.02.21 21:38:17 (+0100)  main  cert. version     : 3
03.02.21 21:38:17 (+0100)  main  serial number     : 44:AF:B0:80:D6:A3:27:BA:89:30:39:86:2E:F8:40:6B
03.02.21 21:38:17 (+0100)  main  issuer name       : O=Digital Signature Trust Co., CN=DST Root CA X3
03.02.21 21:38:17 (+0100)  main  subject name      : O=Digital Signature Trust Co., CN=DST Root CA X3
03.02.21 21:38:17 (+0100)  main  issued  on        : 2000-09-30 21:12:19
03.02.21 21:38:17 (+0100)  main  expires on        : 2021-09-30 14:01:15
03.02.21 21:38:17 (+0100)  main  signed using      : RSA with SHA1
03.02.21 21:38:17 (+0100)  main  RSA key size      : 2048 bits
03.02.21 21:38:17 (+0100)  main  basic constraints : CA=true
03.02.21 21:38:17 (+0100)  main  key usage         : Key Cert Sign, CRL Sign
03.02.21 21:38:17 (+0100)  main  2021-02-03 20:38:17.654 [AIO:INFO] tc has no cert configured - running server auth and client auth with token
03.02.21 21:38:17 (+0100)  main  2021-02-03 20:38:17.690 [TCE:INFO] Connecting to INFOS: wss://eu1.cloud.thethings.network:8887
03.02.21 21:38:17 (+0100)  main  2021-02-03 20:38:17.729 [AIO:INFO] TLS server certificate verification failed: The certificate is not correctly signed by the trusted CA
03.02.21 21:38:17 (+0100)  main  2021-02-03 20:38:17.729 [AIO:DEBU] [3] WS connection shutdown...
03.02.21 21:38:17 (+0100)  main  2021-02-03 20:38:17.729 [TCE:INFO] INFOS reconnect backoff 50s (retry 5)
meese-evo commented 3 years ago

Aha! The problem only occurs if you try to connect to the "new" Things Network V3 Stack via eu1.cloud.thethings.network.

If you use the old V2 Things Network, everything is fine.

mpous commented 3 years ago

Try now @fraterv that i accepted a pull request related with TLS certificates!

meese-evo commented 3 years ago

I've seen that. Will check later and come back with the result. But I'm shure it will work now.

THX!

meese-evo commented 3 years ago

Just checked: switched between V2 and V3 and it works like a charm!

And as I've seen you added support for the IMST ic880a concentrator board as well, I've checked that too: works also!

Thank you very much!