importCertificate

abstract fun importCertificate(alias: String, certificateDer: ByteArray): CertificateInfo(source)

Imports a single DER-encoded X.509 certificate under alias, replacing any existing entry.

Return

the imported entry, without a private key.

Throws

if the backend is unavailable or the import fails.

if alias is invalid or certificateDer is empty, larger than 1 MiB, or not a DER-encoded X.509 certificate.