xref: /netbsd-src/crypto/external/bsd/openssl/dist/doc/man3/s2i_ASN1_IA5STRING.pod (revision b0d1725196a7921d003d2c66a14f186abda4176b)
1*b0d17251Schristos=pod
2*b0d17251Schristos
3*b0d17251Schristos=head1 NAME
4*b0d17251Schristos
5*b0d17251Schristosi2s_ASN1_IA5STRING,
6*b0d17251Schristoss2i_ASN1_IA5STRING,
7*b0d17251Schristosi2s_ASN1_INTEGER,
8*b0d17251Schristoss2i_ASN1_INTEGER,
9*b0d17251Schristosi2s_ASN1_OCTET_STRING,
10*b0d17251Schristoss2i_ASN1_OCTET_STRING,
11*b0d17251Schristosi2s_ASN1_ENUMERATED,
12*b0d17251Schristosi2s_ASN1_ENUMERATED_TABLE,
13*b0d17251Schristosi2s_ASN1_UTF8STRING,
14*b0d17251Schristoss2i_ASN1_UTF8STRING
15*b0d17251Schristos- convert objects from/to ASN.1/string representation
16*b0d17251Schristos
17*b0d17251Schristos=head1 SYNOPSIS
18*b0d17251Schristos
19*b0d17251Schristos #include <openssl/x509v3.h>
20*b0d17251Schristos
21*b0d17251Schristos char *i2s_ASN1_IA5STRING(X509V3_EXT_METHOD *method, ASN1_IA5STRING *ia5);
22*b0d17251Schristos ASN1_IA5STRING *s2i_ASN1_IA5STRING(X509V3_EXT_METHOD *method,
23*b0d17251Schristos                                   X509V3_CTX *ctx, const char *str);
24*b0d17251Schristos char *i2s_ASN1_INTEGER(X509V3_EXT_METHOD *method, const ASN1_INTEGER *a);
25*b0d17251Schristos ASN1_INTEGER *s2i_ASN1_INTEGER(X509V3_EXT_METHOD *method, const char *value);
26*b0d17251Schristos char *i2s_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method,
27*b0d17251Schristos                            const ASN1_OCTET_STRING *oct);
28*b0d17251Schristos ASN1_OCTET_STRING *s2i_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method,
29*b0d17251Schristos                                         X509V3_CTX *ctx, const char *str);
30*b0d17251Schristos char *i2s_ASN1_ENUMERATED(X509V3_EXT_METHOD *method, const ASN1_ENUMERATED *a);
31*b0d17251Schristos char *i2s_ASN1_ENUMERATED_TABLE(X509V3_EXT_METHOD *method,
32*b0d17251Schristos                                const ASN1_ENUMERATED *e);
33*b0d17251Schristos
34*b0d17251Schristos char *i2s_ASN1_UTF8STRING(X509V3_EXT_METHOD *method,
35*b0d17251Schristos                           ASN1_UTF8STRING *utf8);
36*b0d17251Schristos ASN1_UTF8STRING *s2i_ASN1_UTF8STRING(X509V3_EXT_METHOD *method,
37*b0d17251Schristos                                      X509V3_CTX *ctx, const char *str);
38*b0d17251Schristos
39*b0d17251Schristos=head1 DESCRIPTION
40*b0d17251Schristos
41*b0d17251SchristosThese functions convert OpenSSL objects to and from their ASN.1/string
42*b0d17251Schristosrepresentation. This function is used for B<X509v3> extensions.
43*b0d17251Schristos
44*b0d17251Schristos=head1 NOTES
45*b0d17251Schristos
46*b0d17251SchristosThe letters B<i> and B<s> in B<i2s> and B<s2i> stand for
47*b0d17251Schristos"internal" (that is, an internal C structure) and string respectively.
48*b0d17251SchristosSo B<i2s_ASN1_IA5STRING>() converts from internal to string.
49*b0d17251Schristos
50*b0d17251SchristosIt is the caller's responsibility to free the returned string.
51*b0d17251SchristosIn the B<i2s_ASN1_IA5STRING>() function the string is copied and
52*b0d17251Schristosthe ownership of the original string remains with the caller.
53*b0d17251Schristos
54*b0d17251Schristos=head1 RETURN VALUES
55*b0d17251Schristos
56*b0d17251SchristosB<i2s_ASN1_IA5STRING>() returns the pointer to a IA5 string
57*b0d17251Schristosor NULL if an error occurs.
58*b0d17251Schristos
59*b0d17251SchristosB<s2i_ASN1_IA5STRING>() return a valid
60*b0d17251SchristosB<ASN1_IA5STRING> structure or NULL if an error occurs.
61*b0d17251Schristos
62*b0d17251SchristosB<i2s_ASN1_INTEGER>() return a valid
63*b0d17251Schristosstring or NULL if an error occurs.
64*b0d17251Schristos
65*b0d17251SchristosB<s2i_ASN1_INTEGER>() returns the pointer to a B<ASN1_INTEGER>
66*b0d17251Schristosstructure or NULL if an error occurs.
67*b0d17251Schristos
68*b0d17251SchristosB<i2s_ASN1_OCTET_STRING>() returns the pointer to a OCTET_STRING string
69*b0d17251Schristosor NULL if an error occurs.
70*b0d17251Schristos
71*b0d17251SchristosB<s2i_ASN1_OCTET_STRING>() return a valid
72*b0d17251SchristosB<ASN1_OCTET_STRING> structure or NULL if an error occurs.
73*b0d17251Schristos
74*b0d17251SchristosB<i2s_ASN1_ENUMERATED>() return a valid
75*b0d17251Schristosstring or NULL if an error occurs.
76*b0d17251Schristos
77*b0d17251SchristosB<s2i_ASN1_ENUMERATED>() returns the pointer to a B<ASN1_ENUMERATED>
78*b0d17251Schristosstructure or NULL if an error occurs.
79*b0d17251Schristos
80*b0d17251SchristosB<s2i_ASN1_UTF8STRING>() return a valid
81*b0d17251SchristosB<ASN1_UTF8STRING> structure or NULL if an error occurs.
82*b0d17251Schristos
83*b0d17251SchristosB<i2s_ASN1_UTF8STRING>() returns the pointer to a UTF-8 string
84*b0d17251Schristosor NULL if an error occurs.
85*b0d17251Schristos
86*b0d17251Schristos=head1 HISTORY
87*b0d17251Schristos
88*b0d17251Schristosi2s_ASN1_UTF8STRING() and s2i_ASN1_UTF8STRING() were made public in OpenSSL 3.0.
89*b0d17251Schristos
90*b0d17251Schristos=head1 COPYRIGHT
91*b0d17251Schristos
92*b0d17251SchristosCopyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.
93*b0d17251Schristos
94*b0d17251SchristosLicensed under the Apache License 2.0 (the "License").  You may not use
95*b0d17251Schristosthis file except in compliance with the License.  You can obtain a copy
96*b0d17251Schristosin the file LICENSE in the source distribution or at
97*b0d17251SchristosL<https://www.openssl.org/source/license.html>.
98*b0d17251Schristos
99*b0d17251Schristos=cut
100