RSA_PRINT(3ossl)

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

πŸ’… RSA_PRINT(3ossl) β€” the OpenSSL one, bestie

okay so this is a whole family of printing functions from OpenSSL (RSA_PRINT(3ossl), iykyk) and the headline is: they're all deprecated 😭 but you still gotta know what they do, so let's go 🫢


🌸 NAME 🌸

RSA_print, RSA_print_fp, DSAparams_print, DSAparams_print_fp, DSA_print, DSA_print_fp, DHparams_print, DHparams_print_fp β€” they print cryptographic parameters ✨


πŸŽ€ SYNOPSIS πŸŽ€

#include <openssl/rsa.h>

so like, the following functions have been deprecated since OpenSSL 3.0, and you can hide them entirely by defining OPENSSL_API_COMPAT with a suitable version value β€” see openssl_user_macros(7):

int RSA_print(BIO *bp, const RSA *x, int offset);
int RSA_print_fp(FILE *fp, const RSA *x, int offset);
#include <openssl/dsa.h>

again, deprecated since OpenSSL 3.0, hideable with OPENSSL_API_COMPAT set to a suitable version value, see openssl_user_macros(7):

int DSAparams_print(BIO *bp, const DSA *x);
int DSAparams_print_fp(FILE *fp, const DSA *x);
int DSA_print(BIO *bp, const DSA *x, int offset);
int DSA_print_fp(FILE *fp, const DSA *x, int offset);
#include <openssl/dh.h>

same story bestie β€” deprecated since OpenSSL 3.0, hideable by defining OPENSSL_API_COMPAT with a suitable version value, see openssl_user_macros(7):

int DHparams_print(BIO *bp, DH *x);
int DHparams_print_fp(FILE *fp, const DH *x);

✨ DESCRIPTION ✨

🚨 real talk: all of the functions described on this page are deprecated. Applications should instead use EVP_PKEY_print_params(3) and EVP_PKEY_print_private(3). no cap, that's the move πŸ’…

so what do these do? they print a human-readable hexadecimal output of the components of the RSA key, DSA parameters or key, or DH parameters β€” and that output goes to bp or fp πŸ–¨οΈβœ¨

and the little glow-up detail: the output lines are indented by offset spaces. yes, offset spaces, exactly. cute indent energy πŸŽ€


πŸ¦‹ RETURN VALUES πŸ¦‹

  • DSAparams_print(), DSAparams_print_fp(), DSA_print(), and DSA_print_fp() return 1 for success, and 0 or a negative value for failure πŸ’€
  • DHparams_print() and DHparams_print_fp() return 1 on success, 0 on error πŸ™ˆ

🌈 SEE ALSO 🌈


πŸ‘‘ HISTORY πŸ‘‘

all of these functions were deprecated in OpenSSL 3.0. that's the whole lore, periodt ⭐


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 that's the whole page bestie, go forth and use EVP_PKEY_print_params(3) instead fr fr πŸ’–βœ¨

πŸŽ€ sign-off: this was RSA_PRINT(3ossl) from OpenSSL 3.5.6, dated 2026-04-07 β€” mwah, slay, bye πŸ«ΆπŸ’…

πŸ“¦ where this page comes from