* Add pwdf retry logic to OpenSSHKeyV1KeyFile
While PKCS8KeyFile uses PasswordFinder's shouldRetry to determine
whether it should call reqPassword again if decryption of they key file
fails, OpenSSHKeyV1KeyFile simply gives up and throws an exception.
With this commit, retry logic similar to that of PKCS8KeyFile is added
to OpenSSHKeyV1KeyFile. The PasswordFinder's reqPassword is called
again if the validation of the "checkint" fails, which indicates an
incorrect passphrase.
* Use new exception to signal incorrect passphrase
* Throw common exception on key decryption failure
* Add test coverage for retry logic
Co-authored-by: Jeroen van Erp <jeroen@hierynomus.com>
* Added comment field in HostEntry for end-of-line comments in known_hosts file.
* Also modified the getLine() method to return the comment, if it exists.
* Fixed implementation
* Add CODEOWNERS file
Co-authored-by: Jeroen van Erp <jeroen@hierynomus.com>
* Forgive redundant spaces in OpenSSHv2 public keys and known_hosts
Sometimes users copy-pastes private and public keys in text editors. It leads to redundant spaces
and newlines. OpenSSH can easily read such keys, so users expect from SSHJ the same.
* Fixed bugs in OpenSSH key file and known_hosts parsers
* OpenSSHKnownHosts should not throw errors while parsing corrupted records
* `SocketStreamCopyMonitor` closes channel after setting the one event. It doesn't wait for the second stream to finish the job.
* #317 Fix `SocketStreamCopyMonitor` to wait for all events before closing the channel.
* Added support for RSA to openssh-key-v1 keyfile
* Fixed exception
* Added ECDSA support to openssh-key-v1
* Added integration tests for different keytypes
When the remove window size is expanded, a condition is waited on until
the remote server acknowledges and completes the action. If the server
does not respond, e.g. due to a connectivity issue, then this blocks the
client indefinitely. Instead the client waits up to the connection's
timeout (500 min default) and fails. This allows users to set a reasonable
timeout, fail their operations, and retry accordingly.