public class SimpleGeneratorHostKeyProvider extends AbstractGeneratorHostKeyProvider
AbstractGeneratorHostKeyProvider
that writes and reads host keys using the
OpenSSH file format. Legacy keys written by earlier implementations used Java serialization. De-serializing is
restricted to a small number of classes known to exist in serialized KeyPair
s.DEFAULT_ALGORITHM, DEFAULT_ALLOWED_TO_OVERWRITE
log
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
EMPTY_KEYS_PROVIDER
Constructor and Description |
---|
SimpleGeneratorHostKeyProvider() |
SimpleGeneratorHostKeyProvider(Path path) |
Modifier and Type | Method and Description |
---|---|
protected Iterable<KeyPair> |
doReadKeyPairs(SessionContext session,
NamedResource resourceKey,
InputStream inputStream) |
protected void |
doWriteKeyPair(NamedResource resourceKey,
KeyPair kp,
OutputStream outputStream) |
clearLoadedKeys, generateKeyPair, getAlgorithm, getKeySize, getKeySpec, getPath, isOverwriteAllowed, loadFromFile, loadKeys, readKeyPairs, resolveKeyPairs, setAlgorithm, setKeySize, setKeySpec, setOverwriteAllowed, setPath, writeKeyPair
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warn
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getKeyTypes, loadKey, wrap, wrap
exhaustCurrentIdentities, isEmpty, iterableOf, multiProvider, multiProvider, resolveKeyIdentityProvider, wrapKeyPairs, wrapKeyPairs
public SimpleGeneratorHostKeyProvider()
public SimpleGeneratorHostKeyProvider(Path path)
protected Iterable<KeyPair> doReadKeyPairs(SessionContext session, NamedResource resourceKey, InputStream inputStream) throws IOException, GeneralSecurityException
doReadKeyPairs
in class AbstractGeneratorHostKeyProvider
IOException
GeneralSecurityException
protected void doWriteKeyPair(NamedResource resourceKey, KeyPair kp, OutputStream outputStream) throws IOException, GeneralSecurityException
doWriteKeyPair
in class AbstractGeneratorHostKeyProvider
IOException
GeneralSecurityException
Copyright © 2008–2024 The Apache Software Foundation. All rights reserved.