Revision: a309db8b830a
Author: Strullu <[email protected]>
Date: Wed Jan 16 06:02:43 2013
Log: Correction issue 42: Building proxy-authenticate header error:
bad handling of qop parameter
http://code.google.com/p/jain-sip/source/detail?r=a309db8b830a&repo=javascript
Modified:
/src/main/javascript/gov/nist/sip/header/HeaderFactoryImpl.js
=======================================
--- /src/main/javascript/gov/nist/sip/header/HeaderFactoryImpl.js Mon Oct
22 09:09:12 2012
+++ /src/main/javascript/gov/nist/sip/header/HeaderFactoryImpl.js Wed Jan
16 06:02:43 2013
@@ -559,12 +559,11 @@
realm=response.getProxyAuthenticate().getRealm();
scheme=response.getProxyAuthenticate().getScheme();
nonce=response.getProxyAuthenticate().getNonce();
+ qop=response.getProxyAuthenticate().getQop();
var proxyauthorization=new ProxyAuthorization();
- qop=response.getWWWAuthenticate().getQop();
}
var mda=new MessageDigestAlgorithm();
var method=response.getCSeq().getMethod();
-
var cnonce=Math.floor(Math.random()*16777215).toString(16);
var nc="00000001";
var
resp=mda.calculateResponse(sipLogin,realm,sipPassword,nonce,nc,cnonce,
method,request.getRequestURI(),null,qop);
@@ -588,12 +587,13 @@
proxyauthorization.setUsername(sipLogin);
proxyauthorization.setRealm(realm);
proxyauthorization.setNonce(nonce);
- authorization.setCNonce(cnonce);
- authorization.setNonceCount(nc);
+ proxyauthorization.setCNonce(cnonce);
+ proxyauthorization.setNonceCount(nc);
proxyauthorization.setScheme(scheme);
proxyauthorization.setResponse(resp);
proxyauthorization.setURI(request.getRequestURI());
proxyauthorization.setAlgorithm("MD5");
+ proxyauthorization.setQop(qop);
return proxyauthorization;
}
}