VYPR
Critical severity9.8NVD Advisory· Published Nov 16, 2022· Updated May 1, 2026

CVE-2022-45047

CVE-2022-45047

Description

Class org.apache.sshd.server.keyprovider.SimpleGeneratorHostKeyProvider in Apache MINA SSHD <= 2.9.1 uses Java deserialization to load a serialized java.security.PrivateKey. The class is one of several implementations that an implementor using Apache MINA SSHD can choose for loading the host keys of an SSH server.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
org.apache.sshd:sshd-commonMaven
< 2.9.22.9.2
org.apache.sshd:sshd-coreMaven
< 2.9.22.9.2

Affected products

1
  • cpe:2.3:a:apache:sshd:*:*:*:*:*:*:*:*
    Range: <=2.9.1

Patches

3
03238d51586f

Mention CVE-2022-45047 fixed

https://github.com/apache/mina-sshdThomas WolfNov 15, 2022via ghsa
1 file changed · +4 0
  • docs/changes/2.9.2.md+4 0 modified
    @@ -2,6 +2,9 @@
     
     ## Bug fixes
     
    +* [CVE-2022-45047](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-45047) Unsafe deserialization in `org.apache.sshd.server.keyprovider.SimpleGeneratorHostKeyProvider`
    +
    +
     * [SSHD-1173](https://issues.apache.org/jira/browse/SSHD-1173) Not fully using up a channel window may lead to hangs (see [Channel windows](#channelwindows0) below)
     * [SSHD-1287](https://issues.apache.org/jira/browse/SSHD-1287) SFTP: reading with buffers larger than 126kB leads to data corruption
     * [SSHD-1293](https://issues.apache.org/jira/browse/SSHD-1293) ExplicitPortForwardingTracker does not unbind auto-allocated port
    @@ -11,6 +14,7 @@
     * [SSHD-1303](https://issues.apache.org/jira/browse/SSHD-1303) Reading from redirected Channel.getInvertedErr() delivers stdout; should be at EOF
     * [SSHD-1307](https://issues.apache.org/jira/browse/SSHD-1307) [NIO2] TCP/IP port forwarding: shut down output stream only after pending writes have been written
     
    +
     * [GH-263](https://github.com/apache/mina-sshd/issues/263)  Race condition in BufferedIoOutputStream
     * [GH-266](https://github.com/apache/mina-sshd/issues/266)  ChannelPipedOutputStream.flush() must be a no-op
     
    
5a8fe830b2a2

Better file handling for host keys

https://github.com/apache/mina-sshdThomas WolfNov 5, 2022via ghsa
3 files changed · +194 29
  • sshd-common/src/main/java/org/apache/sshd/server/keyprovider/AbstractGeneratorHostKeyProvider.java+73 15 modified
    @@ -18,13 +18,19 @@
      */
     package org.apache.sshd.server.keyprovider;
     
    +import java.io.File;
     import java.io.IOException;
     import java.io.InputStream;
     import java.io.OutputStream;
     import java.nio.file.Files;
     import java.nio.file.LinkOption;
     import java.nio.file.OpenOption;
     import java.nio.file.Path;
    +import java.nio.file.StandardOpenOption;
    +import java.nio.file.attribute.AclEntry;
    +import java.nio.file.attribute.AclEntryType;
    +import java.nio.file.attribute.AclFileAttributeView;
    +import java.nio.file.attribute.UserPrincipal;
     import java.security.GeneralSecurityException;
     import java.security.InvalidKeyException;
     import java.security.KeyPair;
    @@ -46,6 +52,7 @@
     import org.apache.sshd.common.keyprovider.KeySizeIndicator;
     import org.apache.sshd.common.session.SessionContext;
     import org.apache.sshd.common.util.GenericUtils;
    +import org.apache.sshd.common.util.OsUtils;
     import org.apache.sshd.common.util.io.IoUtils;
     import org.apache.sshd.common.util.io.resource.PathResource;
     import org.apache.sshd.common.util.security.SecurityUtils;
    @@ -128,7 +135,7 @@ public void clearLoadedKeys() {
             }
         }
     
    -    @Override // co-variant return
    +    @Override
         public synchronized List<KeyPair> loadKeys(SessionContext session) {
             Path keyPath = getPath();
             Iterable<KeyPair> ids;
    @@ -140,7 +147,7 @@ public synchronized List<KeyPair> loadKeys(SessionContext session) {
                         if (ids != null) {
                             keyPairHolder.set(ids);
                         }
    -                } catch (Throwable t) {
    +                } catch (Exception t) {
                         warn("loadKeys({}) Failed ({}) to resolve: {}",
                                 keyPath, t.getClass().getSimpleName(), t.getMessage(), t);
                     }
    @@ -174,7 +181,7 @@ protected Iterable<KeyPair> resolveKeyPairs(SessionContext session, Path keyPath
                     if (kp != null) {
                         return ids;
                     }
    -            } catch (Throwable e) {
    +            } catch (Exception e) {
                     warn("resolveKeyPair({}) Failed ({}) to load: {}",
                             keyPath, e.getClass().getSimpleName(), e.getMessage(), e);
                 }
    @@ -193,7 +200,7 @@ protected Iterable<KeyPair> resolveKeyPairs(SessionContext session, Path keyPath
                     log.debug("resolveKeyPair({}) generated {} key={}-{}",
                             keyPath, alg, KeyUtils.getKeyType(key), KeyUtils.getFingerPrint(key));
                 }
    -        } catch (Throwable e) {
    +        } catch (Exception e) {
                 warn("resolveKeyPair({})[{}] Failed ({}) to generate {} key-pair: {}",
                         keyPath, alg, e.getClass().getSimpleName(), alg, e.getMessage(), e);
                 return null;
    @@ -202,7 +209,7 @@ protected Iterable<KeyPair> resolveKeyPairs(SessionContext session, Path keyPath
             if (keyPath != null) {
                 try {
                     writeKeyPair(kp, keyPath);
    -            } catch (Throwable e) {
    +            } catch (Exception e) {
                     warn("resolveKeyPair({})[{}] Failed ({}) to write {} key: {}",
                             alg, keyPath, e.getClass().getSimpleName(), alg, e.getMessage(), e);
                 }
    @@ -263,22 +270,71 @@ protected Iterable<KeyPair> doReadKeyPairs(SessionContext session, NamedResource
             return SecurityUtils.loadKeyPairIdentities(session, resourceKey, inputStream, null);
         }
     
    -    protected void writeKeyPair(KeyPair kp, Path keyPath, OpenOption... options)
    +    protected void writeKeyPair(KeyPair kp, Path keyPath)
                 throws IOException, GeneralSecurityException {
    -        if ((!Files.exists(keyPath)) || isOverwriteAllowed()) {
    -            PathResource location = new PathResource(keyPath); // The options are for write (!!)
    -            try (OutputStream os = Files.newOutputStream(keyPath, options)) {
    -                doWriteKeyPair(location, kp, os);
    -            } catch (Throwable e) {
    -                warn("writeKeyPair({}) failed ({}) to write key {}: {}",
    -                        keyPath, e.getClass().getSimpleName(), kp, e.getMessage(), e);
    +        Objects.requireNonNull(kp, "No host key");
    +        if (!Files.exists(keyPath) || isOverwriteAllowed()) {
    +            // Create an empty file or truncate an existing file
    +            Files.newOutputStream(keyPath).close();
    +            setFilePermissions(keyPath);
    +            try (OutputStream os = Files.newOutputStream(keyPath, StandardOpenOption.WRITE,
    +                    StandardOpenOption.TRUNCATE_EXISTING)) {
    +                doWriteKeyPair(new PathResource(keyPath), kp, os);
    +            } catch (Exception e) {
    +                error("writeKeyPair({}) failed ({}) to write {} host key : {}",
    +                        keyPath, e.getClass().getSimpleName(),
    +                        KeyUtils.getKeyType(kp), e.getMessage(), e);
                 }
             } else {
    -            log.error("Overwriting key ({}) is disabled: using throwaway {}: {}",
    -                    keyPath, KeyUtils.getKeyType(kp), KeyUtils.getFingerPrint((kp == null) ? null : kp.getPublic()));
    +            log.warn("Overwriting host key ({}) is disabled: using throwaway {} key: {}",
    +                    keyPath, KeyUtils.getKeyType(kp), KeyUtils.getFingerPrint(kp.getPublic()));
             }
         }
     
    +    private void setFilePermissions(Path path) throws IOException {
    +        Throwable t = null;
    +        if (OsUtils.isWin32()) {
    +            AclFileAttributeView view = Files.getFileAttributeView(path, AclFileAttributeView.class);
    +            UserPrincipal owner = Files.getOwner(path);
    +            if (view != null && owner != null) {
    +                try {
    +                    // Remove all access rights from non-owners.
    +                    List<AclEntry> restricted = new ArrayList<>();
    +                    for (AclEntry acl : view.getAcl()) {
    +                        if (owner.equals(acl.principal()) || AclEntryType.DENY.equals(acl.type())) {
    +                            restricted.add(acl);
    +                        } else {
    +                            // We can't use DENY access: if the owner is member of a group and we deny the group
    +                            // access, the owner won't be able to perform the access. Instead of denying permissions
    +                            // simply allow nothing.
    +                            restricted.add(AclEntry.newBuilder()
    +                                    .setType(AclEntryType.ALLOW)
    +                                    .setPrincipal(acl.principal())
    +                                    .setPermissions(Collections.emptySet())
    +                                    .build());
    +                        }
    +                    }
    +                    view.setAcl(restricted);
    +                    return;
    +                } catch (IOException | SecurityException e) {
    +                    t = e;
    +                }
    +            }
    +        } else {
    +            File file = path.toFile();
    +            if (!file.setExecutable(false)) {
    +                log.debug("Host key file {}: cannot set non-executable", path);
    +            }
    +
    +            boolean success = file.setWritable(false, false) && file.setWritable(true, true);
    +            success = file.setReadable(false, false) && file.setReadable(true, true) && success;
    +            if (success) {
    +                return;
    +            }
    +        }
    +        log.warn("Host key file {}: cannot set file permissions correctly (readable and writeable only by owner)", path, t);
    +    }
    +
         protected abstract void doWriteKeyPair(
                 NamedResource resourceKey, KeyPair kp, OutputStream outputStream)
                 throws IOException, GeneralSecurityException;
    @@ -305,6 +361,8 @@ protected KeyPair generateKeyPair(String algorithm) throws GeneralSecurityExcept
             } else if (keySize != 0) {
                 generator.initialize(keySize);
                 log.info("generateKeyPair({}) generating host key - size={}", algorithm, keySize);
    +        } else {
    +            log.info("generateKeyPair({}) generating host key", algorithm);
             }
     
             return generator.generateKeyPair();
    
  • sshd-common/src/main/java/org/apache/sshd/server/keyprovider/SimpleGeneratorHostKeyProvider.java+98 11 modified
    @@ -18,26 +18,36 @@
      */
     package org.apache.sshd.server.keyprovider;
     
    +import java.io.BufferedInputStream;
     import java.io.IOException;
     import java.io.InputStream;
     import java.io.ObjectInputStream;
    -import java.io.ObjectOutputStream;
    +import java.io.ObjectStreamClass;
    +import java.io.ObjectStreamConstants;
     import java.io.OutputStream;
    +import java.io.StreamCorruptedException;
     import java.nio.file.Path;
     import java.security.GeneralSecurityException;
     import java.security.KeyPair;
     import java.security.spec.InvalidKeySpecException;
     import java.util.Collections;
    +import java.util.HashSet;
    +import java.util.Set;
     
     import org.apache.sshd.common.NamedResource;
    +import org.apache.sshd.common.config.keys.loader.openssh.OpenSSHKeyPairResourceParser;
    +import org.apache.sshd.common.config.keys.writer.openssh.OpenSSHKeyPairResourceWriter;
     import org.apache.sshd.common.session.SessionContext;
     
     /**
    - * TODO Add javadoc
    + * A simple implementation of an {@link AbstractGeneratorHostKeyProvider} that writes and reads host keys using the
    + * OpenSSH file format. Legacy keys written by earlier implementations used Java serialization. De-serializing is
    + * restricted to a small number of classes known to exist in serialized {@link KeyPair}s.
      *
      * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
      */
     public class SimpleGeneratorHostKeyProvider extends AbstractGeneratorHostKeyProvider {
    +
         public SimpleGeneratorHostKeyProvider() {
             super();
         }
    @@ -49,23 +59,100 @@ public SimpleGeneratorHostKeyProvider(Path path) {
         @Override
         protected Iterable<KeyPair> doReadKeyPairs(SessionContext session, NamedResource resourceKey, InputStream inputStream)
                 throws IOException, GeneralSecurityException {
    -        KeyPair kp;
    -        try (ObjectInputStream r = new ObjectInputStream(inputStream)) {
    -            try {
    -                kp = (KeyPair) r.readObject();
    -            } catch (ClassNotFoundException e) {
    -                throw new InvalidKeySpecException("Missing classes: " + e.getMessage(), e);
    +        try (BufferedInputStream in = new BufferedInputStream(inputStream)) {
    +            if (isJavaSerialization(in, resourceKey)) {
    +                try (ObjectInputStream r = new ValidatingObjectInputStream(in)) {
    +                    return Collections.singletonList((KeyPair) r.readObject());
    +                } catch (ClassNotFoundException e) {
    +                    throw new InvalidKeySpecException(
    +                            "Cannot de-serialize " + resourceKey + ": missing classes: " + e.getMessage(), e);
    +                }
    +            } else {
    +                OpenSSHKeyPairResourceParser reader = new OpenSSHKeyPairResourceParser();
    +                return reader.loadKeyPairs(null, resourceKey, null, in);
                 }
             }
    +    }
     
    -        return Collections.singletonList(kp);
    +    private boolean isJavaSerialization(BufferedInputStream in, NamedResource resourceKey) throws IOException {
    +        in.mark(2);
    +        try {
    +            byte[] magicBytes = new byte[2];
    +            int length = in.read(magicBytes);
    +            if (length != 2) {
    +                throw new StreamCorruptedException("File " + resourceKey + " is not a host key");
    +            }
    +            short magic = (short) (((magicBytes[0] & 0xFF) << 8) | (magicBytes[1] & 0xFF));
    +            return magic == ObjectStreamConstants.STREAM_MAGIC;
    +        } finally {
    +            in.reset();
    +        }
         }
     
         @Override
         protected void doWriteKeyPair(NamedResource resourceKey, KeyPair kp, OutputStream outputStream)
                 throws IOException, GeneralSecurityException {
    -        try (ObjectOutputStream w = new ObjectOutputStream(outputStream)) {
    -            w.writeObject(kp);
    +        OpenSSHKeyPairResourceWriter writer = new OpenSSHKeyPairResourceWriter();
    +        try (OutputStream out = outputStream) {
    +            writer.writePrivateKey(kp, "host key", null, out);
             }
         }
    +
    +    private static class ValidatingObjectInputStream extends ObjectInputStream {
    +
    +        private static final Set<String> ALLOWED = new HashSet<>();
    +
    +        static {
    +            ALLOWED.add("[B"); // byte[], used in BC EC key serialization
    +
    +            ALLOWED.add("java.lang.Enum");
    +            ALLOWED.add("java.lang.Number");
    +            ALLOWED.add("java.lang.String");
    +
    +            ALLOWED.add("java.math.BigInteger"); // Used in BC DSA/RSA
    +
    +            ALLOWED.add("java.security.KeyPair");
    +            ALLOWED.add("java.security.PublicKey");
    +            ALLOWED.add("java.security.PrivateKey");
    +            ALLOWED.add("java.security.KeyRep");
    +            ALLOWED.add("java.security.KeyRep$Type");
    +
    +            ALLOWED.add("org.bouncycastle.jcajce.provider.asymmetric.dsa.BCDSAPrivateKey");
    +            ALLOWED.add("org.bouncycastle.jcajce.provider.asymmetric.dsa.BCDSAPublicKey");
    +            ALLOWED.add("org.bouncycastle.jcajce.provider.asymmetric.rsa.BCRSAPrivateCrtKey");
    +            ALLOWED.add("org.bouncycastle.jcajce.provider.asymmetric.rsa.BCRSAPrivateKey");
    +            ALLOWED.add("org.bouncycastle.jcajce.provider.asymmetric.rsa.BCRSAPublicKey");
    +            ALLOWED.add("org.bouncycastle.jcajce.provider.asymmetric.ec.BCECPrivateKey");
    +            ALLOWED.add("org.bouncycastle.jcajce.provider.asymmetric.ec.BCECPublicKey");
    +
    +            ALLOWED.add("com.android.org.bouncycastle.jcajce.provider.asymmetric.dsa.BCDSAPrivateKey");
    +            ALLOWED.add("com.android.org.bouncycastle.jcajce.provider.asymmetric.dsa.BCDSAPublicKey");
    +            ALLOWED.add("com.android.org.bouncycastle.jcajce.provider.asymmetric.rsa.BCRSAPrivateCrtKey");
    +            ALLOWED.add("com.android.org.bouncycastle.jcajce.provider.asymmetric.rsa.BCRSAPrivateKey");
    +            ALLOWED.add("com.android.org.bouncycastle.jcajce.provider.asymmetric.rsa.BCRSAPublicKey");
    +            ALLOWED.add("com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.BCECPrivateKey");
    +            ALLOWED.add("com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.BCECPublicKey");
    +
    +            // net.i2p EdDSA keys cannot be serialized anyway; so no need to whitelist any of their classes.
    +            // They use the default serialization, which writes a great many different classes, but at least
    +            // one of them does not implement Serializable, and thus writing runs into a NotSerializableException.
    +        }
    +
    +        ValidatingObjectInputStream(InputStream in) throws IOException {
    +            super(in);
    +        }
    +
    +        @Override
    +        protected Class<?> resolveClass(ObjectStreamClass desc) throws IOException, ClassNotFoundException {
    +            validate(desc.getName());
    +            return super.resolveClass(desc);
    +        }
    +
    +        private void validate(String className) throws IOException {
    +            if (!ALLOWED.contains(className)) {
    +                throw new IOException(className + " blocked for deserialization");
    +            }
    +        }
    +    }
    +
     }
    
  • sshd-common/src/test/java/org/apache/sshd/server/keyprovider/SimpleGeneratorHostKeyProviderTest.java+23 3 modified
    @@ -19,6 +19,7 @@
     package org.apache.sshd.server.keyprovider;
     
     import java.io.IOException;
    +import java.io.ObjectOutputStream;
     import java.nio.file.Files;
     import java.nio.file.Path;
     import java.security.GeneralSecurityException;
    @@ -88,7 +89,13 @@ public void testECnistp521() throws IOException, GeneralSecurityException {
                     new ECGenParameterSpec("P-521"));
         }
     
    -    private Path testSimpleGeneratorHostKeyProvider(
    +    @Test
    +    public void testEdDSA() throws IOException, GeneralSecurityException {
    +        Assume.assumeTrue("EdDSA not supported", SecurityUtils.isEDDSACurveSupported());
    +        testSimpleGeneratorHostKeyProvider(SecurityUtils.EDDSA, KeyPairProvider.SSH_ED25519, -1, null);
    +    }
    +
    +    private void testSimpleGeneratorHostKeyProvider(
                 String algorithm, String keyType, int keySize, AlgorithmParameterSpec keySpec)
                 throws IOException, GeneralSecurityException {
             Path path = initKeyFileLocation(algorithm);
    @@ -97,7 +104,16 @@ private Path testSimpleGeneratorHostKeyProvider(
     
             KeyPair kpRead = invokeSimpleGeneratorHostKeyProvider(path, algorithm, keyType, keySize, keySpec);
             assertKeyPairEquals("Mismatched write/read key pairs", kpWrite, kpRead);
    -        return path;
    +
    +        if (!KeyPairProvider.SSH_ED25519.equals(keyType)) {
    +            // Try the old way: use Java serialization. net.i2p EdDSA keys cannot be serialized.
    +            path = initKeyFileLocation(algorithm, "ser");
    +            try (ObjectOutputStream out = new ObjectOutputStream(Files.newOutputStream(path))) {
    +                out.writeObject(kpWrite);
    +            }
    +            kpRead = invokeSimpleGeneratorHostKeyProvider(path, algorithm, keyType, keySize, keySpec);
    +            assertKeyPairEquals("Mismatched serialized/deserialized key pairs", kpWrite, kpRead);
    +        }
         }
     
         private static KeyPair invokeSimpleGeneratorHostKeyProvider(
    @@ -135,8 +151,12 @@ private static KeyPair validateKeyPairProvider(
         }
     
         private Path initKeyFileLocation(String algorithm) throws IOException {
    +        return initKeyFileLocation(algorithm, "key");
    +    }
    +
    +    private Path initKeyFileLocation(String algorithm, String extension) throws IOException {
             Path path = assertHierarchyTargetFolderExists(getTempTargetRelativeFile(getClass().getSimpleName()));
    -        path = path.resolve(algorithm + "-simple.key");
    +        path = path.resolve(algorithm + "-simple." + extension);
             Files.deleteIfExists(path);
             return path;
         }
    
10de190e7d3f

[SSHD-842] Split common utilities code from sshd-core into sshd-common (new artifact)

https://github.com/apache/mina-sshdGoldstein LyorSep 5, 2018via ghsa
300 files changed · +533 334
  • assembly/pom.xml+5 0 modified
    @@ -36,6 +36,11 @@
         </properties>
     
         <dependencies>
    +        <dependency>
    +            <groupId>org.apache.sshd</groupId>
    +            <artifactId>sshd-common</artifactId>
    +            <version>${project.version}</version>
    +        </dependency>
             <dependency>
                 <groupId>org.apache.sshd</groupId>
                 <artifactId>sshd-core</artifactId>
    
  • pom.xml+1 0 modified
    @@ -1135,6 +1135,7 @@
         </reporting>
     
         <modules>
    +        <module>sshd-common</module>
             <module>sshd-core</module>
             <module>sshd-mina</module>
             <module>sshd-netty</module>
    
  • sshd-cli/pom.xml+7 0 modified
    @@ -60,6 +60,13 @@
                 <version>${project.version}</version>
                 <type>test-jar</type>
                 <scope>test</scope>
    +        </dependency>
    +        <dependency>
    +            <groupId>org.apache.sshd</groupId>
    +            <artifactId>sshd-common</artifactId>
    +            <version>${project.version}</version>
    +            <type>test-jar</type>
    +            <scope>test</scope>
             </dependency>
                 <!-- For the I/O factories -->
             <dependency>
    
  • sshd-cli/src/main/java/org/apache/sshd/cli/client/SshClientCliSupport.java+8 8 modified
    @@ -65,7 +65,7 @@
     import org.apache.sshd.common.compression.BuiltinCompressions;
     import org.apache.sshd.common.compression.Compression;
     import org.apache.sshd.common.config.CompressionConfigValue;
    -import org.apache.sshd.common.config.SshConfigFileReader;
    +import org.apache.sshd.common.config.ConfigFileReaderSupport;
     import org.apache.sshd.common.config.keys.BuiltinIdentities;
     import org.apache.sshd.common.config.keys.KeyUtils;
     import org.apache.sshd.common.config.keys.PublicKeyEntry;
    @@ -236,7 +236,7 @@ public static ClientSession setupClientSession(
                 }
     
                 if (port <= 0) {
    -                port = SshConfigFileReader.DEFAULT_PORT;
    +                port = ConfigFileReaderSupport.DEFAULT_PORT;
                 }
     
                 // TODO use a configurable wait time
    @@ -424,7 +424,7 @@ public static ServerKeyVerifier setupServerKeyVerifier(
             }
     
             String strictValue = Objects.toString(options.remove(KnownHostsServerKeyVerifier.STRICT_CHECKING_OPTION), "true");
    -        if (!SshConfigFileReader.parseBooleanValue(strictValue)) {
    +        if (!ConfigFileReaderSupport.parseBooleanValue(strictValue)) {
                 return current;
             }
     
    @@ -506,7 +506,7 @@ public static OutputStream resolveLoggingTargetStream(PrintStream stdout, PrintS
         }
     
         public static List<NamedFactory<Compression>> setupCompressions(PropertyResolver options, PrintStream stderr) {
    -        String argVal = PropertyResolverUtils.getString(options, SshConfigFileReader.COMPRESSION_PROP);
    +        String argVal = PropertyResolverUtils.getString(options, ConfigFileReaderSupport.COMPRESSION_PROP);
             if (GenericUtils.isEmpty(argVal)) {
                 return Collections.emptyList();
             }
    @@ -543,10 +543,10 @@ public static List<NamedFactory<Compression>> setupCompressions(
         }
     
         public static List<NamedFactory<Mac>> setupMacs(PropertyResolver options, PrintStream stderr) {
    -        String argVal = PropertyResolverUtils.getString(options, SshConfigFileReader.MACS_CONFIG_PROP);
    +        String argVal = PropertyResolverUtils.getString(options, ConfigFileReaderSupport.MACS_CONFIG_PROP);
             return GenericUtils.isEmpty(argVal)
                  ? Collections.emptyList()
    -             : setupMacs(SshConfigFileReader.MACS_CONFIG_PROP, argVal, null, stderr);
    +             : setupMacs(ConfigFileReaderSupport.MACS_CONFIG_PROP, argVal, null, stderr);
         }
     
         public static List<NamedFactory<Mac>> setupMacs(String argName, String argVal, List<NamedFactory<Mac>> current, PrintStream stderr) {
    @@ -571,10 +571,10 @@ public static List<NamedFactory<Mac>> setupMacs(String argName, String argVal, L
         }
     
         public static List<NamedFactory<Cipher>> setupCiphers(PropertyResolver options, PrintStream stderr) {
    -        String argVal = PropertyResolverUtils.getString(options, SshConfigFileReader.CIPHERS_CONFIG_PROP);
    +        String argVal = PropertyResolverUtils.getString(options, ConfigFileReaderSupport.CIPHERS_CONFIG_PROP);
             return GenericUtils.isEmpty(argVal)
                  ? Collections.emptyList()
    -             : setupCiphers(SshConfigFileReader.CIPHERS_CONFIG_PROP, argVal, null, stderr);
    +             : setupCiphers(ConfigFileReaderSupport.CIPHERS_CONFIG_PROP, argVal, null, stderr);
         }
     
         // returns null - e.g., re-specified or no supported cipher found
    
  • sshd-cli/src/main/java/org/apache/sshd/cli/client/SshKeyScanMain.java+2 2 modified
    @@ -63,7 +63,7 @@
     import org.apache.sshd.client.session.ClientSession;
     import org.apache.sshd.common.NamedFactory;
     import org.apache.sshd.common.cipher.ECCurves;
    -import org.apache.sshd.common.config.SshConfigFileReader;
    +import org.apache.sshd.common.config.ConfigFileReaderSupport;
     import org.apache.sshd.common.config.keys.BuiltinIdentities;
     import org.apache.sshd.common.config.keys.KeyUtils;
     import org.apache.sshd.common.config.keys.PublicKeyEntry;
    @@ -711,7 +711,7 @@ public static <S extends SshKeyScanMain> S setInputStream(S scanner, Collection<
         public static <S extends SshKeyScanMain> S initializeScanner(S scanner, Collection<String> hosts) throws IOException {
             setInputStream(scanner, hosts);
             if (scanner.getPort() <= 0) {
    -            scanner.setPort(SshConfigFileReader.DEFAULT_PORT);
    +            scanner.setPort(ConfigFileReaderSupport.DEFAULT_PORT);
             }
     
             if (scanner.getTimeout() <= 0L) {
    
  • sshd-cli/src/main/java/org/apache/sshd/cli/CliSupport.java+3 3 modified
    @@ -24,8 +24,8 @@
     import java.util.Map;
     import java.util.Objects;
     
    +import org.apache.sshd.common.config.ConfigFileReaderSupport;
     import org.apache.sshd.common.config.LogLevelValue;
    -import org.apache.sshd.common.config.SshConfigFileReader;
     import org.apache.sshd.common.helpers.AbstractFactoryManager;
     import org.apache.sshd.common.io.BuiltinIoServiceFactoryFactories;
     import org.apache.sshd.common.io.IoAcceptor;
    @@ -105,14 +105,14 @@ public static <M extends AbstractFactoryManager> M setupIoServiceFactory(
     
             manager.setIoServiceFactoryFactory(factory.create());
     
    -        String levelValue = (options == null) ? null : Objects.toString(options.get(SshConfigFileReader.LOG_LEVEL_CONFIG_PROP), null);
    +        String levelValue = (options == null) ? null : Objects.toString(options.get(ConfigFileReaderSupport.LOG_LEVEL_CONFIG_PROP), null);
             if (GenericUtils.isEmpty(levelValue)) {
                 return manager;
             }
     
             LogLevelValue level = LogLevelValue.fromName(levelValue);
             if (level == null) {
    -            throw new IllegalArgumentException("Unknown " + SshConfigFileReader.LOG_LEVEL_CONFIG_PROP + " option value: " + levelValue);
    +            throw new IllegalArgumentException("Unknown " + ConfigFileReaderSupport.LOG_LEVEL_CONFIG_PROP + " option value: " + levelValue);
             }
     
             if ((level != LogLevelValue.FATAL) && (level != LogLevelValue.ERROR) && (level != LogLevelValue.INFO)) {
    
  • sshd-cli/src/main/java/org/apache/sshd/cli/server/SshServerCliSupport.java+2 2 modified
    @@ -40,7 +40,7 @@
     import org.apache.sshd.common.NamedFactory;
     import org.apache.sshd.common.PropertyResolver;
     import org.apache.sshd.common.PropertyResolverUtils;
    -import org.apache.sshd.common.config.SshConfigFileReader;
    +import org.apache.sshd.common.config.ConfigFileReaderSupport;
     import org.apache.sshd.common.config.keys.BuiltinIdentities;
     import org.apache.sshd.common.config.keys.KeyUtils;
     import org.apache.sshd.common.keyprovider.KeyPairProvider;
    @@ -166,7 +166,7 @@ public static List<NamedFactory<Command>> resolveServerSubsystems(PrintStream st
                 return subsystems;
             }
     
    -        String nameList = (options == null) ? null : options.getString(SshConfigFileReader.SUBSYSTEM_CONFIG_PROP);
    +        String nameList = (options == null) ? null : options.getString(ConfigFileReaderSupport.SUBSYSTEM_CONFIG_PROP);
             if ("none".equalsIgnoreCase(nameList)) {
                 return Collections.emptyList();
             }
    
  • sshd-cli/src/main/java/org/apache/sshd/cli/server/SshServerMain.java+3 2 modified
    @@ -30,6 +30,7 @@
     import org.apache.sshd.common.NamedResource;
     import org.apache.sshd.common.PropertyResolver;
     import org.apache.sshd.common.PropertyResolverUtils;
    +import org.apache.sshd.common.config.ConfigFileReaderSupport;
     import org.apache.sshd.common.config.SshConfigFileReader;
     import org.apache.sshd.common.keyprovider.KeyPairProvider;
     import org.apache.sshd.common.util.GenericUtils;
    @@ -138,7 +139,7 @@ public static void main(String[] args) throws Exception {
                             keyFiles = new LinkedList<>();
                         }
                         keyFiles.add(optValue);
    -                } else if (SshConfigFileReader.PORT_CONFIG_PROP.equals(optName)) {
    +                } else if (ConfigFileReaderSupport.PORT_CONFIG_PROP.equals(optName)) {
                         port = Integer.parseInt(optValue);
                     } else {
                         options.put(optName, optValue);
    @@ -166,7 +167,7 @@ public static void main(String[] args) throws Exception {
             setupServerBanner(sshd, resolver);
             sshd.setPort(port);
     
    -        String macsOverride = resolver.getString(SshConfigFileReader.MACS_CONFIG_PROP);
    +        String macsOverride = resolver.getString(ConfigFileReaderSupport.MACS_CONFIG_PROP);
             if (GenericUtils.isNotEmpty(macsOverride)) {
                 SshConfigFileReader.configureMacs(sshd, macsOverride, true, true);
             }
    
  • sshd-cli/src/test/java/org/apache/sshd/cli/server/SshFsMounter.java+6 5 modified
    @@ -35,7 +35,7 @@
     
     import org.apache.sshd.common.PropertyResolver;
     import org.apache.sshd.common.PropertyResolverUtils;
    -import org.apache.sshd.common.config.SshConfigFileReader;
    +import org.apache.sshd.common.config.ConfigFileReaderSupport;
     import org.apache.sshd.common.io.BuiltinIoServiceFactoryFactories;
     import org.apache.sshd.common.io.IoServiceFactory;
     import org.apache.sshd.common.util.GenericUtils;
    @@ -56,7 +56,8 @@
     import org.apache.sshd.server.session.ServerSession;
     import org.apache.sshd.server.shell.ShellFactory;
     import org.apache.sshd.server.subsystem.sftp.SftpSubsystemFactory;
    -import org.apache.sshd.util.test.Utils;
    +import org.apache.sshd.util.test.CommonTestSupportUtils;
    +import org.apache.sshd.util.test.CoreTestSupportUtils;
     
     /**
      * A basic implementation to allow remote mounting of the local file system via SFTP
    @@ -249,7 +250,7 @@ private SshFsMounter() {
         //////////////////////////////////////////////////////////////////////////
     
         public static void main(String[] args) throws Exception {
    -        int port = SshConfigFileReader.DEFAULT_PORT;
    +        int port = ConfigFileReaderSupport.DEFAULT_PORT;
             boolean error = false;
             Map<String, Object> options = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
             int numArgs = GenericUtils.length(args);
    @@ -296,7 +297,7 @@ public static void main(String[] args) throws Exception {
             }
     
             SshServer sshd = error ? null : setupIoServiceFactory(
    -            Utils.setupTestServer(SshFsMounter.class), options, System.out, System.err, args);
    +            CoreTestSupportUtils.setupTestServer(SshFsMounter.class), options, System.out, System.err, args);
             if (sshd == null) {
                 error = true;
             }
    @@ -309,7 +310,7 @@ public static void main(String[] args) throws Exception {
             Map<String, Object> props = sshd.getProperties();
             props.putAll(options);
             PropertyResolver resolver = PropertyResolverUtils.toPropertyResolver(options);
    -        File targetFolder = Objects.requireNonNull(Utils.detectTargetFolder(MounterCommandFactory.class), "Failed to detect target folder");
    +        File targetFolder = Objects.requireNonNull(CommonTestSupportUtils.detectTargetFolder(MounterCommandFactory.class), "Failed to detect target folder");
             if (SecurityUtils.isBouncyCastleRegistered()) {
                 sshd.setKeyPairProvider(SecurityUtils.createGeneratorHostKeyProvider(new File(targetFolder, "key.pem").toPath()));
             } else {
    
  • sshd-common/pom.xml+128 0 added
    @@ -0,0 +1,128 @@
    +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    +
    +
    +    <!--
    +
    +        Licensed to the Apache Software Foundation (ASF) under one or more
    +        contributor license agreements.  See the NOTICE file distributed with
    +        this work for additional information regarding copyright ownership.
    +        The ASF licenses this file to You under the Apache License, Version 2.0
    +        (the "License"); you may not use this file except in compliance with
    +        the License.  You may obtain a copy of the License at
    +
    +           http://www.apache.org/licenses/LICENSE-2.0
    +
    +        Unless required by applicable law or agreed to in writing, software
    +        distributed under the License is distributed on an "AS IS" BASIS,
    +        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +        See the License for the specific language governing permissions and
    +        limitations under the License.
    +    -->
    +
    +    <modelVersion>4.0.0</modelVersion>
    +
    +    <parent>
    +        <groupId>org.apache.sshd</groupId>
    +        <artifactId>sshd</artifactId>
    +        <version>2.0.1-SNAPSHOT</version>
    +        <relativePath>..</relativePath>
    +    </parent>
    +
    +    <artifactId>sshd-common</artifactId>
    +    <name>Apache Mina SSHD :: Common support utilities</name>
    +    <packaging>jar</packaging>
    +    <inceptionYear>2018</inceptionYear>
    +
    +    <properties>
    +        <projectRoot>${project.basedir}/..</projectRoot>
    +    </properties>
    +
    +    <dependencies>
    +        <dependency>
    +            <groupId>org.slf4j</groupId>
    +            <artifactId>slf4j-api</artifactId>
    +        </dependency>
    +
    +        <dependency>
    +            <groupId>org.bouncycastle</groupId>
    +            <artifactId>bcpg-jdk15on</artifactId>
    +            <optional>true</optional>
    +        </dependency>
    +        <dependency>
    +            <groupId>org.bouncycastle</groupId>
    +            <artifactId>bcpkix-jdk15on</artifactId>
    +            <optional>true</optional>
    +        </dependency>
    +
    +            <!-- For ed25519 support -->
    +        <dependency>
    +            <groupId>net.i2p.crypto</groupId>
    +            <artifactId>eddsa</artifactId>
    +            <optional>true</optional>
    +        </dependency>
    +
    +            <!-- test dependencies -->
    +        <dependency>
    +            <groupId>org.slf4j</groupId>
    +            <artifactId>jcl-over-slf4j</artifactId>
    +            <scope>test</scope>
    +        </dependency>
    +        <dependency>
    +            <groupId>org.slf4j</groupId>
    +            <artifactId>slf4j-log4j12</artifactId>
    +            <scope>test</scope>
    +        </dependency>
    +        <dependency>
    +            <groupId>junit</groupId>
    +            <artifactId>junit</artifactId>
    +            <scope>test</scope>
    +        </dependency>
    +        <dependency>
    +            <groupId>org.mockito</groupId>
    +            <artifactId>mockito-core</artifactId>
    +            <scope>test</scope>
    +        </dependency>
    +        <dependency>
    +            <groupId>org.apache.servicemix.bundles</groupId>
    +            <artifactId>org.apache.servicemix.bundles.not-yet-commons-ssl</artifactId>
    +            <scope>test</scope>
    +        </dependency>
    +    </dependencies>
    +
    +    <build>
    +        <resources>
    +            <resource>
    +                <directory>src/main/filtered-resources</directory>
    +                <filtering>true</filtering>
    +            </resource>
    +        </resources>
    +        <plugins>
    +            <!-- publish the test-jar since it contains some classes used by other
    +                artifacts tests -->
    +            <plugin>
    +                <groupId>org.apache.maven.plugins</groupId>
    +                <artifactId>maven-jar-plugin</artifactId>
    +                <executions>
    +                    <execution>
    +                        <goals>
    +                            <goal>test-jar</goal>
    +                        </goals>
    +                        <configuration>
    +                            <includes>
    +                                <include>org/apache/sshd/util/test/**/*</include>
    +                            </includes>
    +                        </configuration>
    +                    </execution>
    +                </executions>
    +            </plugin>
    +            <plugin>
    +                <groupId>org.apache.maven.plugins</groupId>
    +                <artifactId>maven-surefire-plugin</artifactId>
    +                <configuration>
    +                    <redirectTestOutputToFile>true</redirectTestOutputToFile>
    +                    <reportsDirectory>${project.build.directory}/surefire-reports-common</reportsDirectory>
    +                </configuration>
    +            </plugin>
    +        </plugins>
    +    </build>
    +</project>
    
  • sshd-common/src/main/filtered-resources/org/apache/sshd/sshd-version.properties+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/client/auth/AuthenticationIdentitiesProvider.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/client/auth/hostbased/HostKeyIdentityProvider.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/client/auth/password/PasswordIdentityProvider.java+2 16 renamed
    @@ -25,7 +25,6 @@
     import java.util.function.Function;
     import java.util.function.Supplier;
     
    -import org.apache.sshd.client.session.ClientSession;
     import org.apache.sshd.common.util.GenericUtils;
     
     /**
    @@ -62,20 +61,6 @@ public String toString() {
          */
         Iterable<String> loadPasswords();
     
    -    /**
    -     * Creates a &quot;unified&quot; {@link Iterator} of passwords out of the registered
    -     * passwords and the extra available ones as a single iterator of passwords
    -     *
    -     * @param session The {@link ClientSession} - ignored if {@code null} (i.e., empty
    -     * iterator returned)
    -     * @return The wrapping iterator
    -     * @see ClientSession#getRegisteredIdentities()
    -     * @see ClientSession#getPasswordIdentityProvider()
    -     */
    -    static Iterator<String> iteratorOf(ClientSession session) {
    -        return (session == null) ? Collections.<String>emptyIterator() : iteratorOf(session.getRegisteredIdentities(), session.getPasswordIdentityProvider());
    -    }
    -
         /**
          * Creates a &quot;unified&quot; {@link Iterator} of passwords out of 2 possible
          * {@link PasswordIdentityProvider}
    @@ -114,7 +99,8 @@ static Iterator<String> iteratorOf(PasswordIdentityProvider provider) {
          * @return The resolved provider
          * @see #multiProvider(PasswordIdentityProvider...)
          */
    -    static PasswordIdentityProvider resolvePasswordIdentityProvider(PasswordIdentityProvider identities, PasswordIdentityProvider passwords) {
    +    static PasswordIdentityProvider resolvePasswordIdentityProvider(
    +            PasswordIdentityProvider identities, PasswordIdentityProvider passwords) {
             if ((passwords == null) || (identities == passwords)) {
                 return identities;
             } else if (identities == null) {
    
  • sshd-common/src/main/java/org/apache/sshd/client/auth/pubkey/PublicKeyIdentity.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/client/config/hosts/ConfigFileHostEntryResolver.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/client/config/hosts/DefaultConfigFileHostEntryResolver.java+2 2 renamed
    @@ -47,8 +47,8 @@ public class DefaultConfigFileHostEntryResolver extends ConfigFileHostEntryResol
     
         /**
          * @param strict If {@code true} then makes sure that the containing folder
    -     *               has 0700 access and the file 0644. <B>Note:</B> for <I>Windows</I> it
    -     *               does not check these permissions
    +     * has 0700 access and the file 0644. <B>Note:</B> for <I>Windows</I> it
    +     * does not check these permissions
          * @see #validateStrictConfigFilePermissions(Path, LinkOption...)
          */
         public DefaultConfigFileHostEntryResolver(boolean strict) {
    
  • sshd-common/src/main/java/org/apache/sshd/client/config/hosts/HostConfigEntry.java+7 7 renamed
    @@ -48,7 +48,7 @@
     import java.util.TreeMap;
     
     import org.apache.sshd.common.auth.MutableUserHolder;
    -import org.apache.sshd.common.config.SshConfigFileReader;
    +import org.apache.sshd.common.config.ConfigFileReaderSupport;
     import org.apache.sshd.common.config.keys.IdentityUtils;
     import org.apache.sshd.common.config.keys.PublicKeyEntry;
     import org.apache.sshd.common.util.GenericUtils;
    @@ -73,7 +73,7 @@ public class HostConfigEntry extends HostPatternsHolder implements MutableUserHo
     
         public static final String HOST_CONFIG_PROP = "Host";
         public static final String HOST_NAME_CONFIG_PROP = "HostName";
    -    public static final String PORT_CONFIG_PROP = SshConfigFileReader.PORT_CONFIG_PROP;
    +    public static final String PORT_CONFIG_PROP = ConfigFileReaderSupport.PORT_CONFIG_PROP;
         public static final String USER_CONFIG_PROP = "User";
         public static final String IDENTITY_FILE_CONFIG_PROP = "IdentityFile";
         /**
    @@ -487,8 +487,8 @@ public void processProperty(String name, Collection<String> valsList, boolean ig
                 }
             } else if (EXCLUSIVE_IDENTITIES_CONFIG_PROP.equalsIgnoreCase(key)) {
                 setIdentitiesOnly(
    -                    SshConfigFileReader.parseBooleanValue(
    -                            ValidateUtils.checkNotNullAndNotEmpty(joinedValue, "No identities option value")));
    +                ConfigFileReaderSupport.parseBooleanValue(
    +                    ValidateUtils.checkNotNullAndNotEmpty(joinedValue, "No identities option value")));
             }
         }
     
    @@ -565,7 +565,7 @@ public <A extends Appendable> A append(A sb) throws IOException {
             appendNonEmptyProperty(sb, USER_CONFIG_PROP, getUsername());
             appendNonEmptyValues(sb, IDENTITY_FILE_CONFIG_PROP, getIdentities());
             if (exclusiveIdentites != null) {
    -            appendNonEmptyProperty(sb, EXCLUSIVE_IDENTITIES_CONFIG_PROP, SshConfigFileReader.yesNoValueOf(exclusiveIdentites));
    +            appendNonEmptyProperty(sb, EXCLUSIVE_IDENTITIES_CONFIG_PROP, ConfigFileReaderSupport.yesNoValueOf(exclusiveIdentites));
             }
             appendNonEmptyProperties(sb, getProperties());
             return sb;
    @@ -673,7 +673,7 @@ public static <A extends Appendable> A appendNonEmptyValues(A sb, String name, C
          * @param entries The entries - ignored if {@code null}/empty
          * @return A {@link HostConfigEntryResolver} wrapper using the entries
          */
    -    public static HostConfigEntryResolver toHostConfigEntryResolver(final Collection<? extends HostConfigEntry> entries) {
    +    public static HostConfigEntryResolver toHostConfigEntryResolver(Collection<? extends HostConfigEntry> entries) {
             if (GenericUtils.isEmpty(entries)) {
                 return HostConfigEntryResolver.EMPTY;
             } else {
    @@ -838,7 +838,7 @@ public static List<HostConfigEntry> readHostConfigEntries(BufferedReader rdr) th
                     continue;
                 }
     
    -            int pos = line.indexOf(SshConfigFileReader.COMMENT_CHAR);
    +            int pos = line.indexOf(ConfigFileReaderSupport.COMMENT_CHAR);
                 if (pos == 0) {
                     continue;
                 }
    
  • sshd-common/src/main/java/org/apache/sshd/client/config/hosts/HostConfigEntryResolver.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/client/config/hosts/HostPatternsHolder.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/client/config/hosts/HostPatternValue.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/client/config/hosts/KnownHostDigest.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/client/config/hosts/KnownHostEntry.java+2 2 renamed
    @@ -36,7 +36,7 @@
     import java.util.Collections;
     import java.util.List;
     
    -import org.apache.sshd.common.config.SshConfigFileReader;
    +import org.apache.sshd.common.config.ConfigFileReaderSupport;
     import org.apache.sshd.common.config.keys.AuthorizedKeyEntry;
     import org.apache.sshd.common.config.keys.PublicKeyEntry;
     import org.apache.sshd.common.util.GenericUtils;
    @@ -196,7 +196,7 @@ public static List<KnownHostEntry> readKnownHostEntries(BufferedReader rdr) thro
                     continue;
                 }
     
    -            int pos = line.indexOf(SshConfigFileReader.COMMENT_CHAR);
    +            int pos = line.indexOf(ConfigFileReaderSupport.COMMENT_CHAR);
                 if (pos == 0) {
                     continue;
                 }
    
  • sshd-common/src/main/java/org/apache/sshd/client/config/hosts/KnownHostHashValue.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/client/config/keys/BuiltinClientIdentitiesWatcher.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/client/config/keys/ClientIdentitiesWatcher.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/client/config/keys/ClientIdentityFileWatcher.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/client/config/keys/ClientIdentity.java+0 57 renamed
    @@ -31,7 +31,6 @@
     import java.util.TreeMap;
     import java.util.function.Function;
     
    -import org.apache.sshd.client.SshClient;
     import org.apache.sshd.common.NamedResource;
     import org.apache.sshd.common.config.keys.BuiltinIdentities;
     import org.apache.sshd.common.config.keys.FilePasswordProvider;
    @@ -95,62 +94,6 @@ public static String getIdentityFileName(String type) {
             return IdentityUtils.getIdentityFileName(ID_FILE_PREFIX, type, ID_FILE_SUFFIX);
         }
     
    -    /**
    -     * @param <C>           The generic client class
    -     * @param client        The {@link SshClient} to updated
    -     * @param strict        If {@code true} then files that do not have the required
    -     *                      access rights are excluded from consideration
    -     * @param supportedOnly If {@code true} then ignore identities that are not
    -     *                      supported internally
    -     * @param provider      A {@link FilePasswordProvider} - may be {@code null}
    -     *                      if the loaded keys are <U>guaranteed</U> not to be encrypted. The argument
    -     *                      to {@link FilePasswordProvider#getPassword(String)} is the path of the
    -     *                      file whose key is to be loaded
    -     * @param options       The {@link LinkOption}s to apply when checking
    -     *                      for existence
    -     * @return The updated <tt>client</tt> instance - provided a non-{@code null}
    -     * {@link KeyPairProvider} was generated
    -     * @throws IOException              If failed to access the file system
    -     * @throws GeneralSecurityException If failed to load the keys
    -     * @see #setKeyPairProvider(SshClient, Path, boolean, boolean, FilePasswordProvider, LinkOption...)
    -     */
    -    public static <C extends SshClient> C setKeyPairProvider(
    -            C client, boolean strict, boolean supportedOnly, FilePasswordProvider provider, LinkOption... options)
    -            throws IOException, GeneralSecurityException {
    -        return setKeyPairProvider(client, PublicKeyEntry.getDefaultKeysFolderPath(), strict, supportedOnly, provider, options);
    -    }
    -
    -    /**
    -     * @param <C>           The generic client class
    -     * @param client        The {@link SshClient} to updated
    -     * @param dir           The folder to scan for the built-in identities
    -     * @param strict        If {@code true} then files that do not have the required
    -     *                      access rights are excluded from consideration
    -     * @param supportedOnly If {@code true} then ignore identities that are not
    -     *                      supported internally
    -     * @param provider      A {@link FilePasswordProvider} - may be {@code null}
    -     *                      if the loaded keys are <U>guaranteed</U> not to be encrypted. The argument
    -     *                      to {@link FilePasswordProvider#getPassword(String)} is the path of the
    -     *                      file whose key is to be loaded
    -     * @param options       The {@link LinkOption}s to apply when checking
    -     *                      for existence
    -     * @return The updated <tt>client</tt> instance - provided a non-{@code null}
    -     * {@link KeyPairProvider} was generated
    -     * @throws IOException              If failed to access the file system
    -     * @throws GeneralSecurityException If failed to load the keys
    -     * @see #loadDefaultKeyPairProvider(Path, boolean, boolean, FilePasswordProvider, LinkOption...)
    -     */
    -    public static <C extends SshClient> C setKeyPairProvider(
    -            C client, Path dir, boolean strict, boolean supportedOnly, FilePasswordProvider provider, LinkOption... options)
    -            throws IOException, GeneralSecurityException {
    -        KeyPairProvider kpp = loadDefaultKeyPairProvider(dir, strict, supportedOnly, provider, options);
    -        if (kpp != null) {
    -            client.setKeyPairProvider(kpp);
    -        }
    -
    -        return client;
    -    }
    -
         /**
          * @param strict        If {@code true} then files that do not have the required
          *                      access rights are excluded from consideration
    
  • sshd-common/src/main/java/org/apache/sshd/client/config/keys/ClientIdentityLoader.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/client/config/keys/ClientIdentityProvider.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/client/config/keys/DefaultClientIdentitiesWatcher.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/AttributeStore.java+1 56 renamed
    @@ -19,11 +19,6 @@
     
     package org.apache.sshd.common;
     
    -import java.util.Objects;
    -
    -import org.apache.sshd.common.channel.Channel;
    -import org.apache.sshd.common.session.Session;
    -
     /**
      * Provides the capability to attach in-memory attributes to the entity
      *
    @@ -98,55 +93,5 @@ public AttributeKey() {
          * @return {@code null} if there is no value associated with the specified key
          */
         <T> T resolveAttribute(AttributeKey<T> key);
    -
    -    /**
    -     * @param <T> The generic attribute type
    -     * @param manager The {@link FactoryManager} - ignored if {@code null}
    -     * @param key The attribute key - never {@code null}
    -     * @return Associated value - {@code null} if not found
    -     */
    -    static <T> T resolveAttribute(FactoryManager manager, AttributeKey<T> key) {
    -        Objects.requireNonNull(key, "No key");
    -        return (manager == null) ? null : manager.getAttribute(key);
    -    }
    -
    -    /**
    -     * Attempts to use the session's attribute, if not found then tries the factory manager
    -     *
    -     * @param <T> The generic attribute type
    -     * @param session The {@link Session} - ignored if {@code null}
    -     * @param key The attribute key - never {@code null}
    -     * @return Associated value - {@code null} if not found
    -     * @see Session#getFactoryManager()
    -     * @see #resolveAttribute(FactoryManager, AttributeKey)
    -     */
    -    static <T> T resolveAttribute(Session session, AttributeKey<T> key) {
    -        Objects.requireNonNull(key, "No key");
    -        if (session == null) {
    -            return null;
    -        }
    -
    -        T value = session.getAttribute(key);
    -        return (value != null) ? value : resolveAttribute(session.getFactoryManager(), key);
    -    }
    -
    -    /**
    -     * Attempts to use the channel attribute, if not found then tries the session
    -     *
    -     * @param <T> The generic attribute type
    -     * @param channel The {@link Channel} - ignored if {@code null}
    -     * @param key The attribute key - never {@code null}
    -     * @return Associated value - {@code null} if not found
    -     * @see Session#getFactoryManager()
    -     * @see #resolveAttribute(Session, AttributeKey)
    -     */
    -    static <T> T resolveAttribute(Channel channel, AttributeKey<T> key) {
    -        Objects.requireNonNull(key, "No key");
    -        if (channel == null) {
    -            return null;
    -        }
    -
    -        T value = channel.getAttribute(key);
    -        return (value != null) ? value : resolveAttribute(channel.getSession(), key);
    -    }
     }
    +
    
  • sshd-common/src/main/java/org/apache/sshd/common/auth/MutableUserHolder.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/auth/UsernameHolder.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/BuiltinFactory.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/cipher/BaseCipher.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/cipher/BaseRC4Cipher.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/cipher/BuiltinCiphers.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/cipher/CipherFactory.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/cipher/CipherInformation.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/cipher/Cipher.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/cipher/CipherNone.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/cipher/ECCurves.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/cipher/package.html+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/Closeable.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/compression/BaseCompression.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/compression/BuiltinCompressions.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/compression/CompressionDelayedZlib.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/compression/CompressionFactory.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/compression/CompressionInformation.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/compression/Compression.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/compression/CompressionNone.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/compression/CompressionZlib.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/compression/package.html+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/CompressionConfigValue.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/ConfigFileReaderSupport.java+230 0 added
    @@ -0,0 +1,230 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements. See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership. The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License. You may obtain a copy of the License at
    + *
    + * http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied. See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +package org.apache.sshd.common.config;
    +
    +import java.io.BufferedReader;
    +import java.io.File;
    +import java.io.FileInputStream;
    +import java.io.IOException;
    +import java.io.InputStream;
    +import java.io.InputStreamReader;
    +import java.io.Reader;
    +import java.io.StreamCorruptedException;
    +import java.net.URL;
    +import java.nio.charset.StandardCharsets;
    +import java.nio.file.Files;
    +import java.nio.file.OpenOption;
    +import java.nio.file.Path;
    +import java.util.Properties;
    +import java.util.concurrent.TimeUnit;
    +
    +import org.apache.sshd.common.keyprovider.KeyPairProvider;
    +import org.apache.sshd.common.util.GenericUtils;
    +import org.apache.sshd.common.util.io.IoUtils;
    +import org.apache.sshd.common.util.io.NoCloseInputStream;
    +import org.apache.sshd.common.util.io.NoCloseReader;
    +import org.apache.sshd.common.util.net.SshdSocketAddress;
    +
    +/**
    + * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
    + * @see <a href="https://www.freebsd.org/cgi/man.cgi?query=ssh_config&sektion=5">ssh_config(5)</a>
    + */
    +public final class ConfigFileReaderSupport {
    +
    +    public static final char COMMENT_CHAR = '#';
    +
    +    public static final String COMPRESSION_PROP = "Compression";
    +    public static final String DEFAULT_COMPRESSION = CompressionConfigValue.NO.getName();
    +    public static final String MAX_SESSIONS_CONFIG_PROP = "MaxSessions";
    +    public static final int DEFAULT_MAX_SESSIONS = 10;
    +    public static final String PASSWORD_AUTH_CONFIG_PROP = "PasswordAuthentication";
    +    public static final String DEFAULT_PASSWORD_AUTH = "no";
    +    public static final boolean DEFAULT_PASSWORD_AUTH_VALUE = parseBooleanValue(DEFAULT_PASSWORD_AUTH);
    +    public static final String LISTEN_ADDRESS_CONFIG_PROP = "ListenAddress";
    +    public static final String DEFAULT_BIND_ADDRESS = SshdSocketAddress.IPV4_ANYADDR;
    +    public static final String PORT_CONFIG_PROP = "Port";
    +    public static final int DEFAULT_PORT = 22;
    +    public static final String KEEP_ALIVE_CONFIG_PROP = "TCPKeepAlive";
    +    public static final boolean DEFAULT_KEEP_ALIVE = true;
    +    public static final String USE_DNS_CONFIG_PROP = "UseDNS";
    +    // NOTE: the usual default is TRUE
    +    public static final boolean DEFAULT_USE_DNS = true;
    +    public static final String PUBKEY_AUTH_CONFIG_PROP = "PubkeyAuthentication";
    +    public static final String DEFAULT_PUBKEY_AUTH = "yes";
    +    public static final boolean DEFAULT_PUBKEY_AUTH_VALUE = parseBooleanValue(DEFAULT_PUBKEY_AUTH);
    +    public static final String AUTH_KEYS_FILE_CONFIG_PROP = "AuthorizedKeysFile";
    +    public static final String MAX_AUTH_TRIES_CONFIG_PROP = "MaxAuthTries";
    +    public static final int DEFAULT_MAX_AUTH_TRIES = 6;
    +    public static final String MAX_STARTUPS_CONFIG_PROP = "MaxStartups";
    +    public static final int DEFAULT_MAX_STARTUPS = 10;
    +    public static final String LOGIN_GRACE_TIME_CONFIG_PROP = "LoginGraceTime";
    +    public static final long DEFAULT_LOGIN_GRACE_TIME = TimeUnit.SECONDS.toMillis(120);
    +    public static final String KEY_REGENERATE_INTERVAL_CONFIG_PROP = "KeyRegenerationInterval";
    +    public static final long DEFAULT_REKEY_TIME_LIMIT = TimeUnit.HOURS.toMillis(1L);
    +    // see http://manpages.ubuntu.com/manpages/precise/en/man5/sshd_config.5.html
    +    public static final String CIPHERS_CONFIG_PROP = "Ciphers";
    +    public static final String DEFAULT_CIPHERS =
    +            "aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour";
    +    // see http://manpages.ubuntu.com/manpages/precise/en/man5/sshd_config.5.html
    +    public static final String MACS_CONFIG_PROP = "MACs";
    +    public static final String DEFAULT_MACS =
    +            "hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-sha1-96,hmac-md5-96,hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96";
    +    // see http://manpages.ubuntu.com/manpages/precise/en/man5/sshd_config.5.html
    +    public static final String KEX_ALGORITHMS_CONFIG_PROP = "KexAlgorithms";
    +    public static final String DEFAULT_KEX_ALGORITHMS =
    +            "ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521"
    +                    + "," + "diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1"
    +                    // RFC-8268 groups
    +                    + "," + "diffie-hellman-group18-sha512,diffie-hellman-group17-sha512"
    +                    + "," + "diffie-hellman-group16-sha512,diffie-hellman-group15-sha512"
    +                    + "," + "diffie-hellman-group14-sha256"
    +                    // Legacy groups
    +                    + "," + "diffie-hellman-group14-sha1,diffie-hellman-group1-sha1";
    +    // see http://linux.die.net/man/5/ssh_config
    +    public static final String HOST_KEY_ALGORITHMS_CONFIG_PROP = "HostKeyAlgorithms";
    +    // see https://tools.ietf.org/html/rfc5656
    +    public static final String DEFAULT_HOST_KEY_ALGORITHMS =
    +            KeyPairProvider.SSH_RSA + "," + KeyPairProvider.SSH_DSS;
    +    // see http://manpages.ubuntu.com/manpages/precise/en/man5/sshd_config.5.html
    +    public static final String LOG_LEVEL_CONFIG_PROP = "LogLevel";
    +    public static final LogLevelValue DEFAULT_LOG_LEVEL = LogLevelValue.INFO;
    +    // see https://www.freebsd.org/cgi/man.cgi?query=sshd_config&sektion=5
    +    public static final String SYSLOG_FACILITY_CONFIG_PROP = "SyslogFacility";
    +    public static final SyslogFacilityValue DEFAULT_SYSLOG_FACILITY = SyslogFacilityValue.AUTH;
    +    public static final String SUBSYSTEM_CONFIG_PROP = "Subsystem";
    +
    +    private ConfigFileReaderSupport() {
    +        throw new UnsupportedOperationException("No instance");
    +    }
    +
    +    public static Properties readConfigFile(File file) throws IOException {
    +        return readConfigFile(file.toPath(), IoUtils.EMPTY_OPEN_OPTIONS);
    +    }
    +
    +    public static Properties readConfigFile(Path path, OpenOption... options) throws IOException {
    +        try (InputStream input = Files.newInputStream(path, options)) {
    +            return readConfigFile(input, true);
    +        }
    +    }
    +
    +    public static Properties readConfigFile(URL url) throws IOException {
    +        try (InputStream input = url.openStream()) {
    +            return readConfigFile(input, true);
    +        }
    +    }
    +
    +    public static Properties readConfigFile(String path) throws IOException {
    +        try (InputStream input = new FileInputStream(path)) {
    +            return readConfigFile(input, true);
    +        }
    +    }
    +
    +    public static Properties readConfigFile(InputStream input, boolean okToClose) throws IOException {
    +        try (Reader reader = new InputStreamReader(NoCloseInputStream.resolveInputStream(input, okToClose), StandardCharsets.UTF_8)) {
    +            return readConfigFile(reader, true);
    +        }
    +    }
    +
    +    public static Properties readConfigFile(Reader reader, boolean okToClose) throws IOException {
    +        try (BufferedReader buf = new BufferedReader(NoCloseReader.resolveReader(reader, okToClose))) {
    +            return readConfigFile(buf);
    +        }
    +    }
    +
    +    /**
    +     * Reads the configuration file contents into a {@link Properties} instance.
    +     * <B>Note:</B> multiple keys value are concatenated using a comma - it is up to
    +     * the caller to know which keys are expected to have multiple values and handle
    +     * the split accordingly
    +     *
    +     * @param rdr The {@link BufferedReader} for reading the file
    +     * @return The read properties
    +     * @throws IOException If failed to read or malformed content
    +     */
    +    public static Properties readConfigFile(BufferedReader rdr) throws IOException {
    +        Properties props = new Properties();
    +        int lineNumber = 1;
    +        for (String line = rdr.readLine(); line != null; line = rdr.readLine(), lineNumber++) {
    +            line = GenericUtils.replaceWhitespaceAndTrim(line);
    +            if (GenericUtils.isEmpty(line)) {
    +                continue;
    +            }
    +
    +            int pos = line.indexOf(COMMENT_CHAR);
    +            if (pos == 0) {
    +                continue;
    +            }
    +
    +            if (pos > 0) {
    +                line = line.substring(0, pos);
    +                line = line.trim();
    +            }
    +
    +            /*
    +             * Some options use '=', others use ' ' - try both
    +             * NOTE: we do not validate the format for each option separately
    +             */
    +            pos = line.indexOf(' ');
    +            if (pos < 0) {
    +                pos = line.indexOf('=');
    +            }
    +
    +            if (pos < 0) {
    +                throw new StreamCorruptedException("No delimiter at line " + lineNumber + ": " + line);
    +            }
    +
    +            String key = line.substring(0, pos);
    +            String value = line.substring(pos + 1).trim();
    +            // see if need to concatenate multi-valued keys
    +            String prev = props.getProperty(key);
    +            if (!GenericUtils.isEmpty(prev)) {
    +                value = prev + "," + value;
    +            }
    +
    +            props.setProperty(key, value);
    +        }
    +
    +        return props;
    +    }
    +
    +    /**
    +     * @param v Checks if the value is &quot;yes&quot;, &quot;y&quot;
    +     *          or &quot;on&quot; or &quot;true&quot;.
    +     * @return The result - <B>Note:</B> {@code null}/empty values are
    +     * interpreted as {@code false}
    +     */
    +    public static boolean parseBooleanValue(String v) {
    +        return "yes".equalsIgnoreCase(v)
    +            || "y".equalsIgnoreCase(v)
    +            || "on".equalsIgnoreCase(v)
    +            || "true".equalsIgnoreCase(v);
    +    }
    +
    +    /**
    +     * Returns a &quot;yes&quot; or &quot;no&quot; value based on the input
    +     * parameter
    +     *
    +     * @param flag The required state
    +     * @return &quot;yes&quot; if {@code true}, &quot;no&quot; otherwise
    +     */
    +    public static String yesNoValueOf(boolean flag) {
    +        return flag ? "yes" : "no";
    +    }
    +}
    
  • sshd-common/src/main/java/org/apache/sshd/common/config/FactoriesListParseResult.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/keys/AuthorizedKeyEntry.java+3 15 renamed
    @@ -47,9 +47,6 @@
     import org.apache.sshd.common.util.ValidateUtils;
     import org.apache.sshd.common.util.io.NoCloseInputStream;
     import org.apache.sshd.common.util.io.NoCloseReader;
    -import org.apache.sshd.server.auth.pubkey.KeySetPublickeyAuthenticator;
    -import org.apache.sshd.server.auth.pubkey.PublickeyAuthenticator;
    -import org.apache.sshd.server.auth.pubkey.RejectAllPublickeyAuthenticator;
     
     /**
      * Represents an entry in the user's {@code authorized_keys} file according
    @@ -148,18 +145,9 @@ public String toString() {
                     + (GenericUtils.isEmpty(kc) ? "" : " " + kc);
         }
     
    -    public static PublickeyAuthenticator fromAuthorizedEntries(PublicKeyEntryResolver fallbackResolver, Collection<? extends AuthorizedKeyEntry> entries)
    -            throws IOException, GeneralSecurityException {
    -        Collection<PublicKey> keys = resolveAuthorizedKeys(fallbackResolver, entries);
    -        if (GenericUtils.isEmpty(keys)) {
    -            return RejectAllPublickeyAuthenticator.INSTANCE;
    -        } else {
    -            return new KeySetPublickeyAuthenticator(keys);
    -        }
    -    }
    -
    -    public static List<PublicKey> resolveAuthorizedKeys(PublicKeyEntryResolver fallbackResolver, Collection<? extends AuthorizedKeyEntry> entries)
    -            throws IOException, GeneralSecurityException {
    +    public static List<PublicKey> resolveAuthorizedKeys(
    +            PublicKeyEntryResolver fallbackResolver, Collection<? extends AuthorizedKeyEntry> entries)
    +                    throws IOException, GeneralSecurityException {
             if (GenericUtils.isEmpty(entries)) {
                 return Collections.emptyList();
             }
    
  • sshd-common/src/main/java/org/apache/sshd/common/config/keys/BuiltinIdentities.java+4 4 renamed
    @@ -58,12 +58,12 @@ public boolean isSupported() {
         };
     
         public static final Set<BuiltinIdentities> VALUES =
    -            Collections.unmodifiableSet(EnumSet.allOf(BuiltinIdentities.class));
    +        Collections.unmodifiableSet(EnumSet.allOf(BuiltinIdentities.class));
     
         public static final Set<String> NAMES =
    -            Collections.unmodifiableSet(
    -                    GenericUtils.asSortedSet(
    -                            String.CASE_INSENSITIVE_ORDER, NamedResource.getNameList(VALUES)));
    +        Collections.unmodifiableSet(
    +            GenericUtils.asSortedSet(
    +                String.CASE_INSENSITIVE_ORDER, NamedResource.getNameList(VALUES)));
     
         private final String name;
         private final String algorithm;
    
  • sshd-common/src/main/java/org/apache/sshd/common/config/keys/FilePasswordProvider.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/keys/Identity.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/keys/IdentityResourceLoader.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/keys/IdentityUtils.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/keys/impl/AbstractIdentityResourceLoader.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/keys/impl/AbstractKeyEntryResolver.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/keys/impl/AbstractPrivateKeyEntryDecoder.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/keys/impl/AbstractPublicKeyEntryDecoder.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/keys/impl/DSSPublicKeyEntryDecoder.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/keys/impl/ECDSAPublicKeyEntryDecoder.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/keys/impl/RSAPublicKeyDecoder.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/keys/KeyEntryResolver.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/keys/KeyRandomArt.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/keys/KeyUtils.java+3 3 renamed
    @@ -109,9 +109,9 @@ public final class KeyUtils {
          * permissions are enforced on key files
          */
         public static final Set<PosixFilePermission> STRICTLY_PROHIBITED_FILE_PERMISSION =
    -            Collections.unmodifiableSet(
    -                    EnumSet.of(PosixFilePermission.GROUP_READ, PosixFilePermission.GROUP_WRITE, PosixFilePermission.GROUP_EXECUTE,
    -                            PosixFilePermission.OTHERS_READ, PosixFilePermission.OTHERS_WRITE, PosixFilePermission.OTHERS_EXECUTE));
    +        Collections.unmodifiableSet(
    +            EnumSet.of(PosixFilePermission.GROUP_READ, PosixFilePermission.GROUP_WRITE, PosixFilePermission.GROUP_EXECUTE,
    +                PosixFilePermission.OTHERS_READ, PosixFilePermission.OTHERS_WRITE, PosixFilePermission.OTHERS_EXECUTE));
     
         /**
          * System property that can be used to control the default fingerprint factory used for keys.
    
  • sshd-common/src/main/java/org/apache/sshd/common/config/keys/loader/AbstractKeyPairResourceParser.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/keys/loader/AbstractPrivateKeyObfuscator.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/keys/loader/AESPrivateKeyObfuscator.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/keys/loader/DESPrivateKeyObfuscator.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/keys/loader/KeyPairResourceLoader.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/keys/loader/KeyPairResourceParser.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/keys/loader/openssh/OpenSSHDSSPrivateKeyEntryDecoder.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/keys/loader/openssh/OpenSSHECDSAPrivateKeyEntryDecoder.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/keys/loader/openssh/OpenSSHKeyPairResourceParser.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/keys/loader/openssh/OpenSSHParserContext.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/keys/loader/openssh/OpenSSHRSAPrivateKeyDecoder.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/keys/loader/pem/AbstractPEMResourceKeyPairParser.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/keys/loader/pem/DSSPEMResourceKeyPairParser.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/keys/loader/pem/ECDSAPEMResourceKeyPairParser.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/keys/loader/pem/KeyPairPEMResourceParser.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/keys/loader/pem/PEMResourceParserUtils.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/keys/loader/pem/PKCS8PEMResourceKeyPairParser.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/keys/loader/pem/RSAPEMResourceKeyPairParser.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/keys/loader/PrivateKeyEncryptionContext.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/keys/loader/PrivateKeyObfuscator.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/keys/PrivateKeyEntryDecoder.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/keys/PrivateKeyEntryResolver.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/keys/PublicKeyEntryDecoder.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/keys/PublicKeyEntry.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/keys/PublicKeyEntryResolver.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/ListParseResult.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/LogLevelValue.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/NamedFactoriesListParseResult.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/NamedResourceListParseResult.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/SyslogFacilityValue.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/TimeValueConfig.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/config/VersionProperties.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/digest/BaseDigest.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/digest/BuiltinDigests.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/digest/DigestFactory.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/digest/DigestInformation.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/digest/Digest.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/digest/DigestUtils.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/digest/package.html+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/Factory.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/future/AbstractSshFuture.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/future/CloseFuture.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/future/DefaultCloseFuture.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/future/DefaultSshFuture.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/future/DefaultVerifiableSshFuture.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/future/SshFuture.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/future/SshFutureListener.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/future/VerifiableFuture.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/future/WaitableFuture.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/keyprovider/AbstractKeyPairProvider.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/keyprovider/AbstractResourceKeyPairProvider.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/keyprovider/ClassLoadableResourceKeyPairProvider.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/keyprovider/FileKeyPairProvider.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/keyprovider/KeyIdentityProvider.java+0 34 renamed
    @@ -26,7 +26,6 @@
     import java.util.function.Function;
     import java.util.function.Supplier;
     
    -import org.apache.sshd.client.session.ClientSession;
     import org.apache.sshd.common.util.GenericUtils;
     
     /**
    @@ -64,39 +63,6 @@ public String toString() {
          */
         Iterable<KeyPair> loadKeys();
     
    -    /**
    -     * Creates a &quot;unified&quot; {@link KeyIdentityProvider} of key pairs out of the registered
    -     * {@link KeyPair} identities and the extra available ones as a single iterator
    -     * of key pairs
    -     *
    -     *
    -     * @param session The {@link ClientSession} - ignored if {@code null} (i.e., empty
    -     * iterator returned)
    -     * @return The wrapping KeyIdentityProvider
    -     * @see ClientSession#getRegisteredIdentities()
    -     * @see ClientSession#getKeyPairProvider()
    -     */
    -    static KeyIdentityProvider providerOf(ClientSession session) {
    -        return session == null
    -                ? EMPTY_KEYS_PROVIDER
    -                : resolveKeyIdentityProvider(session.getRegisteredIdentities(), session.getKeyPairProvider());
    -    }
    -
    -    /**
    -     * Creates a &quot;unified&quot; {@link Iterator} of key pairs out of the registered
    -     * {@link KeyPair} identities and the extra available ones as a single iterator
    -     * of key pairs
    -     *
    -     * @param session The {@link ClientSession} - ignored if {@code null} (i.e., empty
    -     * iterator returned)
    -     * @return The wrapping iterator
    -     * @see ClientSession#getRegisteredIdentities()
    -     * @see ClientSession#getKeyPairProvider()
    -     */
    -    static Iterator<KeyPair> iteratorOf(ClientSession session) {
    -        return iteratorOf(providerOf(session));
    -    }
    -
         /**
          * Creates a &quot;unified&quot; {@link Iterator} of {@link KeyPair}s out of 2 possible
          * {@link KeyIdentityProvider}
    
  • sshd-common/src/main/java/org/apache/sshd/common/keyprovider/KeyPairProviderHolder.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/keyprovider/KeyPairProvider.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/keyprovider/MappedKeyPairProvider.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/mac/BaseMac.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/mac/BuiltinMacs.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/mac/MacFactory.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/mac/MacInformation.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/mac/Mac.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/mac/package.html+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/NamedFactory.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/NamedResource.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/OptionalFeature.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/PropertyResolver.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/PropertyResolverUtils.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/random/AbstractRandomFactory.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/random/AbstractRandom.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/random/JceRandomFactory.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/random/JceRandom.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/random/package.html+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/random/RandomFactory.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/random/Random.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/random/SingletonRandomFactory.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/RuntimeSshException.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/signature/AbstractSignature.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/signature/BuiltinSignatures.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/signature/package.html+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/signature/SignatureDSA.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/signature/SignatureECDSA.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/signature/SignatureFactoriesManager.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/signature/SignatureFactory.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/signature/Signature.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/signature/SignatureRSA.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/SshConstants.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/SshException.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/SyspropsMapWrapper.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/buffer/BufferException.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/buffer/Buffer.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/buffer/BufferUtils.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/buffer/ByteArrayBuffer.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/buffer/keys/AbstractBufferPublicKeyParser.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/buffer/keys/BufferPublicKeyParser.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/buffer/keys/DSSBufferPublicKeyParser.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/buffer/keys/ECBufferPublicKeyParser.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/buffer/keys/ED25519BufferPublicKeyParser.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/buffer/keys/RSABufferPublicKeyParser.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/closeable/AbstractCloseable.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/closeable/AbstractInnerCloseable.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/closeable/Builder.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/closeable/FuturesCloseable.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/closeable/IoBaseCloseable.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/closeable/ParallelCloseable.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/closeable/SequentialCloseable.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/closeable/SimpleCloseable.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/EventListenerUtils.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/EventNotifier.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/GenericUtils.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/IgnoringEmptyMap.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/Int2IntFunction.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/Invoker.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/io/CloseableEmptyInputStream.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/io/der/ASN1Class.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/io/der/ASN1Object.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/io/der/ASN1Type.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/io/der/DERParser.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/io/der/DERWriter.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/io/DirectoryScanner.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/io/EmptyInputStream.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/io/FileInfoExtractor.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/io/functors/IOFunction.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/io/InputStreamWithChannel.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/io/IoUtils.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/io/LimitInputStream.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/io/LoggingFilterOutputStream.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/io/ModifiableFileWatcher.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/io/NoCloseInputStream.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/io/NoCloseOutputStream.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/io/NoCloseReader.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/io/NoCloseWriter.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/io/NullInputStream.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/io/NullOutputStream.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/io/OutputStreamWithChannel.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/logging/AbstractLoggingBean.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/logging/LoggingUtils.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/logging/SimplifiedLog.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/MapEntryUtils.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/net/NetworkConnector.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/net/SshdSocketAddress.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/NumberUtils.java+3 6 renamed
    @@ -34,18 +34,15 @@ public final class NumberUtils {
          * primitive numerical values
          */
         public static final List<Class<?>> NUMERIC_PRIMITIVE_CLASSES =
    -            GenericUtils.unmodifiableList(
    -                        Byte.TYPE, Short.TYPE, Integer.TYPE, Long.TYPE,
    -                        Float.TYPE, Double.TYPE
    -                    );
    +        GenericUtils.unmodifiableList(
    +            Byte.TYPE, Short.TYPE, Integer.TYPE, Long.TYPE, Float.TYPE, Double.TYPE);
     
         /**
          * A {@link List} containing all the pure powers of 2 for a {@code long}
          * value. The value at index <I>n</I> is 2 to the power of <I>n</I>
          */
         public static final List<Long> POWERS_OF_TWO =
    -            GenericUtils.unmodifiableList(IntStream.range(0, 64)
    -                    .mapToObj(i -> 1L << i));
    +        GenericUtils.unmodifiableList(IntStream.range(0, 64).mapToObj(i -> 1L << i));
     
         private NumberUtils() {
             throw new UnsupportedOperationException("No instance");
    
  • sshd-common/src/main/java/org/apache/sshd/common/util/ObjectBuilder.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/OsUtils.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/Readable.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/ReflectionUtils.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/security/AbstractSecurityProviderRegistrar.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/security/bouncycastle/BouncyCastleGeneratorHostKeyProvider.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/security/bouncycastle/BouncyCastleKeyPairResourceParser.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/security/bouncycastle/BouncyCastleRandomFactory.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/security/bouncycastle/BouncyCastleRandom.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/security/bouncycastle/BouncyCastleSecurityProviderRegistrar.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/security/eddsa/Ed25519PublicKeyDecoder.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/security/eddsa/EdDSASecurityProviderRegistrar.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/security/eddsa/EdDSASecurityProviderUtils.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/security/eddsa/OpenSSHEd25519PrivateKeyEntryDecoder.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/security/eddsa/SignatureEd25519.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/security/SecurityEntityFactory.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/security/SecurityProviderChoice.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/security/SecurityProviderRegistrar.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/security/SecurityUtils.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/SelectorUtils.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/SshdEventListener.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/threads/CloseableExecutorService.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/threads/ExecutorServiceCarrier.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/threads/NoCloseExecutor.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/threads/SshdThreadFactory.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/threads/SshThreadPoolExecutor.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/threads/ThreadUtils.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/ValidateUtils.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/common/util/VersionInfo.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/server/keyprovider/AbstractGeneratorHostKeyProvider.java+0 0 renamed
  • sshd-common/src/main/java/org/apache/sshd/server/keyprovider/SimpleGeneratorHostKeyProvider.java+0 0 renamed
  • sshd-common/src/test/java/org/apache/sshd/client/auth/password/PasswordIdentityProviderTest.java+3 4 renamed
    @@ -17,7 +17,7 @@
      * under the License.
      */
     
    -package org.apache.sshd.client.auth;
    +package org.apache.sshd.client.auth.password;
     
     import java.util.ArrayList;
     import java.util.Arrays;
    @@ -26,8 +26,7 @@
     import java.util.LinkedList;
     import java.util.List;
     
    -import org.apache.sshd.client.auth.password.PasswordIdentityProvider;
    -import org.apache.sshd.util.test.BaseTestSupport;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
    @@ -39,7 +38,7 @@
      */
     @FixMethodOrder(MethodSorters.NAME_ASCENDING)
     @Category({ NoIoTestCase.class })
    -public class PasswordIdentityProviderTest extends BaseTestSupport {
    +public class PasswordIdentityProviderTest extends JUnitTestSupport {
         public PasswordIdentityProviderTest() {
             super();
         }
    
  • sshd-common/src/test/java/org/apache/sshd/client/config/hosts/ConfigFileHostEntryResolverTest.java+2 2 renamed
    @@ -29,7 +29,7 @@
     import java.util.concurrent.atomic.AtomicInteger;
     
     import org.apache.sshd.common.util.io.IoUtils;
    -import org.apache.sshd.util.test.BaseTestSupport;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
    @@ -41,7 +41,7 @@
      */
     @FixMethodOrder(MethodSorters.NAME_ASCENDING)
     @Category({ NoIoTestCase.class })
    -public class ConfigFileHostEntryResolverTest extends BaseTestSupport {
    +public class ConfigFileHostEntryResolverTest extends JUnitTestSupport {
         public ConfigFileHostEntryResolverTest() {
             super();
         }
    
  • sshd-common/src/test/java/org/apache/sshd/client/config/hosts/HostConfigEntryTest.java+2 2 renamed
    @@ -28,7 +28,7 @@
     import java.util.regex.Pattern;
     
     import org.apache.sshd.common.util.GenericUtils;
    -import org.apache.sshd.util.test.BaseTestSupport;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
    @@ -40,7 +40,7 @@
      */
     @FixMethodOrder(MethodSorters.NAME_ASCENDING)
     @Category({ NoIoTestCase.class })
    -public class HostConfigEntryTest extends BaseTestSupport {
    +public class HostConfigEntryTest extends JUnitTestSupport {
         public HostConfigEntryTest() {
             super();
         }
    
  • sshd-common/src/test/java/org/apache/sshd/client/config/hosts/KnownHostHashValueTest.java+2 2 renamed
    @@ -22,8 +22,8 @@
     import java.util.Arrays;
     import java.util.Collection;
     
    -import org.apache.sshd.util.test.BaseTestSupport;
     import org.apache.sshd.util.test.JUnit4ClassRunnerWithParametersFactory;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
    @@ -41,7 +41,7 @@
     @RunWith(Parameterized.class)   // see https://github.com/junit-team/junit/wiki/Parameterized-tests
     @UseParametersRunnerFactory(JUnit4ClassRunnerWithParametersFactory.class)
     @Category({ NoIoTestCase.class })
    -public class KnownHostHashValueTest extends BaseTestSupport {
    +public class KnownHostHashValueTest extends JUnitTestSupport {
         private final String hostName;
         private final String hashValue;
         private final KnownHostHashValue hash;
    
  • sshd-common/src/test/java/org/apache/sshd/client/config/keys/BuiltinClientIdentitiesWatcherTest.java+4 4 renamed
    @@ -43,9 +43,9 @@
     import org.apache.sshd.common.util.GenericUtils;
     import org.apache.sshd.common.util.ValidateUtils;
     import org.apache.sshd.common.util.io.IoUtils;
    -import org.apache.sshd.util.test.BaseTestSupport;
    +import org.apache.sshd.util.test.CommonTestSupportUtils;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
    -import org.apache.sshd.util.test.Utils;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
     import org.junit.experimental.categories.Category;
    @@ -56,14 +56,14 @@
      */
     @FixMethodOrder(MethodSorters.NAME_ASCENDING)
     @Category({ NoIoTestCase.class })
    -public class BuiltinClientIdentitiesWatcherTest extends BaseTestSupport {
    +public class BuiltinClientIdentitiesWatcherTest extends JUnitTestSupport {
         public BuiltinClientIdentitiesWatcherTest() {
             super();
         }
     
         @Test
         public void testMultipleFilesWatch() throws Exception {
    -        KeyPair identity = Utils.getFirstKeyPair(createTestHostKeyProvider());
    +        KeyPair identity = CommonTestSupportUtils.getFirstKeyPair(createTestHostKeyProvider());
             String keyType = ValidateUtils.checkNotNullAndNotEmpty(KeyUtils.getKeyType(identity), "Cannot determine identity key type");
     
             Path dir = assertHierarchyTargetFolderExists(getTempTargetRelativeFile(getClass().getSimpleName()));
    
  • sshd-common/src/test/java/org/apache/sshd/client/config/keys/ClientIdentityFileWatcherTest.java+4 4 renamed
    @@ -34,9 +34,9 @@
     
     import org.apache.sshd.common.config.keys.FilePasswordProvider;
     import org.apache.sshd.common.util.io.IoUtils;
    -import org.apache.sshd.util.test.BaseTestSupport;
    +import org.apache.sshd.util.test.CommonTestSupportUtils;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
    -import org.apache.sshd.util.test.Utils;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
     import org.junit.experimental.categories.Category;
    @@ -47,7 +47,7 @@
      */
     @FixMethodOrder(MethodSorters.NAME_ASCENDING)
     @Category({ NoIoTestCase.class })
    -public class ClientIdentityFileWatcherTest extends BaseTestSupport {
    +public class ClientIdentityFileWatcherTest extends JUnitTestSupport {
         public ClientIdentityFileWatcherTest() {
             super();
         }
    @@ -56,7 +56,7 @@ public ClientIdentityFileWatcherTest() {
         public void testIdentityReload() throws Exception {
             Path dir = assertHierarchyTargetFolderExists(getTempTargetRelativeFile(getClass().getSimpleName()));
             Path idFile = dir.resolve(getCurrentTestName() + ".pem");
    -        KeyPair identity = Utils.getFirstKeyPair(createTestHostKeyProvider());
    +        KeyPair identity = CommonTestSupportUtils.getFirstKeyPair(createTestHostKeyProvider());
             ClientIdentityLoader loader = new ClientIdentityLoader() {
                 @Override
                 public KeyPair loadClientIdentity(String location, FilePasswordProvider provider) throws IOException, GeneralSecurityException {
    
  • sshd-common/src/test/java/org/apache/sshd/client/config/keys/ClientIdentityTest.java+2 2 renamed
    @@ -33,7 +33,7 @@
     import org.apache.sshd.common.keyprovider.KeyIdentityProvider;
     import org.apache.sshd.common.util.GenericUtils;
     import org.apache.sshd.common.util.io.IoUtils;
    -import org.apache.sshd.util.test.BaseTestSupport;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
    @@ -45,7 +45,7 @@
      */
     @FixMethodOrder(MethodSorters.NAME_ASCENDING)
     @Category({ NoIoTestCase.class })
    -public class ClientIdentityTest extends BaseTestSupport {
    +public class ClientIdentityTest extends JUnitTestSupport {
         public ClientIdentityTest() {
             super();
         }
    
  • sshd-common/src/test/java/org/apache/sshd/common/cipher/AES192CTRTest.java+0 0 renamed
  • sshd-common/src/test/java/org/apache/sshd/common/cipher/AES256CBCTest.java+0 0 renamed
  • sshd-common/src/test/java/org/apache/sshd/common/cipher/ARCFOUR128Test.java+0 0 renamed
  • sshd-common/src/test/java/org/apache/sshd/common/cipher/ARCFOUR256Test.java+0 0 renamed
  • sshd-common/src/test/java/org/apache/sshd/common/cipher/BaseCipherTest.java+2 2 renamed
    @@ -29,7 +29,7 @@
     import org.apache.sshd.common.NamedFactory;
     import org.apache.sshd.common.cipher.Cipher.Mode;
     import org.apache.sshd.common.util.security.SecurityUtils;
    -import org.apache.sshd.util.test.BaseTestSupport;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.Assume;
     import org.junit.experimental.categories.Category;
    @@ -38,7 +38,7 @@
      * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
      */
     @Category({ NoIoTestCase.class })
    -public abstract class BaseCipherTest extends BaseTestSupport {
    +public abstract class BaseCipherTest extends JUnitTestSupport {
         protected BaseCipherTest() {
             super();
         }
    
  • sshd-common/src/test/java/org/apache/sshd/common/cipher/ECCurvesTest.java+2 2 renamed
    @@ -22,7 +22,7 @@
     import java.util.EnumSet;
     import java.util.Set;
     
    -import org.apache.sshd.util.test.BaseTestSupport;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
    @@ -34,7 +34,7 @@
      */
     @FixMethodOrder(MethodSorters.NAME_ASCENDING)
     @Category({ NoIoTestCase.class })
    -public class ECCurvesTest extends BaseTestSupport {
    +public class ECCurvesTest extends JUnitTestSupport {
         public ECCurvesTest() {
             super();
         }
    
  • sshd-common/src/test/java/org/apache/sshd/common/compression/BuiltinCompressionsTest.java+2 2 renamed
    @@ -32,7 +32,7 @@
     import org.apache.sshd.common.NamedResource;
     import org.apache.sshd.common.compression.BuiltinCompressions.ParseResult;
     import org.apache.sshd.common.util.GenericUtils;
    -import org.apache.sshd.util.test.BaseTestSupport;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
    @@ -45,7 +45,7 @@
      */
     @FixMethodOrder(MethodSorters.NAME_ASCENDING)
     @Category({ NoIoTestCase.class })
    -public class BuiltinCompressionsTest extends BaseTestSupport {
    +public class BuiltinCompressionsTest extends JUnitTestSupport {
         public BuiltinCompressionsTest() {
             super();
         }
    
  • sshd-common/src/test/java/org/apache/sshd/common/config/keys/AuthorizedKeyEntryLoginOptionsParseTest.java+2 2 renamed
    @@ -24,8 +24,8 @@
     import java.util.Map;
     
     import org.apache.sshd.common.util.GenericUtils;
    -import org.apache.sshd.util.test.BaseTestSupport;
     import org.apache.sshd.util.test.JUnit4ClassRunnerWithParametersFactory;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
     import org.junit.runner.RunWith;
    @@ -40,7 +40,7 @@
     @FixMethodOrder(MethodSorters.NAME_ASCENDING)
     @RunWith(Parameterized.class)   // see https://github.com/junit-team/junit/wiki/Parameterized-tests
     @UseParametersRunnerFactory(JUnit4ClassRunnerWithParametersFactory.class)
    -public class AuthorizedKeyEntryLoginOptionsParseTest extends BaseTestSupport {
    +public class AuthorizedKeyEntryLoginOptionsParseTest extends JUnitTestSupport {
         private final String value;
         private final String loginPart;
         private final String keyPart;
    
  • sshd-common/src/test/java/org/apache/sshd/common/config/keys/BuiltinIdentitiesTest.java+2 2 renamed
    @@ -27,8 +27,8 @@
     import java.util.List;
     
     import org.apache.sshd.common.util.security.SecurityUtils;
    -import org.apache.sshd.util.test.BaseTestSupport;
     import org.apache.sshd.util.test.JUnit4ClassRunnerWithParametersFactory;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.Assume;
     import org.junit.BeforeClass;
    @@ -48,7 +48,7 @@
     @RunWith(Parameterized.class)   // see https://github.com/junit-team/junit/wiki/Parameterized-tests
     @UseParametersRunnerFactory(JUnit4ClassRunnerWithParametersFactory.class)
     @Category({ NoIoTestCase.class })
    -public class BuiltinIdentitiesTest extends BaseTestSupport {
    +public class BuiltinIdentitiesTest extends JUnitTestSupport {
         private final BuiltinIdentities expected;
     
         public BuiltinIdentitiesTest(BuiltinIdentities expected) {
    
  • sshd-common/src/test/java/org/apache/sshd/common/config/keys/KeyRandomArtTest.java+4 4 renamed
    @@ -28,10 +28,10 @@
     import org.apache.sshd.common.cipher.ECCurves;
     import org.apache.sshd.common.util.GenericUtils;
     import org.apache.sshd.common.util.security.SecurityUtils;
    -import org.apache.sshd.util.test.BaseTestSupport;
    +import org.apache.sshd.util.test.CommonTestSupportUtils;
     import org.apache.sshd.util.test.JUnit4ClassRunnerWithParametersFactory;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
    -import org.apache.sshd.util.test.Utils;
     import org.junit.AfterClass;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
    @@ -49,7 +49,7 @@
     @RunWith(Parameterized.class)   // see https://github.com/junit-team/junit/wiki/Parameterized-tests
     @UseParametersRunnerFactory(JUnit4ClassRunnerWithParametersFactory.class)
     @Category({ NoIoTestCase.class })
    -public class KeyRandomArtTest extends BaseTestSupport {
    +public class KeyRandomArtTest extends JUnitTestSupport {
         private static final Collection<KeyPair> KEYS = new LinkedList<>();
     
         private final String algorithm;
    @@ -59,7 +59,7 @@ public class KeyRandomArtTest extends BaseTestSupport {
         public KeyRandomArtTest(String algorithm, int keySize) throws Exception {
             this.algorithm = algorithm;
             this.keySize = keySize;
    -        this.keyPair = Utils.generateKeyPair(algorithm, keySize);
    +        this.keyPair = CommonTestSupportUtils.generateKeyPair(algorithm, keySize);
             KEYS.add(this.keyPair);
         }
     
    
  • sshd-common/src/test/java/org/apache/sshd/common/config/keys/KeyUtilsCloneTest.java+2 2 renamed
    @@ -32,8 +32,8 @@
     import org.apache.sshd.common.keyprovider.KeyPairProvider;
     import org.apache.sshd.common.util.ValidateUtils;
     import org.apache.sshd.common.util.security.SecurityUtils;
    -import org.apache.sshd.util.test.BaseTestSupport;
     import org.apache.sshd.util.test.JUnit4ClassRunnerWithParametersFactory;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
    @@ -51,7 +51,7 @@
     @RunWith(Parameterized.class)   // see https://github.com/junit-team/junit/wiki/Parameterized-tests
     @UseParametersRunnerFactory(JUnit4ClassRunnerWithParametersFactory.class)
     @Category({ NoIoTestCase.class })
    -public class KeyUtilsCloneTest extends BaseTestSupport {
    +public class KeyUtilsCloneTest extends JUnitTestSupport {
         private final String keyType;
         private final int keySize;
     
    
  • sshd-common/src/test/java/org/apache/sshd/common/config/keys/KeyUtilsFingerprintCaseSensitivityTest.java+2 2 renamed
    @@ -26,8 +26,8 @@
     import java.util.Arrays;
     import java.util.Collection;
     
    -import org.apache.sshd.util.test.BaseTestSupport;
     import org.apache.sshd.util.test.JUnit4ClassRunnerWithParametersFactory;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.BeforeClass;
     import org.junit.FixMethodOrder;
    @@ -46,7 +46,7 @@
     @RunWith(Parameterized.class)   // see https://github.com/junit-team/junit/wiki/Parameterized-tests
     @UseParametersRunnerFactory(JUnit4ClassRunnerWithParametersFactory.class)
     @Category({ NoIoTestCase.class })
    -public class KeyUtilsFingerprintCaseSensitivityTest extends BaseTestSupport {
    +public class KeyUtilsFingerprintCaseSensitivityTest extends JUnitTestSupport {
     
         // CHECKSTYLE:OFF
         private static final String KEY_STRING = "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAxr3N5fkt966xJINl0hH7Q6lLDRR1D0yMjcXCE5roE9VFut2ctGFuo90TCOxkPOMnwzwConeyScVF4ConZeWsxbG9VtRh61IeZ6R5P5ZTvE9xPdZBgIEWvU1bRfrrOfSMihqF98pODspE6NoTtND2eglwSGwxcYFmpdTAmu+8qgxgGxlEaaCjqwdiNPZhygrH81Mv2ruolNeZkn4Bj+wFFmZTD/waN1pQaMf+SO1+kEYIYFNl5+8JRGuUcr8MhHHJB+gwqMTF2BSBVITJzZUiQR0TMtkK6Vbs7yt1F9hhzDzAFDwhV+rsfNQaOHpl3zP07qH+/99A0XG1CVcEdHqVMw== lgoldstein@LGOLDSTEIN-WIN7";
    
  • sshd-common/src/test/java/org/apache/sshd/common/config/keys/KeyUtilsFingerprintGenerationTest.java+2 2 renamed
    @@ -33,8 +33,8 @@
     
     import org.apache.sshd.common.digest.BuiltinDigests;
     import org.apache.sshd.common.digest.DigestFactory;
    -import org.apache.sshd.util.test.BaseTestSupport;
     import org.apache.sshd.util.test.JUnit4ClassRunnerWithParametersFactory;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
    @@ -52,7 +52,7 @@
     @RunWith(Parameterized.class)   // see https://github.com/junit-team/junit/wiki/Parameterized-tests
     @UseParametersRunnerFactory(JUnit4ClassRunnerWithParametersFactory.class)
     @Category({ NoIoTestCase.class })
    -public class KeyUtilsFingerprintGenerationTest extends BaseTestSupport {
    +public class KeyUtilsFingerprintGenerationTest extends JUnitTestSupport {
         private final PublicKey key;
         private final DigestFactory digestFactory;
         private final String expected;
    
  • sshd-common/src/test/java/org/apache/sshd/common/config/keys/KeyUtilsTest.java+2 2 renamed
    @@ -37,7 +37,7 @@
     import org.apache.sshd.common.util.GenericUtils;
     import org.apache.sshd.common.util.OsUtils;
     import org.apache.sshd.common.util.io.IoUtils;
    -import org.apache.sshd.util.test.BaseTestSupport;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
    @@ -49,7 +49,7 @@
      */
     @FixMethodOrder(MethodSorters.NAME_ASCENDING)
     @Category({ NoIoTestCase.class })
    -public class KeyUtilsTest extends BaseTestSupport {
    +public class KeyUtilsTest extends JUnitTestSupport {
         public KeyUtilsTest() {
             super();
         }
    
  • sshd-common/src/test/java/org/apache/sshd/common/config/keys/loader/AESPrivateKeyObfuscatorTest.java+2 2 renamed
    @@ -28,8 +28,8 @@
     
     import org.apache.sshd.common.util.GenericUtils;
     import org.apache.sshd.common.util.security.SecurityUtils;
    -import org.apache.sshd.util.test.BaseTestSupport;
     import org.apache.sshd.util.test.JUnit4ClassRunnerWithParametersFactory;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
    @@ -47,7 +47,7 @@
     @RunWith(Parameterized.class)   // see https://github.com/junit-team/junit/wiki/Parameterized-tests
     @UseParametersRunnerFactory(JUnit4ClassRunnerWithParametersFactory.class)
     @Category({ NoIoTestCase.class })
    -public class AESPrivateKeyObfuscatorTest extends BaseTestSupport {
    +public class AESPrivateKeyObfuscatorTest extends JUnitTestSupport {
         private static final Random RANDOMIZER = new Random(System.currentTimeMillis());
     
         private final int keyLength;
    
  • sshd-common/src/test/java/org/apache/sshd/common/config/keys/loader/openssh/OpenSSHKeyPairResourceParserTest.java+2 2 renamed
    @@ -32,8 +32,8 @@
     import org.apache.sshd.common.config.keys.PublicKeyEntryResolver;
     import org.apache.sshd.common.util.GenericUtils;
     import org.apache.sshd.common.util.ValidateUtils;
    -import org.apache.sshd.util.test.BaseTestSupport;
     import org.apache.sshd.util.test.JUnit4ClassRunnerWithParametersFactory;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.Assume;
     import org.junit.FixMethodOrder;
    @@ -52,7 +52,7 @@
     @RunWith(Parameterized.class)   // see https://github.com/junit-team/junit/wiki/Parameterized-tests
     @UseParametersRunnerFactory(JUnit4ClassRunnerWithParametersFactory.class)
     @Category({ NoIoTestCase.class })
    -public class OpenSSHKeyPairResourceParserTest extends BaseTestSupport {
    +public class OpenSSHKeyPairResourceParserTest extends JUnitTestSupport {
         private static final OpenSSHKeyPairResourceParser PARSER = OpenSSHKeyPairResourceParser.INSTANCE;
         private final BuiltinIdentities identity;
     
    
  • sshd-common/src/test/java/org/apache/sshd/common/config/keys/loader/pem/PKCS8PEMResourceKeyPairParserTest.java+2 2 renamed
    @@ -33,8 +33,8 @@
     import org.apache.commons.ssl.PEMUtil;
     import org.apache.sshd.common.config.keys.KeyUtils;
     import org.apache.sshd.common.util.security.SecurityUtils;
    -import org.apache.sshd.util.test.BaseTestSupport;
     import org.apache.sshd.util.test.JUnit4ClassRunnerWithParametersFactory;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
    @@ -54,7 +54,7 @@
     @UseParametersRunnerFactory(JUnit4ClassRunnerWithParametersFactory.class)
     @FixMethodOrder(MethodSorters.NAME_ASCENDING)
     @Category({ NoIoTestCase.class })
    -public class PKCS8PEMResourceKeyPairParserTest extends BaseTestSupport {
    +public class PKCS8PEMResourceKeyPairParserTest extends JUnitTestSupport {
         private final String algorithm;
         private final int keySize;
     
    
  • sshd-common/src/test/java/org/apache/sshd/common/config/keys/PublicKeyEntryTest.java+2 2 renamed
    @@ -25,7 +25,7 @@
     import java.util.Arrays;
     
     import org.apache.sshd.common.util.GenericUtils;
    -import org.apache.sshd.util.test.BaseTestSupport;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
    @@ -37,7 +37,7 @@
      */
     @FixMethodOrder(MethodSorters.NAME_ASCENDING)
     @Category({ NoIoTestCase.class })
    -public class PublicKeyEntryTest extends BaseTestSupport {
    +public class PublicKeyEntryTest extends JUnitTestSupport {
         public PublicKeyEntryTest() {
             super();
         }
    
  • sshd-common/src/test/java/org/apache/sshd/common/config/TimeValueConfigTest.java+2 2 renamed
    @@ -21,7 +21,7 @@
     
     import java.util.concurrent.TimeUnit;
     
    -import org.apache.sshd.util.test.BaseTestSupport;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
    @@ -33,7 +33,7 @@
      */
     @FixMethodOrder(MethodSorters.NAME_ASCENDING)
     @Category({ NoIoTestCase.class })
    -public class TimeValueConfigTest extends BaseTestSupport {
    +public class TimeValueConfigTest extends JUnitTestSupport {
         public TimeValueConfigTest() {
             super();
         }
    
  • sshd-common/src/test/java/org/apache/sshd/common/digest/BuiltinDigestsTest.java+2 2 renamed
    @@ -23,7 +23,7 @@
     import java.util.EnumSet;
     import java.util.Set;
     
    -import org.apache.sshd.util.test.BaseTestSupport;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
    @@ -35,7 +35,7 @@
      */
     @FixMethodOrder(MethodSorters.NAME_ASCENDING)
     @Category({ NoIoTestCase.class })
    -public class BuiltinDigestsTest extends BaseTestSupport {
    +public class BuiltinDigestsTest extends JUnitTestSupport {
         public BuiltinDigestsTest() {
             super();
         }
    
  • sshd-common/src/test/java/org/apache/sshd/common/future/DefaultSshFutureTest.java+2 2 renamed
    @@ -21,7 +21,7 @@
     import java.util.concurrent.TimeUnit;
     import java.util.concurrent.atomic.AtomicInteger;
     
    -import org.apache.sshd.util.test.BaseTestSupport;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
    @@ -34,7 +34,7 @@
      */
     @FixMethodOrder(MethodSorters.NAME_ASCENDING)
     @Category({ NoIoTestCase.class })
    -public class DefaultSshFutureTest extends BaseTestSupport {
    +public class DefaultSshFutureTest extends JUnitTestSupport {
         public DefaultSshFutureTest() {
             super();
         }
    
  • sshd-common/src/test/java/org/apache/sshd/common/keyprovider/KeyPairProviderTest.java+2 2 renamed
    @@ -27,7 +27,7 @@
     import java.util.function.Function;
     
     import org.apache.sshd.common.util.GenericUtils;
    -import org.apache.sshd.util.test.BaseTestSupport;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
    @@ -40,7 +40,7 @@
      */
     @FixMethodOrder(MethodSorters.NAME_ASCENDING)
     @Category({ NoIoTestCase.class })
    -public class KeyPairProviderTest extends BaseTestSupport {
    +public class KeyPairProviderTest extends JUnitTestSupport {
         public KeyPairProviderTest() {
             super();
         }
    
  • sshd-common/src/test/java/org/apache/sshd/common/mac/BuiltinMacsTest.java+2 2 renamed
    @@ -31,7 +31,7 @@
     import org.apache.sshd.common.NamedResource;
     import org.apache.sshd.common.mac.BuiltinMacs.ParseResult;
     import org.apache.sshd.common.util.GenericUtils;
    -import org.apache.sshd.util.test.BaseTestSupport;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
    @@ -44,7 +44,7 @@
      */
     @FixMethodOrder(MethodSorters.NAME_ASCENDING)
     @Category({ NoIoTestCase.class })
    -public class BuiltinMacsTest extends BaseTestSupport {
    +public class BuiltinMacsTest extends JUnitTestSupport {
         public BuiltinMacsTest() {
             super();
         }
    
  • sshd-common/src/test/java/org/apache/sshd/common/mac/MacVectorsTest.java+2 2 renamed
    @@ -33,8 +33,8 @@
     import org.apache.sshd.common.util.GenericUtils;
     import org.apache.sshd.common.util.ValidateUtils;
     import org.apache.sshd.common.util.buffer.BufferUtils;
    -import org.apache.sshd.util.test.BaseTestSupport;
     import org.apache.sshd.util.test.JUnit4ClassRunnerWithParametersFactory;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
    @@ -53,7 +53,7 @@
     @RunWith(Parameterized.class)   // see https://github.com/junit-team/junit/wiki/Parameterized-tests
     @UseParametersRunnerFactory(JUnit4ClassRunnerWithParametersFactory.class)
     @Category({ NoIoTestCase.class })
    -public class MacVectorsTest extends BaseTestSupport {
    +public class MacVectorsTest extends JUnitTestSupport {
         private final VectorSeed seed;
         private final Factory<? extends Mac> macFactory;
         private final byte[] expected;
    
  • sshd-common/src/test/java/org/apache/sshd/common/random/RandomFactoryTest.java+2 2 renamed
    @@ -23,8 +23,8 @@
     import java.util.concurrent.TimeUnit;
     
     import org.apache.sshd.common.util.security.SecurityUtils;
    -import org.apache.sshd.util.test.BaseTestSupport;
     import org.apache.sshd.util.test.JUnit4ClassRunnerWithParametersFactory;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.Assume;
     import org.junit.FixMethodOrder;
    @@ -43,7 +43,7 @@
     @RunWith(Parameterized.class)   // see https://github.com/junit-team/junit/wiki/Parameterized-tests
     @UseParametersRunnerFactory(JUnit4ClassRunnerWithParametersFactory.class)
     @Category({ NoIoTestCase.class })
    -public class RandomFactoryTest extends BaseTestSupport {
    +public class RandomFactoryTest extends JUnitTestSupport {
         private final RandomFactory factory;
     
         public RandomFactoryTest(RandomFactory factory) {
    
  • sshd-common/src/test/java/org/apache/sshd/common/signature/BuiltinSignaturesTest.java+2 2 renamed
    @@ -28,7 +28,7 @@
     import org.apache.sshd.common.NamedResource;
     import org.apache.sshd.common.signature.BuiltinSignatures.ParseResult;
     import org.apache.sshd.common.util.GenericUtils;
    -import org.apache.sshd.util.test.BaseTestSupport;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
    @@ -41,7 +41,7 @@
      */
     @FixMethodOrder(MethodSorters.NAME_ASCENDING)
     @Category({ NoIoTestCase.class })
    -public class BuiltinSignaturesTest extends BaseTestSupport {
    +public class BuiltinSignaturesTest extends JUnitTestSupport {
         public BuiltinSignaturesTest() {
             super();
         }
    
  • sshd-common/src/test/java/org/apache/sshd/common/signature/SignatureDSATest.java+2 2 renamed
    @@ -25,7 +25,7 @@
     
     import org.apache.sshd.common.config.keys.KeyUtils;
     import org.apache.sshd.common.util.security.SecurityUtils;
    -import org.apache.sshd.util.test.BaseTestSupport;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
    @@ -37,7 +37,7 @@
      */
     @FixMethodOrder(MethodSorters.NAME_ASCENDING)
     @Category({ NoIoTestCase.class })
    -public class SignatureDSATest extends BaseTestSupport {
    +public class SignatureDSATest extends JUnitTestSupport {
         public SignatureDSATest() {
             super();
         }
    
  • sshd-common/src/test/java/org/apache/sshd/common/signature/SignatureRSATest.java+2 2 renamed
    @@ -30,7 +30,7 @@
     import org.apache.sshd.common.Factory;
     import org.apache.sshd.common.config.keys.KeyUtils;
     import org.apache.sshd.common.util.security.SecurityUtils;
    -import org.apache.sshd.util.test.BaseTestSupport;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.junit.BeforeClass;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
    @@ -40,7 +40,7 @@
      * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
      */
     @FixMethodOrder(MethodSorters.NAME_ASCENDING)
    -public class SignatureRSATest extends BaseTestSupport {
    +public class SignatureRSATest extends JUnitTestSupport {
         private static final Base64.Decoder B64_DECODER = Base64.getDecoder();
         @SuppressWarnings("checkstyle:linelength")
         private static final byte[] TEST_MSG =
    
  • sshd-common/src/test/java/org/apache/sshd/common/signature/SignaturesDevelopment.java+4 2 renamed
    @@ -26,13 +26,15 @@
     import org.apache.sshd.common.util.GenericUtils;
     import org.apache.sshd.common.util.buffer.BufferUtils;
     import org.apache.sshd.common.util.security.eddsa.EdDSASecurityProviderUtils;
    -import org.apache.sshd.util.test.BaseTestSupport;
    +import org.apache.sshd.util.test.JUnitTestSupport;
    +import org.junit.Ignore;
     
     /**
      * A &quot;scratch-pad&quot; class for testing signatures related code during development
      * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
      */
    -public class SignaturesDevelopment extends BaseTestSupport {
    +@Ignore("Used only for development")
    +public class SignaturesDevelopment extends JUnitTestSupport {
         public SignaturesDevelopment() {
             super();
         }
    
  • sshd-common/src/test/java/org/apache/sshd/common/SshConstantsTest.java+2 2 renamed
    @@ -22,7 +22,7 @@
     import java.util.Collection;
     
     import org.apache.sshd.common.util.GenericUtils;
    -import org.apache.sshd.util.test.BaseTestSupport;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
    @@ -34,7 +34,7 @@
      */
     @FixMethodOrder(MethodSorters.NAME_ASCENDING)
     @Category({ NoIoTestCase.class })
    -public class SshConstantsTest extends BaseTestSupport {
    +public class SshConstantsTest extends JUnitTestSupport {
         public SshConstantsTest() {
             super();
         }
    
  • sshd-common/src/test/java/org/apache/sshd/common/util/buffer/BufferTest.java+2 2 renamed
    @@ -23,7 +23,7 @@
     import java.nio.charset.StandardCharsets;
     
     import org.apache.sshd.common.util.GenericUtils;
    -import org.apache.sshd.util.test.BaseTestSupport;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
    @@ -32,7 +32,7 @@
     
     @FixMethodOrder(MethodSorters.NAME_ASCENDING)
     @Category({ NoIoTestCase.class })
    -public class BufferTest extends BaseTestSupport {
    +public class BufferTest extends JUnitTestSupport {
         public BufferTest() {
             super();
         }
    
  • sshd-common/src/test/java/org/apache/sshd/common/util/buffer/BufferUtilsTest.java+2 2 renamed
    @@ -22,7 +22,7 @@
     import java.nio.charset.StandardCharsets;
     import java.util.Random;
     
    -import org.apache.sshd.util.test.BaseTestSupport;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
    @@ -34,7 +34,7 @@
      */
     @FixMethodOrder(MethodSorters.NAME_ASCENDING)
     @Category({ NoIoTestCase.class })
    -public class BufferUtilsTest extends BaseTestSupport {
    +public class BufferUtilsTest extends JUnitTestSupport {
         public BufferUtilsTest() {
             super();
         }
    
  • sshd-common/src/test/java/org/apache/sshd/common/util/closeable/CloseableUtilsTest.java+2 2 renamed
    @@ -30,7 +30,7 @@
     import org.apache.sshd.common.future.DefaultCloseFuture;
     import org.apache.sshd.common.future.SshFutureListener;
     import org.apache.sshd.common.util.threads.ThreadUtils;
    -import org.apache.sshd.util.test.BaseTestSupport;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
    @@ -42,7 +42,7 @@
      */
     @FixMethodOrder(MethodSorters.NAME_ASCENDING)
     @Category({ NoIoTestCase.class })
    -public class CloseableUtilsTest extends BaseTestSupport {
    +public class CloseableUtilsTest extends JUnitTestSupport {
         public CloseableUtilsTest() {
             super();
         }
    
  • sshd-common/src/test/java/org/apache/sshd/common/util/EventListenerUtilsTest.java+2 2 renamed
    @@ -26,7 +26,7 @@
     import java.util.List;
     import java.util.Set;
     
    -import org.apache.sshd.util.test.BaseTestSupport;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
    @@ -38,7 +38,7 @@
      */
     @FixMethodOrder(MethodSorters.NAME_ASCENDING)
     @Category({ NoIoTestCase.class })
    -public class EventListenerUtilsTest extends BaseTestSupport {
    +public class EventListenerUtilsTest extends JUnitTestSupport {
         public EventListenerUtilsTest() {
             super();
         }
    
  • sshd-common/src/test/java/org/apache/sshd/common/util/GenericUtilsTest.java+3 3 renamed
    @@ -24,7 +24,7 @@
     import java.util.List;
     import java.util.NoSuchElementException;
     
    -import org.apache.sshd.util.test.BaseTestSupport;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
    @@ -35,8 +35,8 @@
      * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
      */
     @FixMethodOrder(MethodSorters.NAME_ASCENDING)
    -@Category({ NoIoTestCase.class })
    -public class GenericUtilsTest extends BaseTestSupport {
    +@Category(NoIoTestCase.class)
    +public class GenericUtilsTest extends JUnitTestSupport {
         public GenericUtilsTest() {
             super();
         }
    
  • sshd-common/src/test/java/org/apache/sshd/common/util/Int2IntFunctionTest.java+2 2 renamed
    @@ -22,7 +22,7 @@
     import java.util.Random;
     import java.util.function.IntUnaryOperator;
     
    -import org.apache.sshd.util.test.BaseTestSupport;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
    @@ -34,7 +34,7 @@
      */
     @FixMethodOrder(MethodSorters.NAME_ASCENDING)
     @Category({ NoIoTestCase.class })
    -public class Int2IntFunctionTest extends BaseTestSupport {
    +public class Int2IntFunctionTest extends JUnitTestSupport {
         public Int2IntFunctionTest() {
             super();
         }
    
  • sshd-common/src/test/java/org/apache/sshd/common/util/io/EmptyInputStreamTest.java+2 2 renamed
    @@ -23,7 +23,7 @@
     import java.io.InputStream;
     
     import org.apache.sshd.common.util.buffer.BufferUtils;
    -import org.apache.sshd.util.test.BaseTestSupport;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
    @@ -35,7 +35,7 @@
      */
     @FixMethodOrder(MethodSorters.NAME_ASCENDING)
     @Category({ NoIoTestCase.class })
    -public class EmptyInputStreamTest extends BaseTestSupport {
    +public class EmptyInputStreamTest extends JUnitTestSupport {
         public EmptyInputStreamTest() {
             super();
         }
    
  • sshd-common/src/test/java/org/apache/sshd/common/util/io/IoUtilsTest.java+2 2 renamed
    @@ -22,7 +22,7 @@
     import java.nio.file.LinkOption;
     
     import org.apache.sshd.common.util.NumberUtils;
    -import org.apache.sshd.util.test.BaseTestSupport;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
    @@ -34,7 +34,7 @@
      */
     @FixMethodOrder(MethodSorters.NAME_ASCENDING)
     @Category({ NoIoTestCase.class })
    -public class IoUtilsTest extends BaseTestSupport {
    +public class IoUtilsTest extends JUnitTestSupport {
         public IoUtilsTest() {
             super();
         }
    
  • sshd-common/src/test/java/org/apache/sshd/common/util/io/LimitInputStreamTest.java+2 2 renamed
    @@ -25,7 +25,7 @@
     import java.nio.file.Files;
     import java.nio.file.Path;
     
    -import org.apache.sshd.util.test.BaseTestSupport;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
    @@ -37,7 +37,7 @@
      */
     @FixMethodOrder(MethodSorters.NAME_ASCENDING)
     @Category({ NoIoTestCase.class })
    -public class LimitInputStreamTest extends BaseTestSupport {
    +public class LimitInputStreamTest extends JUnitTestSupport {
         public LimitInputStreamTest() {
             super();
         }
    
  • sshd-common/src/test/java/org/apache/sshd/common/util/io/ModifiableFileWatcherTest.java+2 2 renamed
    @@ -31,7 +31,7 @@
     
     import org.apache.sshd.common.util.GenericUtils;
     import org.apache.sshd.common.util.OsUtils;
    -import org.apache.sshd.util.test.BaseTestSupport;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
    @@ -43,7 +43,7 @@
      */
     @FixMethodOrder(MethodSorters.NAME_ASCENDING)
     @Category({ NoIoTestCase.class })
    -public class ModifiableFileWatcherTest extends BaseTestSupport {
    +public class ModifiableFileWatcherTest extends JUnitTestSupport {
         public ModifiableFileWatcherTest() {
             super();
         }
    
  • sshd-common/src/test/java/org/apache/sshd/common/util/NumberUtilsTest.java+2 2 renamed
    @@ -19,7 +19,7 @@
     
     package org.apache.sshd.common.util;
     
    -import org.apache.sshd.util.test.BaseTestSupport;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
    @@ -31,7 +31,7 @@
      */
     @FixMethodOrder(MethodSorters.NAME_ASCENDING)
     @Category({ NoIoTestCase.class })
    -public class NumberUtilsTest extends BaseTestSupport {
    +public class NumberUtilsTest extends JUnitTestSupport {
         public NumberUtilsTest() {
             super();
         }
    
  • sshd-common/src/test/java/org/apache/sshd/common/util/OsUtilsTest.java+2 2 renamed
    @@ -21,7 +21,7 @@
     
     import java.util.Objects;
     
    -import org.apache.sshd.util.test.BaseTestSupport;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
    @@ -33,7 +33,7 @@
      */
     @FixMethodOrder(MethodSorters.NAME_ASCENDING)
     @Category({ NoIoTestCase.class })
    -public class OsUtilsTest extends BaseTestSupport {
    +public class OsUtilsTest extends JUnitTestSupport {
         public OsUtilsTest() {
             super();
         }
    
  • sshd-common/src/test/java/org/apache/sshd/common/util/SelectorUtilsTest.java+2 2 renamed
    @@ -21,7 +21,7 @@
     import java.io.File;
     import java.util.Random;
     
    -import org.apache.sshd.util.test.BaseTestSupport;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.Assume;
     import org.junit.FixMethodOrder;
    @@ -34,7 +34,7 @@
      */
     @FixMethodOrder(MethodSorters.NAME_ASCENDING)
     @Category({ NoIoTestCase.class })
    -public class SelectorUtilsTest extends BaseTestSupport {
    +public class SelectorUtilsTest extends JUnitTestSupport {
         public SelectorUtilsTest() {
             super();
         }
    
  • sshd-common/src/test/java/org/apache/sshd/common/util/ThreadUtilsTest.java+2 2 renamed
    @@ -23,7 +23,7 @@
     
     import org.apache.sshd.common.util.threads.CloseableExecutorService;
     import org.apache.sshd.common.util.threads.ThreadUtils;
    -import org.apache.sshd.util.test.BaseTestSupport;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
    @@ -35,7 +35,7 @@
      */
     @FixMethodOrder(MethodSorters.NAME_ASCENDING)
     @Category({ NoIoTestCase.class })
    -public class ThreadUtilsTest extends BaseTestSupport {
    +public class ThreadUtilsTest extends JUnitTestSupport {
         public ThreadUtilsTest() {
             super();
         }
    
  • sshd-common/src/test/java/org/apache/sshd/common/util/ValidateUtilsTest.java+3 3 renamed
    @@ -19,7 +19,7 @@
     
     package org.apache.sshd.common.util;
     
    -import org.apache.sshd.util.test.BaseTestSupport;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
    @@ -30,8 +30,8 @@
      * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
      */
     @FixMethodOrder(MethodSorters.NAME_ASCENDING)
    -@Category({ NoIoTestCase.class })
    -public class ValidateUtilsTest extends BaseTestSupport {
    +@Category(NoIoTestCase.class)
    +public class ValidateUtilsTest extends JUnitTestSupport {
         public ValidateUtilsTest() {
             super();
         }
    
  • sshd-common/src/test/java/org/apache/sshd/common/util/VersionInfoTest.java+2 2 renamed
    @@ -19,7 +19,7 @@
     
     package org.apache.sshd.common.util;
     
    -import org.apache.sshd.util.test.BaseTestSupport;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.apache.sshd.util.test.NoIoTestCase;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
    @@ -31,7 +31,7 @@
      */
     @FixMethodOrder(MethodSorters.NAME_ASCENDING)
     @Category({ NoIoTestCase.class })
    -public class VersionInfoTest extends BaseTestSupport {
    +public class VersionInfoTest extends JUnitTestSupport {
         public VersionInfoTest() {
             super();
         }
    
  • sshd-common/src/test/java/org/apache/sshd/common/VersionPropertiesTest.java+2 2 renamed
    @@ -23,7 +23,7 @@
     
     import org.apache.sshd.common.config.VersionProperties;
     import org.apache.sshd.common.util.GenericUtils;
    -import org.apache.sshd.util.test.BaseTestSupport;
    +import org.apache.sshd.util.test.JUnitTestSupport;
     import org.junit.FixMethodOrder;
     import org.junit.Test;
     import org.junit.runners.MethodSorters;
    @@ -32,7 +32,7 @@
      * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
      */
     @FixMethodOrder(MethodSorters.NAME_ASCENDING)
    -public class VersionPropertiesTest extends BaseTestSupport {
    +public class VersionPropertiesTest extends JUnitTestSupport {
         public VersionPropertiesTest() {
             super();
         }
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

8

News mentions

0

No linked articles in our index yet.