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, wait
getAlgorithm, getBitLength, getJCEPublicKey, test, verifySignature
getPriority, getSecurityLevel
public 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()
SshPublicKey
getEncodingAlgorithm
in interface SshPublicKey
public String getSigningAlgorithm()
SshPublicKey
getSigningAlgorithm
in interface SshPublicKey
public boolean isUserCertificate()
public boolean isHostCertificate()
public SshPublicKey getSignedKey()
public final String getFingerprint() throws SshException
SshPublicKey
getFingerprint
in interface SshPublicKey
SshException
public OpenSshCertificate init(byte[] blob) throws SshException
SshException
public void init(byte[] blob, int start, int len) throws SshException
SshPublicKey
init
in interface SshPublicKey
SshException
public byte[] getEncoded() throws SshException
SshPublicKey
getEncoded
in interface SshPublicKey
SshException
protected abstract void decodePublicKey(ByteArrayReader reader) throws IOException, SshException
IOException
SshException
protected void encodeCertificate(ByteArrayWriter writer) throws IOException, SshException
IOException
SshException
public CertificateExtension getExtension(String key)
protected void decodeCertificate(ByteArrayReader reader) throws IOException, SshException
IOException
SshException
public 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
SshException
public void verify() throws SshException
SshException
public 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 © 2024. All rights reserved.