OPENSSL-SESS_ID(1ossl)
π openssl-sess_id β the SSL/TLS session handling command π
okay so this is openssl-sess_id from the OpenSSL manual (section 1ossl), and bestie, it's a whole vibe. it looks at a serialized/encoded SSL session structure and can spill the tea on session details (yes, including the master key π) in human-readable form. it's a diagnostic tool though, so it fr fr needs some SSL protocol knowledge to drive properly β most users will not need to use it. not me being the exception, obviously. πββοΈ
β¨ NAME β¨
openssl-sess_id β the SSL/TLS session handling command π
πΈ SYNOPSIS πΈ
openssl sess_id [-help] [-inform DER|PEM] [-outform DER|PEM|NSS] [-in
filename] [-out filename] [-text] [-cert] [-noout] [-context ID]
π¦ DESCRIPTION π¦
so basically this command processes the encoded version of the SSL session structure, and it can optionally print out SSL session details β like, for example, the SSL session master key π β in human readable format. since it's a diagnostic tool that needs some knowledge of the SSL protocol to use properly, most users will not need to use it. iykyk.
the precise format of the data can vary across OpenSSL versions and is not documented. so like... don't come for me if it looks different in your version, okay? π
β¨ OPTIONS β¨
-helpβ prints out a usage message. the classic "what do i even do" button π«Ά-inform DER|PEM,-outform DER|PEM|NSSβ the input and output formats; the default isPEM. seeopenssl-format-options(1)for the full details, bestie. forNSSoutput, the session ID and master key are reported in NSS "keylog" format. π₯-in filenameβ this specifies the input filename to read session information from, or standard input by default.-out filenameβ this specifies the output filename to write session information to, or standard output if this option is not specified.-textβ prints out the various public or private key components in plain text in addition to the encoded version. icon behavior.-certβ if a certificate is present in the session, it will be output using this option. and if the-textoption is also present, then it will be printed out in text form β¨-nooutβ this option prevents output of the encoded version of the session. sometimes less is more π-context IDβ this option can set the session id so the output session information uses the suppliedID. theIDcan be any string of characters. this option won't normally be used. lowkey a niche one.
π OUTPUT π
typical output looks like this, and yes it's giving main character diagnostics:
SSL-Session:
Protocol : TLSv1
Cipher : 0016
Session-ID: 871E62626C554CE95488823752CBD5F3673A3EF3DCE9C67BD916C809914B40ED
Session-ID-ctx: 01000000
Master-Key: A7CEFC571974BE02CAC305269DC59F76EA9F0B180CB6642697A68251F2D2BB57E51DBBB4C7885573192AE9AEE220FACD
Key-Arg : None
Start Time: 948459261
Timeout : 300 (sec)
Verify return code 0 (ok)
these are described below in more detail β¬οΈ
π§ Protocol
this is the protocol in use: TLSv1.3, TLSv1.2, TLSv1.1, TLSv1 or SSLv3.
π§ Cipher
the cipher used β this is the actual raw SSL or TLS cipher code. see the SSL or TLS specifications for more information, because that's a whole other rabbit hole π
π§ Session-ID
the SSL session ID in hex format.
π§ Session-ID-ctx
the session ID context in hex format.
π§ Master-Key
this is the SSL session master key. π (yes, the big one. be careful with it, more on that below.)
π§ Start Time
this is the session start time represented as an integer in standard Unix format.
π§ Timeout
the timeout in seconds.
π§ Verify return code
this is the return code when an SSL client certificate is verified.
π NOTES π
okay so real talk, this is the important part:
since the SSL session output contains the master key, it is possible to read the contents of an encrypted session using this information. therefore, appropriate security precautions should be taken if the information is being output by a "real" application. this is however strongly discouraged and should only be used for debugging purposes.
like... do NOT leave this lying around in prod, bestie. π¨ debugging only. periodt.
π BUGS π
the cipher and start time should be printed out in human readable form. yeah. that's the whole bug. it's giving "we know, we know" π
π«Ά SEE ALSO π«Ά
openssl(1), openssl-ciphers(1), openssl-s_server(1)
π COPYRIGHT π
Copyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.
and that's the page, bestie!! πβ¨ version 3.5.0, dated 2026-09-25 β signed, sealed, delivered by the OpenSSL girlies. slay π
π
π¦ where this page comes from
- opensuse-leap 16.0: openssl-3 3.5.0-160000.11.1 Β· Apache-2.0
- opensuse-leap 16.0: openssl-3 3.5.0-160000.11.1 Β· Apache-2.0
- opensuse-leap 16.0: openssl-3 3.5.0-160000.11.1 Β· Apache-2.0
- opensuse-leap 16.0: openssl-3 3.5.0-160000.11.1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms