generateReaderCertificate
suspend fun generateReaderCertificate(readerRootKey: AsymmetricKey.X509Certified, readerKey: EcPublicKey, subject: X500Name, serial: ASN1Integer, validFrom: Instant, validUntil: Instant, extensions: List<X509Extension> = emptyList()): X509Cert
Generates a reader auth certificate according to ISO/IEC 18013-5:2021 Annex B.1.7.
Return
a X509Cert with all the required extensions.
Parameters
readerRootKey
the reader root certificate and the corresponding private key.
readerKey
the public part of the reader key.
subject
the value to use for subject, e.g. "CN=Test Reader,C=ZZ".
serial
the serial number to use for the certificate.
validFrom
the point in time the certificate should be valid from.
validUntil
the point in time the certificate should be valid until.
extensions
additional extensions to include in the reader certificate.