1c3f6f16bd4a2338e88275641b9f2f56e816ca377Narayan Kamath/* 254cf3446000fdcf88a9e62724f7deb0282e98da1jwilson * Copyright (C) 2013 The Android Open Source Project 3c3f6f16bd4a2338e88275641b9f2f56e816ca377Narayan Kamath * 4c3f6f16bd4a2338e88275641b9f2f56e816ca377Narayan Kamath * Licensed under the Apache License, Version 2.0 (the "License"); 5c3f6f16bd4a2338e88275641b9f2f56e816ca377Narayan Kamath * you may not use this file except in compliance with the License. 6c3f6f16bd4a2338e88275641b9f2f56e816ca377Narayan Kamath * You may obtain a copy of the License at 7c3f6f16bd4a2338e88275641b9f2f56e816ca377Narayan Kamath * 8c3f6f16bd4a2338e88275641b9f2f56e816ca377Narayan Kamath * http://www.apache.org/licenses/LICENSE-2.0 9c3f6f16bd4a2338e88275641b9f2f56e816ca377Narayan Kamath * 10c3f6f16bd4a2338e88275641b9f2f56e816ca377Narayan Kamath * Unless required by applicable law or agreed to in writing, software 11c3f6f16bd4a2338e88275641b9f2f56e816ca377Narayan Kamath * distributed under the License is distributed on an "AS IS" BASIS, 12c3f6f16bd4a2338e88275641b9f2f56e816ca377Narayan Kamath * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13c3f6f16bd4a2338e88275641b9f2f56e816ca377Narayan Kamath * See the License for the specific language governing permissions and 14c3f6f16bd4a2338e88275641b9f2f56e816ca377Narayan Kamath * limitations under the License. 15c3f6f16bd4a2338e88275641b9f2f56e816ca377Narayan Kamath */ 1654cf3446000fdcf88a9e62724f7deb0282e98da1jwilsonpackage com.squareup.okhttp.internal; 17c3f6f16bd4a2338e88275641b9f2f56e816ca377Narayan Kamath 1854cf3446000fdcf88a9e62724f7deb0282e98da1jwilsonimport java.util.ArrayList; 1954cf3446000fdcf88a9e62724f7deb0282e98da1jwilsonimport java.util.List; 2054cf3446000fdcf88a9e62724f7deb0282e98da1jwilsonimport javax.net.ssl.HostnameVerifier; 2154cf3446000fdcf88a9e62724f7deb0282e98da1jwilsonimport javax.net.ssl.SSLSession; 22c3f6f16bd4a2338e88275641b9f2f56e816ca377Narayan Kamath 2354cf3446000fdcf88a9e62724f7deb0282e98da1jwilsonpublic final class RecordingHostnameVerifier implements HostnameVerifier { 2454cf3446000fdcf88a9e62724f7deb0282e98da1jwilson public final List<String> calls = new ArrayList<String>(); 25c3f6f16bd4a2338e88275641b9f2f56e816ca377Narayan Kamath 2654cf3446000fdcf88a9e62724f7deb0282e98da1jwilson public boolean verify(String hostname, SSLSession session) { 2754cf3446000fdcf88a9e62724f7deb0282e98da1jwilson calls.add("verify " + hostname); 2854cf3446000fdcf88a9e62724f7deb0282e98da1jwilson return true; 2954cf3446000fdcf88a9e62724f7deb0282e98da1jwilson } 30c3f6f16bd4a2338e88275641b9f2f56e816ca377Narayan Kamath} 31