diff options
Diffstat (limited to '')
-rw-r--r-- | src/lib/libcrypto/man/ASN1_STRING_print_ex.3 | 41 |
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 | |||
33 | structure. | 33 | structure. |
34 | .Vt ASN1_STRING | 34 | .Vt ASN1_STRING |
35 | is used to | 35 | is used to |
36 | represent all the ASN1 string types. | 36 | represent all the ASN.1 string types. |
37 | .Pp | 37 | .Pp |
38 | .Fn ASN1_STRING_print_ex | 38 | .Fn ASN1_STRING_print_ex |
39 | outputs | 39 | outputs |
40 | .Fa str | 40 | .Fa str |
41 | to | 41 | to |
42 | .Fa out , | 42 | .Fa out , |
43 | the format is determined by the options | 43 | the 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 |
46 | is identical except it outputs to | 46 | is 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 . |
57 | It replaces unprintable characters (other than CR, LF) with | 57 | It 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 |
61 | is a legacy function which should be avoided in new | 61 | is a legacy function which should be avoided in new |
62 | applications. | 62 | applications. |
63 | .Pp | 63 | .Pp |
64 | Although there are a large number of options frequently | 64 | Although there are a large number of options, |
65 | .Dv ASN1_STRFLGS_RFC2253 | ||
66 | is often suitable, or on UTF-8 terminals | ||
65 | .Dv ASN1_STRFLGS_RFC2253 | 67 | .Dv ASN1_STRFLGS_RFC2253 |
66 | is suitable, or on UTF8 terminals | 68 | and |
67 | .Dv ASN1_STRFLGS_RFC2253 No & | ||
68 | .Pf ~ Dv ASN1_STRFLGS_ESC_MSB . | 69 | .Pf ~ Dv ASN1_STRFLGS_ESC_MSB . |
69 | .Pp | 70 | .Pp |
70 | The complete set of supported options for | 71 | The complete set of supported options for |
@@ -74,7 +75,7 @@ is listed below. | |||
74 | Various characters can be escaped. | 75 | Various characters can be escaped. |
75 | If | 76 | If |
76 | .Dv ASN1_STRFLGS_ESC_2253 | 77 | .Dv ASN1_STRFLGS_ESC_2253 |
77 | is set, the characters determined by RFC2253 are escaped. | 78 | is set, the characters determined by RFC 2253 are escaped. |
78 | If | 79 | If |
79 | .Dv ASN1_STRFLGS_ESC_CTRL | 80 | .Dv ASN1_STRFLGS_ESC_CTRL |
80 | is set, control characters are escaped. | 81 | is set, control characters are escaped. |
@@ -82,15 +83,14 @@ If | |||
82 | .Dv ASN1_STRFLGS_ESC_MSB | 83 | .Dv ASN1_STRFLGS_ESC_MSB |
83 | is set, characters with the MSB set are escaped: this option should | 84 | is set, characters with the MSB set are escaped: this option should |
84 | .Em not | 85 | .Em not |
85 | be used if the terminal correctly interprets UTF8 sequences. | 86 | be used if the terminal correctly interprets UTF-8 sequences. |
86 | .Pp | 87 | .Pp |
87 | Escaping takes several forms. | 88 | Escaping takes several forms. |
88 | .Pp | 89 | If the character being escaped is a 16-bit character then the form "\eUXXXX" |
89 | If the character being escaped is a 16 bit character then the form "\eUXXXX" | ||
90 | is used using exactly four characters for the hex representation. | 90 | is used using exactly four characters for the hex representation. |
91 | If it is 32 bits then "\eWXXXXXXXX" is used using eight characters | 91 | If it is 32 bits then "\eWXXXXXXXX" is used using eight characters |
92 | of its hex representation. | 92 | of its hex representation. |
93 | These forms will only be used if UTF8 conversion is not set (see below). | 93 | These forms will only be used if UTF-8 conversion is not set (see below). |
94 | .Pp | 94 | .Pp |
95 | Printable characters are normally escaped using the backslash | 95 | Printable characters are normally escaped using the backslash |
96 | .Pq Sq \e | 96 | .Pq Sq \e |
@@ -104,24 +104,24 @@ representation. | |||
104 | .Pp | 104 | .Pp |
105 | If | 105 | If |
106 | .Dv ASN1_STRFLGS_UTF8_CONVERT | 106 | .Dv ASN1_STRFLGS_UTF8_CONVERT |
107 | is set, then characters are converted to UTF8 format first. | 107 | is set, then characters are converted to UTF-8 format first. |
108 | If the terminal supports the display of UTF8 sequences then this | 108 | If the terminal supports the display of UTF-8 sequences then this |
109 | option will correctly display multi byte characters. | 109 | option will correctly display multi-byte characters. |
110 | .Pp | 110 | .Pp |
111 | If | 111 | If |
112 | .Dv ASN1_STRFLGS_IGNORE_TYPE | 112 | .Dv ASN1_STRFLGS_IGNORE_TYPE |
113 | is set, then the string type is not interpreted at all: | 113 | is set, then the string type is not interpreted at all: |
114 | everything is assumed to be one byte per character. | 114 | everything is assumed to be one byte per character. |
115 | This is primarily for debugging purposes and can result | 115 | This is primarily for debugging purposes and can result |
116 | in confusing output in multi character strings. | 116 | in confusing output in multi-character strings. |
117 | .Pp | 117 | .Pp |
118 | If | 118 | If |
119 | .Dv ASN1_STRFLGS_SHOW_TYPE | 119 | .Dv ASN1_STRFLGS_SHOW_TYPE |
120 | is set, then the string type itself is printed out before its value | 120 | is 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 |
124 | The content of a string instead of being interpreted can be "dumped": | 124 | Instead of being interpreted the contents of a string can be "dumped": |
125 | this just outputs the value of the string using the form #XXXX | 125 | this just outputs the value of the string using the form #XXXX |
126 | using hex format for each octet. | 126 | using 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 |
130 | is set, then any type is dumped. | 130 | is set, then any type is dumped. |
131 | .Pp | 131 | .Pp |
132 | Normally non character string types (such as OCTET STRING) | 132 | Normally non-character string types (such as OCTET STRING) |
133 | are assumed to be one byte per character; if | 133 | are assumed to be one byte per character; if |
134 | .Dv ASN1_STRFLGS_DUMP_UNKNOWN | 134 | .Dv ASN1_STRFLGS_DUMP_UNKNOWN |
135 | is set, then they will be dumped instead. | 135 | is 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 |