Skip to content

Commit c0c394e

Browse files
Steve BlockAndroid (Google) Code Review
authored andcommitted
Merge "Modify BrowserFrame.requestClientCert() to take the host and port as a String" into ics-mr0
2 parents 49f6143 + 8eb83b9 commit c0c394e

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

core/java/android/webkit/BrowserFrame.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,22 +1204,20 @@ public void cancel() {
12041204
* We delegate the request to CallbackProxy, and route its response to
12051205
* {@link #nativeSslClientCert(int, X509Certificate)}.
12061206
*/
1207-
private void requestClientCert(int handle, byte[] host_and_port_bytes) {
1208-
String host_and_port = new String(host_and_port_bytes, Charsets.UTF_8);
1207+
private void requestClientCert(int handle, String hostAndPort) {
12091208
SslClientCertLookupTable table = SslClientCertLookupTable.getInstance();
1210-
if (table.IsAllowed(host_and_port)) {
1209+
if (table.IsAllowed(hostAndPort)) {
12111210
// previously allowed
12121211
nativeSslClientCert(handle,
1213-
table.PrivateKey(host_and_port),
1214-
table.CertificateChain(host_and_port));
1215-
} else if (table.IsDenied(host_and_port)) {
1212+
table.PrivateKey(hostAndPort),
1213+
table.CertificateChain(hostAndPort));
1214+
} else if (table.IsDenied(hostAndPort)) {
12161215
// previously denied
12171216
nativeSslClientCert(handle, null, null);
12181217
} else {
12191218
// previously ignored or new
12201219
mCallbackProxy.onReceivedClientCertRequest(
1221-
new ClientCertRequestHandler(this, handle, host_and_port, table),
1222-
host_and_port);
1220+
new ClientCertRequestHandler(this, handle, hostAndPort, table), hostAndPort);
12231221
}
12241222
}
12251223

0 commit comments

Comments
 (0)