Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import javax.net.ssl.HostnameVerifier;

import javax.net.ssl.SSLSession;

public class Main {
    public static HostnameVerifier createSSLHostnameVerifier(final String apiHostname) {
        HostnameVerifier hostnameVerifier = new HostnameVerifier() {
            @Override
            public boolean verify(String hostname, SSLSession session) {
                //Logcat.d("HostnameVerifier.verify(): " + hostname + " / " + apiHostname);
                return hostname.equals(apiHostname);
            }
        };
        return hostnameVerifier;
    }
}