Package se.digg.dgc.signatures
Class DGCSignatureVerifier.Result
- java.lang.Object
-
- se.digg.dgc.signatures.DGCSignatureVerifier.Result
-
- Enclosing interface:
- DGCSignatureVerifier
public static class DGCSignatureVerifier.Result extends Object
Represents the successful result of a HCERT signature verification.
-
-
Constructor Summary
Constructors Constructor Description Result(byte[] dccPayload, X509Certificate signerCertificate, byte[] kid, String country, Instant issuedAt, Instant expires)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCountry()
Gets the ISO-3166 code for the issuing country.byte[]
getDgcPayload()
Gets the CBOR encoded DCC payload.Instant
getExpires()
Gets the expiration time of the HCERT.Instant
getIssuedAt()
Gets the issuance time of the HCERT.byte[]
getKid()
Gets the key identifier that was used to locate the signer certificate.X509Certificate
getSignerCertificate()
Gets the certificate that was used to verify the signature.
-
-
-
Constructor Detail
-
Result
public Result(byte[] dccPayload, X509Certificate signerCertificate, byte[] kid, String country, Instant issuedAt, Instant expires)
Constructor.- Parameters:
dccPayload
- the CBOR encoded DCC payloadsignerCertificate
- the certificate that was used to verify the signaturekid
- he key id that was used to locate the signer certificatecountry
- the ISO-3166 code for the issuing countryissuedAt
- the issuance time of the DCCexpires
- the expiration time of the DCC
-
-
Method Detail
-
getDgcPayload
public byte[] getDgcPayload()
Gets the CBOR encoded DCC payload.- Returns:
- the CBOR encoded DCC payload
-
getSignerCertificate
public X509Certificate getSignerCertificate()
Gets the certificate that was used to verify the signature.- Returns:
- the certificate used to verify the signature
-
getKid
public byte[] getKid()
Gets the key identifier that was used to locate the signer certificate.- Returns:
- the key identifier
-
getCountry
public String getCountry()
Gets the ISO-3166 code for the issuing country.- Returns:
- country code
-
getIssuedAt
public Instant getIssuedAt()
Gets the issuance time of the HCERT.- Returns:
- issuance time
-
getExpires
public Instant getExpires()
Gets the expiration time of the HCERT.- Returns:
- the expiration time
-
-