OPENSSL-SESS_ID(1ossl)

πŸ“¦
version 15.1 Β· 2 versions
, in freebsd 15.1

πŸ’… OPENSSL-SESS_ID(1ossl) β€” like, the whole manual, bestie

okay so this is openssl-sess_id, and yes it lives in the OpenSSL fam (that's the "1ossl" situation in the corner, iykyk). She's a little niche, a little mysterious, and honestly kind of a backstage-pass situation. Let's get into it πŸ’–


✨ 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]

like, that's the whole incantation. copy it exactly, don't freestyle the flags, bestie 🫢


✨ DESCRIPTION ✨

So what does she do? She processes the encoded version of the SSL session structure, and then β€” if you want β€” prints out the SSL session details in human readable format. And by "details" I mean things like the SSL session master key. Yes, that master key. πŸ‘€

Real talk tho: this is a diagnostic tool and it needs you to know a little something about the SSL protocol to use it properly. Most users will not need to use it. Not me being mean, that's literally what the page says πŸ’€

Also, the precise format of the data can vary across OpenSSL versions β€” and it is not documented. So if it looks different on a different version, that's not a bug, that's just her being mysterious ✨


✨ OPTIONS ✨

  • -help β€” prints out a usage message. the classic "help me help you" moment πŸ’…
  • -inform DER|PEM, -outform DER|PEM|NSS β€” the input and output formats. the default is PEM. for the full scoop, go see openssl-format-options(1).

and for NSS output specifically: the session ID and master key are reported in NSS "keylog" format. cute, right? πŸŽ€

  • -in filename β€” picks the input filename to read session information from. if you don't say anything, it reads from standard input 🫢
  • -out filename β€” picks the output filename to write session information to. if this option is not specified, it goes to standard output 🌸
  • -text β€” prints out the various public or private key components in plain text, in addition to the encoded version. so you get both, bestie πŸ’–
  • -cert β€” if a certificate is present in the session, it gets output with this option. and if the -text option is also present, then it gets printed out in text form too πŸ”₯
  • -noout β€” prevents output of the encoded version of the session. the "no <out>, thanks" of it all πŸ™ˆ
  • -context ID β€” this one can set the session id, so the output session information uses the supplied ID. the ID can be any string of characters. this option won't normally be used. lowkey just sitting there for the edge cases πŸ‘‘

✨ OUTPUT ✨

Typical output looks like this β€” and I'm giving it to you character for character, no cap:

 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. that's the lineup πŸ¦‹

Cipher

the cipher used. and this is the actual raw SSL or TLS cipher code β€” see the SSL or TLS specifications for more information. she's not translating for you, she's giving you the raw digits πŸ’…

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. yeah. the key. 🌈

Start Time

this is the session start time, represented as an integer in standard Unix format. so like, an epoch number, not a cute little date string 😭

Timeout

the timeout, in seconds. ⏳

Verify return code

this is the return code when an SSL client certificate is verified. πŸ”


✨ NOTES ✨

⚠️ okay this part is important, so listen up: 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. and this is however strongly discouraged β€” it should only be used for debugging purposes. fr fr. no playing around with this one πŸ”₯

✨ BUGS ✨

The cipher and start time should be printed out in human readable form. that's it, that's the bug list πŸ’€ she's honest about it at least πŸ™ˆ


✨ SEE ALSO ✨

go read those next, bestie, the lore runs deep πŸ“šπŸ’œ


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>.


okay and that's the whole page!! πŸ’– this was version 3.5.6, dated 2026-04-07, and the manpage name is OPENSSL-SESS_ID(1ossl) β€” write it down, cite it in your essay, whatever you need. mwah πŸ«Άβœ¨πŸŽ€

πŸ“¦ where this page comes from