Interface DGCSigner

  • All Known Implementing Classes:
    DefaultDGCSigner

    public interface DGCSigner
    An interface for a DCC signer.
    Author:
    Martin Lindström (martin@idsec.se), Henrik Bengtsson (extern.henrik.bengtsson@digg.se), Henric Norlander (extern.henric.norlander@digg.se)
    • Method Detail

      • sign

        byte[] sign​(byte[] dccPayload,
                    Instant expiration)
             throws SignatureException
        Creates a CWT including the CBOR encoded DCC payload and signs it.

        Note: It is the caller's responsibility to ensure that the validity of the issued DCC does not exceed the validity of the signer's certificate (see getSignerExpiration()).

        Parameters:
        dccPayload - the CBOR encoding of the DCC payload
        expiration - the expiration time for the DCC
        Returns:
        the CBOR encoding of the signed CWT holding the DCC payload
        Throws:
        SignatureException - for signature errors
      • getSignerExpiration

        Instant getSignerExpiration()
        Gets the point in time when this signer's certificate expires. For maximum interoperability, the validity of a DCC should not stretch beyond this time.
        Returns:
        the signer certificate expiration time
      • getSignerCountry

        String getSignerCountry()
        Gets the ISO-3166 country code of the signer (issuer).
        Returns:
        the country code of the signer