RSA_PRINT(3SSL)
β¨ NAME β¨
okay so this is the 3SSL page for the OpenSSL family of print-y functions, and it covers: RSA_print, RSA_print_fp, DSAparams_print, DSAparams_print_fp, DSA_print, DSA_print_fp, DHparams_print, DHparams_print_fp β and what they all do, collectively, is print cryptographic parameters. that's it. that's the function. it prints your crypto stuff in a way humans can read π
πΈ SYNOPSIS πΈ
first up, the RSA girlies:
#include <openssl/rsa.h>
heads up bestie: the functions below have been deprecated since OpenSSL 3.0, and you can hide them entirely by definingOPENSSL_API_COMPATwith a suitable version value β seeopenssl_user_macros(7)for the deets.
int RSA_print(BIO *bp, const RSA *x, int offset);
int RSA_print_fp(FILE *fp, const RSA *x, int offset);
then the DSA corner:
#include <openssl/dsa.h>
same warning, same energy: these have been deprecated since OpenSSL 3.0 too, and yes they can also be hidden entirely by definingOPENSSL_API_COMPATwith a suitable version value, seeopenssl_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);
and finally, DH, the third member of the trio π
#include <openssl/dh.h>
you already know what i'm gonna say: deprecated since OpenSSL 3.0, hideable by definingOPENSSL_API_COMPATwith a suitable version value, checkopenssl_user_macros(7).
int DHparams_print(BIO *bp, DH *x);
int DHparams_print_fp(FILE *fp, const DH *x);
π DESCRIPTION π
okay so real talk: all of the functions described on this page are deprecated. not like "kinda old" deprecated, like actually don't use these for new stuff deprecated. if you're writing an application, the glow-up move is to use EVP_PKEY_print_params(3) and EVP_PKEY_print_private(3) instead. periodt. π
what they actually do β and they do this fine, they're just old β is print a human-readable hexadecimal output of the components of the RSA key, or the DSA parameters or key, or the DH parameters. and where does it go? to bp or to fp. your choice, bestie. β¨
also! the output lines get indented by offset spaces. so cute. so customizable. π
π«Ά RETURN VALUES π«Ά
DSAparams_print(),DSAparams_print_fp(),DSA_print(), andDSA_print_fp()β return1for success, and0or a negative value for failure πDHparams_print()andDHparams_print_fp()β return1on success,0on error. that's it. no weird negative values here, she's simple. π
π SEE ALSO π
EVP_PKEY_print_params(3)β the main character replacement β¨EVP_PKEY_print_private(3)β her sister, also iconic πBN_bn2bin(3)β for the bignum girlies π¦
π HISTORY π
literally all of these functions were deprecated in OpenSSL 3.0. every single one. rip to them but they're different now. π
Β©οΈ 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>.
k that's the whole page bestie, ily, go forth and print your parameters responsibly πβ¨π
this was RSA_PRINT(3SSL) from OpenSSL, version 4.0.3, dated 2026-09-29 β mwah, no cap, slay π«Ά
π¦ where this page comes from
- ubuntu stonking: libssl-doc 4.0.3-1ubuntu1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms