Skip to content

gnutls-cli: reduce printed session information

Nikos Mavrogiannopoulos requested to merge tmp-cli-reduce-output into master

When connecting to a server we were printing a lot of duplicate information that was already part of the "Description" string. No longer print that information unless --verbose is given.

That is, the default output is changed from:

- Status: The certificate is trusted. 
- Description: (TLS1.2)-(ECDHE-X25519)-(ECDSA-SHA256)-(CHACHA20-POLY1305)
- Session ID: EF:07:10:B2:8C:A2:69:2F:DD:CF:D8:91:49:77:7B:76:85:75:4E:DC:08:1F:30:12:50:82:E6:8E:C7:99:E1:0E
- Ephemeral EC Diffie-Hellman parameters
 - Using curve: X25519
 - Curve size: 256 bits
- Version: TLS1.2
- Key Exchange: ECDHE-ECDSA
- Server Signature: ECDSA-SHA256
- Cipher: CHACHA20-POLY1305
- MAC: AEAD
- Options: extended master secret, safe renegotiation,
- Handshake was completed

to:

- Status: The certificate is trusted. 
- Description: (TLS1.2)-(ECDHE-X25519)-(ECDSA-SHA256)-(CHACHA20-POLY1305)
- Session ID: C9:4B:3D:30:EC:FE:5C:D9:A4:59:E6:0D:F7:68:AB:B0:63:05:06:63:21:B4:C4:A3:A6:A1:7E:87:D9:ED:88:E2
- Options: extended master secret, safe renegotiation,
- Handshake was completed

Checklist

  • Code modified for feature
  • Test suite updated with functionality tests
  • Test suite updated with negative tests
  • Documentation updated

Reviewer's checklist:

  • Any issues marked for closing are addressed
  • There is a test suite reasonably covering new functionality or modifications
  • Function naming, parameters, return values, types, etc., are consistent and according to CONTRIBUTION.md
  • This feature/change has adequate documentation added
  • No obvious mistakes in the code
Edited by Dmitry Baryshkov

Merge request reports