Class OCSPParametes

java.lang.Object
eu.emi.security.authn.x509.OCSPParametes

public class OCSPParametes extends Object
Manages configuration of OCSP support for all truststores.
Author:
K. Benedyczak
  • Field Details

    • DEFAULT_TIMEOUT

      public static final int DEFAULT_TIMEOUT
      See Also:
    • DEFAULT_CACHE

      public static final int DEFAULT_CACHE
      See Also:
    • checkingMode

      protected OCSPCheckingMode checkingMode
    • localResponders

      protected OCSPResponder[] localResponders
    • conntectTimeout

      protected int conntectTimeout
    • preferLocalResponders

      protected boolean preferLocalResponders
    • useNonce

      protected boolean useNonce
    • cacheTtl

      protected int cacheTtl
    • diskCachePath

      protected String diskCachePath
  • Constructor Details

    • OCSPParametes

      public OCSPParametes()
      Default constructor using OCSPCheckingMode.IF_AVAILABLE.
      See Also:
    • OCSPParametes

      public OCSPParametes(OCSPCheckingMode checkingMode)
      Constructor without any local responders and default settings.
      Parameters:
      checkingMode - general checking mode
      See Also:
    • OCSPParametes

      public OCSPParametes(OCSPCheckingMode checkingMode, OCSPResponder localResponder)
      Uses default settings for timeout (DEFAULT_TIMEOUT), and cache (DEFAULT_CACHE and no disk persistence of cached responses), prefers local responders, do not sign requests and do not use nonce. Uses only a single local responder.
      Parameters:
      checkingMode - general checking mode
      localResponder - a single local responder
    • OCSPParametes

      public OCSPParametes(OCSPCheckingMode checkingMode, OCSPResponder[] localResponders, int cacheTtl, String diskCachePath)
      Uses default settings for timeout (DEFAULT_TIMEOUT), prefers local responders, do not sign requests and do not use nonce.
      Parameters:
      checkingMode - general checking mode
      localResponders - list of local responders (can be empty, but not null)
      cacheTtl - maximum time after each cached response expires. Negative for no cache at all, 0 for no limit (i.e. caching time will be only controlled by the OCSP response validity period). In s.
      diskCachePath - if not null, cached responses will be stored on disk.
    • OCSPParametes

      public OCSPParametes(OCSPCheckingMode checkingMode, OCSPResponder[] localResponders, int conntectTimeout, boolean preferLocalResponders, boolean useNonce, int cacheTtl, String diskCachePath)
      Full constructor
      Parameters:
      checkingMode - general checking mode
      localResponders - list of local responders (can be empty, but not null)
      conntectTimeout - OCSP responder connection and communication timeout
      preferLocalResponders - whether to prefer locally defined responders over certificate-defined responder
      useNonce - whether to use in request and require in response the nonce
      cacheTtl - maximum time after each cached response expires. Negative for no cache at all, 0 for no limit (i.e. caching time will be only controlled by the OCSP response validity period). In s.
      diskCachePath - if not null, cached responses will be stored on disk.
  • Method Details

    • getCheckingMode

      public OCSPCheckingMode getCheckingMode()
      Returns:
      the checkingMode
    • setCheckingMode

      public void setCheckingMode(OCSPCheckingMode checkingMode)
      Parameters:
      checkingMode - the checkingMode to set
    • getLocalResponders

      public OCSPResponder[] getLocalResponders()
      Returns:
      the localResponders
    • setLocalResponders

      public void setLocalResponders(OCSPResponder[] localResponders)
      Parameters:
      localResponders - the localResponders to set
    • getConntectTimeout

      public int getConntectTimeout()
      Returns:
      the conntectTimeout
    • setConntectTimeout

      public void setConntectTimeout(int conntectTimeout)
      Parameters:
      conntectTimeout - the conntectTimeout to set
    • isPreferLocalResponders

      public boolean isPreferLocalResponders()
      Returns:
      the preferLocalResponders
    • setPreferLocalResponders

      public void setPreferLocalResponders(boolean preferLocalResponders)
      Parameters:
      preferLocalResponders - the preferLocalResponders to set
    • isUseNonce

      public boolean isUseNonce()
      Returns:
      the useNonce
    • setUseNonce

      public void setUseNonce(boolean useNonce)
      Parameters:
      useNonce - the useNonce to set
    • getCacheTtl

      public int getCacheTtl()
      Returns:
      the cacheTtl
    • setCacheTtl

      public void setCacheTtl(int cacheTtl)
      Parameters:
      cacheTtl - the cacheTtl to set
    • getDiskCachePath

      public String getDiskCachePath()
      Returns:
      the diskCachePath
    • setDiskCachePath

      public void setDiskCachePath(String diskCachePath)
      Parameters:
      diskCachePath - the diskCachePath to set