Class ITSCertificate

java.lang.Object
org.bouncycastle.its.ITSCertificate
All Implemented Interfaces:
org.bouncycastle.util.Encodable

public class ITSCertificate extends Object implements org.bouncycastle.util.Encodable
  • Constructor Details

    • ITSCertificate

      public ITSCertificate(org.bouncycastle.oer.its.ieee1609dot2.CertificateBase certificate)
  • Method Details

    • getIssuer

      public org.bouncycastle.oer.its.ieee1609dot2.IssuerIdentifier getIssuer()
    • getValidityPeriod

      public ITSValidityPeriod getValidityPeriod()
    • getPublicEncryptionKey

      public ITSPublicEncryptionKey getPublicEncryptionKey()
      Return the certificate's public encryption key, if present.
      Returns:
    • isSignatureValid

      public boolean isSignatureValid(ITSContentVerifierProvider verifierProvider) throws Exception
      Throws:
      Exception
    • toASN1Structure

      public org.bouncycastle.oer.its.ieee1609dot2.CertificateBase toASN1Structure()
    • getEncoded

      public byte[] getEncoded() throws IOException
      Specified by:
      getEncoded in interface org.bouncycastle.util.Encodable
      Throws:
      IOException
    • getCanonicalEncoding

      public byte[] getCanonicalEncoding() throws IOException
      Return the encoding of this certificate to use when it is hashed, for example to calculate its HashedId8 or the signer certificate digest included in a signature calculation.

      IEEE 1609.2 allows the rSig of a certificate's signature to be any of x-only, compressed-y-0, compressed-y-1 or uncompressed, but requires it to be taken to be of form x-only when the certificate is encoded for hashing. The returned encoding is the same as getEncoded() with rSig converted to x-only, so every encoding of the same signature hashes to the same value.

      Returns:
      the OER encoding of this certificate with its signature's rSig of form x-only.
      Throws:
      IOException - if the signature cannot be converted or the certificate cannot be encoded.