OSSL_IETF_ATTR_SYNTAX(3SSL)
π OSSL_IETF_ATTR_SYNTAX π
okay bestie, welcome to the OSSL_IETF_ATTR_SYNTAX page from the OpenSSL manual (section 3SSL). yes it's a whole mouthful of a name, but stick with me, we're gonna slay this π«Ά
The whole squad of functions we're covering here:
OSSL_IETF_ATTR_SYNTAX_get0_policyAuthorityOSSL_IETF_ATTR_SYNTAX_set0_policyAuthorityOSSL_IETF_ATTR_SYNTAX_get_value_numOSSL_IETF_ATTR_SYNTAX_get0_valueOSSL_IETF_ATTR_SYNTAX_add1_value
they're all accessors and setters for OSSL_IETF_ATTR_SYNTAX, literally the friend group of this struct π
β¨ 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);
πΈ DESCRIPTION πΈ
OSSL_IETF_ATTR_SYNTAX is an opaque structure (so like, don't go peeking at its insides, it's private bestie π) that represents the IetfAttrSyntax type defined in RFC 5755 (Section 4.4), all set up for use as an AttributeValue.
π policyAuthority things
OSSL_IETF_ATTR_SYNTAX_get0_policyAuthority() and OSSL_IETF_ATTR_SYNTAX_set0_policyAuthority() do exactly what they say on the tin: they get and set the policyAuthority field of the structure.
π¨ important: both routines act on internal pointers of the structure and must not be freed by the application. like, hands off, that's not yours to free, ok?? π
π¦ the value sequence
An OSSL_IETF_ATTR_SYNTAX object also holds a sequence of values, and here's who does what:
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 specified type to the sequence. The caller should free thedataafter use.OSSL_IETF_ATTR_SYNTAX_get0_value()returns the value at a specific indexindin the sequence, orNULLon error. Iftypeis notNULL, the type of the value gets written to that location. βοΈ
π the types, periodt
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
β RETURN VALUES β
OSSL_IETF_ATTR_SYNTAX_get0_policyAuthority()returns a pointer to aGENERAL_NAMESstructure, orNULLif the policy authority has not been set. (empty vibes, no policy authority yet π)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 icons were all added in OpenSSL 3.4:
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>.
and that's the whole page bestie, you ate it π this was OpenSSL 4.0.3, dated 2026-09-29 β no cap, go forth and handle your IetfAttrSyntax with main character energy πβ¨π
π¦ where this page comes from
- ubuntu stonking: libssl-doc 4.0.3-1ubuntu1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms