s2i_ASN1_IA5STRING.3ossl 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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 "S2I_ASN1_IA5STRING 3ossl"
  58. .TH S2I_ASN1_IA5STRING 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. i2s_ASN1_IA5STRING,
  65. s2i_ASN1_IA5STRING,
  66. i2s_ASN1_INTEGER,
  67. s2i_ASN1_INTEGER,
  68. i2s_ASN1_OCTET_STRING,
  69. s2i_ASN1_OCTET_STRING,
  70. i2s_ASN1_ENUMERATED,
  71. i2s_ASN1_ENUMERATED_TABLE,
  72. i2s_ASN1_UTF8STRING,
  73. s2i_ASN1_UTF8STRING
  74. \&\- convert objects from/to ASN.1/string representation
  75. .SH SYNOPSIS
  76. .IX Header "SYNOPSIS"
  77. .Vb 1
  78. \& #include <openssl/x509v3.h>
  79. \&
  80. \& char *i2s_ASN1_IA5STRING(X509V3_EXT_METHOD *method, ASN1_IA5STRING *ia5);
  81. \& ASN1_IA5STRING *s2i_ASN1_IA5STRING(X509V3_EXT_METHOD *method,
  82. \& X509V3_CTX *ctx, const char *str);
  83. \& char *i2s_ASN1_INTEGER(X509V3_EXT_METHOD *method, const ASN1_INTEGER *a);
  84. \& ASN1_INTEGER *s2i_ASN1_INTEGER(X509V3_EXT_METHOD *method, const char *value);
  85. \& char *i2s_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method,
  86. \& const ASN1_OCTET_STRING *oct);
  87. \& ASN1_OCTET_STRING *s2i_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method,
  88. \& X509V3_CTX *ctx, const char *str);
  89. \& char *i2s_ASN1_ENUMERATED(X509V3_EXT_METHOD *method, const ASN1_ENUMERATED *a);
  90. \& char *i2s_ASN1_ENUMERATED_TABLE(X509V3_EXT_METHOD *method,
  91. \& const ASN1_ENUMERATED *e);
  92. \&
  93. \& char *i2s_ASN1_UTF8STRING(X509V3_EXT_METHOD *method,
  94. \& ASN1_UTF8STRING *utf8);
  95. \& ASN1_UTF8STRING *s2i_ASN1_UTF8STRING(X509V3_EXT_METHOD *method,
  96. \& X509V3_CTX *ctx, const char *str);
  97. .Ve
  98. .SH DESCRIPTION
  99. .IX Header "DESCRIPTION"
  100. These functions convert OpenSSL objects to and from their ASN.1/string
  101. representation. This function is used for \fBX509v3\fR extensions.
  102. .SH NOTES
  103. .IX Header "NOTES"
  104. The letters \fBi\fR and \fBs\fR in \fBi2s\fR and \fBs2i\fR stand for
  105. "internal" (that is, an internal C structure) and string respectively.
  106. So \fBi2s_ASN1_IA5STRING\fR() converts from internal to string.
  107. .PP
  108. It is the caller's responsibility to free the returned string.
  109. In the \fBi2s_ASN1_IA5STRING\fR() function the string is copied and
  110. the ownership of the original string remains with the caller.
  111. .SH "RETURN VALUES"
  112. .IX Header "RETURN VALUES"
  113. \&\fBi2s_ASN1_IA5STRING\fR() returns the pointer to a IA5 string
  114. or NULL if an error occurs.
  115. .PP
  116. \&\fBs2i_ASN1_IA5STRING\fR() return a valid
  117. \&\fBASN1_IA5STRING\fR structure or NULL if an error occurs.
  118. .PP
  119. \&\fBi2s_ASN1_INTEGER\fR() return a valid
  120. string or NULL if an error occurs.
  121. .PP
  122. \&\fBs2i_ASN1_INTEGER\fR() returns the pointer to a \fBASN1_INTEGER\fR
  123. structure or NULL if an error occurs.
  124. .PP
  125. \&\fBi2s_ASN1_OCTET_STRING\fR() returns the pointer to a OCTET_STRING string
  126. or NULL if an error occurs.
  127. .PP
  128. \&\fBs2i_ASN1_OCTET_STRING\fR() return a valid
  129. \&\fBASN1_OCTET_STRING\fR structure or NULL if an error occurs.
  130. .PP
  131. \&\fBi2s_ASN1_ENUMERATED\fR() return a valid
  132. string or NULL if an error occurs.
  133. .PP
  134. \&\fBs2i_ASN1_ENUMERATED\fR() returns the pointer to a \fBASN1_ENUMERATED\fR
  135. structure or NULL if an error occurs.
  136. .PP
  137. \&\fBs2i_ASN1_UTF8STRING\fR() return a valid
  138. \&\fBASN1_UTF8STRING\fR structure or NULL if an error occurs.
  139. .PP
  140. \&\fBi2s_ASN1_UTF8STRING\fR() returns the pointer to a UTF\-8 string
  141. or NULL if an error occurs.
  142. .SH HISTORY
  143. .IX Header "HISTORY"
  144. \&\fBi2s_ASN1_UTF8STRING()\fR and \fBs2i_ASN1_UTF8STRING()\fR were made public in OpenSSL 3.0.
  145. .SH COPYRIGHT
  146. .IX Header "COPYRIGHT"
  147. Copyright 2020\-2021 The OpenSSL Project Authors. All Rights Reserved.
  148. .PP
  149. Licensed under the Apache License 2.0 (the "License"). You may not use
  150. this file except in compliance with the License. You can obtain a copy
  151. in the file LICENSE in the source distribution or at
  152. <https://www.openssl.org/source/license.html>.