mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-09 00:18:39 +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
|
* @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}.
|
* @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
|
@Deprecated
|
||||||
int getHeartbeatInterval();
|
int getHeartbeatInterval();
|
||||||
@@ -85,6 +86,7 @@ public interface Transport
|
|||||||
/**
|
/**
|
||||||
* @param interval the interval in seconds, {@code 0} means no hearbeat
|
* @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}.
|
* @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
|
@Deprecated
|
||||||
void setHeartbeatInterval(int interval);
|
void setHeartbeatInterval(int interval);
|
||||||
|
|||||||
@@ -127,10 +127,9 @@ public final class TransportImpl
|
|||||||
this.sshClient = null;
|
this.sshClient = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* Temporary constructor until we remove support for the set/get Heartbeat interval from transport.
|
* Temporary constructor until we remove support for the set/get Heartbeat interval from transport.
|
||||||
* @param config
|
* @deprecated To be removed in 0.12.0
|
||||||
* @param sshClient
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public TransportImpl(Config config, SSHClient sshClient) {
|
public TransportImpl(Config config, SSHClient sshClient) {
|
||||||
|
|||||||
@@ -139,9 +139,7 @@ public class PKCS8KeyFile
|
|||||||
JcePEMDecryptorProviderBuilder decryptorBuilder = new JcePEMDecryptorProviderBuilder();
|
JcePEMDecryptorProviderBuilder decryptorBuilder = new JcePEMDecryptorProviderBuilder();
|
||||||
decryptorBuilder.setProvider("BC");
|
decryptorBuilder.setProvider("BC");
|
||||||
try {
|
try {
|
||||||
// Do not return null, as JcePEMDecryptorProviderBuilder$1$1.decrypt would throw an exception
|
passphrase = pwdf == null ? null : pwdf.reqPassword(resource);
|
||||||
// in that case because it requires a 'password' (i.e. passphrase).
|
|
||||||
passphrase = pwdf == null ? "".toCharArray() : pwdf.reqPassword(resource);
|
|
||||||
kp = pemConverter.getKeyPair(encryptedKeyPair.decryptKeyPair(decryptorBuilder.build(passphrase)));
|
kp = pemConverter.getKeyPair(encryptedKeyPair.decryptKeyPair(decryptorBuilder.build(passphrase)));
|
||||||
} finally {
|
} finally {
|
||||||
PasswordUtils.blankOut(passphrase);
|
PasswordUtils.blankOut(passphrase);
|
||||||
|
|||||||
Reference in New Issue
Block a user