1 | | --- mod_caps.erl.orig 2010-09-26 12:34:01.000000000 -0700 |
2 | | +++ mod_caps.erl 2010-09-26 12:34:52.000000000 -0700 |
3 | | @@ -277,8 +277,6 @@ |
4 | | Host, From, Caps, [SubNode | SubNodes]) -> |
5 | | BinaryNode = node_to_binary(Caps#caps.node, SubNode), |
6 | | IsValid = case Caps#caps.hash of |
7 | | - "md2" -> |
8 | | - Caps#caps.version == make_disco_hash(Els, md2); |
9 | | "md5" -> |
10 | | Caps#caps.version == make_disco_hash(Els, md5); |
11 | | "sha-1" -> |
12 | | @@ -354,9 +352,7 @@ |
13 | | concat_features(DiscoEls), |
14 | | concat_info(DiscoEls)], |
15 | | base64:encode_to_string( |
16 | | - if Algo == md2 -> |
17 | | - sha:md2(Concat); |
18 | | - Algo == md5 -> |
19 | | + if Algo == md5 -> |
20 | | crypto:md5(Concat); |
21 | | Algo == sha1 -> |
22 | | crypto:sha(Concat); |
23 | | --- sha.erl.orig 2010-09-26 12:33:23.000000000 -0700 |
24 | | +++ sha.erl 2010-09-26 12:33:48.000000000 -0700 |
25 | | @@ -28,7 +28,7 @@ |
26 | | -author('alexey@process-one.net'). |
27 | | |
28 | | -export([start/0, sha/1, sha1/1, sha224/1, sha256/1, sha384/1, |
29 | | - sha512/1, md2/1]). |
30 | | + sha512/1]). |
31 | | |
32 | | -include("ejabberd.hrl"). |
33 | | |
34 | | @@ -80,9 +80,6 @@ |
35 | | sha512(Text) -> |
36 | | erlang:port_control(?DRIVER, 512, Text). |
37 | | |
38 | | -md2(Text) -> |
39 | | - erlang:port_control(?DRIVER, 2, Text). |
40 | | - |
41 | | driver_path() -> |
42 | | Suffix = case os:type() of |
43 | | {win32, _} -> ".dll"; |
44 | | --- tls/sha_drv.c.orig 2010-09-26 12:32:33.000000000 -0700 |
45 | | +++ tls/sha_drv.c 2010-09-26 12:33:15.000000000 -0700 |
46 | | @@ -20,7 +20,6 @@ |
47 | | |
48 | | #include <erl_driver.h> |
49 | | #include <openssl/sha.h> |
50 | | -#include <openssl/md2.h> |
51 | | |
52 | | static ErlDrvData sha_drv_start(ErlDrvPort port, char *buf) |
53 | | { |
54 | | @@ -36,11 +35,6 @@ |
55 | | ErlDrvBinary *b = NULL; |
56 | | |
57 | | switch (command) { |
58 | | - case 2: |
59 | | - rlen = MD2_DIGEST_LENGTH; |
60 | | - b = driver_alloc_binary(rlen); |
61 | | - if (b) MD2((unsigned char*)buf, len, (unsigned char*)b->orig_bytes); |
62 | | - break; |
63 | | case 224: |
64 | | rlen = SHA224_DIGEST_LENGTH; |
65 | | b = driver_alloc_binary(rlen); |