Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdfe22dd

Browse files
committed
Merge pull requestAsyncHttpClient#875 from afelisatti/1.8.x
Adding support for MD5-sess algorithm in digest authentication (1.8 only)
2 parentsd7fb4cc +6fdb63d commitdfe22dd

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

‎src/main/java/com/ning/http/client/Realm.java‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,16 @@ private void newResponse() throws UnsupportedEncodingException {
566566
.toString().getBytes("ISO-8859-1"));
567567
byte[]ha1 =md.digest();
568568

569+
if ("MD5-sess".equals(algorithm)) {
570+
md.update(newStringBuilder(toBase16(ha1))
571+
.append(":")
572+
.append(nonce)
573+
.append(":")
574+
.append(cnonce)
575+
.toString().getBytes("ISO-8859-1"));
576+
ha1 =md.digest();
577+
}
578+
569579
md.reset();
570580

571581
//HA2 if qop is auth-int is methodName:url:md5(entityBody)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp