summaryrefslogtreecommitdiffstats
path: root/doc/internal
diff options
context:
space:
mode:
authorJonathan M. Wilbur <jonathan@wilbur.space>2024-06-18 11:08:40 +0200
committerTomas Mraz <tomas@openssl.org>2024-06-24 15:33:21 +0200
commitbe5adfd6e36817fe8d5b5793f8c23189dc412045 (patch)
tree13c22ba4cf24d7598d6dffb8dfa517713cecfbc0 /doc/internal
parentFix typos found by codespell (diff)
downloadopenssl-be5adfd6e36817fe8d5b5793f8c23189dc412045.tar.xz
openssl-be5adfd6e36817fe8d5b5793f8c23189dc412045.zip
Support subjectDirectoryAttributes and associatedInformation exts
Added tests for SDA and AI extensions. Added internal function ossl_print_attribute_value() with documentation. Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/24669)
Diffstat (limited to 'doc/internal')
-rw-r--r--doc/internal/man3/ossl_print_attribute_value.pod52
1 files changed, 52 insertions, 0 deletions
diff --git a/doc/internal/man3/ossl_print_attribute_value.pod b/doc/internal/man3/ossl_print_attribute_value.pod
new file mode 100644
index 0000000000..1816f838e9
--- /dev/null
+++ b/doc/internal/man3/ossl_print_attribute_value.pod
@@ -0,0 +1,52 @@
+=pod
+
+=head1 NAME
+
+ossl_print_attribute_value
+- Print an X.500 directory attribute value
+
+=head1 SYNOPSIS
+
+ #include <crypto/x509.h>
+
+ int ossl_print_attribute_value(BIO *out, int obj_nid, const ASN1_TYPE *av, int indent);
+
+=head1 DESCRIPTION
+
+ossl_print_attribute_value() prints an X.500 directory value, which is an
+ASN.1 value and an associated attribute type that informs its interpretation,
+syntax, display characteristics, comparison, sorting, and substring searching
+behaviors, among other things. This attribute type is identified by an ASN.1
+object identifier.
+
+X.500 directory values are used in the relative distinguished names in a
+distinguished name, as seen in the C<subject> and C<issuer> fields of an X.509
+public key certificate. They also appear in the attributes of an X.509
+attribute certificate, as well as in the subjectDirectoryAttributes or
+associatedInformation X.509v3 extensions.
+
+The I<out> argument is a B<BIO> pointer for printing the output. The I<obj_nid>
+argument is the NID of the attribute type object identifier. The ASN.1 value
+itself is passed in I<av> and the level of desired indentation in terms of the
+number of spaces is specified in I<indent>.
+
+This function generally prints values in such a way as to keep them on a single
+line, but this is not always the case. Unrecognized attribute types whose syntax
+is a C<SET> or C<SEQUENCE> will be printed on multiple lines, for instance. Not
+all ASN.1 syntaxes are currently supported, and there is no guarantee for what
+printed values will look like in future versions.
+
+=head1 RETURN VALUES
+
+Returns 1 if it succeeds in printing, and 0 if it failed.
+
+=head1 COPYRIGHT
+
+Copyright 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
+L<https://www.openssl.org/source/license.html>.
+
+=cut