- Chase net/libosip shlib version bump
- Fix build with new net/libosip - Bump PORTREVISION
This commit is contained in:
parent
681404d43d
commit
ab1912bc34
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=210292
3 changed files with 213 additions and 1 deletions
|
@ -7,13 +7,14 @@
|
|||
|
||||
PORTNAME= siproxd
|
||||
PORTVERSION= 0.7.0
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= net
|
||||
MASTER_SITES= SF
|
||||
|
||||
MAINTAINER= frank@dynamical-systems.org
|
||||
COMMENT= A proxy/masquerading daemon for the SIP protocol
|
||||
|
||||
LIB_DEPENDS= osip2.4:${PORTSDIR}/net/libosip
|
||||
LIB_DEPENDS= osip2.5:${PORTSDIR}/net/libosip
|
||||
|
||||
USE_GCC= 3.2+
|
||||
USE_RC_SUBR= siproxd.sh
|
||||
|
|
128
net/siproxd/files/patch-src_auth.c
Normal file
128
net/siproxd/files/patch-src_auth.c
Normal file
|
@ -0,0 +1,128 @@
|
|||
--- src/auth.c.orig 2008-01-19 17:07:14.000000000 +0100
|
||||
+++ src/auth.c 2008-03-31 10:58:24.000000000 +0200
|
||||
@@ -367,25 +367,25 @@
|
||||
OUT HASHHEX SessionKey
|
||||
)
|
||||
{
|
||||
- MD5_CTX Md5Ctx;
|
||||
+ osip_MD5_CTX Md5Ctx;
|
||||
HASH HA1;
|
||||
|
||||
- MD5Init(&Md5Ctx);
|
||||
- if (pszUserName) MD5Update(&Md5Ctx, pszUserName, strlen(pszUserName));
|
||||
- MD5Update(&Md5Ctx, ":", 1);
|
||||
- if (pszRealm) MD5Update(&Md5Ctx, pszRealm, strlen(pszRealm));
|
||||
- MD5Update(&Md5Ctx, ":", 1);
|
||||
- if (pszPassword) MD5Update(&Md5Ctx, pszPassword, strlen(pszPassword));
|
||||
- MD5Final(HA1, &Md5Ctx);
|
||||
+ osip_MD5Init(&Md5Ctx);
|
||||
+ if (pszUserName) osip_MD5Update(&Md5Ctx, pszUserName, strlen(pszUserName));
|
||||
+ osip_MD5Update(&Md5Ctx, ":", 1);
|
||||
+ if (pszRealm) osip_MD5Update(&Md5Ctx, pszRealm, strlen(pszRealm));
|
||||
+ osip_MD5Update(&Md5Ctx, ":", 1);
|
||||
+ if (pszPassword) osip_MD5Update(&Md5Ctx, pszPassword, strlen(pszPassword));
|
||||
+ osip_MD5Final(HA1, &Md5Ctx);
|
||||
|
||||
if ((pszAlg!=NULL) && (osip_strcasecmp(pszAlg, "md5-sess") == 0)) {
|
||||
- MD5Init(&Md5Ctx);
|
||||
- MD5Update(&Md5Ctx, HA1, HASHLEN);
|
||||
- MD5Update(&Md5Ctx, ":", 1);
|
||||
- if (pszNonce) MD5Update(&Md5Ctx, pszNonce, strlen(pszNonce));
|
||||
- MD5Update(&Md5Ctx, ":", 1);
|
||||
- if (pszCNonce) MD5Update(&Md5Ctx, pszCNonce, strlen(pszCNonce));
|
||||
- MD5Final(HA1, &Md5Ctx);
|
||||
+ osip_MD5Init(&Md5Ctx);
|
||||
+ osip_MD5Update(&Md5Ctx, HA1, HASHLEN);
|
||||
+ osip_MD5Update(&Md5Ctx, ":", 1);
|
||||
+ if (pszNonce) osip_MD5Update(&Md5Ctx, pszNonce, strlen(pszNonce));
|
||||
+ osip_MD5Update(&Md5Ctx, ":", 1);
|
||||
+ if (pszCNonce) osip_MD5Update(&Md5Ctx, pszCNonce, strlen(pszCNonce));
|
||||
+ osip_MD5Final(HA1, &Md5Ctx);
|
||||
};
|
||||
CvtHex(HA1, SessionKey);
|
||||
}
|
||||
@@ -403,57 +403,57 @@
|
||||
OUT HASHHEX Response /* request-digest or response-digest */
|
||||
)
|
||||
{
|
||||
- MD5_CTX Md5Ctx;
|
||||
+ osip_MD5_CTX Md5Ctx;
|
||||
HASH HA2;
|
||||
HASH RespHash;
|
||||
HASHHEX HA2Hex;
|
||||
|
||||
/* calculate H(A2) */
|
||||
- MD5Init(&Md5Ctx);
|
||||
- if (pszMethod) MD5Update(&Md5Ctx, pszMethod, strlen(pszMethod));
|
||||
- MD5Update(&Md5Ctx, ":", 1);
|
||||
- if (pszDigestUri)MD5Update(&Md5Ctx, pszDigestUri, strlen(pszDigestUri));
|
||||
+ osip_MD5Init(&Md5Ctx);
|
||||
+ if (pszMethod) osip_MD5Update(&Md5Ctx, pszMethod, strlen(pszMethod));
|
||||
+ osip_MD5Update(&Md5Ctx, ":", 1);
|
||||
+ if (pszDigestUri)osip_MD5Update(&Md5Ctx, pszDigestUri, strlen(pszDigestUri));
|
||||
|
||||
if (pszQop!=NULL) {
|
||||
goto auth_withqop;
|
||||
};
|
||||
|
||||
/* auth_withoutqop: */
|
||||
- MD5Final(HA2, &Md5Ctx);
|
||||
+ osip_MD5Final(HA2, &Md5Ctx);
|
||||
CvtHex(HA2, HA2Hex);
|
||||
|
||||
/* calculate response */
|
||||
- MD5Init(&Md5Ctx);
|
||||
- MD5Update(&Md5Ctx, HA1, HASHHEXLEN);
|
||||
- MD5Update(&Md5Ctx, ":", 1);
|
||||
- if (pszNonce) MD5Update(&Md5Ctx, pszNonce, strlen(pszNonce));
|
||||
- MD5Update(&Md5Ctx, ":", 1);
|
||||
+ osip_MD5Init(&Md5Ctx);
|
||||
+ osip_MD5Update(&Md5Ctx, HA1, HASHHEXLEN);
|
||||
+ osip_MD5Update(&Md5Ctx, ":", 1);
|
||||
+ if (pszNonce) osip_MD5Update(&Md5Ctx, pszNonce, strlen(pszNonce));
|
||||
+ osip_MD5Update(&Md5Ctx, ":", 1);
|
||||
|
||||
goto end;
|
||||
|
||||
auth_withqop:
|
||||
|
||||
- MD5Update(&Md5Ctx, ":", 1);
|
||||
- MD5Update(&Md5Ctx, HEntity, HASHHEXLEN);
|
||||
- MD5Final(HA2, &Md5Ctx);
|
||||
+ osip_MD5Update(&Md5Ctx, ":", 1);
|
||||
+ osip_MD5Update(&Md5Ctx, HEntity, HASHHEXLEN);
|
||||
+ osip_MD5Final(HA2, &Md5Ctx);
|
||||
CvtHex(HA2, HA2Hex);
|
||||
|
||||
/* calculate response */
|
||||
- MD5Init(&Md5Ctx);
|
||||
- MD5Update(&Md5Ctx, HA1, HASHHEXLEN);
|
||||
- MD5Update(&Md5Ctx, ":", 1);
|
||||
- if (pszNonce) MD5Update(&Md5Ctx, pszNonce, strlen(pszNonce));
|
||||
- MD5Update(&Md5Ctx, ":", 1);
|
||||
- if (pszNonceCount)MD5Update(&Md5Ctx, pszNonceCount, strlen(pszNonceCount));
|
||||
- MD5Update(&Md5Ctx, ":", 1);
|
||||
- if (pszCNonce) MD5Update(&Md5Ctx, pszCNonce, strlen(pszCNonce));
|
||||
- MD5Update(&Md5Ctx, ":", 1);
|
||||
- if (pszQop) MD5Update(&Md5Ctx, pszQop, strlen(pszQop));
|
||||
- MD5Update(&Md5Ctx, ":", 1);
|
||||
+ osip_MD5Init(&Md5Ctx);
|
||||
+ osip_MD5Update(&Md5Ctx, HA1, HASHHEXLEN);
|
||||
+ osip_MD5Update(&Md5Ctx, ":", 1);
|
||||
+ if (pszNonce) osip_MD5Update(&Md5Ctx, pszNonce, strlen(pszNonce));
|
||||
+ osip_MD5Update(&Md5Ctx, ":", 1);
|
||||
+ if (pszNonceCount)osip_MD5Update(&Md5Ctx, pszNonceCount, strlen(pszNonceCount));
|
||||
+ osip_MD5Update(&Md5Ctx, ":", 1);
|
||||
+ if (pszCNonce) osip_MD5Update(&Md5Ctx, pszCNonce, strlen(pszCNonce));
|
||||
+ osip_MD5Update(&Md5Ctx, ":", 1);
|
||||
+ if (pszQop) osip_MD5Update(&Md5Ctx, pszQop, strlen(pszQop));
|
||||
+ osip_MD5Update(&Md5Ctx, ":", 1);
|
||||
|
||||
end:
|
||||
- MD5Update(&Md5Ctx, HA2Hex, HASHHEXLEN);
|
||||
- MD5Final(RespHash, &Md5Ctx);
|
||||
+ osip_MD5Update(&Md5Ctx, HA2Hex, HASHHEXLEN);
|
||||
+ osip_MD5Final(RespHash, &Md5Ctx);
|
||||
CvtHex(RespHash, Response);
|
||||
}
|
||||
|
83
net/siproxd/files/patch-src_sip_utils.c
Normal file
83
net/siproxd/files/patch-src_sip_utils.c
Normal file
|
@ -0,0 +1,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]",
|
Loading…
Reference in a new issue