ERR_LOAD_STRINGS(3)
π ERR_LOAD_STRINGS(3) π
okay bestie, welcome to the Library Functions Manual entry for ERR_LOAD_STRINGS(3) β this one is all about loading arbitrary OpenSSL error strings, and itβs lowkey iconic for that. π¦
πΈ NAME πΈ
ERR_load_strings, ERR_PACK, ERR_get_next_error_library β load arbitrary OpenSSL error strings
β¨ SYNOPSIS β¨
library βlibcryptoβ #include <openssl/err.h>
void
ERR_load_strings(int lib, ERR_STRING_DATA str[]);
unsigned long
ERR_PACK(int lib, int func, int reason);
int
ERR_get_next_error_library(void);
π¦ DESCRIPTION π¦
okay so, ERR_load_strings() registers error strings for library number lib. slay.
str is an array of error string data:
typedef struct ERR_string_data_st {
unsigned long error;
char *string;
} ERR_STRING_DATA;
The error code is generated from the library number and a function and reason code:
error = ERR_PACK(lib, func, reason)
ERR_PACK() is a macro. periodt.
The last entry in the array is {0, NULL}. no cap, thatβs the little end marker vibe.
ERR_get_next_error_library() can be used to assign library numbers to user libraries at runtime. itβs giving βgrab a fresh number bestieβ energy. π
π RETURN VALUES π
ERR_PACK() returns the error code. ERR_get_next_error_library() returns a new library number. fr fr, thatβs the whole return-value situation.
π SEE ALSO π
ERR(3)β yes bestie, go read that one too.
π HISTORY π
ERR_load_strings() and ERR_PACK() first appeared in SSLeay 0.4.4. ERR_get_next_error_library() first appeared in SSLeay 0.9.0. These functions have been available since OpenBSD 2.4. not me being obsessed with a clean little timeline. β
mwah π β source/version Debian, date June 8, 2025, page ERR_LOAD_STRINGS(3). π
π¦ where this page comes from
- alpine 3.24: libressl-doc 4.3.1-r0 Β· custom
- arch rolling: libressl 4.4.0-1 Β· ISC AND custom:OpenSSL
- Copyright (c) 2000 The OpenSSL Project. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms