Package org.italiangrid.voms.request
Class SSLSocketFactoryProvider
- java.lang.Object
-
- org.italiangrid.voms.request.SSLSocketFactoryProvider
-
public class SSLSocketFactoryProvider extends java.lang.Object
Provides an SSL socket factory configured using CAnL. This class is responsible for creating anSSLSocketFactory
that is configured with a given X.509 credential and certificate validator. It supports optional hostname verification.
-
-
Field Summary
Fields Modifier and Type Field Description private eu.emi.security.authn.x509.X509Credential
credential
The X.509 credential used for SSL connections.private boolean
skipHostnameChecks
Flag indicating whether hostname checks should be skipped.private eu.emi.security.authn.x509.X509CertChainValidatorExt
validator
The certificate chain validator.
-
Constructor Summary
Constructors Constructor Description SSLSocketFactoryProvider(eu.emi.security.authn.x509.X509Credential credential)
Constructs anSSLSocketFactoryProvider
with the given credential and a default validator.SSLSocketFactoryProvider(eu.emi.security.authn.x509.X509Credential credential, eu.emi.security.authn.x509.X509CertChainValidatorExt validator)
Constructs anSSLSocketFactoryProvider
with the given credential and validator, with hostname verification enabled.SSLSocketFactoryProvider(eu.emi.security.authn.x509.X509Credential credential, eu.emi.security.authn.x509.X509CertChainValidatorExt validator, boolean skipHostnameChecks)
Constructs anSSLSocketFactoryProvider
with the given credential, validator, and hostname check setting.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.net.ssl.SSLSocketFactory
getSSLSockectFactory()
Returns an SSL socket factory configured with the provided credential and validator.
-
-
-
Field Detail
-
credential
private eu.emi.security.authn.x509.X509Credential credential
The X.509 credential used for SSL connections.
-
validator
private eu.emi.security.authn.x509.X509CertChainValidatorExt validator
The certificate chain validator.
-
skipHostnameChecks
private boolean skipHostnameChecks
Flag indicating whether hostname checks should be skipped.
-
-
Constructor Detail
-
SSLSocketFactoryProvider
public SSLSocketFactoryProvider(eu.emi.security.authn.x509.X509Credential credential, eu.emi.security.authn.x509.X509CertChainValidatorExt validator, boolean skipHostnameChecks)
Constructs anSSLSocketFactoryProvider
with the given credential, validator, and hostname check setting.- Parameters:
credential
- the X.509 credentialvalidator
- the certificate chain validatorskipHostnameChecks
- true to disable hostname verification, false otherwise
-
SSLSocketFactoryProvider
public SSLSocketFactoryProvider(eu.emi.security.authn.x509.X509Credential credential, eu.emi.security.authn.x509.X509CertChainValidatorExt validator)
Constructs anSSLSocketFactoryProvider
with the given credential and validator, with hostname verification enabled.- Parameters:
credential
- the X.509 credentialvalidator
- the certificate chain validator
-
SSLSocketFactoryProvider
public SSLSocketFactoryProvider(eu.emi.security.authn.x509.X509Credential credential)
Constructs anSSLSocketFactoryProvider
with the given credential and a default validator.- Parameters:
credential
- the X.509 credential
-
-