File: 10-crypto.patch

package info (click to toggle)
rabbitmq-server 2.8.4-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 8,928 kB
  • sloc: erlang: 52,968; python: 2,846; xml: 1,987; sh: 816; makefile: 683; perl: 86; ruby: 63
file content (117 lines) | stat: -rw-r--r-- 4,315 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
diff -r 0c4b60ac68b4 demo/ebin/webmachine_demo.app
--- a/demo/ebin/webmachine_demo.app	Tue Jun 15 08:36:55 2010 -0400
+++ b/demo/ebin/webmachine_demo.app	Sat Dec 18 21:20:46 2010 +0000
@@ -11,4 +11,4 @@
   {registered, []},
   {mod, {webmachine_demo_app, []}},
   {env, []},
-  {applications, [kernel, stdlib, crypto]}]}.
+  {applications, [kernel, stdlib]}]}.
diff -r 0c4b60ac68b4 demo/src/demo_fs_resource.erl
--- a/demo/src/demo_fs_resource.erl	Tue Jun 15 08:36:55 2010 -0400
+++ b/demo/src/demo_fs_resource.erl	Sat Dec 18 21:20:46 2010 +0000
@@ -143,7 +143,7 @@
     {LMod, ReqData, Context#context{metadata=[{'last-modified',
                     httpd_util:rfc1123_date(LMod)}|Context#context.metadata]}}.
 
-hash_body(Body) -> mochihex:to_hex(binary_to_list(crypto:sha(Body))).
+hash_body(Body) -> mochihex:to_hex(binary_to_list(erlang:md5(Body))).
 
 generate_etag(ReqData, Context) ->
     case maybe_fetch_object(Context, wrq:disp_path(ReqData)) of
diff -r 0c4b60ac68b4 demo/src/webmachine_demo.erl
--- a/demo/src/webmachine_demo.erl	Tue Jun 15 08:36:55 2010 -0400
+++ b/demo/src/webmachine_demo.erl	Sat Dec 18 21:20:46 2010 +0000
@@ -14,7 +14,6 @@
 %% @spec start() -> ok
 %% @doc Start the webmachine_demo server.
 start() ->
-    ensure_started(crypto),
     ensure_started(webmachine),
     application:start(webmachine_demo).
 
@@ -23,5 +22,4 @@
 stop() ->
     Res = application:stop(webmachine_demo),
     application:stop(webmachine),
-    application:stop(crypto),
     Res.
diff -r 0c4b60ac68b4 ebin/webmachine.app
--- a/ebin/webmachine.app	Tue Jun 15 08:36:55 2010 -0400
+++ b/ebin/webmachine.app	Sat Dec 18 21:20:46 2010 +0000
@@ -25,4 +25,4 @@
   {env, [
          {dispatch_list, []}
         ]},
-  {applications, [kernel, stdlib, crypto]}]}.
+  {applications, [kernel, stdlib]}]}.
diff -r 0c4b60ac68b4 priv/templates/ebin/wmskel.app
--- a/priv/templates/ebin/wmskel.app	Tue Jun 15 08:36:55 2010 -0400
+++ b/priv/templates/ebin/wmskel.app	Sat Dec 18 21:20:46 2010 +0000
@@ -13,7 +13,6 @@
   {applications, [
                   kernel,
                   stdlib,
-                  crypto,
                   mochiweb,
                   webmachine
                  ]},
diff -r 0c4b60ac68b4 priv/templates/src/wmskel.erl
--- a/priv/templates/src/wmskel.erl	Tue Jun 15 08:36:55 2010 -0400
+++ b/priv/templates/src/wmskel.erl	Sat Dec 18 21:20:46 2010 +0000
@@ -18,7 +18,6 @@
 %% @spec start_link() -> {ok,Pid::pid()}
 %% @doc Starts the app for inclusion in a supervisor tree
 start_link() ->
-    ensure_started(crypto),
     ensure_started(mochiweb),
     application:set_env(webmachine, webmachine_logger_module, 
                         webmachine_logger),
@@ -28,7 +27,6 @@
 %% @spec start() -> ok
 %% @doc Start the {{appid}} server.
 start() ->
-    ensure_started(crypto),
     ensure_started(mochiweb),
     application:set_env(webmachine, webmachine_logger_module, 
                         webmachine_logger),
@@ -41,5 +39,4 @@
     Res = application:stop({{appid}}),
     application:stop(webmachine),
     application:stop(mochiweb),
-    application:stop(crypto),
     Res.
diff -r 0c4b60ac68b4 scripts/run_tests.escript
--- a/scripts/run_tests.escript	Tue Jun 15 08:36:55 2010 -0400
+++ b/scripts/run_tests.escript	Sat Dec 18 21:20:46 2010 +0000
@@ -21,7 +21,6 @@
                 end,
                 proplists:get_value(modules, App)),
     
-    crypto:start(),
     start_cover(Modules),
     eunit:test(Modules, [verbose]),
     analyze_cover(Modules);
diff -r 0c4b60ac68b4 src/webmachine.erl
--- a/src/webmachine.erl	Tue Jun 15 08:36:55 2010 -0400
+++ b/src/webmachine.erl	Sat Dec 18 21:20:46 2010 +0000
@@ -28,7 +28,6 @@
 %% @doc Start the webmachine server.
 start() ->
     webmachine_deps:ensure(),
-    application:start(crypto),
     application:start(webmachine).
 
 %% @spec stop() -> ok
diff -r 0c4b60ac68b4 src/webmachine_request.erl
--- a/src/webmachine_request.erl	Tue Jun 15 08:36:55 2010 -0400
+++ b/src/webmachine_request.erl	Sat Dec 18 21:20:46 2010 +0000
@@ -560,7 +560,7 @@
 	    {CT, _} ->
 		CT
 	end,
-    Boundary = mochihex:to_hex(crypto:rand_bytes(8)),
+    Boundary = mochihex:to_hex(mochiweb_util:rand_bytes(8)),
     HeaderList = [{"Content-Type",
                    ["multipart/byteranges; ",
                     "boundary=", Boundary]}],