public class OpenSshRsaCertificate extends OpenSshCertificate implements SshRsaPublicKey
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
SSH_RSA_CERT_V01 |
OPTION_FORCE_COMMAND, OPTION_SOURCE_ADDRESS, PERMIT_AGENT_FORWARDING, PERMIT_PORT_FORWARDING, PERMIT_USER_PTY, PERMIT_USER_RC, PERMIT_X11_FORWARDING, publicKey, SSH_CERT_TYPE_HOST, SSH_CERT_TYPE_USER| Constructor and Description |
|---|
OpenSshRsaCertificate()
Default constructor for initializing the key from a byte array using the
init method.
|
OpenSshRsaCertificate(java.math.BigInteger modulus,
java.math.BigInteger publicExponent) |
OpenSshRsaCertificate(java.security.interfaces.RSAPublicKey pubKey) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
decodePublicKey(com.sshtools.common.util.ByteArrayReader reader) |
java.math.BigInteger |
doPublic(java.math.BigInteger input) |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getAlgorithm()
Get the algorithm name for the public key.
|
int |
getBitLength()
Get the bit length of the public key
|
java.security.PublicKey |
getJCEPublicKey()
Return the JCE component for this key.
|
java.math.BigInteger |
getModulus() |
int |
getPriority() |
java.math.BigInteger |
getPublicExponent() |
SecurityLevel |
getSecurityLevel() |
java.lang.String |
getSigningAlgorithm()
The algorithm name expected to be encoded in SSH signatures
|
int |
getVersion() |
int |
hashCode() |
java.lang.String |
test()
Test the JCE for algorithm availability.
|
boolean |
verifySignature(byte[] signature,
byte[] data)
Verify the signature.
|
decodeCertificate, encodeCertificate, getCriticalOptions, getCriticalOptionsList, getEncoded, getEncodingAlgorithm, getExtension, getExtensions, getExtensionsList, getExtensionsMap, getFingerprint, getForcedCommand, getKeyId, getPrincipals, getSerial, getSignedBy, getSignedKey, getSourceAddresses, getType, getValidAfter, getValidBefore, init, isForceCommand, isHostCertificate, isUserCertificate, signclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetEncoded, getEncodingAlgorithm, getFingerprint, init, isCertificatepublic static final java.lang.String SSH_RSA_CERT_V01
public OpenSshRsaCertificate()
public OpenSshRsaCertificate(java.security.interfaces.RSAPublicKey pubKey)
public OpenSshRsaCertificate(java.math.BigInteger modulus,
java.math.BigInteger publicExponent)
throws java.security.NoSuchAlgorithmException,
java.security.spec.InvalidKeySpecException
java.security.NoSuchAlgorithmExceptionjava.security.spec.InvalidKeySpecExceptionpublic SecurityLevel getSecurityLevel()
getSecurityLevel in interface SecureComponentpublic int getPriority()
getPriority in interface SecureComponentpublic int getBitLength()
SshPublicKeygetBitLength in interface SshPublicKeyprotected void decodePublicKey(com.sshtools.common.util.ByteArrayReader reader)
throws java.io.IOException,
SshException
decodePublicKey in class OpenSshCertificatejava.io.IOExceptionSshExceptionpublic java.lang.String getAlgorithm()
SshPublicKeygetAlgorithm in interface SshPublicKeygetAlgorithm in interface SecureComponentpublic boolean verifySignature(byte[] signature,
byte[] data)
throws SshException
SshPublicKeyverifySignature in interface SshPublicKeytrue if the signature was produced by the corresponding
private key that owns this public key, otherwise false.SshExceptionpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic int getVersion()
getVersion in interface SshRsaPublicKeypublic java.security.PublicKey getJCEPublicKey()
SshPublicKeygetJCEPublicKey in interface SshPublicKeygetJCEPublicKey in interface SshRsaPublicKeypublic java.lang.String test()
SshPublicKeytest in interface SshPublicKeypublic java.lang.String getSigningAlgorithm()
SshPublicKeygetSigningAlgorithm in interface SshPublicKeypublic java.math.BigInteger getModulus()
getModulus in interface SshRsaPublicKeypublic java.math.BigInteger getPublicExponent()
getPublicExponent in interface SshRsaPublicKeypublic java.math.BigInteger doPublic(java.math.BigInteger input)
throws SshException
doPublic in interface SshRsaPublicKeySshExceptionCopyright © 2022. All rights reserved.