GithubHelp home page GithubHelp logo

Comments (8)

markjfisher avatar markjfisher commented on June 3, 2024 1

Thanks for the update. I've just fixed it in our code.
Very sorry for the noise. It turns out we were not reading the certificate correctly with the upgrade in clients, yet that was somehow working with some sites but not others.

Many thanks for your feedback on this and sorry to have wasted your time.

from mongoose.

scaprile avatar scaprile commented on June 3, 2024

Hello Mark,
we just use MbedTLS, there is nothing special in that besides possible API differences.
Our tests run on Windows, Mac, and Ubuntu 22.04 (what Github provides) and they all pass.
You should start by using 7.13, and you could even try our built-in TLS1.3
However, a bit of googling yields: "The error you are getting means that you have received a fatal alert from the server.
This fatal alert was sent after the server received the ClientHello message from your client.
This means that the server couldn’t find common parameters for a TLS handshake. Usually it is the server can’t support the proposed ciphersuites, however it could be other cases such as unsupported eliptic curves and hashes
.", so you should check your credentials and what those servers expect from you, AND, in the specific code you are using, if there is an mbed configuration file, that will have specifics on what it will support, so you have to make it match, or remove that file and expect your OS will solve that.

from mongoose.

markjfisher avatar markjfisher commented on June 3, 2024

Hi! And thanks for the update.

This problem is happening on my and other users machines over different OSes, the only thing we have done is upgrade the mongoose client code, which is why I brought it here.

I had seen it's reporting a fatal error, 21 response being a MSG_ALERT, 22 being MSG_HANDSHAKE, and that 40 represents ERR_SSL_VERSION_OR_CIPHER_MISMATCH. The logs show the earlier negotiation of ciphers is identical between the 2 endpoints I have logged, showing all 104 ciphers are the same.

I'm really trying to narrow down why only upgrading mongoose client causes this issue, downgrading fixes it. No mbed tls changes (as we're just using the system installed libs), just mongoose.c/h file changes in our code.

Our code is simply trying to request JSON served over https, there's no auth/credentials involved here. It's as simple as can be.

I'll continue to dig into this, I'm trying to reproduce with a local nginx as a reverse proxy and controlling tls versions.

from mongoose.

scaprile avatar scaprile commented on June 3, 2024

Hmm... that's weird.
There's been a lot of re-write in the TLS interface to make room for our own stack, and we've been favoring embedded-friendly features (elliptic curves and lighter-weight algorithms). I'm not familiar with pre-7.6.
So you have a CA cert and you just validate it, but there is a cypher exchange anyway and that is failing... Make sure your cert file contents start with dashes, and check how you pass that cert in options. It should fail in a different way if that was the case, but, it doesn't harm to try.

from mongoose.

markjfisher avatar markjfisher commented on June 3, 2024

Also apologies, we are using 7.13, not 7.11 as I reported, I'll update the post.

The ca.pem file is also constant between the scenarios too, it's well formatted and works with curl specified directly:

curl -vvv --cacert data/webui/common/ca.pem https://5card.carr-designs.com/state?table=blue\&player=THOMC

from mongoose.

scaprile avatar scaprile commented on June 3, 2024

I just tried your Google endpoint in my Linux with both OpenSSL and MbedTLS and it works with no hassle. Looks like this is a problem with your specific version of MbedTLS.
We've been very reluctant to rely on OS libraries, for a while we've been building against specific versions compiled on-the-fly. I think a quick fix for your issue can be to do that. In examples/http-client:

$ make mbedtls
$ make CFLAGS_EXTRA="-DMG_TLS=MG_TLS_MBED mbedtls/library/libmbedtls.a mbedtls/library/libmbedcrypto.a mbedtls/library/libmbedx509.a"

from mongoose.

CaptainTeemo avatar CaptainTeemo commented on June 3, 2024

@markjfisher hello Mark,
I just got the same issue, could you please share the details about how it was fixed?

from mongoose.

scaprile avatar scaprile commented on June 3, 2024

@CaptainTeemo :

Very sorry for the noise. It turns out we were not reading the certificate correctly with the upgrade in clients, yet that was somehow working with some sites but not others.

This is not a Mongoose issue, please do not do necroposting nor thread hijacking,
If you have an actual issue, please open an issue, honor the issue template so we can know your scenario and reproduce the issue if necessary, and let us know exactly what you are doing
Please follow the guidelines in the documentation, examples and tutorials available.

from mongoose.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.