com.github.j3t.ssl.utils.strategy.TrustManagerStrategy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ssl-utils Show documentation
Show all versions of ssl-utils Show documentation
Is a library of utilities to assist with developing security functionality in Java applications.
The newest version!
package com.github.j3t.ssl.utils.strategy;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
/**
* A strategy to establish trustworthiness of certificates independent of the trust manager configured in actual context
* (trust store). This can be used to override the standard certificate verification process.
*
* @author j3t
*/
public interface TrustManagerStrategy {
/**
* Determines whether the certificate chain can be trusted or not or the trust manager configured in the actual
* context should verify the trustworthiness.
*
* @param chain the peer certificate chain
* @param authType the authentication type based on the certificate
* @return true
if the trust manager configured in the actual context should verify the
* trustworthiness, otherwise false
.
* @throws CertificateException if the certificate chain is not trusted
*/
boolean checkTrusted(X509Certificate[] chain, String authType) throws CertificateException;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy