Package se.digg.dgc.signatures
Interface DGCSigner
-
- All Known Implementing Classes:
DefaultDGCSigner
public interface DGCSignerAn 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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetSignerCountry()Gets the ISO-3166 country code of the signer (issuer).InstantgetSignerExpiration()Gets the point in time when this signer's certificate expires.byte[]sign(byte[] dccPayload, Instant expiration)Creates a CWT including the CBOR encoded DCC payload and signs it.
-
-
-
Method Detail
-
sign
byte[] sign(byte[] dccPayload, Instant expiration) throws SignatureExceptionCreates 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 payloadexpiration- 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
-
-