NamedFactory
NullPointerException
on closed channel in NettyIoSession
Charset
in ClientSession.executeRemoteCommand()
SftpClient.put(Path localFile, String remoteFileName)
and SftpClient.put(InputStream in, String remoteFileName)
facilitate SFTP file uploading.Besides fixing a bug with bc-fips (the RandomGenerator
class exists in normal Bouncy Castle, but not in the FIPS version, but Apache MINA sshd referenced it even if only bc-fips was present), support was improved for running in an environment restricted by FIPS.
There is a new system property org.apache.sshd.security.fipsEnabled
. If set to true
, a number of crypto-algorithms not approved by FIPS 140 are disabled:
Additionally, the new “SunJCEWrapper” SecurityProviderRegistrar
(see below) and the EdDSASecurityProviderRegistrar
are disabled, and the BouncyCastleScurityProviderRegistrar
looks only for the “BCFIPS” security provider, not for the normal “BC” provider.
If the system property is not set to true
, FIPS mode can be enabled programmatically by calling SecurityUtils.setFipsMode()
before any other call to Apache MINA sshd.
There is a new SecurityProviderRegistrar
that is registered by default if there is a SunJCE
security provider. It uses the AES and HmacSHA* implementations from SunJCE
even if Bouncy Castle is also registered. SunJCE
has native implementations, whereas Bouncy Castle may not.
The new registrar has the name “SunJCEWrapper” and can be configured like any other registrar. It can be disabled via the system property org.apache.sshd.security.provider.SunJCEWrapper.enabled=false
. It is also disabled in FIPS mode (see above).
NamedFactory
The methods NamedFactory.setupBuiltinFactories(boolean ignoreUnsupported, ...)
and NamedFactory.setupTransformedFactories(boolean ignoreUnsupported, ...)
had a bug that gave the “ignoreUnsupported” parameter actually the meaning of “include unsupported”.
This was fixed in this release, but existing code calling these or one of the following methods:
BaseBuilder.setUpDefaultMacs(boolean ignoreUnsupported)
BaseBuilder.setUpDefaultCiphers(boolean ignoreUnsupported)
ClientBuilder.setUpDefaultCompressionFactories(boolean ignoreUnsupported)
ClientBuilder.setUpDefaultKeyExchanges(boolean ignoreUnsupported)
ClientBuilder.setUpDefaultSignatureFactories(boolean ignoreUnsupported)
ServerBuilder.setUpDefaultCompressionFactories(boolean ignoreUnsupported)
ServerBuilder.setUpDefaultKeyExchanges(boolean ignoreUnsupported)
ServerBuilder.setUpDefaultSignatureFactories(boolean ignoreUnsupported)
SshConfigFileReader.configure
SshClientConfigFileReader.configure(...)
SshServerConfigFileReader.configure(...)
should be reviewed:
true
, the result will no longer include unsupported algorithms. Formerly it wrongly did.false
, the result may include unsupported algorithms. Formerly it did not.So if existing code used parameter value false
to ensure it never got unsupported algorithms, change it to true
.