public abstract class OpenSshCertificate extends Object implements SshPublicKey
| Modifier and Type | Field and Description |
|---|---|
static String |
OPTION_FORCE_COMMAND |
static String |
OPTION_SOURCE_ADDRESS |
static String |
PERMIT_AGENT_FORWARDING |
static String |
PERMIT_PORT_FORWARDING |
static String |
PERMIT_USER_PTY |
static String |
PERMIT_USER_RC |
static String |
PERMIT_X11_FORWARDING |
static int |
SSH_CERT_TYPE_HOST |
static int |
SSH_CERT_TYPE_USER |
| Constructor and Description |
|---|
OpenSshCertificate() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
decodeCertificate(ByteArrayReader reader) |
protected abstract void |
decodePublicKey(ByteArrayReader reader) |
protected void |
encodeCertificate(ByteArrayWriter writer) |
Map<String,String> |
getCriticalOptions()
Deprecated.
Process CertificateExtension values directly.
|
List<CriticalOption> |
getCriticalOptionsList() |
byte[] |
getEncoded()
Encode the public key into a blob of binary data, the encoded result will be
passed into init to recreate the key.
|
String |
getEncodingAlgorithm()
The algorithm name used in the encoding of the public key
|
CertificateExtension |
getExtension(String key) |
List<String> |
getExtensions()
Deprecated.
Process CertificateExtension values directly.
|
List<CertificateExtension> |
getExtensionsList() |
Map<String,String> |
getExtensionsMap()
Deprecated.
Process CertificateExtension values directly.
|
String |
getFingerprint()
Return an SSH fingerprint of the public key
|
String |
getForcedCommand() |
String |
getKeyId() |
List<String> |
getPrincipals() |
UnsignedInteger64 |
getSerial() |
SshPublicKey |
getSignedBy() |
SshPublicKey |
getSignedKey() |
String |
getSigningAlgorithm()
The algorithm name expected to be encoded in SSH signatures
|
Set<String> |
getSourceAddresses() |
int |
getType() |
Date |
getValidAfter() |
Date |
getValidBefore() |
OpenSshCertificate |
init(byte[] blob) |
void |
init(byte[] blob,
int start,
int len)
Initialize the public key from a blob of binary data.
|
boolean |
isForceCommand() |
boolean |
isHostCertificate() |
boolean |
isUserCertificate() |
void |
sign(SshPublicKey publicKey,
UnsignedInteger64 serial,
int type,
String keyId,
List<String> validPrincipals,
UnsignedInteger64 validAfter,
UnsignedInteger64 validBefore,
List<CriticalOption> criticalOptions,
List<CertificateExtension> extensions,
SshKeyPair signingKey) |
void |
verify() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAlgorithm, getBitLength, getJCEPublicKey, test, verifySignaturegetPriority, getSecurityLevelpublic static final int SSH_CERT_TYPE_USER
public static final int SSH_CERT_TYPE_HOST
public static final String PERMIT_X11_FORWARDING
public static final String PERMIT_PORT_FORWARDING
public static final String PERMIT_AGENT_FORWARDING
public static final String PERMIT_USER_PTY
public static final String PERMIT_USER_RC
public static final String OPTION_FORCE_COMMAND
public static final String OPTION_SOURCE_ADDRESS
public String getEncodingAlgorithm()
SshPublicKeygetEncodingAlgorithm in interface SshPublicKeypublic String getSigningAlgorithm()
SshPublicKeygetSigningAlgorithm in interface SshPublicKeypublic boolean isUserCertificate()
public boolean isHostCertificate()
public SshPublicKey getSignedKey()
public final String getFingerprint() throws SshException
SshPublicKeygetFingerprint in interface SshPublicKeySshExceptionpublic OpenSshCertificate init(byte[] blob) throws SshException
SshExceptionpublic void init(byte[] blob,
int start,
int len)
throws SshException
SshPublicKeyinit in interface SshPublicKeySshExceptionpublic byte[] getEncoded()
throws SshException
SshPublicKeygetEncoded in interface SshPublicKeySshExceptionprotected abstract void decodePublicKey(ByteArrayReader reader) throws IOException, SshException
IOExceptionSshExceptionprotected void encodeCertificate(ByteArrayWriter writer) throws IOException, SshException
IOExceptionSshExceptionpublic CertificateExtension getExtension(String key)
protected void decodeCertificate(ByteArrayReader reader) throws IOException, SshException
IOExceptionSshExceptionpublic void sign(SshPublicKey publicKey, UnsignedInteger64 serial, int type, String keyId, List<String> validPrincipals, UnsignedInteger64 validAfter, UnsignedInteger64 validBefore, List<CriticalOption> criticalOptions, List<CertificateExtension> extensions, SshKeyPair signingKey) throws SshException
SshExceptionpublic void verify()
throws SshException
SshExceptionpublic SshPublicKey getSignedBy()
public int getType()
@Deprecated public List<String> getExtensions()
public List<CriticalOption> getCriticalOptionsList()
public List<CertificateExtension> getExtensionsList()
@Deprecated public Map<String,String> getExtensionsMap()
public boolean isForceCommand()
public String getForcedCommand()
public Date getValidBefore()
public Date getValidAfter()
public UnsignedInteger64 getSerial()
public String getKeyId()
@Deprecated public Map<String,String> getCriticalOptions()
Copyright © 2025. All rights reserved.