SSL_SESSION_PRINT(3ossl)

πŸ“¦ version 3.5.0, in opensuse-leap 16.0

πŸ’… SSL_SESSION_PRINT(3ossl) β€” the "spill the tea about my TLS session" page

okay so bestie, real talk: this is the ossl corner of the man pages, and it's all about printing out what's inside an SSL_SESSION β€” like a vibe check for your session, but make it text. ✨


🌸 NAME 🌸

SSL_SESSION_print, SSL_SESSION_print_fp, SSL_SESSION_print_keylog β€” literally just printf-ing information about a session, no cap 🫢


πŸŽ€ SYNOPSIS πŸŽ€

#include <openssl/ssl.h>

int SSL_SESSION_print(BIO *fp, const SSL_SESSION *ses);
int SSL_SESSION_print_fp(FILE *fp, const SSL_SESSION *ses);
int SSL_SESSION_print_keylog(BIO *bp, const SSL_SESSION *x);

yes the parameter names differ between the first two and the third, and yes we are keeping them exactly as-is because that's what the header says πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the tea, three ways to say the same session:

  • SSL_SESSION_print() prints summary information about the session you handed it in ses, and it writes all of that out to the BIO fp. It's giving "tell me everything about yourself, but, like, summarized" ✨
  • SSL_SESSION_print_fp() does the exact same thing as SSL_SESSION_print() β€” except instead of a BIO it prints to the FILE fp. same energy, different destination, iconic behavior honestly πŸŽ€
  • SSL_SESSION_print_keylog() prints session information to the provided BIO bp, but in NSS keylog format πŸ‘€ β€” that's the special format, not the pretty-summary format. it's a whole different aesthetic.
heads up bestie: that bp in the description is written as <bp> in the original page β€” same thing, just the BIO you're writing to. no plot twist 🫢

πŸ’€ RETURN VALUES πŸ’€

All three of them β€” SSL_SESSION_print(), SSL_SESSION_print_fp() and SSL_SESSION_print_keylog β€” return 1 on success or 0 on error. that's it. binary. no in-between, fr fr πŸ“


πŸ‘‘ SEE ALSO πŸ‘‘

  • ssl(7) β€” go read it, iykyk πŸ’–

Copyright 2017 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 whole page, bestie β€” no crumbs left behind πŸ’…

signed off with love from 3.5.0, dated 2026-09-25, and brought to you by the SSL_SESSION_PRINT(3ossl) girlies βœ¨πŸŽ€πŸ’œ

πŸ“¦ where this page comes from