summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/ASN1_STRING_print_ex.3
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/libcrypto/man/ASN1_STRING_print_ex.341
1 files changed, 20 insertions, 21 deletions
diff --git a/src/lib/libcrypto/man/ASN1_STRING_print_ex.3 b/src/lib/libcrypto/man/ASN1_STRING_print_ex.3
index 75a07a0b6e..19ff081f79 100644
--- a/src/lib/libcrypto/man/ASN1_STRING_print_ex.3
+++ b/src/lib/libcrypto/man/ASN1_STRING_print_ex.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: ASN1_STRING_print_ex.3,v 1.3 2016/11/06 15:52:50 jmc Exp $ 1.\" $OpenBSD: ASN1_STRING_print_ex.3,v 1.4 2016/11/06 16:56:46 jmc Exp $
2.\" 2.\"
3.Dd $Mdocdate: November 6 2016 $ 3.Dd $Mdocdate: November 6 2016 $
4.Dt ASN1_STRING_PRINT_EX 3 4.Dt ASN1_STRING_PRINT_EX 3
@@ -33,14 +33,14 @@ These functions output an
33structure. 33structure.
34.Vt ASN1_STRING 34.Vt ASN1_STRING
35is used to 35is used to
36represent all the ASN1 string types. 36represent all the ASN.1 string types.
37.Pp 37.Pp
38.Fn ASN1_STRING_print_ex 38.Fn ASN1_STRING_print_ex
39outputs 39outputs
40.Fa str 40.Fa str
41to 41to
42.Fa out , 42.Fa out ,
43the format is determined by the options 43the format being determined by the options
44.Fa flags . 44.Fa flags .
45.Fn ASN1_STRING_print_ex_fp 45.Fn ASN1_STRING_print_ex_fp
46is identical except it outputs to 46is identical except it outputs to
@@ -56,15 +56,16 @@ but using a different format to
56.Fn ASN1_STRING_print_ex . 56.Fn ASN1_STRING_print_ex .
57It replaces unprintable characters (other than CR, LF) with 57It replaces unprintable characters (other than CR, LF) with
58.Sq \&. . 58.Sq \&. .
59.Sh NOTES 59.Pp
60.Fn ASN1_STRING_print 60.Fn ASN1_STRING_print
61is a legacy function which should be avoided in new 61is a legacy function which should be avoided in new
62applications. 62applications.
63.Pp 63.Pp
64Although there are a large number of options frequently 64Although there are a large number of options,
65.Dv ASN1_STRFLGS_RFC2253
66is often suitable, or on UTF-8 terminals
65.Dv ASN1_STRFLGS_RFC2253 67.Dv ASN1_STRFLGS_RFC2253
66is suitable, or on UTF8 terminals 68and
67.Dv ASN1_STRFLGS_RFC2253 No &
68.Pf ~ Dv ASN1_STRFLGS_ESC_MSB . 69.Pf ~ Dv ASN1_STRFLGS_ESC_MSB .
69.Pp 70.Pp
70The complete set of supported options for 71The complete set of supported options for
@@ -74,7 +75,7 @@ is listed below.
74Various characters can be escaped. 75Various characters can be escaped.
75If 76If
76.Dv ASN1_STRFLGS_ESC_2253 77.Dv ASN1_STRFLGS_ESC_2253
77is set, the characters determined by RFC2253 are escaped. 78is set, the characters determined by RFC 2253 are escaped.
78If 79If
79.Dv ASN1_STRFLGS_ESC_CTRL 80.Dv ASN1_STRFLGS_ESC_CTRL
80is set, control characters are escaped. 81is set, control characters are escaped.
@@ -82,15 +83,14 @@ If
82.Dv ASN1_STRFLGS_ESC_MSB 83.Dv ASN1_STRFLGS_ESC_MSB
83is set, characters with the MSB set are escaped: this option should 84is set, characters with the MSB set are escaped: this option should
84.Em not 85.Em not
85be used if the terminal correctly interprets UTF8 sequences. 86be used if the terminal correctly interprets UTF-8 sequences.
86.Pp 87.Pp
87Escaping takes several forms. 88Escaping takes several forms.
88.Pp 89If the character being escaped is a 16-bit character then the form "\eUXXXX"
89If the character being escaped is a 16 bit character then the form "\eUXXXX"
90is used using exactly four characters for the hex representation. 90is used using exactly four characters for the hex representation.
91If it is 32 bits then "\eWXXXXXXXX" is used using eight characters 91If it is 32 bits then "\eWXXXXXXXX" is used using eight characters
92of its hex representation. 92of its hex representation.
93These forms will only be used if UTF8 conversion is not set (see below). 93These forms will only be used if UTF-8 conversion is not set (see below).
94.Pp 94.Pp
95Printable characters are normally escaped using the backslash 95Printable characters are normally escaped using the backslash
96.Pq Sq \e 96.Pq Sq \e
@@ -104,24 +104,24 @@ representation.
104.Pp 104.Pp
105If 105If
106.Dv ASN1_STRFLGS_UTF8_CONVERT 106.Dv ASN1_STRFLGS_UTF8_CONVERT
107is set, then characters are converted to UTF8 format first. 107is set, then characters are converted to UTF-8 format first.
108If the terminal supports the display of UTF8 sequences then this 108If the terminal supports the display of UTF-8 sequences then this
109option will correctly display multi byte characters. 109option will correctly display multi-byte characters.
110.Pp 110.Pp
111If 111If
112.Dv ASN1_STRFLGS_IGNORE_TYPE 112.Dv ASN1_STRFLGS_IGNORE_TYPE
113is set, then the string type is not interpreted at all: 113is set, then the string type is not interpreted at all:
114everything is assumed to be one byte per character. 114everything is assumed to be one byte per character.
115This is primarily for debugging purposes and can result 115This is primarily for debugging purposes and can result
116in confusing output in multi character strings. 116in confusing output in multi-character strings.
117.Pp 117.Pp
118If 118If
119.Dv ASN1_STRFLGS_SHOW_TYPE 119.Dv ASN1_STRFLGS_SHOW_TYPE
120is set, then the string type itself is printed out before its value 120is set, then the string type itself is printed before its value
121(for example "BMPSTRING"), this actually uses 121(for example "BMPSTRING"), using
122.Fn ASN1_tag2str . 122.Fn ASN1_tag2str .
123.Pp 123.Pp
124The content of a string instead of being interpreted can be "dumped": 124Instead of being interpreted the contents of a string can be "dumped":
125this just outputs the value of the string using the form #XXXX 125this just outputs the value of the string using the form #XXXX
126using hex format for each octet. 126using hex format for each octet.
127.Pp 127.Pp
@@ -129,7 +129,7 @@ If
129.Dv ASN1_STRFLGS_DUMP_ALL 129.Dv ASN1_STRFLGS_DUMP_ALL
130is set, then any type is dumped. 130is set, then any type is dumped.
131.Pp 131.Pp
132Normally non character string types (such as OCTET STRING) 132Normally non-character string types (such as OCTET STRING)
133are assumed to be one byte per character; if 133are assumed to be one byte per character; if
134.Dv ASN1_STRFLGS_DUMP_UNKNOWN 134.Dv ASN1_STRFLGS_DUMP_UNKNOWN
135is set, then they will be dumped instead. 135is set, then they will be dumped instead.
@@ -149,5 +149,4 @@ It is equivalent to
149.Dv ASN1_STRFLGS_DUMP_UNKNOWN | 149.Dv ASN1_STRFLGS_DUMP_UNKNOWN |
150.Dv ASN1_STRFLGS_DUMP_DER . 150.Dv ASN1_STRFLGS_DUMP_DER .
151.Sh SEE ALSO 151.Sh SEE ALSO
152.Xr ASN1_tag2str 3 ,
153.Xr X509_NAME_print_ex 3 152.Xr X509_NAME_print_ex 3