mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-06 07:10:53 +03:00
Processed review comments from @demobox. Thx!
This commit is contained in:
@@ -78,6 +78,7 @@ public interface Transport
|
||||
/**
|
||||
* @return the interval in seconds at which a heartbeat message is sent to the server
|
||||
* @deprecated Moved to {@link net.schmizz.keepalive.KeepAlive#getKeepAliveInterval()}. This is accessible through the {@link net.schmizz.sshj.connection.Connection}.
|
||||
* Scheduled to be removed in 0.12.0
|
||||
*/
|
||||
@Deprecated
|
||||
int getHeartbeatInterval();
|
||||
@@ -85,6 +86,7 @@ public interface Transport
|
||||
/**
|
||||
* @param interval the interval in seconds, {@code 0} means no hearbeat
|
||||
* @deprecated Moved to {@link net.schmizz.keepalive.KeepAlive#getKeepAliveInterval()}. This is accessible through the {@link net.schmizz.sshj.connection.Connection}.
|
||||
* Scheduled to be removed in 0.12.0
|
||||
*/
|
||||
@Deprecated
|
||||
void setHeartbeatInterval(int interval);
|
||||
|
||||
@@ -127,10 +127,9 @@ public final class TransportImpl
|
||||
this.sshClient = null;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Temporary constructor until we remove support for the set/get Heartbeat interval from transport.
|
||||
* @param config
|
||||
* @param sshClient
|
||||
* @deprecated To be removed in 0.12.0
|
||||
*/
|
||||
@Deprecated
|
||||
public TransportImpl(Config config, SSHClient sshClient) {
|
||||
|
||||
@@ -139,9 +139,7 @@ public class PKCS8KeyFile
|
||||
JcePEMDecryptorProviderBuilder decryptorBuilder = new JcePEMDecryptorProviderBuilder();
|
||||
decryptorBuilder.setProvider("BC");
|
||||
try {
|
||||
// Do not return null, as JcePEMDecryptorProviderBuilder$1$1.decrypt would throw an exception
|
||||
// in that case because it requires a 'password' (i.e. passphrase).
|
||||
passphrase = pwdf == null ? "".toCharArray() : pwdf.reqPassword(resource);
|
||||
passphrase = pwdf == null ? null : pwdf.reqPassword(resource);
|
||||
kp = pemConverter.getKeyPair(encryptedKeyPair.decryptKeyPair(decryptorBuilder.build(passphrase)));
|
||||
} finally {
|
||||
PasswordUtils.blankOut(passphrase);
|
||||
|
||||
Reference in New Issue
Block a user