OSSL_TRACE_GET_CATEGORY_NUM(3ossl)

πŸ“¦ version 3.5.0, in opensuse-leap 16.0

πŸ’« OSSL_TRACE_GET_CATEGORY_NUM πŸ’«

okay bestie, so this is the 3ossl manual page for two lil functions that let you translate back and forth between trace category names and trace category numbers. That's it. That's the whole vibe. Two functions, one header, zero drama ✨


✨ NAME ✨

OSSL_trace_get_category_num, OSSL_trace_get_category_name β€” the OpenSSL tracing information functions, aka your little name↔number translator gworls πŸŽ€


🌸 SYNOPSIS 🌸

#include <openssl/trace.h>

int OSSL_trace_get_category_num(const char *name);
const char *OSSL_trace_get_category_name(int num);

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


πŸ¦‹ DESCRIPTION πŸ¦‹

  • OSSL_trace_get_category_num() β€” bestie hands you a name string and this function gives you back the category number that corresponds to it. name in, number out, slay πŸ”₯
  • OSSL_trace_get_category_name() β€” the reverse glow-up: you give it a num and it gives you back the category name that corresponds to that number. number in, name out, iconic πŸ‘‘

so like, they're mirrors of each other. icon behavior fr fr 🫢


⭐ RETURN VALUES ⭐

  • OSSL_trace_get_category_num() β€” returns the category number if the name you passed is a recognised category name. and if it's not recognised? you get -1. not a vibe, but at least it's honest πŸ’€
  • OSSL_trace_get_category_name() β€” returns the category name if the num you passed is a recognised category number. and if it's not recognised? you get NULL. same energy, different flavor πŸ™ˆ
ngl, always check your return values before you use them, yeah? -1 and NULL are not real categories, no matter how much you want them to be 😭

🧚 HISTORY 🧚

the OpenSSL Tracing API was added in OpenSSL 3.0 πŸŽ‰ (the original page has a lil typo β€” "ino OpenSSL 3.0" β€” we love her, she's doing her best πŸ’–). so if you're on something older than 3.0, these functions are simply not gonna be there for you. periodt ✨


Copyright 2019 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>.

that's the legal bit and yes you actually have to read it, bestie 🫢

🌈 sign-off 🌈

and that's the page!! brought to you by OpenSSL 3.5.0, dated 2026-09-25 β€” go forth and trace your little heart out, iykyk πŸ¦‹πŸ’…πŸŽ€

πŸ“¦ where this page comes from