public class OpenSshCertificateImpl extends Object implements OpenSshCertificate
OpenSshCertificate.CertificateOption, OpenSshCertificate.TypeINFINITY, MIN_EPOCH| Constructor and Description |
|---|
OpenSshCertificateImpl() |
| Modifier and Type | Method and Description |
|---|---|
String |
getAlgorithm() |
PublicKey |
getCaPubKey()
Retrieves the CA public key of this certificate.
|
PublicKey |
getCertPubKey()
Retrieves the certified public key.
|
List<OpenSshCertificate.CertificateOption> |
getCriticalOptions()
Retrieves the critical options set in the certificate.
|
byte[] |
getEncoded() |
List<OpenSshCertificate.CertificateOption> |
getExtensions()
Retrieves the extensions set in the certificate.
|
String |
getFormat() |
String |
getId()
Retrieves a free-form text set by the CA when the certificate was generated; intended to identify the identity
principal in log message.
|
String |
getKeyType()
Retrieves the SSH key type of this certificate.
|
byte[] |
getMessage()
Retrieves the raw byte content of the certificate, minus the signature.
|
byte[] |
getNonce()
Retrieves the nonce of this certificate.
|
Collection<String> |
getPrincipals()
Retrieves the principals mentioned in the certificate.
|
String |
getRawKeyType()
Retrieves the raw SSH key type of this certificate.
|
byte[] |
getRawSignature()
Retrieves the raw signature bytes, without the signature algorithm.
|
String |
getReserved()
Retrieves the "reserved" field of the certificate.
|
long |
getSerial()
Retrieves the serial number of this certificate.
|
byte[] |
getSignature()
Retrieves the signature of the certificate, including the signature algorithm.
|
String |
getSignatureAlgorithm()
Retrieves the signature algorithm used for the signature.
|
OpenSshCertificate.Type |
getType()
Retrieves the type of certificate.
|
long |
getValidAfter()
Retrieves the time in number of seconds since the
Instant.EPOCH at which this certificate
becomes or became valid. |
long |
getValidBefore()
Retrieves the time in number of seconds since the
Instant.EPOCH at which this certificate
becomes or became invalid. |
void |
setCaPubKey(PublicKey caPubKey) |
void |
setCertPubKey(PublicKey certificatePublicKey) |
void |
setCriticalOptions(List<OpenSshCertificate.CertificateOption> criticalOptions) |
void |
setExtensions(List<OpenSshCertificate.CertificateOption> extensions) |
void |
setId(String id) |
void |
setKeyType(String keyType) |
void |
setMessage(byte[] message) |
void |
setNonce(byte[] nonce) |
void |
setPrincipals(Collection<String> principals) |
void |
setReserved(String reserved) |
void |
setSerial(long serial) |
void |
setSignature(byte[] signature) |
void |
setType(OpenSshCertificate.Type type) |
void |
setValidAfter(Instant validAfter)
If null, uses
OpenSshCertificate.MIN_EPOCH |
void |
setValidAfter(long validAfter) |
void |
setValidBefore(Instant validBefore)
If null, uses
OpenSshCertificate.INFINITY |
void |
setValidBefore(long validBefore) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisValidNowdestroy, isDestroyedpublic String getRawKeyType()
OpenSshCertificategetRawKeyType in interface OpenSshCertificatepublic byte[] getNonce()
OpenSshCertificategetNonce in interface OpenSshCertificatepublic String getKeyType()
OpenSshCertificategetKeyType in interface OpenSshCertificatepublic PublicKey getCertPubKey()
OpenSshCertificategetCertPubKey in interface OpenSshCertificatePublicKeypublic long getSerial()
OpenSshCertificategetSerial in interface OpenSshCertificatepublic OpenSshCertificate.Type getType()
OpenSshCertificategetType in interface OpenSshCertificateOpenSshCertificate.Typepublic String getId()
OpenSshCertificategetId in interface OpenSshCertificatenull but may be empty.public Collection<String> getPrincipals()
OpenSshCertificategetPrincipals in interface OpenSshCertificatenull but possibly emptypublic long getValidAfter()
OpenSshCertificateInstant.EPOCH at which this certificate
becomes or became valid.getValidAfter in interface OpenSshCertificateInstant.EPOCH as an unsigned 64bit valueOpenSshCertificate.isValidNow(OpenSshCertificate)public long getValidBefore()
OpenSshCertificateInstant.EPOCH at which this certificate
becomes or became invalid.getValidBefore in interface OpenSshCertificateInstant.EPOCH as an unsigned 64bit valueOpenSshCertificate.isValidNow(OpenSshCertificate)public List<OpenSshCertificate.CertificateOption> getCriticalOptions()
OpenSshCertificategetCriticalOptions in interface OpenSshCertificatenull but possibly emptypublic List<OpenSshCertificate.CertificateOption> getExtensions()
OpenSshCertificategetExtensions in interface OpenSshCertificatenull but possibly emptypublic String getReserved()
OpenSshCertificategetReserved in interface OpenSshCertificatepublic PublicKey getCaPubKey()
OpenSshCertificategetCaPubKey in interface OpenSshCertificatePublicKeypublic byte[] getMessage()
OpenSshCertificategetMessage in interface OpenSshCertificatepublic byte[] getSignature()
OpenSshCertificategetSignature in interface OpenSshCertificateOpenSshCertificate.getRawSignature()public byte[] getRawSignature()
OpenSshCertificategetRawSignature in interface OpenSshCertificateOpenSshCertificate.getSignature()public String getSignatureAlgorithm()
OpenSshCertificategetSignatureAlgorithm in interface OpenSshCertificatepublic String getAlgorithm()
getAlgorithm in interface Keypublic byte[] getEncoded()
getEncoded in interface Keypublic void setKeyType(String keyType)
public void setNonce(byte[] nonce)
public void setCertPubKey(PublicKey certificatePublicKey)
public void setSerial(long serial)
public void setType(OpenSshCertificate.Type type)
public void setId(String id)
public void setPrincipals(Collection<String> principals)
public void setValidAfter(long validAfter)
public void setValidAfter(Instant validAfter)
OpenSshCertificate.MIN_EPOCHvalidAfter - Instant to use for validAfterpublic void setValidBefore(long validBefore)
public void setValidBefore(Instant validBefore)
OpenSshCertificate.INFINITYvalidBefore - Instant to use for validBeforepublic void setCriticalOptions(List<OpenSshCertificate.CertificateOption> criticalOptions)
public void setExtensions(List<OpenSshCertificate.CertificateOption> extensions)
public void setReserved(String reserved)
public void setCaPubKey(PublicKey caPubKey)
public void setMessage(byte[] message)
public void setSignature(byte[] signature)
Copyright © 2018–2024 The Apache Software Foundation. All rights reserved.