diff options
| author | Simon MacMullen <simon@rabbitmq.com> | 2011-04-05 16:57:44 +0100 |
|---|---|---|
| committer | Simon MacMullen <simon@rabbitmq.com> | 2011-04-05 16:57:44 +0100 |
| commit | 115fc04dbc11d4bb92d33c213469cc8db46993c5 (patch) | |
| tree | a3c8a92e9c1ad7eced81c47657a551a8f0c3fb84 | |
| parent | 774c134695faea0fbfa8bb1ca33be8941e00df8e (diff) | |
| download | rabbitmq-server-git-115fc04dbc11d4bb92d33c213469cc8db46993c5.tar.gz | |
UTF8strings come back as binaries.
| -rw-r--r-- | src/rabbit_ssl.erl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rabbit_ssl.erl b/src/rabbit_ssl.erl index a3cd2b3760..e0defa9e96 100644 --- a/src/rabbit_ssl.erl +++ b/src/rabbit_ssl.erl @@ -211,7 +211,8 @@ format_asn1_value(V) -> %% subset of ASCII it is also a subset of UTF-8. The others need %% converting. Fortunately since the Erlang SSL library does the %% decoding for us (albeit into a weird format, see below), we just -%% need to handle encoding into UTF-8. +%% need to handle encoding into UTF-8. Note also that utf8Strings come +%% back as binary. %% %% Note for testing: the default Ubuntu configuration for openssl will %% only create printableString or teletexString types no matter what @@ -225,7 +226,7 @@ format_directory_string(printableString, S) -> S; format_directory_string(teletexString, S) -> utf8_list_from(S); format_directory_string(bmpString, S) -> utf8_list_from(S); format_directory_string(universalString, S) -> utf8_list_from(S); -format_directory_string(utf8String, S) -> S. +format_directory_string(utf8String, S) -> binary_to_list(S). utf8_list_from(S) -> binary_to_list( |
