static TLSClientParameters createTLSClientParametersFromType(TLSClientParametersType params)
throws GeneralSecurityException,
IOException {
TLSClientParameters ret = new TLSClientParameters();
if (params.isDisableCNCheck()) {
ret.setDisableCNCheck(true);
}
if (params.isSetCipherSuitesFilter()) {
ret.setCipherSuitesFilter(params.getCipherSuitesFilter());
}
if (params.isSetCipherSuites()) {
ret.setCipherSuites(params.getCipherSuites().getCipherSuite());
}
if (params.isSetJsseProvider()) {
ret.setJsseProvider(params.getJsseProvider());
}
if (params.isSetSecureRandomParameters()) {
ret.setSecureRandom(
TLSParameterJaxBUtils.getSecureRandom(
params.getSecureRandomParameters()));
}
if (params.isSetKeyManagers()) {
ret.setKeyManagers(
TLSParameterJaxBUtils.getKeyManagers(params.getKeyManagers()));
}
if (params.isSetTrustManagers()) {
ret.setTrustManagers(
TLSParameterJaxBUtils.getTrustManagers(
params.getTrustManagers()));
}
if (params.isSetCertConstraints()) {
ret.setCertConstraints(params.getCertConstraints());
}
return ret;
}