summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@lshift.net>2009-10-26 12:58:48 +0000
committerMatthias Radestock <matthias@lshift.net>2009-10-26 12:58:48 +0000
commit2c83195cacfb4879f777ce588fe2c7f8d847f267 (patch)
treed7ec35bc6cdaa7073a2f8b64b87727be358e906e /src
parent6f2e0baadf31ceb6ad37bef0fab2102acb51675a (diff)
downloadrabbitmq-server-git-2c83195cacfb4879f777ce588fe2c7f8d847f267.tar.gz
use base64 module instead of ssl_base64
The former is part of stdlib and hencd available in all Erlang installations, whereas the latter is absent if ssl was disabled during compilation. The downside is that base64 was only introduced in R11B-4. However, all the major distributions ship stable branches with Erlang releases later than that, and for exotic distributions the user can always build Erlang manually.
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_guid.erl9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/rabbit_guid.erl b/src/rabbit_guid.erl
index b789fbd1e0..ea61a679e8 100644
--- a/src/rabbit_guid.erl
+++ b/src/rabbit_guid.erl
@@ -104,13 +104,8 @@ guid() ->
%% generate a readable string representation of a guid. Note that any
%% monotonicity of the guid is not preserved in the encoding.
string_guid(Prefix) ->
- %% we use the (undocumented) ssl_base64 module here because it is
- %% present throughout OTP R11 and R12 whereas base64 only becomes
- %% available in R11B-4.
- %%
- %% TODO: once debian stable and EPEL have moved from R11B-2 to
- %% R11B-4 or later we should change this to use base64.
- Prefix ++ "-" ++ ssl_base64:encode(erlang:md5(term_to_binary(guid()))).
+ Prefix ++ "-" ++ base64:encode_to_string(
+ erlang:md5(term_to_binary(guid()))).
binstring_guid(Prefix) ->
list_to_binary(string_guid(Prefix)).