Class BouncyCastleGeneratorHostKeyProvider
- java.lang.Object
-
- org.apache.sshd.common.util.logging.AbstractLoggingBean
-
- org.apache.sshd.common.keyprovider.AbstractKeyPairProvider
-
- org.apache.sshd.server.keyprovider.AbstractGeneratorHostKeyProvider
-
- org.apache.sshd.common.util.security.bouncycastle.BouncyCastleGeneratorHostKeyProvider
-
- All Implemented Interfaces:
AlgorithmNameProvider
,KeyIdentityProvider
,KeyPairProvider
,KeySizeIndicator
public class BouncyCastleGeneratorHostKeyProvider extends AbstractGeneratorHostKeyProvider
-
-
Field Summary
-
Fields inherited from class org.apache.sshd.server.keyprovider.AbstractGeneratorHostKeyProvider
DEFAULT_ALGORITHM, DEFAULT_ALLOWED_TO_OVERWRITE
-
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log
-
Fields inherited from interface org.apache.sshd.common.keyprovider.KeyIdentityProvider
EMPTY_KEYS_PROVIDER
-
Fields inherited from interface org.apache.sshd.common.keyprovider.KeyPairProvider
ECDSA_SHA2_NISTP256, ECDSA_SHA2_NISTP384, ECDSA_SHA2_NISTP521, EMPTY_KEYPAIR_PROVIDER, SSH_DSS, SSH_DSS_CERT, SSH_ECDSA_SHA2_NISTP256_CERT, SSH_ECDSA_SHA2_NISTP384_CERT, SSH_ECDSA_SHA2_NISTP521_CERT, SSH_ED25519, SSH_ED25519_CERT, SSH_RSA, SSH_RSA_CERT
-
-
Constructor Summary
Constructors Constructor Description BouncyCastleGeneratorHostKeyProvider(java.nio.file.Path path)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doWriteKeyPair(NamedResource resourceKey, java.security.KeyPair kp, java.io.OutputStream outputStream)
static void
writePEMKeyPair(java.security.KeyPair kp, java.io.OutputStream outputStream)
static void
writePEMKeyPair(java.security.KeyPair kp, java.nio.file.Path targetPath)
static void
writePEMKeyPair(java.security.KeyPair kp, java.nio.file.Path targetPath, java.nio.file.OpenOption... options)
-
Methods inherited from class org.apache.sshd.server.keyprovider.AbstractGeneratorHostKeyProvider
clearLoadedKeys, doReadKeyPairs, generateKeyPair, getAlgorithm, getKeySize, getKeySpec, getPath, hasStrictFilePermissions, isOverwriteAllowed, loadFromFile, loadKeys, readKeyPairs, resolveKeyPairs, setAlgorithm, setFilePermissions, setKeySize, setKeySpec, setOverwriteAllowed, setPath, setStrictFilePermissions, writeKeyPair
-
Methods inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warn
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.sshd.common.keyprovider.KeyPairProvider
getKeyTypes, loadKey
-
-
-
-
Method Detail
-
doWriteKeyPair
protected void doWriteKeyPair(NamedResource resourceKey, java.security.KeyPair kp, java.io.OutputStream outputStream) throws java.io.IOException, java.security.GeneralSecurityException
- Specified by:
doWriteKeyPair
in classAbstractGeneratorHostKeyProvider
- Throws:
java.io.IOException
java.security.GeneralSecurityException
-
writePEMKeyPair
public static void writePEMKeyPair(java.security.KeyPair kp, java.nio.file.Path targetPath) throws java.io.IOException
- Throws:
java.io.IOException
-
writePEMKeyPair
public static void writePEMKeyPair(java.security.KeyPair kp, java.nio.file.Path targetPath, java.nio.file.OpenOption... options) throws java.io.IOException
- Throws:
java.io.IOException
-
writePEMKeyPair
public static void writePEMKeyPair(java.security.KeyPair kp, java.io.OutputStream outputStream) throws java.io.IOException
- Throws:
java.io.IOException
-
-