OSSL_IETF_ATTR_SYNTAX.3ossl 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. .\" -*- mode: troff; coding: utf-8 -*-
  2. .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43)
  3. .\"
  4. .\" Standard preamble:
  5. .\" ========================================================================
  6. .de Sp \" Vertical space (when we can't use .PP)
  7. .if t .sp .5v
  8. .if n .sp
  9. ..
  10. .de Vb \" Begin verbatim text
  11. .ft CW
  12. .nf
  13. .ne \\$1
  14. ..
  15. .de Ve \" End verbatim text
  16. .ft R
  17. .fi
  18. ..
  19. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
  20. .ie n \{\
  21. . ds C` ""
  22. . ds C' ""
  23. 'br\}
  24. .el\{\
  25. . ds C`
  26. . ds C'
  27. 'br\}
  28. .\"
  29. .\" Escape single quotes in literal strings from groff's Unicode transform.
  30. .ie \n(.g .ds Aq \(aq
  31. .el .ds Aq '
  32. .\"
  33. .\" If the F register is >0, we'll generate index entries on stderr for
  34. .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
  35. .\" entries marked with X<> in POD. Of course, you'll have to process the
  36. .\" output yourself in some meaningful fashion.
  37. .\"
  38. .\" Avoid warning from groff about undefined register 'F'.
  39. .de IX
  40. ..
  41. .nr rF 0
  42. .if \n(.g .if rF .nr rF 1
  43. .if (\n(rF:(\n(.g==0)) \{\
  44. . if \nF \{\
  45. . de IX
  46. . tm Index:\\$1\t\\n%\t"\\$2"
  47. ..
  48. . if !\nF==2 \{\
  49. . nr % 0
  50. . nr F 2
  51. . \}
  52. . \}
  53. .\}
  54. .rr rF
  55. .\" ========================================================================
  56. .\"
  57. .IX Title "OSSL_IETF_ATTR_SYNTAX 3ossl"
  58. .TH OSSL_IETF_ATTR_SYNTAX 3ossl 2025-01-17 3.4.0 OpenSSL
  59. .\" For nroff, turn off justification. Always turn off hyphenation; it makes
  60. .\" way too many mistakes in technical documents.
  61. .if n .ad l
  62. .nh
  63. .SH NAME
  64. OSSL_IETF_ATTR_SYNTAX,
  65. OSSL_IETF_ATTR_SYNTAX_get0_policyAuthority,
  66. OSSL_IETF_ATTR_SYNTAX_set0_policyAuthority,
  67. OSSL_IETF_ATTR_SYNTAX_get_value_num,
  68. OSSL_IETF_ATTR_SYNTAX_get0_value,
  69. OSSL_IETF_ATTR_SYNTAX_add1_value
  70. \&\- Accessors and setters for OSSL_IETF_ATTR_SYNTAX
  71. .SH SYNOPSIS
  72. .IX Header "SYNOPSIS"
  73. .Vb 1
  74. \& #include <openssl/x509_acert.h>
  75. \&
  76. \& typedef struct OSSL_IETF_ATTR_SYNTAX_st OSSL_IETF_ATTR_SYNTAX;
  77. \&
  78. \& const GENERAL_NAMES *
  79. \& OSSL_IETF_ATTR_SYNTAX_get0_policyAuthority(const OSSL_IETF_ATTR_SYNTAX *a);
  80. \& void OSSL_IETF_ATTR_SYNTAX_set0_policyAuthority(OSSL_IETF_ATTR_SYNTAX *a,
  81. \& GENERAL_NAMES *names);
  82. \&
  83. \& int OSSL_IETF_ATTR_SYNTAX_get_value_num(const OSSL_IETF_ATTR_SYNTAX *a);
  84. \& void *OSSL_IETF_ATTR_SYNTAX_get0_value(const OSSL_IETF_ATTR_SYNTAX *a,
  85. \& int ind, int *type);
  86. \& int OSSL_IETF_ATTR_SYNTAX_add1_value(OSSL_IETF_ATTR_SYNTAX *a, int type,
  87. \& void *data);
  88. .Ve
  89. .SH DESCRIPTION
  90. .IX Header "DESCRIPTION"
  91. \&\fBOSSL_IETF_ATTR_SYNTAX\fR is an opaque structure that represents the
  92. IetfAttrSyntax type defined in RFC 5755 (Section 4.4) for use
  93. as an AttributeValue.
  94. .PP
  95. \&\fBOSSL_IETF_ATTR_SYNTAX_get0_policyAuthority()\fR and \fBOSSL_IETF_ATTR_SYNTAX_set0_policyAuthority()\fR
  96. get and set the policyAuthority field of the structure. Both routines act on
  97. internal pointers of the structure and must not be freed by the application.
  98. .PP
  99. An \fBOSSL_IETF_ATTR_SYNTAX\fR object also holds a sequence of values.
  100. \&\fBOSSL_IETF_ATTR_SYNTAX_get_value_num()\fR returns the number of values in the
  101. sequence. \fBOSSL_IETF_ATTR_SYNTAX_add1_value()\fR, adds a copy of \fIdata\fR of a specified
  102. \&\fItype\fR to the sequence. The caller should free the \fIdata\fR after use.
  103. .PP
  104. \&\fBOSSL_IETF_ATTR_SYNTAX_get0_value()\fR will return the value and a specific index \fIind\fR
  105. in the sequence or NULL on error. If \fItype\fR is not NULL, the type of the
  106. value will be written to this location.
  107. .PP
  108. The \fItype\fR of the values stored in the \fBOSSL_IETF_ATTR_SYNTAX\fR value sequence is
  109. one of the following:
  110. .IP OSSL_IETFAS_OCTETS 4
  111. .IX Item "OSSL_IETFAS_OCTETS"
  112. A pointer to an ASN1_OCTET_STRING
  113. .IP OSSL_IETFAS_OID 4
  114. .IX Item "OSSL_IETFAS_OID"
  115. A pointer to an ASN1_OBJECT
  116. .IP OSSL_IETFAS_STRING 4
  117. .IX Item "OSSL_IETFAS_STRING"
  118. A pointer to an ASN1_UTF8STRING
  119. .SH "RETURN VALUES"
  120. .IX Header "RETURN VALUES"
  121. \&\fBOSSL_IETF_ATTR_SYNTAX_get0_policyAuthority()\fR returns an pointer to a
  122. \&\fBGENERAL_NAMES\fR structure or \fBNULL\fR if the policy authority has not been
  123. set.
  124. .PP
  125. \&\fBOSSL_IETF_ATTR_SYNTAX_get_value_num()\fR returns the number of entries in the value
  126. sequence or \-1 on error.
  127. .PP
  128. \&\fBOSSL_IETF_ATTR_SYNTAX_get0_value()\fR returns a pointer to the value at the given index
  129. or NULL if the index is out of range.
  130. .PP
  131. \&\fBOSSL_IETF_ATTR_SYNTAX_add1_value()\fR returns 1 on success and 0 on failure.
  132. .SH HISTORY
  133. .IX Header "HISTORY"
  134. \&\fBOSSL_IETF_ATTR_SYNTAX_get0_policyAuthority()\fR, \fBOSSL_IETF_ATTR_SYNTAX_set0_policyAuthority()\fR,
  135. \&\fBOSSL_IETF_ATTR_SYNTAX_get_value_num()\fR, \fBOSSL_IETF_ATTR_SYNTAX_get0_value()\fR, and
  136. \&\fBOSSL_IETF_ATTR_SYNTAX_add1_value()\fR were added in OpenSSL 3.4.
  137. .SH COPYRIGHT
  138. .IX Header "COPYRIGHT"
  139. Copyright 2021\-2024 The OpenSSL Project Authors. All Rights Reserved.
  140. .PP
  141. Licensed under the Apache License 2.0 (the "License"). You may not use
  142. this file except in compliance with the License. You can obtain a copy
  143. in the file LICENSE in the source distribution or at
  144. <https://www.openssl.org/source/license.html>.