ERR_PRINT_ERRORS(3SSL)
π ERR_PRINT_ERRORS π
okay bestie, gather round, because this is literally the manual page for ERR_print_errors, ERR_print_errors_fp, and ERR_print_errors_cb β the little trio in the OpenSSL library (3SSL) that spills all your error tea. β¨
πΈ NAME πΈ
ERR_print_errors, ERR_print_errors_fp, ERR_print_errors_cb β print error messages, bestie. that's it. that's the whole job. π
π SYNOPSIS π
#include <openssl/err.h>
void ERR_print_errors(BIO *bp);
void ERR_print_errors_fp(FILE *fp);
void ERR_print_errors_cb(int (*cb)(const char *str, size_t len, void *u),
void *u);
β¨ DESCRIPTION β¨
so ERR_print_errors() is the convenience queen π β she prints the error strings for all the errors that OpenSSL has recorded, straight to bp, and in doing so she empties the error queue. like, drains it. nothing left. gone. π
ERR_print_errors_fp() is the exact same vibe, except the output goes to a FILE. same energy, different destination. π«Ά
ERR_print_errors_cb() is also the same, except that the callback function cb gets called once for each error line, and it receives the string, the length, and the userdata u as its callback parameters. so you get to handle each line yourself. main character callback energy, honestly. π
the error strings come out in this exact format:
[pid]:error:[error code]:[library name]:[function name]:[reason string]:[filename]:[line]:[optional text message]
okay let's break it down because the details matter, no cap:
error codeis an 8 digit hexadecimal number.library name,function name, andreason stringare ASCII text.optional text messageis also ASCII text β if one was set for the respective error code. if not, it's just not there, and that's fine. π
heads up bestie: if there is no text string registered for the given error code, the error string will just contain the numeric code. so don't be confused when you see numbers staring back at you. π
π RETURN VALUES π
ERR_print_errors() and ERR_print_errors_fp() return no values. nope. nothing. they just do the thing and dip. π
(and yeah, notice ERR_print_errors_cb() isn't in that list β the original page only names those two here, so that's exactly what we're saying. π€·)
π¦ SEE ALSO π¦
iykyk, go read those next. obsessed with a linked manpage moment. πβ¨
π 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 whole page, bestie!! π this was OpenSSL 4.0.3, dated 2026-09-29, and yeah β it's giving iconic documentation. slay. periodt. π β¨π«Ά
π¦ 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