Class SSLSocketFactoryProvider

java.lang.Object
org.italiangrid.voms.request.SSLSocketFactoryProvider

public class SSLSocketFactoryProvider extends Object
Provides an SSL socket factory configured using CAnL. This class is responsible for creating an SSLSocketFactory 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
    The X.509 credential used for SSL connections.
    private boolean
    Flag indicating whether hostname checks should be skipped.
    private eu.emi.security.authn.x509.X509CertChainValidatorExt
    The certificate chain validator.
  • Constructor Summary

    Constructors
    Constructor
    Description
    SSLSocketFactoryProvider(eu.emi.security.authn.x509.X509Credential credential)
    Constructs an SSLSocketFactoryProvider with the given credential and a default validator.
    SSLSocketFactoryProvider(eu.emi.security.authn.x509.X509Credential credential, eu.emi.security.authn.x509.X509CertChainValidatorExt validator)
    Constructs an SSLSocketFactoryProvider 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 an SSLSocketFactoryProvider with the given credential, validator, and hostname check setting.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns an SSL socket factory configured with the provided credential and validator.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • 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 Details

    • SSLSocketFactoryProvider

      public SSLSocketFactoryProvider(eu.emi.security.authn.x509.X509Credential credential, eu.emi.security.authn.x509.X509CertChainValidatorExt validator, boolean skipHostnameChecks)
      Constructs an SSLSocketFactoryProvider with the given credential, validator, and hostname check setting.
      Parameters:
      credential - the X.509 credential
      validator - the certificate chain validator
      skipHostnameChecks - 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 an SSLSocketFactoryProvider with the given credential and validator, with hostname verification enabled.
      Parameters:
      credential - the X.509 credential
      validator - the certificate chain validator
    • SSLSocketFactoryProvider

      public SSLSocketFactoryProvider(eu.emi.security.authn.x509.X509Credential credential)
      Constructs an SSLSocketFactoryProvider with the given credential and a default validator.
      Parameters:
      credential - the X.509 credential
  • Method Details

    • getSSLSockectFactory

      public SSLSocketFactory getSSLSockectFactory()
      Returns an SSL socket factory configured with the provided credential and validator.
      Returns:
      the SSLSocketFactory object