OSSL_ITEM(3ossl)

πŸ“¦
version 15.1 Β· 3 versions
, in freebsd 15.1

πŸ’… OSSL_ITEM πŸ’…

okay so this is a page from the OpenSSL manual, section 3ossl β€” yes bestie, we're in the library-functions-and-types section, buckle up πŸŽ€


✨ NAME ✨

OSSL_ITEM β€” the OpenSSL Core type for generic itemized data. it's giving "mystery box but make it C" πŸ“¦


🌸 SYNOPSIS 🌸

#include <openssl/core.h>

typedef struct ossl_item_st OSSL_ITEM;
struct ossl_item_st {
    unsigned int id;
    void *ptr;
};

like, that's the whole struct. two fields. she's minimal, she's iconic, she ate πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so the tea is: this type is literally just a tuple of an integer and a pointer. that's it. that's the vibe. it's a generic type that gets used as a generic descriptor, and its exact meaning? completely up to whoever's using it. no cap, it's the "you decide what it means" type 😌

arrays of this type get passed back and forth between the OpenSSL libraries and the providers β€” and here's the important bit, bestie, listen up: those arrays must be terminated with a tuple where the integer is zero and the pointer is NULL. like a little end-of-list flag so nobody reads past the end and has a bad time πŸ™ˆ

right now it's mainly used for the return value of the provider's error reason strings array β€” go read "Provider Functions" over in provider-base(7) if you wanna see it in the wild 🧚


πŸ’– SEE ALSO πŸ’–

the whole friend group, together at last 🫢


⭐ HISTORY ⭐

OSSL_ITEM was added in OpenSSL 3.0 β€” so she's a 3.0 girlie, don't go looking for her in older versions 😭


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

like, please actually read the license, it's not decorative 🫢


and that's the whole page! this edition is from 3.5.6, dated 2026-04-07, and it's OSSL_ITEM(3ossl) β€” mwah, go write some providers bestie πŸ’œβœ¨πŸŽ€

πŸ“¦ where this page comes from