summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmile Joubert <emile@rabbitmq.com>2011-04-05 17:34:08 +0100
committerEmile Joubert <emile@rabbitmq.com>2011-04-05 17:34:08 +0100
commita3c513313ee067e58f277904a841a95dfe2f9e66 (patch)
tree8781974720d3d071f54e52161e6bde14bbe2819d
parentd6d8e615121291670f43a1acb7b24fc5fd1378f3 (diff)
parent115fc04dbc11d4bb92d33c213469cc8db46993c5 (diff)
downloadrabbitmq-server-git-a3c513313ee067e58f277904a841a95dfe2f9e66.tar.gz
Merge bug24017 into default (again)
-rw-r--r--src/rabbit_ssl.erl5
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(