| Modifier and Type | Field and Description |
|---|---|
| private final AtomicBoolean | |
| private final Connector | |
| private static final Logger | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| public | SshAgentClient(Connector
Connector to useCreates a new |
| Modifier and Type | Method and Description |
|---|---|
| public void | addIdentity(KeyPair
KeyPair to addto associate with the key comment, SshAgentKeyConstraint... SshAgentKeyConstraints for this key to pass on to the agentImplements org. Adds a key to the agent. |
| private static byte[] | Returns: the extracted private key bytes; of lengthnencoded private key to extract the private key bytes from encoded, int number of bytes expected n)Extracts the private key bytes from an encoded ed25519 private key by parsing the bytes as ASN.1 according to RFC 5958 (PKCS #8 encoding):
OneAsymmetricKey ::= SEQUENCE {
version Version,
privateKeyAlgorithm PrivateKeyAlgorithmIdentifier,
privateKey PrivateKey,
...
|
| public void | |
| public Iterable | |
| public boolean | |
| private boolean | |
| private static void | |
| private static PublicKey | |
| public void | |
| public void | |
| private Buffer | |
| private Buffer | |
| public Map. | sign(SessionContext
The current session, PublicKey SessionContextThe key, String PublicKey to use for signingRecommended signature algorithm - if algorithm, byte[] null/empty then one will be selected based on
the key type and/or signature factoriesNote even if specific algorithm specified, the implementation may disregard and choose another Data to sign data)Implements org.
|
| closed | back to summary |
|---|---|
| private final AtomicBoolean closed | |
| connector | back to summary |
|---|---|
| private final Connector connector | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| MAX_NUMBER_OF_KEYS | back to summary |
|---|---|
| private static final int MAX_NUMBER_OF_KEYS | |
| SshAgentClient | back to summary |
|---|---|
| public SshAgentClient(Connector connector) Creates a new | |
| addIdentity | back to summary |
|---|---|
| public void addIdentity(KeyPair key, String comment, SshAgentKeyConstraint... constraints) throws IOException Implements org. Doc from org. Adds a key to the agent.
| |
| asn1Parse | back to summary |
|---|---|
| private static byte[] asn1Parse(byte[] encoded, int n) throws IOException Extracts the private key bytes from an encoded ed25519 private key by parsing the bytes as ASN.1 according to RFC 5958 (PKCS #8 encoding):
OneAsymmetricKey ::= SEQUENCE {
version Version,
privateKeyAlgorithm PrivateKeyAlgorithmIdentifier,
privateKey PrivateKey,
...
}
Version ::= INTEGER
PrivateKeyAlgorithmIdentifier ::= AlgorithmIdentifier
PrivateKey ::= OCTET STRING
AlgorithmIdentifier ::= SEQUENCE {
algorithm OBJECT IDENTIFIER,
parameters ANY DEFINED BY algorithm OPTIONAL
}
and RFC 8410: "... when encoding a OneAsymmetricKey object, the private key is wrapped in a CurvePrivateKey object and wrapped by the OCTET STRING of the 'privateKey' field." CurvePrivateKey ::= OCTET STRING
| |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements java. Doc from java. Closes this channel. After a channel is closed, any further attempt to invoke I/O
operations upon it will cause a If this channel is already closed then invoking this method has no effect. This method may be invoked at any time. If some other thread has already invoked it, however, then another invocation will block until the first invocation is complete, after which it will return without effect.
| |
| getIdentities | back to summary |
|---|---|
| public Iterable Implements org.
| |
| isOpen | back to summary |
|---|---|
| public boolean isOpen() Implements java. Doc from java. Tells whether or not this channel is open.
| |
| open | back to summary |
|---|---|
| private boolean open(boolean debugging) throws IOException | |
| putEd25519Key | back to summary |
|---|---|
| private static void putEd25519Key(Buffer msg, KeyPair key) throws IOException Writes an ed25519
| |
| readKey | back to summary |
|---|---|
| private static PublicKey readKey(Buffer buffer) throws BufferException A safe version of This is needed because an SSH agent might contain and deliver keys that we cannot handle (for instance ed448 keys).
| |
| removeAllIdentities | back to summary |
|---|---|
| public void removeAllIdentities() throws IOException Implements org.
| |
| removeIdentity | back to summary |
|---|---|
| public void removeIdentity(PublicKey key) throws IOException Implements org.
| |
| rpc | back to summary |
|---|---|
| private Buffer rpc(byte command, byte[] message) throws IOException | |
| rpc | back to summary |
|---|---|
| private Buffer rpc(byte command) throws IOException | |
| sign | back to summary |
|---|---|
| public Map. Implements org.
| |