Class OCSPParametes


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

      • conntectTimeout

        protected int conntectTimeout
      • preferLocalResponders

        protected boolean preferLocalResponders
      • useNonce

        protected boolean useNonce
      • cacheTtl

        protected int cacheTtl
      • diskCachePath

        protected java.lang.String diskCachePath
    • Constructor Detail

      • 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,
                             java.lang.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,
                             java.lang.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 Detail

      • 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 java.lang.String getDiskCachePath()
        Returns:
        the diskCachePath
      • setDiskCachePath

        public void setDiskCachePath​(java.lang.String diskCachePath)
        Parameters:
        diskCachePath - the diskCachePath to set