openssl-namedisplay-options.pod 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. =pod
  2. =head1 NAME
  3. openssl-namedisplay-options - Distinguished name display options
  4. =head1 SYNOPSIS
  5. B<openssl>
  6. I<command>
  7. [ I<options> ... ]
  8. [ I<parameters> ... ]
  9. =head1 DESCRIPTION
  10. OpenSSL provides fine-grain control over how the subject and issuer DN's are
  11. displayed.
  12. This is specified by using the B<-nameopt> option, which takes a
  13. comma-separated list of options from the following set.
  14. An option may be preceded by a minus sign, C<->, to turn it off.
  15. The first four option arguments are the most commonly used.
  16. The default value is
  17. C<esc_ctrl,utf8,dump_unknown,dump_der,sep_comma_plus_space,sname>.
  18. =head1 OPTIONS
  19. =head2 Name Format Option Arguments
  20. The DN output format can be fine tuned with the following flags.
  21. =over 4
  22. =item B<compat>
  23. Display the name using an old format from previous OpenSSL versions.
  24. =item B<RFC2253>
  25. Display the name using the format defined in RFC 2253.
  26. It is equivalent to B<esc_2253>, B<esc_ctrl>, B<esc_msb>, B<utf8>,
  27. B<dump_nostr>, B<dump_unknown>, B<dump_der>, B<sep_comma_plus>, B<dn_rev>
  28. and B<sname>.
  29. =item B<oneline>
  30. Display the name in one line, using a format that is more readable
  31. RFC 2253.
  32. It is equivalent to B<esc_2253>, B<esc_ctrl>, B<esc_msb>, B<utf8>,
  33. B<dump_nostr>, B<dump_der>, B<use_quote>, B<sep_comma_plus_space>,
  34. B<space_eq> and B<sname> options.
  35. =item B<multiline>
  36. Display the name using multiple lines.
  37. It is equivalent to B<esc_ctrl>, B<esc_msb>, B<sep_multiline>, B<space_eq>,
  38. B<lname> and B<align>.
  39. =item B<esc_2253>
  40. Escape the "special" characters in a field, as required by RFC 2253.
  41. That is, any of the characters C<,+"E<lt>E<gt>;>, C<#> at the beginning of
  42. a string and leading or trailing spaces.
  43. =item B<esc_2254>
  44. Escape the "special" characters in a field as required by RFC 2254 in a field.
  45. That is, the B<NUL> character and of C<()*>.
  46. =item B<esc_ctrl>
  47. Escape non-printable ASCII characters, codes less than 0x20 (space)
  48. or greater than 0x7F (DELETE). They are displayed using RFC 2253 C<\XX>
  49. notation where B<XX> are the two hex digits representing the character value.
  50. =item B<esc_msb>
  51. Escape any characters with the most significant bit set, that is with
  52. values larger than 127, as described in B<esc_ctrl>.
  53. =item B<use_quote>
  54. Escapes some characters by surrounding the entire string with quotation
  55. marks, C<">.
  56. Without this option, individual special characters are preceded with
  57. a backslash character, C<\>.
  58. =item B<utf8>
  59. Convert all strings to UTF-8 format first as required by RFC 2253.
  60. If the output device is UTF-8 compatible, then using this option (and
  61. not setting B<esc_msb>) may give the correct display of multibyte
  62. characters.
  63. If this option is not set, then multibyte characters larger than 0xFF
  64. will be output as C<\UXXXX> for 16 bits or C<\WXXXXXXXX> for 32 bits.
  65. In addition, any UTF8Strings will be converted to their character form first.
  66. =item B<ignore_type>
  67. This option does not attempt to interpret multibyte characters in any
  68. way. That is, the content octets are merely dumped as though one octet
  69. represents each character. This is useful for diagnostic purposes but
  70. will result in rather odd looking output.
  71. =item B<show_type>
  72. Display the type of the ASN1 character string before the value,
  73. such as C<BMPSTRING: Hello World>.
  74. =item B<dump_der>
  75. Any fields that would be output in hex format are displayed using
  76. the DER encoding of the field.
  77. If not set, just the content octets are displayed.
  78. Either way, the B<#XXXX...> format of RFC 2253 is used.
  79. =item B<dump_nostr>
  80. Dump non-character strings, such as ASN.1 B<OCTET STRING>.
  81. If this option is not set, then non character string types will be displayed
  82. as though each content octet represents a single character.
  83. =item B<dump_all>
  84. Dump all fields. When this used with B<dump_der>, this allows the
  85. DER encoding of the structure to be unambiguously determined.
  86. =item B<dump_unknown>
  87. Dump any field whose OID is not recognised by OpenSSL.
  88. =item B<sep_comma_plus>, B<sep_comma_plus_space>, B<sep_semi_plus_space>,
  89. B<sep_multiline>
  90. Specify the field separators. The first word is used between the
  91. Relative Distinguished Names (RDNs) and the second is between
  92. multiple Attribute Value Assertions (AVAs). Multiple AVAs are
  93. very rare and their use is discouraged.
  94. The options ending in "space" additionally place a space after the separator to make it more readable.
  95. The B<sep_multiline> starts each field on its own line, and uses "plus space"
  96. for the AVA separator.
  97. It also indents the fields by four characters.
  98. The default value is B<sep_comma_plus_space>.
  99. =item B<dn_rev>
  100. Reverse the fields of the DN as required by RFC 2253.
  101. This also reverses the order of multiple AVAs in a field, but this is
  102. permissible as there is no ordering on values.
  103. =item B<nofname>, B<sname>, B<lname>, B<oid>
  104. Specify how the field name is displayed.
  105. B<nofname> does not display the field at all.
  106. B<sname> uses the "short name" form (CN for commonName for example).
  107. B<lname> uses the long form.
  108. B<oid> represents the OID in numerical form and is useful for
  109. diagnostic purpose.
  110. =item B<align>
  111. Align field values for a more readable output. Only usable with
  112. B<sep_multiline>.
  113. =item B<space_eq>
  114. Places spaces round the equal sign, C<=>, character which follows the field
  115. name.
  116. =back
  117. =head1 COPYRIGHT
  118. Copyright 2000-2025 The OpenSSL Project Authors. All Rights Reserved.
  119. Licensed under the Apache License 2.0 (the "License"). You may not use
  120. this file except in compliance with the License. You can obtain a copy
  121. in the file LICENSE in the source distribution or at
  122. L<https://www.openssl.org/source/license.html>.
  123. =cut