test/sun/security/ssl/com/sun/net/ssl/internal/www/protocol/https/HttpsClient/ProxyTunnelServer.java
Print this page
*** 31,40 ****
--- 31,41 ----
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,305 ****
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)
! ))) {
matched = true;
}
} catch (Exception e) {
throw new IOException(
"Proxy received invalid Proxy-Authorization value: "
--- 291,306 ----
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( Base64.getMimeDecoder()
! .decode(recvdUserPlusPass))))
! {
matched = true;
}
} catch (Exception e) {
throw new IOException(
"Proxy received invalid Proxy-Authorization value: "