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
|
--- src/sip_utils.c.orig 2008-01-19 17:07:14.000000000 +0100
+++ src/sip_utils.c 2008-03-31 10:58:24.000000000 +0200
@@ -773,13 +773,13 @@
if (strncmp(param->gvalue, magic_cookie,
strlen(magic_cookie))==0) {
/* calculate MD5 hash */
- MD5_CTX Md5Ctx;
+ osip_MD5_CTX Md5Ctx;
HASH HA1;
- MD5Init(&Md5Ctx);
- MD5Update(&Md5Ctx, param->gvalue,
+ osip_MD5Init(&Md5Ctx);
+ osip_MD5Update(&Md5Ctx, param->gvalue,
strlen(param->gvalue));
- MD5Final(HA1, &Md5Ctx);
+ osip_MD5Final(HA1, &Md5Ctx);
CvtHex(HA1, hashstring);
DEBUGC(DBCLASS_BABBLE, "existing branch -> branch hash [%s]",
@@ -799,53 +799,53 @@
*/
if (hashstring[0] == '\0') {
/* calculate MD5 hash */
- MD5_CTX Md5Ctx;
+ osip_MD5_CTX Md5Ctx;
HASH HA1;
char *tmp;
- MD5Init(&Md5Ctx);
+ osip_MD5Init(&Md5Ctx);
/* topmost via */
osip_via_to_str(via, &tmp);
if (tmp) {
- MD5Update(&Md5Ctx, tmp, strlen(tmp));
+ osip_MD5Update(&Md5Ctx, tmp, strlen(tmp));
osip_free(tmp);
}
/* Tag in To header */
osip_to_get_tag(sip_msg->to, ¶m);
if (param && param->gvalue) {
- MD5Update(&Md5Ctx, param->gvalue, strlen(param->gvalue));
+ osip_MD5Update(&Md5Ctx, param->gvalue, strlen(param->gvalue));
}
/* Tag in From header */
osip_from_get_tag(sip_msg->from, ¶m);
if (param && param->gvalue) {
- MD5Update(&Md5Ctx, param->gvalue, strlen(param->gvalue));
+ osip_MD5Update(&Md5Ctx, param->gvalue, strlen(param->gvalue));
}
/* Call-ID */
call_id = osip_message_get_call_id(sip_msg);
osip_call_id_to_str(call_id, &tmp);
if (tmp) {
- MD5Update(&Md5Ctx, tmp, strlen(tmp));
+ osip_MD5Update(&Md5Ctx, tmp, strlen(tmp));
osip_free(tmp);
}
/* CSeq number (but not method) */
tmp = osip_cseq_get_number(sip_msg->cseq);
if (tmp) {
- MD5Update(&Md5Ctx, tmp, strlen(tmp));
+ osip_MD5Update(&Md5Ctx, tmp, strlen(tmp));
}
/* Request URI */
osip_uri_to_str(sip_msg->req_uri, &tmp);
if (tmp) {
- MD5Update(&Md5Ctx, tmp, strlen(tmp));
+ osip_MD5Update(&Md5Ctx, tmp, strlen(tmp));
osip_free(tmp);
}
- MD5Final(HA1, &Md5Ctx);
+ osip_MD5Final(HA1, &Md5Ctx);
CvtHex(HA1, hashstring);
DEBUGC(DBCLASS_BABBLE, "non-existing branch -> branch hash [%s]",
|