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