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 KeyPairs.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected Iterable | doReadKeyPairs(SessionContext session, NamedResource resourceKey, InputStream inputStream)
Overrides org.
|
| protected void | doWriteKeyPair(NamedResource resourceKey, KeyPair kp, OutputStream outputStream)
Implements abstract org.
|
| private boolean |
| SimpleGeneratorHostKeyProvider | back to summary |
|---|---|
| public SimpleGeneratorHostKeyProvider() | |
| SimpleGeneratorHostKeyProvider | back to summary |
|---|---|
| public SimpleGeneratorHostKeyProvider(Path path) | |
| doReadKeyPairs | back to summary |
|---|---|
| protected Iterable Overrides org.
| |
| doWriteKeyPair | back to summary |
|---|---|
| protected void doWriteKeyPair(NamedResource resourceKey, KeyPair kp, OutputStream outputStream) throws IOException, GeneralSecurityException Implements abstract org.
| |
| isJavaSerialization | back to summary |
|---|---|
| private boolean isJavaSerialization(BufferedInputStream in, NamedResource resourceKey) throws IOException | |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| protected Class | resolveClass(ObjectStreamClass
an instance of class desc)ObjectStreamClassOverrides java. Load the local class equivalent of the specified stream class description. |
| private void |
| ALLOWED | back to summary |
|---|---|
| private static final Set<String> ALLOWED | |
| ValidatingObjectInputStream | back to summary |
|---|---|
| pack-priv ValidatingObjectInputStream(InputStream in) throws IOException | |
| resolveClass | back to summary |
|---|---|
| protected Class Overrides java. Doc from java. Load the local class equivalent of the specified stream class description. Subclasses may implement this method to allow classes to be fetched from an alternate source. The corresponding method in The default implementation of this method in
Class.forName(desc.getName(), false, loader) loader is the first class loader on the current
thread's stack (starting from the currently executing method) that is
neither the platform
class loader nor its ancestor; otherwise, loader is the
platform class loader. If this call results in a
ClassNotFoundException and the name of the passed
ObjectStreamClass instance is the Java language keyword
for a primitive type or void, then the Class object
representing that primitive type or void will be returned
(e.g., an ObjectStreamClass with the name
"int" will be resolved to Integer.TYPE).
Otherwise, the ClassNotFoundException will be thrown to
the caller of this method.
| |
| validate | back to summary |
|---|---|
| private void validate(String className) throws IOException | |