use of org.openecard.bouncycastle.tls.CertificateRequest in project open-ecard by ecsec.
the class DefaultTlsClientImpl method getAuthentication.
@Override
public TlsAuthentication getAuthentication() throws IOException {
return new TlsAuthentication() {
@Override
public void notifyServerCertificate(TlsServerCertificate crtfct) throws IOException {
JavaSecVerifier v = new JavaSecVerifier();
CertificateVerifier cv = new CertificateVerifierBuilder().and(new HostnameVerifier()).and(v).and(new KeyLengthVerifier()).build();
cv.isValid(crtfct, serverNames.get(0).toString());
}
@Override
public TlsCredentials getClientCredentials(CertificateRequest cr) throws IOException {
throw new UnsupportedOperationException("Not supported yet.");
}
};
}
Aggregations