Skip to content
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

TLS: Initial support for printing TLS PDUs #990

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ryandoyle
Copy link

Supports printing plain text parts of TLS. Basic record layer printing is
supported as well as more complex printing of handshake and alert protocols,
specifically ClientHello and ServerHello - these will print interesting parts
of TLS extensions like ALPN, SNI and the underlying TLS version negotiated.

As we don't keep state and TLS is stateful, this printer does assume/
is limited by this, specifically:

  • TLS version is printed as per record layer version. In the case of TLS 1.3,
    the record layer is set to TLS 1.2, and the supported_versions extension is
    used to negotiate the actual version used.
  • Alert and Handshake protocol messages can be plain text or encrypted,
    depending on if a crypto context is established. This printer doesn't know
    this, so we try to detect it and print "(likely encrypted)".

@infrastation
Copy link
Member

Thank you for preparing these changes. Apparently, uint does not belong to the Windows C compiler vernacular. The type needs to be either u_int or unsigned.

Supports printing plain text parts of TLS. Basic record layer printing is
supported as well as more complex printing of handshake and alert protocols,
specifically ClientHello and ServerHello - these will print interesting parts
of TLS extensions like ALPN, SNI and the underlying TLS version negotiated.

As we don't keep state and TLS is stateful, this printer does assume/
is limited by this, specifically:
 * TLS version is printed as per record layer version. In the case of TLS 1.3,
   the record layer is set to TLS 1.2, and the supported_versions extension is
   used to negotiate the actual version used.
 * Alert and Handshake protocol messages can be plain text or encrypted,
   depending on if a crypto context is established. This printer doesn't know
   this, so we try to detect it and print "(likely encrypted)".
@ryandoyle
Copy link
Author

Cheers @infrastation, fixed 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants