Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2013-11-03 02:22:09 -0500
committerGreg Wilkins2013-11-03 02:22:09 -0500
commiteb3bb660b52b6eaa146b4fa77afd8fd1f63e6bba (patch)
tree6d501857bbc82c9240ba1cd603f981797349b3d5 /jetty-security/src/main/java/org/eclipse
parent6f1eb712e9bb3341d257a75511ebc8e73e0faca0 (diff)
parent6b0269a16d7ee923ae70082eb60595d432861707 (diff)
downloadorg.eclipse.jetty.project-eb3bb660b52b6eaa146b4fa77afd8fd1f63e6bba.tar.gz
org.eclipse.jetty.project-eb3bb660b52b6eaa146b4fa77afd8fd1f63e6bba.tar.xz
org.eclipse.jetty.project-eb3bb660b52b6eaa146b4fa77afd8fd1f63e6bba.zip
Merge remote-tracking branch 'origin/master' into jetty-9.1
Conflicts: jetty-client/src/main/java/org/eclipse/jetty/client/util/DigestAuthentication.java jetty-client/src/test/java/org/eclipse/jetty/client/HttpReceiverTest.java jetty-client/src/test/java/org/eclipse/jetty/client/HttpSenderTest.java jetty-http/src/main/java/org/eclipse/jetty/http/HttpField.java jetty-server/src/test/java/org/eclipse/jetty/server/AbstractHttpTest.java jetty-servlets/src/test/java/org/eclipse/jetty/servlets/AbstractDoSFilterTest.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/generator/HeadersBlockGenerator.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/parser/HeadersBlockParser.java jetty-websocket/websocket-client/src/main/java/org/eclipse/jetty/websocket/client/ClientUpgradeRequest.java jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/WebSocketFrame.java jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/WebSocketSession.java jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/compress/DeflateCompressionMethodTest.java jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/compress/PerMessageDeflateExtensionTest.java
Diffstat (limited to 'jetty-security/src/main/java/org/eclipse')
-rw-r--r--jetty-security/src/main/java/org/eclipse/jetty/security/authentication/BasicAuthenticator.java3
-rw-r--r--jetty-security/src/main/java/org/eclipse/jetty/security/authentication/DigestAuthenticator.java23
2 files changed, 14 insertions, 12 deletions
diff --git a/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/BasicAuthenticator.java b/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/BasicAuthenticator.java
index 56d3fe41ad..4eeeec8b11 100644
--- a/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/BasicAuthenticator.java
+++ b/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/BasicAuthenticator.java
@@ -19,6 +19,7 @@
package org.eclipse.jetty.security.authentication;
import java.io.IOException;
+import java.nio.charset.StandardCharsets;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
@@ -82,7 +83,7 @@ public class BasicAuthenticator extends LoginAuthenticator
if ("basic".equalsIgnoreCase(method))
{
credentials = credentials.substring(space+1);
- credentials = B64Code.decode(credentials,StringUtil.__ISO_8859_1);
+ credentials = B64Code.decode(credentials, StandardCharsets.ISO_8859_1);
int i = credentials.indexOf(':');
if (i>0)
{
diff --git a/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/DigestAuthenticator.java b/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/DigestAuthenticator.java
index 0fe374774b..49f924a53b 100644
--- a/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/DigestAuthenticator.java
+++ b/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/DigestAuthenticator.java
@@ -19,6 +19,7 @@
package org.eclipse.jetty.security.authentication;
import java.io.IOException;
+import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.security.SecureRandom;
import java.util.BitSet;
@@ -367,18 +368,18 @@ public class DigestAuthenticator extends LoginAuthenticator
else
{
// calc A1 digest
- md.update(username.getBytes(StringUtil.__ISO_8859_1));
+ md.update(username.getBytes(StandardCharsets.ISO_8859_1));
md.update((byte) ':');
- md.update(realm.getBytes(StringUtil.__ISO_8859_1));
+ md.update(realm.getBytes(StandardCharsets.ISO_8859_1));
md.update((byte) ':');
- md.update(password.getBytes(StringUtil.__ISO_8859_1));
+ md.update(password.getBytes(StandardCharsets.ISO_8859_1));
ha1 = md.digest();
}
// calc A2 digest
md.reset();
- md.update(method.getBytes(StringUtil.__ISO_8859_1));
+ md.update(method.getBytes(StandardCharsets.ISO_8859_1));
md.update((byte) ':');
- md.update(uri.getBytes(StringUtil.__ISO_8859_1));
+ md.update(uri.getBytes(StandardCharsets.ISO_8859_1));
byte[] ha2 = md.digest();
// calc digest
@@ -388,17 +389,17 @@ public class DigestAuthenticator extends LoginAuthenticator
// request-digest = <"> < KD ( H(A1), unq(nonce-value) ":" H(A2)
// ) > <">
- md.update(TypeUtil.toString(ha1, 16).getBytes(StringUtil.__ISO_8859_1));
+ md.update(TypeUtil.toString(ha1, 16).getBytes(StandardCharsets.ISO_8859_1));
md.update((byte) ':');
- md.update(nonce.getBytes(StringUtil.__ISO_8859_1));
+ md.update(nonce.getBytes(StandardCharsets.ISO_8859_1));
md.update((byte) ':');
- md.update(nc.getBytes(StringUtil.__ISO_8859_1));
+ md.update(nc.getBytes(StandardCharsets.ISO_8859_1));
md.update((byte) ':');
- md.update(cnonce.getBytes(StringUtil.__ISO_8859_1));
+ md.update(cnonce.getBytes(StandardCharsets.ISO_8859_1));
md.update((byte) ':');
- md.update(qop.getBytes(StringUtil.__ISO_8859_1));
+ md.update(qop.getBytes(StandardCharsets.ISO_8859_1));
md.update((byte) ':');
- md.update(TypeUtil.toString(ha2, 16).getBytes(StringUtil.__ISO_8859_1));
+ md.update(TypeUtil.toString(ha2, 16).getBytes(StandardCharsets.ISO_8859_1));
byte[] digest = md.digest();
// check digest

Back to the top