OSSL_IETF_ATTR_SYNTAX(3ossl)
β¨ OSSL_IETF_ATTR_SYNTAX β¨ (3ossl)
okay so bestie, this is the <openssl/x509_acert.h> girlies' page β welcome to the 3ossl manual, we're talking about OSSL_IETF_ATTR_SYNTAX and all her little accessor besties π
π 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 π«Ά
πΈ 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 π¦
okay so OSSL_IETF_ATTR_SYNTAX is an opaque structure β like, you can't peek inside, she's mysterious π
β and she represents the IetfAttrSyntax type defined in RFC 5755 (Section 4.4), for use as an AttributeValue. iconic behavior tbh.
OSSL_IETF_ATTR_SYNTAX_get0_policyAuthority() and OSSL_IETF_ATTR_SYNTAX_set0_policyAuthority() get and set the policyAuthority field of the structure. β οΈ lowkey important: both routines act on internal pointers of the structure and must not be freed by the application β do NOT try to free them yourself bestie, that's not your job, hands off π
An OSSL_IETF_ATTR_SYNTAX object also holds a sequence of values. so:
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. and yes β the caller should free thedataafter use π«Ά
OSSL_IETF_ATTR_SYNTAX_get0_value() will return the value at a specific index ind in the sequence, or NULL on error. If type is not NULL, the type of the value will be written to this location π
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.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. slay or flop, no in-between π
β HISTORY β
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(), and OSSL_IETF_ATTR_SYNTAX_add1_value() were added in OpenSSL 3.4 π
π 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>.
fr fr that's the whole page, no gatekeeping π
k that's a wrap bestie, tysm for reading π«Ά this was 3.5.0, dated 2026-09-25, and it's the OSSL_IETF_ATTR_SYNTAX(3ossl) manual page β mwah, go forth and parse those attribute values π
β¨
π¦ where this page comes from
- opensuse-leap 16.0: openssl-3-doc 3.5.0-160000.11.1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms