OBJ_FIND_SIGID_ALGS(3)

πŸ“¦ version 4.4.0, in alpine 3.24, arch rolling

πŸ’– NAME πŸ’–

okay so bestie, welcome to OBJ_FIND_SIGID_ALGS(3) straight out of the Library Functions Manual πŸŽ€ β€” and today's main characters are OBJ_find_sigid_algs and OBJ_find_sigid_by_algs, aka your signature algorithm mappings ✨ iykyk.


πŸ¦‹ SYNOPSIS πŸ¦‹

library β€œlibcrypto”
#include <openssl/objects.h>

int
OBJ_find_sigid_algs(int signature, int *pdigest, int *pencryption);

int
OBJ_find_sigid_by_algs(int *psignature, int digest, int encryption);

like, literally just include the header and you're in πŸ’…


🌸 DESCRIPTION 🌸

πŸ’« OBJ_find_sigid_algs()

this one goes looking for the signature algorithm πŸ‘‘ and if it finds it:

  • the matching digest algorithm gets dropped into *pdigest β€” unless pdigest is a NULL pointer, in which case bestie, we simply don't 🫢
  • the matching encryption algorithm gets dropped into *pencryption β€” unless pencryption is a NULL pointer, same deal, no stress πŸ’œ

πŸ’« OBJ_find_sigid_by_algs()

this one runs the lookup the other way around, hunting for the pair (digest, encryption) πŸ” and if that pair is found, the associated signature algorithm goes into *psignature β€” unless psignature is a NULL pointer, in which case it's giving "we move" 😌✨


πŸŽ€ RETURN VALUES πŸŽ€

  • OBJ_find_sigid_algs() β€” returns 1 if a definition of the signature algorithm is found, or 0 if a definition of the signature algorithm is not built into the library 😭
  • OBJ_find_sigid_by_algs() β€” returns 1 if a signature algorithm using the specified digest and encryption algorithms is defined, or 0 if the definition of such an algorithm is not built into the library πŸ’€
fr fr, 0 is not an error message situation, it just means that definition isn't baked in. vibe check passed, lookup not found πŸ™ˆ

⭐ SEE ALSO ⭐

go read these next, they're iconic πŸ‘‘


🌈 HISTORY 🌈

these functions first appeared in OpenSSL 1.0.0 and have been available since OpenBSD 4.9 β€” so they've been serving looks for a minute πŸ’…βœ¨


mwah 🫢 this lil page is from Debian, dated June 9, 2025, and it lives in section 3 (OBJ_FIND_SIGID_ALGS(3)) β€” periodt. πŸ’–

πŸ“¦ where this page comes from