2
0

s2i_ASN1_IA5STRING.pod 3.3 KB

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