-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The NBSSLWebClient.ino example works only on webhook.site and aftenposten.no, but not on most other HTTPS sites #106
Comments
This is very likely an issue of a missing or outdated certificate. @Rocketct can you provide help re updating of the internally stored certificates? |
I have similar issues: my MKR NB1500 with NBSSLWebClient.ino will connect to webhook.site, but not to an Azure influxdata.com site. When I try connecting to influxdata, I end up with an error 11 (EWOULDBLOCK / EAGAIN - Current operation would block, try
and
|
Further to the above, I used
Arduino.cc server does not support any of those:
webhook.site supports:
influxdata also doesn't support any of the suites that the ublox manual mentions.
Although I don't see why there should be different error messages, the lack of common cipher suites seems to be a reasonable explanation for the lack of success in connecting to arduino.cc and influxdata. When I look at the latest version of the manual rev 27, I see there are many more suites available (pages 308-311 of 536) - enough to match the TLSv1.2 protocol (although none of the TLSv1.3 suites) for arduino.cc and influxdata. It looks like I will have to try updating the firmware. |
Hello @johnyesberg I'm facing the same issue while trying to connect to azure iot hub, where you able to solve the issue? |
No, I gave up.
I found that I could submit to a google form, which could store data in a
spreadsheet.
…On Thu, 30 May 2024 at 07:08, MayarNour ***@***.***> wrote:
Hello @johnyesberg <https://github.com/johnyesberg> I'm facing the same
issue while trying to connect to azure iot hub, where you able to solve the
issue?
—
Reply to this email directly, view it on GitHub
<#106 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADVCZWB5E22W7OULZ6DN53ZEY7WHAVCNFSM6AAAAAAR37B5Y2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZYGI3DONRTHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Well, another one bites the dust, this took me way too long to figure out, but thanks @jontingvold and @johnyesberg for providing all the information of the things you have already tried. I have looked endlessly at the Ublox manual, nmap and OpenSSL output and tried many different sites in order to figure out what the hell was going on here. Although I'm not 100% sure I found the root cause, a lot of sites that were mentioned here now seem to work or have an explanation why they don't work. Add your root certificatesThis one is kind of obvious, the root certificates that are in NBRootCert.cpp are incomplete and often outdated. Fortunately, the NBSSLClient makes it quite easy to pass your own root certificates. Copy NBRootCert.cpp, change the name of the class and pass it to the NBSSLClient through its constructor parameters (like This library adds the Root certificates using the Don´t use EC pubkeys in your intermediate certificatesThis seems to be a bug in how the SARA-R410M verifies certificates. When you look for example at the certificate chain of Let's Encrypt (https://letsencrypt.org/certificates/), the chain X1->R10/R11 will work because the root and intermediate certificates use RSA for the pubkeys, but the chain X1->E5/E6 use an EC pubkey for the E5/E6 intermediate certificates so it fails. Why does this verification fail? No clue at the moment. The modem seems to support EC crypto algorithms as can be seen in the ciphersuits it supports. Some sites like google.com, which uses an EC pubkey in their server certificate (but not in their root/intermediate certificates) seem to work correctly. It looks like it gets confused when a combination of EC and standard RSA pubkeys get used in the certification chain. It is hard to pinpoint exactly what's going on without having detailed debug logs. So what is the solution? Preferably use an certificate chain without any EC pubkeys, but when this isn't possible you can also disable certificate checking using Set the SNISome sites don´t seem to work (correctly) when you don't specify the Server Name Indication (sites like nginx.org or pcgamer.com). Specifying the SNI can be done by using the AT command I won't explain how SNI works exactly, there is an explanation in the manual. Furthermore....Well I can write a blog post of all the things I tried an did, but I'll leave it at this for now. It's extremely frustrating to have a modem only telling you 'internal error' or 'tls/ssl error' without specifying exactly what has been going wrong. It's also a shame that Arduino didn't update the root certificates in this library for 4 years and not taking the effort to investigate and fix these bugs making this device almost unusable when you need secure connections. For people willing to dig further into this, here are some tips:
|
When I run examples/NBSSLWebClient/NBSSLWebClient.ino, the simple example for connecting to an HTTPS/SSL web server, it only works on a few sites.
It works on:
It does not work on:
If i enable debugging mode (change
line 28
fromNB nbAccess;
toNB nbAccess(true)
), I get the following error:For webhook.site, which works fine, I get
I tried to change
NBClient.cpp line 128
fromMODEM.send("AT+USECPRF=0,0,1");
toMODEM.send("AT+USECPRF=0,0,0");
like Issue 90 suggested, but this did not work.I don't have any clue what the issue can be about.
webhook.site
uses Let's encrypt and Nginx, but the web site of Let's encrypt and Nginx (which I guess use their own newest technology) does not work. It might be that webhook.site uses an older Nginx version, but this is hard to verify.aftenposten.no
uses Let's Encrypt and Varnish and has au89-varnish-abo-01
header. Butvg.no
, another major Norwegian news site, owned by the same parent company, also uses Varnish (it has au89-varnish-01
header), but this site does not work. I also tired to see if their was any commonality between the certificate issuer or the signature algorithm for the sites that worked, but I always find an other sites with the same factor that did not work.The text was updated successfully, but these errors were encountered: