All Implemented Interfaces:
IdentifierBasedObject, Serializable

public class OCSPToken extends RevocationToken<OCSP>
OCSP Signed Token which encapsulate BasicOCSPResp (BC).
See Also:
  • Constructor Details

    • OCSPToken

      public OCSPToken(org.bouncycastle.cert.ocsp.BasicOCSPResp basicOCSPResp, org.bouncycastle.cert.ocsp.SingleResp latestSingleResp, CertificateToken certificate, CertificateToken issuer)
      The default constructor to instantiate an OCSPToken with BasicOCSPResp only
      Parameters:
      basicOCSPResp - BasicOCSPResp containing the response binaries
      latestSingleResp - SingleResp to be used with the current certificate
      certificate - CertificateToken to which the revocation data is provided for
      issuer - CertificateToken issued the certificateToken
  • Method Details

    • getSignatureAlgorithm

      public eu.europa.esig.dss.enumerations.SignatureAlgorithm getSignatureAlgorithm()
      Overrides:
      getSignatureAlgorithm in class Token
    • getBasicOCSPResp

      public org.bouncycastle.cert.ocsp.BasicOCSPResp getBasicOCSPResp()
      Returns the BasicOCSPResp
      Returns:
      BasicOCSPResp
    • getLatestSingleResp

      public org.bouncycastle.cert.ocsp.SingleResp getLatestSingleResp()
      Returns the latest single response
      Returns:
      SingleResp
    • getCertificateSource

      public OCSPCertificateSource getCertificateSource()
      Description copied from class: RevocationToken
      Returns a source of embedded into a revocation token certificates
      Specified by:
      getCertificateSource in class RevocationToken<OCSP>
      Returns:
      RevocationCertificateSource
    • getEncoded

      public byte[] getEncoded()
      Specified by:
      getEncoded in class Token
    • getIssuerX500Principal

      public X500Principal getIssuerX500Principal()
      Specified by:
      getIssuerX500Principal in class Token
    • getIssuerCertificateToken

      public CertificateToken getIssuerCertificateToken()
      Description copied from class: RevocationToken
      Returns issuer CertificateToken
      Specified by:
      getIssuerCertificateToken in class RevocationToken<OCSP>
      Returns:
      issuer CertificateToken
    • isValid

      public boolean isValid()
      Indicates if the token signature is intact. NOTE: The method isSignedBy(token) must be called before!
      Specified by:
      isValid in class RevocationToken<OCSP>
      Returns:
      true or false
    • checkIsSignedBy

      protected eu.europa.esig.dss.enumerations.SignatureValidity checkIsSignedBy(PublicKey publicKey)
      Verifies if the current OCSP token has been signed by the specified publicKey
      Specified by:
      checkIsSignedBy in class Token
      Parameters:
      publicKey - PublicKey of a signing candidate
      Returns:
      SignatureValidity
    • getRevocationType

      public eu.europa.esig.dss.enumerations.RevocationType getRevocationType()
      Description copied from class: RevocationToken
      Returns the Revocation Token type (CRL or OCSP)
      Specified by:
      getRevocationType in class RevocationToken<OCSP>
      Returns:
      RevocationType of the token
    • getAbbreviation

      public String getAbbreviation()
      Overrides:
      getAbbreviation in class Token
    • toString

      public String toString(String indentStr)
      Specified by:
      toString in class Token