Skip to main content

gnutls-cli: Notes

tuyendq@2:~$ apt search gnutls-cli
Sorting... Done
Full Text Search... Done
gnutls-bin/bionic-updates 3.5.18-1ubuntu1.4 amd64
  GNU TLS library - commandline utilities

tuyendq@2:~$
sudo apt install gnutls-bin
tuyendq@2:~$ gnutls-cli -p 465 smtp.gmail.com
Processed 129 CA certificate(s).
Resolving 'smtp.gmail.com:465'...
Connecting to '142.250.101.108:465'...
- Certificate type: X.509
- Got a certificate list of 2 certificates.
- Certificate[0] info:
 - subject `CN=smtp.gmail.com,O=Google LLC,L=Mountain View,ST=California,C=US', issuer `CN=GTS CA 1O1,O=Google Trust Services,C=US', serial 0x5645821e254664ef0300000000cbf788, EC/ECDSA key 256 bits, signed using RSA-SHA256, activated `2021-04-13 10:15:55 UTC', expires `2021-07-06 10:15:54 UTC', pin-sha256="xY1LhV4Bv7CqYxSWp+DZql+kGylKKwwuJvuSWVSK8pU="
        Public Key ID:
                sha1:94589a11b6767e7ba6ac53c924f32f78ab9101cf
                sha256:c58d4b855e01bfb0aa631496a7e0d9aa5fa41b294a2b0c2e26fb9259548af295
        Public Key PIN:
                pin-sha256:xY1LhV4Bv7CqYxSWp+DZql+kGylKKwwuJvuSWVSK8pU=
        Public key's random art:
                +--[SECP256R1]----+
                |      +..        |
                |     . B .       |
                |      B +        |
                |     . Bo .      |
                |        E*..     |
                |         +=.     |
                |        oo..o    |
                |        ooo+.    |
                |        o=+o     |
                +-----------------+

- Certificate[1] info:
 - subject `CN=GTS CA 1O1,O=Google Trust Services,C=US', issuer `CN=GlobalSign,O=GlobalSign,OU=GlobalSign Root CA - R2', serial 0x01e3b49aa18d8aa981256950b8, RSA key 2048 bits, signed using RSA-SHA256, activated `2017-06-15 00:00:42 UTC', expires `2021-12-15 00:00:42 UTC', pin-sha256="YZPgTZ+woNCCCIW3LH2CxQeLzB/1m42QcCTBSdgayjs="
- Status: The certificate is trusted.
- Description: (TLS1.2)-(ECDHE-ECDSA-SECP256R1)-(CHACHA20-POLY1305)
- Session ID: 02:60:99:6C:0E:AA:E6:43:16:06:AC:06:B1:94:6E:85:7F:76:AF:B3:E1:A3:B0:F8:FF:8A:BD:63:40:43:53:99
- Ephemeral EC Diffie-Hellman parameters
 - Using curve: SECP256R1
 - Curve size: 256 bits
- Version: TLS1.2
- Key Exchange: ECDHE-ECDSA
- Server Signature: ECDSA-SHA256
- Cipher: CHACHA20-POLY1305
- MAC: AEAD
- Compression: NULL
- Options: extended master secret, safe renegotiation,
- Handshake was completed

- Simple Client Mode:

220 smtp.gmail.com ESMTP y14sm2123044pjn.48 - gsmtp
ehlo tuyen
250-smtp.gmail.com at your service, [173.82.240.78]
250-SIZE 35882577
250-8BITMIME
250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-CHUNKING
250 SMTPUTF8

Popular posts from this blog

Linux command: top

NAME        top - display Linux processes SYNOPSIS        top -hv|-bcHiOSs -d secs -n max -u|U user -p pid -o fld -w [cols]        The traditional switches `-' and whitespace are optional. DESCRIPTION        The  top program provides a dynamic real-time view of a running system.  It can display        system summary information as well as a list of processes or  threads  currently  being        managed  by  the  Linux  kernel.  The types of system summary information shown and the        types, order and size of information displayed for processes are all user  configurable        and that configuration can be made persistent across restarts.        The  program  provides a limited interactive interface for process manipulation ...

Linux command: tail

tail - output the last part of files

Linux command: printenv

printenv - print all or part of environment NAME        printenv - print all or part of environment SYNOPSIS        printenv [OPTION]... [VARIABLE]... DESCRIPTION        Print  the  values  of the specified environment VARIABLE(s).  If no VARIABLE is speci‐        fied, print name and value pairs for them all.        -0, --null               end each output line with NUL, not newline        --help display this help and exit        --version               output version information and exit        NOTE: your shell may have its own version of printenv,  which  usually  supersedes  the        version  described  here.  Please refer to your shell's documentation for d...