test/sun/security/ssl/com/sun/net/ssl/internal/www/protocol/https/HttpsClient/ProxyTunnelServer.java
Print this page
@@ -31,10 +31,11 @@
import java.io.*;
import java.net.*;
import javax.net.ssl.*;
import javax.net.ServerSocketFactory;
import sun.net.www.*;
+import java.util.Base64;
public class ProxyTunnelServer extends Thread {
private static ServerSocket ss = null;
/*
@@ -290,16 +291,16 @@
boolean matched = false;
try {
authInfo.trim();
int ind = authInfo.indexOf(' ');
String recvdUserPlusPass = authInfo.substring(ind + 1).trim();
+
// extract encoded (username:passwd
if (userPlusPass.equals(
- new String(
- (new sun.misc.BASE64Decoder()).
- decodeBuffer(recvdUserPlusPass)
- ))) {
+ new String( Base64.getMimeDecoder()
+ .decode(recvdUserPlusPass))))
+ {
matched = true;
}
} catch (Exception e) {
throw new IOException(
"Proxy received invalid Proxy-Authorization value: "