package com.bocloud.ims.service.utils;

import javax.net.ssl.X509TrustManager;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;

/**
 * TrustManager
 *
 * @author 007
 */
public class TrustManager implements X509TrustManager {

    @Override
    public void checkClientTrusted(X509Certificate[] certificates, String authType) throws CertificateException {
        if (null == certificates) {
            throw new CertificateException("未知异常");
        }
    }

    @Override
    public void checkServerTrusted(X509Certificate[] ax509certificate, String s) throws CertificateException {
        if (null == ax509certificate) {
            throw new CertificateException("未知异常");
        }
    }

    @Override
    public X509Certificate[] getAcceptedIssuers() {
        return null;
    }
}