Giter VIP home page Giter VIP logo

Comments (4)

manuels avatar manuels commented on May 22, 2024

Also see RFC v1.2: https://tools.ietf.org/html/rfc5246#section-6.2.1 under version.
On the other hand RFC v1.3 says it should be ProtocolVersion::TLS_v10 and should be ignored: https://tools.ietf.org/html/draft-ietf-tls-tls13-18#section-5

Confused.

from rustls.

ctz avatar ctz commented on May 22, 2024

For TLS1.3 the key thing to note is that TLS13MessageEncrypter sets the right version here: https://github.com/ctz/rustls/blob/master/src/cipher.rs#L306 and ignores the version in the message.

TLS13MessageDecrypter likewise sets all versions to TLS1.3, which allows the messages to be decoded properly (because the encoding of some variant types changed between TLS1.2 and TLS1.3 and the version is the only way work out the difference -- ugly!)

This is going to be much more of an issue for TLS1.1 support -- so I'm leaving it open.

from rustls.

manuels avatar manuels commented on May 22, 2024

I see, thanks for clarification. But shouldn't this be v1.0 in case of TLS v1.3?

https://tools.ietf.org/html/draft-ietf-tls-tls13-18#section-5.2 says:

The legacy_record_version field is identical
to TLSPlaintext.legacy_record_version and is always 0x0301. Note
that the handshake protocol including the ClientHello and
ServerHello messages authenticates the protocol version, so this
value is redundant.

from rustls.

ctz avatar ctz commented on May 22, 2024

shouldn't this be v1.0 in case of TLS v1.3

On the wire its 1.0, but internally its 1.3. The translation happens in the message encryption/decryption functions.

from rustls.

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.