OSSL_IETF_ATTR_SYNTAX(3ossl)
πΈ OSSL_IETF_ATTR_SYNTAX β the 3ossl manual page, bestie edition π
okay so welcome to OSSL_IETF_ATTR_SYNTAX(3ossl), the OpenSSL manpage for the accessors and setters that let you poke at an OSSL_IETF_ATTR_SYNTAX object. it's giving certificate-attribute realness, and honestly? we're obsessed. let's get into it π«Ά
β¨ NAME β¨
OSSL_IETF_ATTR_SYNTAX, OSSL_IETF_ATTR_SYNTAX_get0_policyAuthority, OSSL_IETF_ATTR_SYNTAX_set0_policyAuthority, OSSL_IETF_ATTR_SYNTAX_get_value_num, OSSL_IETF_ATTR_SYNTAX_get0_value, OSSL_IETF_ATTR_SYNTAX_add1_value β the accessors and setters for OSSL_IETF_ATTR_SYNTAX. that's the whole squad, no cap π
π SYNOPSIS π
#include <openssl/x509_acert.h>
typedef struct OSSL_IETF_ATTR_SYNTAX_st OSSL_IETF_ATTR_SYNTAX;
const GENERAL_NAMES *
OSSL_IETF_ATTR_SYNTAX_get0_policyAuthority(const OSSL_IETF_ATTR_SYNTAX *a);
void OSSL_IETF_ATTR_SYNTAX_set0_policyAuthority(OSSL_IETF_ATTR_SYNTAX *a,
GENERAL_NAMES *names);
int OSSL_IETF_ATTR_SYNTAX_get_value_num(const OSSL_IETF_ATTR_SYNTAX *a);
void *OSSL_IETF_ATTR_SYNTAX_get0_value(const OSSL_IETF_ATTR_SYNTAX *a,
int ind, int *type);
int OSSL_IETF_ATTR_SYNTAX_add1_value(OSSL_IETF_ATTR_SYNTAX *a, int type,
void *data);
like. look at that include. <openssl/x509_acert.h>. iconic β¨
π DESCRIPTION π
OSSL_IETF_ATTR_SYNTAX is an opaque structure (so don't go poking at its internals, bestie, it's not that kind of relationship π) that represents the IetfAttrSyntax type defined in RFC 5755 (Section 4.4) β and you'd use it as an AttributeValue. yes, fr fr, that's the vibe.
π policyAuthority stuff π
OSSL_IETF_ATTR_SYNTAX_get0_policyAuthority() and OSSL_IETF_ATTR_SYNTAX_set0_policyAuthority() get and set the policyAuthority field of the structure.
β οΈ both routines act on internal pointers of the structure, so the application must NOT free them. do not. I'm serious. put the free() down π
π¦ the value sequence π¦
An OSSL_IETF_ATTR_SYNTAX object also holds a sequence of values. here's the tea:
OSSL_IETF_ATTR_SYNTAX_get_value_num()returns the number of values in the sequence.OSSL_IETF_ATTR_SYNTAX_add1_value()adds a copy ofdataof a specifiedtypeto the sequence.- and yes, the caller should free the
dataafter use β it's a copy, so the original is still yours to clean up π
- and yes, the caller should free the
OSSL_IETF_ATTR_SYNTAX_get0_value()will return the value at a specific indexindin the sequence, orNULLon error.- if
typeis notNULL, the type of the value gets written to that location. handing you the receipts π
- if
β the types, the types β
the type of the values stored in the OSSL_IETF_ATTR_SYNTAX value sequence is one of the following:
OSSL_IETFAS_OCTETSβ a pointer to anASN1_OCTET_STRINGOSSL_IETFAS_OIDβ a pointer to anASN1_OBJECTOSSL_IETFAS_STRINGβ a pointer to anASN1_UTF8STRING
three types, three moods, all valid πΈ
π RETURN VALUES π
OSSL_IETF_ATTR_SYNTAX_get0_policyAuthority()returns a pointer to aGENERAL_NAMESstructure, orNULLif the policy authority has not been set. (it's not ghosting you, it's just empty π)OSSL_IETF_ATTR_SYNTAX_get_value_num()returns the number of entries in the value sequence, or-1on error.OSSL_IETF_ATTR_SYNTAX_get0_value()returns a pointer to the value at the given index, orNULLif the index is out of range.OSSL_IETF_ATTR_SYNTAX_add1_value()returns1on success and0on failure.
π§ HISTORY π§
these functions all showed up in OpenSSL 3.4, and honestly, glow-up behavior:
OSSL_IETF_ATTR_SYNTAX_get0_policyAuthority()OSSL_IETF_ATTR_SYNTAX_set0_policyAuthority()OSSL_IETF_ATTR_SYNTAX_get_value_num()OSSL_IETF_ATTR_SYNTAX_get0_value()OSSL_IETF_ATTR_SYNTAX_add1_value()
π COPYRIGHT π
Copyright 2021-2024 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>.
okay that's the whole page, bestie, you ate that π go forth and set your policy authorities responsibly. this was OpenSSL 3.5.9, dated 2026-09-29, and the manual name is OSSL_IETF_ATTR_SYNTAX(3ossl). mwah πβ¨
π¦ where this page comes from
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms