public class C509PEM
extends java.lang.Object
implements javax.security.auth.Destroyable
C509PEM = [ C509PrivateKey, COSE_C509 / null ]pairing a private key with the certificates for the corresponding public key. Destroying a C509PEM destroys the private key it holds.
| Constructor and Description |
|---|
C509PEM(C509PrivateKey privateKey,
C509Certificate[] certificates)
Base constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
C509Certificate[] |
getCertificates()
Return the certificates, or null if none were carried.
|
byte[] |
getEncoded()
Return the complete CBOR encoding of this structure.
|
static C509PEM |
getInstance(byte[] encoding)
Parse a C509PEM structure from its CBOR encoding.
|
C509PrivateKey |
getPrivateKey()
Return the private key.
|
boolean |
isDestroyed() |
public C509PEM(C509PrivateKey privateKey, C509Certificate[] certificates)
privateKey - the private key.certificates - the certificates for the corresponding public key, or null.public static C509PEM getInstance(byte[] encoding) throws java.io.IOException
java.io.IOExceptionpublic byte[] getEncoded()
throws java.io.IOException
java.io.IOExceptionpublic C509PrivateKey getPrivateKey()
public C509Certificate[] getCertificates()
public void destroy()
throws javax.security.auth.DestroyFailedException
destroy in interface javax.security.auth.Destroyablejavax.security.auth.DestroyFailedExceptionpublic boolean isDestroyed()
isDestroyed in interface javax.security.auth.Destroyable