You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by tw...@apache.org on 2025/10/19 10:07:20 UTC

(mina-sshd) branch dev_3.0 updated (2a13d8ccb -> b327b81b6)

This is an automated email from the ASF dual-hosted git repository.

twolf pushed a change to branch dev_3.0
in repository https://gitbox.apache.org/repos/asf/mina-sshd.git


    from 2a13d8ccb Fix test
     new 1693f478f ChaCha20: simplify initializing the Poly1305 Mac
     new 3f32b3a70 [osgi] Bump upper bound for org.bouncycastle to 3.0.0
     new f7fd08995 BouncyCastleAccessor: completely separate paths for BC and BC-FIPS
     add 078ea5f08 Bump org.owasp:dependency-check-maven from 12.1.6 to 12.1.7 (#839)
     add 2bb67e61d Bump org.owasp:dependency-check-maven from 12.1.7 to 12.1.8 (#840)
     add 794122f0b fix: negate followLinks flag for checkSymlinkState (#843)
     add f98873919 [releng] Fix surefire config
     new 576ae31f8 Merge branch 'master' into 3.0.0
     new bf606d26d Fix Javadoc problems
     new aa9c94bbe [releng] Release preparation for 3.0.0-M2
     new 2081ffa13 [maven-release-plugin] prepare release sshd-3.0.0-M2
     new d85220e79 [maven-release-plugin] prepare for next development iteration
     new b327b81b6 Post-release documentation updates

The 9 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGES.md                                         | 56 +++-----------
 CHANGES.md => docs/changes/3.0.0-M2.md             | 29 +++-----
 pom.xml                                            | 25 +++++--
 sshd-benchmarks/pom.xml                            |  1 +
 .../sshd/common/cipher/AbstractChaCha20Cipher.java |  2 +
 .../apache/sshd/common/cipher/ChaCha20Cipher.java  |  1 -
 .../sshd/common/config/keys/BuiltinIdentities.java |  1 -
 .../apache/sshd/common/config/keys/KeyUtils.java   | 18 ++---
 .../common/config/keys/PrivateKeyEntryDecoder.java |  4 +-
 .../config/keys/PublicKeyRawDataDecoder.java       |  3 +-
 .../keys/impl/AbstractIdentityResourceLoader.java  |  4 +-
 .../config/keys/impl/AbstractKeyEntryResolver.java |  4 +-
 .../keys/impl/AbstractPublicKeyEntryDecoder.java   |  8 +-
 .../openssh/OpenSSHKeyPairResourceParser.java      |  1 -
 .../bouncycastle/BouncyCastleAccessor.java         | 47 ++++++------
 .../sshd/common/cipher/ChaCha20CipherFactory.java  | 23 +++---
 .../apache/sshd/common/channel/LocalWindow.java    |  2 +-
 .../apache/sshd/common/channel/RemoteWindow.java   |  2 +-
 .../org/apache/sshd/core/CoreModuleProperties.java |  2 +-
 sshd-osgi/pom.xml                                  |  5 +-
 .../apache/sshd/putty/AbstractPuttyKeyDecoder.java |  4 +-
 .../sshd/putty/PuttyKeyPairResourceParser.java     |  2 -
 .../sftp/server/AbstractSftpSubsystemHelper.java   |  2 +-
 .../org/apache/sshd/sftp/server/SftpSubsystem.java |  2 +-
 .../apache/sshd/sftp/client/SftpVersionsTest.java  | 85 ++++++++++++++++++++++
 sshd-site/src/site/markdown/index.md               | 10 ++-
 sshd-test/pom.xml                                  |  1 +
 27 files changed, 189 insertions(+), 155 deletions(-)
 copy CHANGES.md => docs/changes/3.0.0-M2.md (78%)


(mina-sshd) 01/09: ChaCha20: simplify initializing the Poly1305 Mac

Posted by tw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

twolf pushed a commit to branch dev_3.0
in repository https://gitbox.apache.org/repos/asf/mina-sshd.git

commit 1693f478f3463510000a403cc2e1e272bb502b84
Author: Thomas Wolf <tw...@apache.org>
AuthorDate: Wed Oct 15 19:10:04 2025 +0200

    ChaCha20: simplify initializing the Poly1305 Mac
    
    Just get a full block from ChaCha20 to increment the block counter
    instead of re-initializing the ChaCha20 cipher. This also has the
    advantage that getting the second 32 bytes overwrites the first
    32 bytes and thus clears the Mac key.
---
 .../sshd/common/cipher/AbstractChaCha20Cipher.java |  2 ++
 .../apache/sshd/common/cipher/ChaCha20Cipher.java  |  1 -
 .../sshd/common/cipher/ChaCha20CipherFactory.java  | 23 ++++++++++------------
 3 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/sshd-common/src/main/java/org/apache/sshd/common/cipher/AbstractChaCha20Cipher.java b/sshd-common/src/main/java/org/apache/sshd/common/cipher/AbstractChaCha20Cipher.java
index b7db12141..95409d1a3 100644
--- a/sshd-common/src/main/java/org/apache/sshd/common/cipher/AbstractChaCha20Cipher.java
+++ b/sshd-common/src/main/java/org/apache/sshd/common/cipher/AbstractChaCha20Cipher.java
@@ -24,6 +24,8 @@ package org.apache.sshd.common.cipher;
  */
 public abstract class AbstractChaCha20Cipher implements Cipher {
 
+    protected static final int BLOCK_BYTES = 64;
+
     protected AbstractChaCha20Cipher() {
         super();
     }
diff --git a/sshd-common/src/main/java/org/apache/sshd/common/cipher/ChaCha20Cipher.java b/sshd-common/src/main/java/org/apache/sshd/common/cipher/ChaCha20Cipher.java
index e4ebde8b6..9e170c2c9 100644
--- a/sshd-common/src/main/java/org/apache/sshd/common/cipher/ChaCha20Cipher.java
+++ b/sshd-common/src/main/java/org/apache/sshd/common/cipher/ChaCha20Cipher.java
@@ -99,7 +99,6 @@ public class ChaCha20Cipher extends AbstractChaCha20Cipher {
     }
 
     protected static class ChaChaEngine {
-        private static final int BLOCK_BYTES = 64;
         private static final int BLOCK_INTS = BLOCK_BYTES / Integer.BYTES;
         private static final int KEY_OFFSET = 4;
         private static final int KEY_BYTES = 32;
diff --git a/sshd-common/src/main/java11/org/apache/sshd/common/cipher/ChaCha20CipherFactory.java b/sshd-common/src/main/java11/org/apache/sshd/common/cipher/ChaCha20CipherFactory.java
index d7a3eb6c5..dfffc2b33 100644
--- a/sshd-common/src/main/java11/org/apache/sshd/common/cipher/ChaCha20CipherFactory.java
+++ b/sshd-common/src/main/java11/org/apache/sshd/common/cipher/ChaCha20CipherFactory.java
@@ -131,7 +131,7 @@ public final class ChaCha20CipherFactory implements Supplier<Cipher> {
             AlgorithmParameterSpec algorithmParameterSpec = new ChaCha20ParameterSpec(nonce, 0);
             k1 = new SecretKeySpec(Arrays.copyOfRange(key, 0, 32), "ChaCha20");
             bodyEngine.init(mode == Mode.Encrypt ? javax.crypto.Cipher.ENCRYPT_MODE : javax.crypto.Cipher.DECRYPT_MODE, k1, algorithmParameterSpec);
-            mac.init(computePolyMacKey());
+            init(mac, bodyEngine);
 
             k2 = new SecretKeySpec(Arrays.copyOfRange(key, 32, 64), "ChaCha20");
             headerEngine.init(mode == Mode.Encrypt ? javax.crypto.Cipher.ENCRYPT_MODE : javax.crypto.Cipher.DECRYPT_MODE, k2, algorithmParameterSpec);
@@ -179,23 +179,20 @@ public final class ChaCha20CipherFactory implements Supplier<Cipher> {
             BufferUtils.putUInt(counter, nonce, 8, 4);
             AlgorithmParameterSpec algorithmParameterSpec = new ChaCha20ParameterSpec(nonce, 0);
             bodyEngine.init(mode == Mode.Encrypt ? javax.crypto.Cipher.ENCRYPT_MODE : javax.crypto.Cipher.DECRYPT_MODE, k1, algorithmParameterSpec);
-            mac.init(computePolyMacKey());
+            init(mac, bodyEngine);
             headerEngine.init(mode == Mode.Encrypt ? javax.crypto.Cipher.ENCRYPT_MODE : javax.crypto.Cipher.DECRYPT_MODE, k2,
                     algorithmParameterSpec);
         }
 
-        private byte[] computePolyMacKey() throws GeneralSecurityException {
+        private void init(Mac mac, javax.crypto.Cipher engine) throws Exception {
+            // Getting a full block from ChaCha20 increments its block counter (from 0 to 1), so the cipher
+            // is set up correctly as a side-effect. The extra bytes gotten are simply discarded.
+            //
+            // Note that AbstractChaCha20Cipher.BLOCK_BYTES == 2 * Poly1305Mac.KEY_BYTES.
             byte[] block = new byte[Poly1305Mac.KEY_BYTES];
-            bodyEngine.update(block, 0, block.length, block);
-            // JDK does not like re-initialization with same key and nonce, even if the counter is different.
-            // But it only checks the latest nonce. So trick it:
-            nonce[0] ^= 1;
-            AlgorithmParameterSpec next = new ChaCha20ParameterSpec(nonce, 1);
-            bodyEngine.init(mode == Mode.Encrypt ? javax.crypto.Cipher.ENCRYPT_MODE : javax.crypto.Cipher.DECRYPT_MODE, k1, next);
-            nonce[0] ^= 1;
-            next = new ChaCha20ParameterSpec(nonce, 1);
-            bodyEngine.init(mode == Mode.Encrypt ? javax.crypto.Cipher.ENCRYPT_MODE : javax.crypto.Cipher.DECRYPT_MODE, k1, next);
-            return block;
+            engine.update(block, 0, block.length, block);
+            mac.init(block);
+            engine.update(block, 0, block.length, block);
         }
     }
 


(mina-sshd) 07/09: [maven-release-plugin] prepare release sshd-3.0.0-M2

Posted by tw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

twolf pushed a commit to branch dev_3.0
in repository https://gitbox.apache.org/repos/asf/mina-sshd.git

commit 2081ffa131132e7bb902c793c7c933de0e029935
Author: Thomas Wolf <tw...@apache.org>
AuthorDate: Sun Oct 19 00:59:42 2025 +0200

    [maven-release-plugin] prepare release sshd-3.0.0-M2
---
 assembly/pom.xml         | 2 +-
 pom.xml                  | 6 +++---
 sshd-benchmarks/pom.xml  | 2 +-
 sshd-cli/pom.xml         | 2 +-
 sshd-common/pom.xml      | 2 +-
 sshd-contrib/pom.xml     | 2 +-
 sshd-core/pom.xml        | 2 +-
 sshd-git/pom.xml         | 2 +-
 sshd-ldap/pom.xml        | 2 +-
 sshd-mina/pom.xml        | 2 +-
 sshd-netty/pom.xml       | 2 +-
 sshd-openpgp/pom.xml     | 2 +-
 sshd-osgi/pom.xml        | 2 +-
 sshd-putty/pom.xml       | 2 +-
 sshd-scp/pom.xml         | 2 +-
 sshd-sftp/pom.xml        | 2 +-
 sshd-site/pom.xml        | 2 +-
 sshd-spring-sftp/pom.xml | 2 +-
 sshd-test/pom.xml        | 2 +-
 19 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/assembly/pom.xml b/assembly/pom.xml
index f160ef55b..e1c869a8d 100644
--- a/assembly/pom.xml
+++ b/assembly/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.sshd</groupId>
         <artifactId>sshd</artifactId>
-        <version>3.0.0-SNAPSHOT</version>
+        <version>3.0.0-M2</version>
     </parent>
 
     <artifactId>apache-sshd</artifactId>
diff --git a/pom.xml b/pom.xml
index 74b981258..71be559a8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,7 +27,7 @@
 
     <groupId>org.apache.sshd</groupId>
     <artifactId>sshd</artifactId>
-    <version>3.0.0-SNAPSHOT</version>
+    <version>3.0.0-M2</version>
     <name>Apache Mina SSHD</name>
     <packaging>pom</packaging>
     <inceptionYear>2008</inceptionYear>
@@ -67,7 +67,7 @@
         <connection>scm:git:https://gitbox.apache.org/repos/asf/mina-sshd.git</connection>
         <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/mina-sshd.git</developerConnection>
         <url>https://github.com/apache/mina-sshd/tree/${project.scm.tag}</url>
-        <tag>dev_3.0</tag>
+        <tag>sshd-3.0.0-M2</tag>
     </scm>
 
     <properties>
@@ -81,7 +81,7 @@
 
 
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <project.build.outputTimestamp>2025-08-29T21:59:28Z</project.build.outputTimestamp>
+        <project.build.outputTimestamp>2025-10-18T22:56:48Z</project.build.outputTimestamp>
 
         <java.sdk.version>8</java.sdk.version>
         <javac.release>${java.sdk.version}</javac.release>
diff --git a/sshd-benchmarks/pom.xml b/sshd-benchmarks/pom.xml
index 4ad037fc0..3bf228d2e 100644
--- a/sshd-benchmarks/pom.xml
+++ b/sshd-benchmarks/pom.xml
@@ -20,7 +20,7 @@
     <parent>
         <groupId>org.apache.sshd</groupId>
         <artifactId>sshd</artifactId>
-        <version>3.0.0-SNAPSHOT</version>
+        <version>3.0.0-M2</version>
         <relativePath>..</relativePath>
     </parent>
 
diff --git a/sshd-cli/pom.xml b/sshd-cli/pom.xml
index 7247b90fd..fa60537da 100644
--- a/sshd-cli/pom.xml
+++ b/sshd-cli/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.sshd</groupId>
         <artifactId>sshd</artifactId>
-        <version>3.0.0-SNAPSHOT</version>
+        <version>3.0.0-M2</version>
     </parent>
 
     <artifactId>sshd-cli</artifactId>
diff --git a/sshd-common/pom.xml b/sshd-common/pom.xml
index f66fa54be..2cbe0d4b6 100644
--- a/sshd-common/pom.xml
+++ b/sshd-common/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.sshd</groupId>
         <artifactId>sshd</artifactId>
-        <version>3.0.0-SNAPSHOT</version>
+        <version>3.0.0-M2</version>
         <relativePath>..</relativePath>
     </parent>
 
diff --git a/sshd-contrib/pom.xml b/sshd-contrib/pom.xml
index a2e9ed879..ef824be5a 100644
--- a/sshd-contrib/pom.xml
+++ b/sshd-contrib/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.sshd</groupId>
         <artifactId>sshd</artifactId>
-        <version>3.0.0-SNAPSHOT</version>
+        <version>3.0.0-M2</version>
     </parent>
 
     <!-- NOTE ::: NOTE ::: NOTE ::: NOTE ::: NOTE ::: NOTE ::: NOTE ::: NOTE :::
diff --git a/sshd-core/pom.xml b/sshd-core/pom.xml
index 3f3dfa97f..aa28519fe 100644
--- a/sshd-core/pom.xml
+++ b/sshd-core/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.sshd</groupId>
         <artifactId>sshd</artifactId>
-        <version>3.0.0-SNAPSHOT</version>
+        <version>3.0.0-M2</version>
         <relativePath>..</relativePath>
     </parent>
 
diff --git a/sshd-git/pom.xml b/sshd-git/pom.xml
index f9cbe0e49..8430e3079 100644
--- a/sshd-git/pom.xml
+++ b/sshd-git/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.sshd</groupId>
         <artifactId>sshd</artifactId>
-        <version>3.0.0-SNAPSHOT</version>
+        <version>3.0.0-M2</version>
     </parent>
 
     <artifactId>sshd-git</artifactId>
diff --git a/sshd-ldap/pom.xml b/sshd-ldap/pom.xml
index e97a44f07..392c456c0 100644
--- a/sshd-ldap/pom.xml
+++ b/sshd-ldap/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.sshd</groupId>
         <artifactId>sshd</artifactId>
-        <version>3.0.0-SNAPSHOT</version>
+        <version>3.0.0-M2</version>
     </parent>
 
     <artifactId>sshd-ldap</artifactId>
diff --git a/sshd-mina/pom.xml b/sshd-mina/pom.xml
index 839e76fa0..88e49b75b 100644
--- a/sshd-mina/pom.xml
+++ b/sshd-mina/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.sshd</groupId>
         <artifactId>sshd</artifactId>
-        <version>3.0.0-SNAPSHOT</version>
+        <version>3.0.0-M2</version>
         <relativePath>..</relativePath>
     </parent>
 
diff --git a/sshd-netty/pom.xml b/sshd-netty/pom.xml
index 75afd8963..3b2a58acf 100644
--- a/sshd-netty/pom.xml
+++ b/sshd-netty/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.sshd</groupId>
         <artifactId>sshd</artifactId>
-        <version>3.0.0-SNAPSHOT</version>
+        <version>3.0.0-M2</version>
         <relativePath>..</relativePath>
     </parent>
 
diff --git a/sshd-openpgp/pom.xml b/sshd-openpgp/pom.xml
index 4d3ceb57a..b5fb6b024 100644
--- a/sshd-openpgp/pom.xml
+++ b/sshd-openpgp/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.sshd</groupId>
         <artifactId>sshd</artifactId>
-        <version>3.0.0-SNAPSHOT</version>
+        <version>3.0.0-M2</version>
         <relativePath>..</relativePath>
     </parent>
 
diff --git a/sshd-osgi/pom.xml b/sshd-osgi/pom.xml
index 19ad6e46f..870025699 100644
--- a/sshd-osgi/pom.xml
+++ b/sshd-osgi/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.sshd</groupId>
         <artifactId>sshd</artifactId>
-        <version>3.0.0-SNAPSHOT</version>
+        <version>3.0.0-M2</version>
     </parent>
 
     <artifactId>sshd-osgi</artifactId>
diff --git a/sshd-putty/pom.xml b/sshd-putty/pom.xml
index 9c323069e..46c06972d 100644
--- a/sshd-putty/pom.xml
+++ b/sshd-putty/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.sshd</groupId>
         <artifactId>sshd</artifactId>
-        <version>3.0.0-SNAPSHOT</version>
+        <version>3.0.0-M2</version>
         <relativePath>..</relativePath>
     </parent>
 
diff --git a/sshd-scp/pom.xml b/sshd-scp/pom.xml
index aa43e3ef8..807540476 100644
--- a/sshd-scp/pom.xml
+++ b/sshd-scp/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.sshd</groupId>
         <artifactId>sshd</artifactId>
-        <version>3.0.0-SNAPSHOT</version>
+        <version>3.0.0-M2</version>
     </parent>
 
     <artifactId>sshd-scp</artifactId>
diff --git a/sshd-sftp/pom.xml b/sshd-sftp/pom.xml
index 7924dfb41..d48c13cd7 100644
--- a/sshd-sftp/pom.xml
+++ b/sshd-sftp/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.sshd</groupId>
         <artifactId>sshd</artifactId>
-        <version>3.0.0-SNAPSHOT</version>
+        <version>3.0.0-M2</version>
     </parent>
 
     <artifactId>sshd-sftp</artifactId>
diff --git a/sshd-site/pom.xml b/sshd-site/pom.xml
index ba3c89ebb..58216d1d0 100644
--- a/sshd-site/pom.xml
+++ b/sshd-site/pom.xml
@@ -20,7 +20,7 @@
     <parent>
         <groupId>org.apache.sshd</groupId>
         <artifactId>sshd</artifactId>
-        <version>3.0.0-SNAPSHOT</version>
+        <version>3.0.0-M2</version>
         <relativePath>..</relativePath>
     </parent>
 
diff --git a/sshd-spring-sftp/pom.xml b/sshd-spring-sftp/pom.xml
index e04242575..83a6d491e 100644
--- a/sshd-spring-sftp/pom.xml
+++ b/sshd-spring-sftp/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.sshd</groupId>
         <artifactId>sshd</artifactId>
-        <version>3.0.0-SNAPSHOT</version>
+        <version>3.0.0-M2</version>
     </parent>
 
     <artifactId>sshd-spring-sftp</artifactId>
diff --git a/sshd-test/pom.xml b/sshd-test/pom.xml
index e05cf9812..01467246b 100644
--- a/sshd-test/pom.xml
+++ b/sshd-test/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.sshd</groupId>
         <artifactId>sshd</artifactId>
-        <version>3.0.0-SNAPSHOT</version>
+        <version>3.0.0-M2</version>
         <relativePath>..</relativePath>
     </parent>
 


(mina-sshd) 06/09: [releng] Release preparation for 3.0.0-M2

Posted by tw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

twolf pushed a commit to branch dev_3.0
in repository https://gitbox.apache.org/repos/asf/mina-sshd.git

commit aa9c94bbedd0b4c15510fb697e0ffdfce23b0947
Author: Thomas Wolf <tw...@apache.org>
AuthorDate: Sat Oct 18 21:53:28 2025 +0200

    [releng] Release preparation for 3.0.0-M2
    
    Update CHANGES.md.
    
    Make sure that the maven-source-plugin uses a modern commons-io.
    Somehow it picks up 2.11.0, which is way too old. Force 2.20.0.
    
    Set deployAtEnd=true to avoid that anything is pushed to the deployment
    repository if something goes wrong when building a release.
    
    Remove <links> from maven-javadoc-plugin config; it fails with Java 25.
    Exclude sshd-benchmarks and sshd-test from javadoc generation.
---
 CHANGES.md              |  9 ++++++---
 pom.xml                 | 16 +++++++++++++---
 sshd-benchmarks/pom.xml |  1 +
 sshd-test/pom.xml       |  1 +
 4 files changed, 21 insertions(+), 6 deletions(-)

diff --git a/CHANGES.md b/CHANGES.md
index 41c02e219..1d40a2ba8 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -8,8 +8,8 @@
 generated by [japicmp](https://siom79.github.io/japicmp) are published at
 [https://apache.github.io/mina-sshd](https://apache.github.io/mina-sshd).
 
-Version 3 includes all the features and bug fixes of version 2, including the
-[latest ones](https://github.com/apache/mina-sshd/blob/master/CHANGES.md#planned-for-next-version).
+Version 3 includes all the features and bug fixes of [version 2.16.0](./docs/changes/2.16.0.md) and up to
+[commit f9887391](https://github.com/apache/mina-sshd/blob/f9887391/CHANGES.md#planned-for-next-version).
 
 ## Milestone 1: Pre-Release 3.0.0-M1
 
@@ -17,7 +17,10 @@ Complete refactoring of the SSH transport protocol. New feature: support for cli
 
 * [Change notes for 3.0.0-M1](./docs/changes/3.0.0-M1.md)
 
-# Planned for the Next Milestone Release
+# Milestone 2: Pre-Release 3.0.0-M2
+
+Refactoring of cryptography. New feature: multi-release JARs for `sshd-common` and `sshd-osgi` and using on
+newer Java versions the already built-in cryptographic algorithms for ChaCha20, ed25519, and ML-KEM.
 
 * For building Apache MINA SSHD 3.0, Java >= 24 and Apache Maven >= 3.9.11 are required. Generated artifacts
   still use Java 8 as minimum runtime requirement.
diff --git a/pom.xml b/pom.xml
index 391721093..74b981258 100644
--- a/pom.xml
+++ b/pom.xml
@@ -701,6 +701,14 @@
     <build>
         <pluginManagement>
             <plugins>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-deploy-plugin</artifactId>
+                    <configuration>
+                        <!-- In case something goes wrong: don't push bundles to the deployment repository -->
+                        <deployAtEnd>true</deployAtEnd>
+                    </configuration>
+                </plugin>
                 <plugin>
                     <groupId>org.codehaus.mojo</groupId>
                     <artifactId>build-helper-maven-plugin</artifactId>
@@ -792,6 +800,11 @@
                             <artifactId>plexus-archiver</artifactId>
                             <version>${plexus.archiver.version}</version>
                         </dependency>
+                        <dependency>
+                            <groupId>commons-io</groupId>
+                            <artifactId>commons-io</artifactId>
+                            <version>2.20.0</version>
+                        </dependency>
                     </dependencies>
                 </plugin>
                 <plugin>
@@ -809,9 +822,6 @@
                         <additionalOptions>-Xdoclint:-missing</additionalOptions>
                         <encoding>${project.build.sourceEncoding}</encoding>
                         <quiet>true</quiet>
-                        <links>
-                            <link>http://docs.oracle.com/javase/${java.sdk.version}/docs/api</link>
-                        </links>
                     </configuration>
                     <dependencies>
                         <dependency>
diff --git a/sshd-benchmarks/pom.xml b/sshd-benchmarks/pom.xml
index 62faabac9..4ad037fc0 100644
--- a/sshd-benchmarks/pom.xml
+++ b/sshd-benchmarks/pom.xml
@@ -36,6 +36,7 @@
         <maven.compiler.release>11</maven.compiler.release>
         <maven.install.skip>true</maven.install.skip>
         <maven.deploy.skip>true</maven.deploy.skip>
+        <maven.javadoc.skip>true</maven.javadoc.skip>
         <japicmp.skip>true</japicmp.skip>
     </properties>
 
diff --git a/sshd-test/pom.xml b/sshd-test/pom.xml
index 65ec8e838..e05cf9812 100644
--- a/sshd-test/pom.xml
+++ b/sshd-test/pom.xml
@@ -35,6 +35,7 @@
         <projectRoot>${project.basedir}/..</projectRoot>
         <maven.install.skip>true</maven.install.skip>
         <maven.deploy.skip>true</maven.deploy.skip>
+        <maven.javadoc.skip>true</maven.javadoc.skip>
         <japicmp.skip>true</japicmp.skip>
     </properties>
 


(mina-sshd) 08/09: [maven-release-plugin] prepare for next development iteration

Posted by tw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

twolf pushed a commit to branch dev_3.0
in repository https://gitbox.apache.org/repos/asf/mina-sshd.git

commit d85220e79496df90b1fb9aa20b1c1afcd91d1bb3
Author: Thomas Wolf <tw...@apache.org>
AuthorDate: Sun Oct 19 00:59:43 2025 +0200

    [maven-release-plugin] prepare for next development iteration
---
 assembly/pom.xml         | 2 +-
 pom.xml                  | 6 +++---
 sshd-benchmarks/pom.xml  | 2 +-
 sshd-cli/pom.xml         | 2 +-
 sshd-common/pom.xml      | 2 +-
 sshd-contrib/pom.xml     | 2 +-
 sshd-core/pom.xml        | 2 +-
 sshd-git/pom.xml         | 2 +-
 sshd-ldap/pom.xml        | 2 +-
 sshd-mina/pom.xml        | 2 +-
 sshd-netty/pom.xml       | 2 +-
 sshd-openpgp/pom.xml     | 2 +-
 sshd-osgi/pom.xml        | 2 +-
 sshd-putty/pom.xml       | 2 +-
 sshd-scp/pom.xml         | 2 +-
 sshd-sftp/pom.xml        | 2 +-
 sshd-site/pom.xml        | 2 +-
 sshd-spring-sftp/pom.xml | 2 +-
 sshd-test/pom.xml        | 2 +-
 19 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/assembly/pom.xml b/assembly/pom.xml
index e1c869a8d..f160ef55b 100644
--- a/assembly/pom.xml
+++ b/assembly/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.sshd</groupId>
         <artifactId>sshd</artifactId>
-        <version>3.0.0-M2</version>
+        <version>3.0.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>apache-sshd</artifactId>
diff --git a/pom.xml b/pom.xml
index 71be559a8..002da2c4c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,7 +27,7 @@
 
     <groupId>org.apache.sshd</groupId>
     <artifactId>sshd</artifactId>
-    <version>3.0.0-M2</version>
+    <version>3.0.0-SNAPSHOT</version>
     <name>Apache Mina SSHD</name>
     <packaging>pom</packaging>
     <inceptionYear>2008</inceptionYear>
@@ -67,7 +67,7 @@
         <connection>scm:git:https://gitbox.apache.org/repos/asf/mina-sshd.git</connection>
         <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/mina-sshd.git</developerConnection>
         <url>https://github.com/apache/mina-sshd/tree/${project.scm.tag}</url>
-        <tag>sshd-3.0.0-M2</tag>
+        <tag>dev_3.0</tag>
     </scm>
 
     <properties>
@@ -81,7 +81,7 @@
 
 
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <project.build.outputTimestamp>2025-10-18T22:56:48Z</project.build.outputTimestamp>
+        <project.build.outputTimestamp>2025-10-18T22:59:43Z</project.build.outputTimestamp>
 
         <java.sdk.version>8</java.sdk.version>
         <javac.release>${java.sdk.version}</javac.release>
diff --git a/sshd-benchmarks/pom.xml b/sshd-benchmarks/pom.xml
index 3bf228d2e..4ad037fc0 100644
--- a/sshd-benchmarks/pom.xml
+++ b/sshd-benchmarks/pom.xml
@@ -20,7 +20,7 @@
     <parent>
         <groupId>org.apache.sshd</groupId>
         <artifactId>sshd</artifactId>
-        <version>3.0.0-M2</version>
+        <version>3.0.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
diff --git a/sshd-cli/pom.xml b/sshd-cli/pom.xml
index fa60537da..7247b90fd 100644
--- a/sshd-cli/pom.xml
+++ b/sshd-cli/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.sshd</groupId>
         <artifactId>sshd</artifactId>
-        <version>3.0.0-M2</version>
+        <version>3.0.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>sshd-cli</artifactId>
diff --git a/sshd-common/pom.xml b/sshd-common/pom.xml
index 2cbe0d4b6..f66fa54be 100644
--- a/sshd-common/pom.xml
+++ b/sshd-common/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.sshd</groupId>
         <artifactId>sshd</artifactId>
-        <version>3.0.0-M2</version>
+        <version>3.0.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
diff --git a/sshd-contrib/pom.xml b/sshd-contrib/pom.xml
index ef824be5a..a2e9ed879 100644
--- a/sshd-contrib/pom.xml
+++ b/sshd-contrib/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.sshd</groupId>
         <artifactId>sshd</artifactId>
-        <version>3.0.0-M2</version>
+        <version>3.0.0-SNAPSHOT</version>
     </parent>
 
     <!-- NOTE ::: NOTE ::: NOTE ::: NOTE ::: NOTE ::: NOTE ::: NOTE ::: NOTE :::
diff --git a/sshd-core/pom.xml b/sshd-core/pom.xml
index aa28519fe..3f3dfa97f 100644
--- a/sshd-core/pom.xml
+++ b/sshd-core/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.sshd</groupId>
         <artifactId>sshd</artifactId>
-        <version>3.0.0-M2</version>
+        <version>3.0.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
diff --git a/sshd-git/pom.xml b/sshd-git/pom.xml
index 8430e3079..f9cbe0e49 100644
--- a/sshd-git/pom.xml
+++ b/sshd-git/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.sshd</groupId>
         <artifactId>sshd</artifactId>
-        <version>3.0.0-M2</version>
+        <version>3.0.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>sshd-git</artifactId>
diff --git a/sshd-ldap/pom.xml b/sshd-ldap/pom.xml
index 392c456c0..e97a44f07 100644
--- a/sshd-ldap/pom.xml
+++ b/sshd-ldap/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.sshd</groupId>
         <artifactId>sshd</artifactId>
-        <version>3.0.0-M2</version>
+        <version>3.0.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>sshd-ldap</artifactId>
diff --git a/sshd-mina/pom.xml b/sshd-mina/pom.xml
index 88e49b75b..839e76fa0 100644
--- a/sshd-mina/pom.xml
+++ b/sshd-mina/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.sshd</groupId>
         <artifactId>sshd</artifactId>
-        <version>3.0.0-M2</version>
+        <version>3.0.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
diff --git a/sshd-netty/pom.xml b/sshd-netty/pom.xml
index 3b2a58acf..75afd8963 100644
--- a/sshd-netty/pom.xml
+++ b/sshd-netty/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.sshd</groupId>
         <artifactId>sshd</artifactId>
-        <version>3.0.0-M2</version>
+        <version>3.0.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
diff --git a/sshd-openpgp/pom.xml b/sshd-openpgp/pom.xml
index b5fb6b024..4d3ceb57a 100644
--- a/sshd-openpgp/pom.xml
+++ b/sshd-openpgp/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.sshd</groupId>
         <artifactId>sshd</artifactId>
-        <version>3.0.0-M2</version>
+        <version>3.0.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
diff --git a/sshd-osgi/pom.xml b/sshd-osgi/pom.xml
index 870025699..19ad6e46f 100644
--- a/sshd-osgi/pom.xml
+++ b/sshd-osgi/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.sshd</groupId>
         <artifactId>sshd</artifactId>
-        <version>3.0.0-M2</version>
+        <version>3.0.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>sshd-osgi</artifactId>
diff --git a/sshd-putty/pom.xml b/sshd-putty/pom.xml
index 46c06972d..9c323069e 100644
--- a/sshd-putty/pom.xml
+++ b/sshd-putty/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.sshd</groupId>
         <artifactId>sshd</artifactId>
-        <version>3.0.0-M2</version>
+        <version>3.0.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
diff --git a/sshd-scp/pom.xml b/sshd-scp/pom.xml
index 807540476..aa43e3ef8 100644
--- a/sshd-scp/pom.xml
+++ b/sshd-scp/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.sshd</groupId>
         <artifactId>sshd</artifactId>
-        <version>3.0.0-M2</version>
+        <version>3.0.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>sshd-scp</artifactId>
diff --git a/sshd-sftp/pom.xml b/sshd-sftp/pom.xml
index d48c13cd7..7924dfb41 100644
--- a/sshd-sftp/pom.xml
+++ b/sshd-sftp/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.sshd</groupId>
         <artifactId>sshd</artifactId>
-        <version>3.0.0-M2</version>
+        <version>3.0.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>sshd-sftp</artifactId>
diff --git a/sshd-site/pom.xml b/sshd-site/pom.xml
index 58216d1d0..ba3c89ebb 100644
--- a/sshd-site/pom.xml
+++ b/sshd-site/pom.xml
@@ -20,7 +20,7 @@
     <parent>
         <groupId>org.apache.sshd</groupId>
         <artifactId>sshd</artifactId>
-        <version>3.0.0-M2</version>
+        <version>3.0.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
diff --git a/sshd-spring-sftp/pom.xml b/sshd-spring-sftp/pom.xml
index 83a6d491e..e04242575 100644
--- a/sshd-spring-sftp/pom.xml
+++ b/sshd-spring-sftp/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.sshd</groupId>
         <artifactId>sshd</artifactId>
-        <version>3.0.0-M2</version>
+        <version>3.0.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>sshd-spring-sftp</artifactId>
diff --git a/sshd-test/pom.xml b/sshd-test/pom.xml
index 01467246b..e05cf9812 100644
--- a/sshd-test/pom.xml
+++ b/sshd-test/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.sshd</groupId>
         <artifactId>sshd</artifactId>
-        <version>3.0.0-M2</version>
+        <version>3.0.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 


(mina-sshd) 05/09: Fix Javadoc problems

Posted by tw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

twolf pushed a commit to branch dev_3.0
in repository https://gitbox.apache.org/repos/asf/mina-sshd.git

commit bf606d26d1810c0ca7783a8d689a5488617da813
Author: Thomas Wolf <tw...@apache.org>
AuthorDate: Sun Oct 19 00:50:48 2025 +0200

    Fix Javadoc problems
---
 .../sshd/common/config/keys/BuiltinIdentities.java     |  1 -
 .../org/apache/sshd/common/config/keys/KeyUtils.java   | 18 +++++++++---------
 .../common/config/keys/PrivateKeyEntryDecoder.java     |  4 +---
 .../common/config/keys/PublicKeyRawDataDecoder.java    |  3 +--
 .../keys/impl/AbstractIdentityResourceLoader.java      |  4 +---
 .../config/keys/impl/AbstractKeyEntryResolver.java     |  4 +---
 .../keys/impl/AbstractPublicKeyEntryDecoder.java       |  8 ++------
 .../loader/openssh/OpenSSHKeyPairResourceParser.java   |  1 -
 .../org/apache/sshd/common/channel/LocalWindow.java    |  2 +-
 .../org/apache/sshd/common/channel/RemoteWindow.java   |  2 +-
 .../org/apache/sshd/core/CoreModuleProperties.java     |  2 +-
 .../org/apache/sshd/putty/AbstractPuttyKeyDecoder.java |  4 +---
 .../apache/sshd/putty/PuttyKeyPairResourceParser.java  |  2 --
 13 files changed, 19 insertions(+), 36 deletions(-)

diff --git a/sshd-common/src/main/java/org/apache/sshd/common/config/keys/BuiltinIdentities.java b/sshd-common/src/main/java/org/apache/sshd/common/config/keys/BuiltinIdentities.java
index a43b9737b..871c09ecd 100644
--- a/sshd-common/src/main/java/org/apache/sshd/common/config/keys/BuiltinIdentities.java
+++ b/sshd-common/src/main/java/org/apache/sshd/common/config/keys/BuiltinIdentities.java
@@ -148,7 +148,6 @@ public enum BuiltinIdentities implements Identity {
      * @param  key The {@link Key} instance - ignored if {@code null}
      * @return     The matching {@link BuiltinIdentities} whose either public or private key type matches the requested
      *             one or {@code null} if no match found
-     * @see        #fromKeyType(Class)
      */
     public static BuiltinIdentities fromKey(Key key) {
         if (key == null) {
diff --git a/sshd-common/src/main/java/org/apache/sshd/common/config/keys/KeyUtils.java b/sshd-common/src/main/java/org/apache/sshd/common/config/keys/KeyUtils.java
index b05ec3b8d..0cf91fa8a 100644
--- a/sshd-common/src/main/java/org/apache/sshd/common/config/keys/KeyUtils.java
+++ b/sshd-common/src/main/java/org/apache/sshd/common/config/keys/KeyUtils.java
@@ -341,7 +341,7 @@ public final class KeyUtils {
      * @return                          A {@link KeyPair} of the specified type and size
      * @throws GeneralSecurityException If failed to generate the key pair
      * @see                             #getPublicKeyEntryDecoder(String)
-     * @see                             PublicKeyEntryDecoder<?, ?>#generateKeyPair(int)
+     * @see                             PublicKeyEntryDecoder#generateKeyPair(int)
      */
     public static KeyPair generateKeyPair(String keyType, int keySize) throws GeneralSecurityException {
         PublicKeyEntryDecoder decoder = getPublicKeyEntryDecoder(keyType);
@@ -353,7 +353,7 @@ public final class KeyUtils {
     }
 
     /**
-     * Registers the specified decoder for all the types it {@link PublicKeyEntryDecoder<?, ?>#getSupportedKeyTypes()
+     * Registers the specified decoder for all the types it {@link PublicKeyEntryDecoder#getSupportedKeyTypes()
      * supports}
      *
      * @param decoder The (never {@code null}) {@link PublicKeyEntryDecoder decoder} to register
@@ -371,9 +371,9 @@ public final class KeyUtils {
     /**
      * Unregisters the specified decoder for all the types it supports
      *
-     * @param  decoder The (never {@code null}) {@link PublicKeyEntryDecoder<?, ?> decoder} to unregister
+     * @param  decoder The (never {@code null}) {@link PublicKeyEntryDecoder decoder} to unregister
      * @return         {@link Set} of all the effectively un-registered key types out of all the
-     *                 {@link PublicKeyEntryDecoder<?, ?>#getSupportedKeyTypes() supported} ones.
+     *                 {@link PublicKeyEntryDecoder#getSupportedKeyTypes() supported} ones.
      * @see            #unregisterPublicKeyEntryDecoderForKeyType(String)
      */
     public static Set<String> unregisterPublicKeyEntryDecoder(PublicKeyEntryDecoder decoder) {
@@ -395,8 +395,8 @@ public final class KeyUtils {
      * Unregister the decoder registered for the specified key type
      *
      * @param  keyType The key (never {@code null}/empty) key type
-     * @return         The unregistered {@link PublicKeyEntryDecoder<?, ?>} - {@code null} if none registered for this
-     *                 key type
+     * @return         The unregistered {@link PublicKeyEntryDecoder} - {@code null} if none registered for this key
+     *                 type
      */
     public static PublicKeyEntryDecoder unregisterPublicKeyEntryDecoderForKeyType(String keyType) {
         keyType = ValidateUtils.checkNotNullAndNotEmpty(keyType, "No key type specified");
@@ -406,7 +406,7 @@ public final class KeyUtils {
     /**
      * @param  keyType The {@code OpenSSH} key type string - e.g., {@code ssh-rsa, ssh-dss} - ignored if
      *                 {@code null}/empty
-     * @return         The registered {@link PublicKeyEntryDecoder<?, ?>} or {code null} if not found
+     * @return         The registered {@link PublicKeyEntryDecoder} or {code null} if not found
      */
     public static PublicKeyEntryDecoder getPublicKeyEntryDecoder(String keyType) {
         if (GenericUtils.isEmpty(keyType)) {
@@ -417,8 +417,8 @@ public final class KeyUtils {
 
     /**
      * @param  kp The {@link KeyPair} to examine - ignored if {@code null}
-     * @return    The matching {@link PublicKeyEntryDecoder<?, ?>} provided <U>both</U> the public and private keys have
-     *            the same decoder - {@code null} if no match found
+     * @return    The matching {@link PublicKeyEntryDecoder} provided <U>both</U> the public and private keys have the
+     *            same decoder - {@code null} if no match found
      * @see       #getPublicKeyEntryDecoder(Key)
      */
     public static PublicKeyEntryDecoder getPublicKeyEntryDecoder(KeyPair kp) {
diff --git a/sshd-common/src/main/java/org/apache/sshd/common/config/keys/PrivateKeyEntryDecoder.java b/sshd-common/src/main/java/org/apache/sshd/common/config/keys/PrivateKeyEntryDecoder.java
index 3d5571323..ab76ccabb 100644
--- a/sshd-common/src/main/java/org/apache/sshd/common/config/keys/PrivateKeyEntryDecoder.java
+++ b/sshd-common/src/main/java/org/apache/sshd/common/config/keys/PrivateKeyEntryDecoder.java
@@ -38,9 +38,7 @@ import org.apache.sshd.common.util.ValidateUtils;
 import org.apache.sshd.common.util.io.output.SecureByteArrayOutputStream;
 
 /**
- * @param  <PUB> Type of {@link PublicKey}
- * @param  <PRV> Type of {@link PrivateKey}
- * @author       <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
+ * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
  */
 public interface PrivateKeyEntryDecoder extends KeyEntryResolver, PrivateKeyEntryResolver {
 
diff --git a/sshd-common/src/main/java/org/apache/sshd/common/config/keys/PublicKeyRawDataDecoder.java b/sshd-common/src/main/java/org/apache/sshd/common/config/keys/PublicKeyRawDataDecoder.java
index 345b086b4..f796250bb 100644
--- a/sshd-common/src/main/java/org/apache/sshd/common/config/keys/PublicKeyRawDataDecoder.java
+++ b/sshd-common/src/main/java/org/apache/sshd/common/config/keys/PublicKeyRawDataDecoder.java
@@ -30,8 +30,7 @@ import org.apache.sshd.common.session.SessionContext;
 import org.apache.sshd.common.util.NumberUtils;
 
 /**
- * @param  <PUB> Generic {@link PublicKey} type
- * @author       <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
+ * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
  */
 public interface PublicKeyRawDataDecoder {
     /**
diff --git a/sshd-common/src/main/java/org/apache/sshd/common/config/keys/impl/AbstractIdentityResourceLoader.java b/sshd-common/src/main/java/org/apache/sshd/common/config/keys/impl/AbstractIdentityResourceLoader.java
index 5207f97c4..d0e2856f4 100644
--- a/sshd-common/src/main/java/org/apache/sshd/common/config/keys/impl/AbstractIdentityResourceLoader.java
+++ b/sshd-common/src/main/java/org/apache/sshd/common/config/keys/impl/AbstractIdentityResourceLoader.java
@@ -28,9 +28,7 @@ import org.apache.sshd.common.util.ValidateUtils;
 import org.apache.sshd.common.util.logging.AbstractLoggingBean;
 
 /**
- * @param  <PUB> Generic public key type
- * @param  <PRV> Generic private key type
- * @author       <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
+ * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
  */
 public abstract class AbstractIdentityResourceLoader
         extends AbstractLoggingBean
diff --git a/sshd-common/src/main/java/org/apache/sshd/common/config/keys/impl/AbstractKeyEntryResolver.java b/sshd-common/src/main/java/org/apache/sshd/common/config/keys/impl/AbstractKeyEntryResolver.java
index 7d14e6b8b..11ebe01ff 100644
--- a/sshd-common/src/main/java/org/apache/sshd/common/config/keys/impl/AbstractKeyEntryResolver.java
+++ b/sshd-common/src/main/java/org/apache/sshd/common/config/keys/impl/AbstractKeyEntryResolver.java
@@ -29,9 +29,7 @@ import java.util.Collection;
 import org.apache.sshd.common.config.keys.KeyEntryResolver;
 
 /**
- * @param  <PUB> Type of {@link PublicKey}
- * @param  <PRV> Type of {@link PrivateKey}
- * @author       <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
+ * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
  */
 public abstract class AbstractKeyEntryResolver extends AbstractIdentityResourceLoader implements KeyEntryResolver {
     protected AbstractKeyEntryResolver(Collection<String> names) {
diff --git a/sshd-common/src/main/java/org/apache/sshd/common/config/keys/impl/AbstractPublicKeyEntryDecoder.java b/sshd-common/src/main/java/org/apache/sshd/common/config/keys/impl/AbstractPublicKeyEntryDecoder.java
index cf9cde054..efdc9da06 100644
--- a/sshd-common/src/main/java/org/apache/sshd/common/config/keys/impl/AbstractPublicKeyEntryDecoder.java
+++ b/sshd-common/src/main/java/org/apache/sshd/common/config/keys/impl/AbstractPublicKeyEntryDecoder.java
@@ -19,8 +19,6 @@
 
 package org.apache.sshd.common.config.keys.impl;
 
-import java.security.PrivateKey;
-import java.security.PublicKey;
 import java.util.Collection;
 import java.util.Map;
 
@@ -29,11 +27,9 @@ import org.apache.sshd.common.config.keys.PublicKeyEntryDecoder;
 import org.apache.sshd.common.util.MapEntryUtils;
 
 /**
- * Useful base class implementation for a decoder of an {@code OpenSSH} encoded key data
+ * Useful base class implementation for a decoder of an {@code OpenSSH} encoded key data.
  *
- * @param  <PUB> Type of {@link PublicKey}
- * @param  <PRV> Type of {@link PrivateKey}
- * @author       <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
+ * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
  */
 public abstract class AbstractPublicKeyEntryDecoder extends AbstractKeyEntryResolver implements PublicKeyEntryDecoder {
     protected AbstractPublicKeyEntryDecoder(Collection<String> names) {
diff --git a/sshd-common/src/main/java/org/apache/sshd/common/config/keys/loader/openssh/OpenSSHKeyPairResourceParser.java b/sshd-common/src/main/java/org/apache/sshd/common/config/keys/loader/openssh/OpenSSHKeyPairResourceParser.java
index 5c2f77811..c9fc76f6a 100644
--- a/sshd-common/src/main/java/org/apache/sshd/common/config/keys/loader/openssh/OpenSSHKeyPairResourceParser.java
+++ b/sshd-common/src/main/java/org/apache/sshd/common/config/keys/loader/openssh/OpenSSHKeyPairResourceParser.java
@@ -335,7 +335,6 @@ public class OpenSSHKeyPairResourceParser extends AbstractKeyPairResourceParser
     /**
      * @param  decoder                  The decoder to register
      * @throws IllegalArgumentException if no decoder or not key type or no supported names for the decoder
-     * @see                             PrivateKeyEntryDecoder#getPublicKeyType()
      * @see                             PrivateKeyEntryDecoder#getSupportedKeyTypes()
      */
     public static void registerPrivateKeyEntryDecoder(PrivateKeyEntryDecoder decoder) {
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/channel/LocalWindow.java b/sshd-core/src/main/java/org/apache/sshd/common/channel/LocalWindow.java
index 10f4a700a..bb2722f46 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/channel/LocalWindow.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/channel/LocalWindow.java
@@ -56,7 +56,7 @@ public class LocalWindow extends Window {
     /**
      * Initializes the {@link LocalWindow} with the packet and window sizes from the {@code resolver}.
      *
-     * @param resolver {@PropertyResolver} to access properties
+     * @param resolver {@link PropertyResolver} to access properties
      */
     public void init(PropertyResolver resolver) {
         init(CoreModuleProperties.WINDOW_SIZE.getRequired(resolver),
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/channel/RemoteWindow.java b/sshd-core/src/main/java/org/apache/sshd/common/channel/RemoteWindow.java
index ca8da5b60..29e4e926b 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/channel/RemoteWindow.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/channel/RemoteWindow.java
@@ -55,7 +55,7 @@ public class RemoteWindow extends Window {
      *
      * @param size       the initial window size
      * @param packetSize the peer's advertised maximum packet size
-     * @param resolver   {@PropertyResolver} to access properties
+     * @param resolver   {@link PropertyResolver} to access properties
      */
     @Override
     public void init(long size, long packetSize, PropertyResolver resolver) {
diff --git a/sshd-core/src/main/java/org/apache/sshd/core/CoreModuleProperties.java b/sshd-core/src/main/java/org/apache/sshd/core/CoreModuleProperties.java
index c777d0dbf..a51c3c740 100644
--- a/sshd-core/src/main/java/org/apache/sshd/core/CoreModuleProperties.java
+++ b/sshd-core/src/main/java/org/apache/sshd/core/CoreModuleProperties.java
@@ -205,7 +205,7 @@ public final class CoreModuleProperties {
             = Property.bool("channel-exec-want-reply", false);
 
     /**
-     * On some platforms, a call to {@ode System.in.read(new byte[65536], 0, 32768)} always throws an
+     * On some platforms, a call to {@code System.in.read(new byte[65536], 0, 32768)} always throws an
      * {@link IOException}. So we need to protect against that and chunk the call into smaller calls. This problem was
      * found on Windows, JDK 1.6.0_03-b05.
      */
diff --git a/sshd-putty/src/main/java/org/apache/sshd/putty/AbstractPuttyKeyDecoder.java b/sshd-putty/src/main/java/org/apache/sshd/putty/AbstractPuttyKeyDecoder.java
index e377aec7f..521103826 100644
--- a/sshd-putty/src/main/java/org/apache/sshd/putty/AbstractPuttyKeyDecoder.java
+++ b/sshd-putty/src/main/java/org/apache/sshd/putty/AbstractPuttyKeyDecoder.java
@@ -44,9 +44,7 @@ import org.apache.sshd.common.util.GenericUtils;
 import org.apache.sshd.common.util.ValidateUtils;
 
 /**
- * @param  <PUB> Generic public key type
- * @param  <PRV> Generic private key type
- * @author       <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
+ * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
  */
 public abstract class AbstractPuttyKeyDecoder extends AbstractIdentityResourceLoader implements PuttyKeyPairResourceParser {
     public static final String ENCRYPTION_HEADER = "Encryption";
diff --git a/sshd-putty/src/main/java/org/apache/sshd/putty/PuttyKeyPairResourceParser.java b/sshd-putty/src/main/java/org/apache/sshd/putty/PuttyKeyPairResourceParser.java
index d8bea1d3c..bf83ce189 100644
--- a/sshd-putty/src/main/java/org/apache/sshd/putty/PuttyKeyPairResourceParser.java
+++ b/sshd-putty/src/main/java/org/apache/sshd/putty/PuttyKeyPairResourceParser.java
@@ -91,8 +91,6 @@ import org.bouncycastle.crypto.params.Argon2Parameters;
  * Emdk
  * Private-MAC: 50c45751d18d74c00fca395deb7b7695e3ed6f77
  * </PRE>
- * @param <PUB> Generic public key type
- * @param <PRV> Generic private key type
  * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
  */
 //CHECKSTYLE:ON


(mina-sshd) 02/09: [osgi] Bump upper bound for org.bouncycastle to 3.0.0

Posted by tw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

twolf pushed a commit to branch dev_3.0
in repository https://gitbox.apache.org/repos/asf/mina-sshd.git

commit 3f32b3a70ab9b10a103e726c2f44003c8de5e161
Author: Thomas Wolf <tw...@apache.org>
AuthorDate: Sat Oct 18 13:37:27 2025 +0200

    [osgi] Bump upper bound for org.bouncycastle to 3.0.0
    
    Widen the package import version range for org.bouncycastle.* from
    [1.82,2.0.0) to [1.82,3.0.0). This enables using BC-FIPS in an OSGi
    environment. BC-FIPS provides OSGi manifests since version 2.1.0.
---
 CHANGES.md        | 3 +++
 pom.xml           | 3 +++
 sshd-osgi/pom.xml | 5 ++---
 3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/CHANGES.md b/CHANGES.md
index cce564c69..41c02e219 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -74,3 +74,6 @@ Complete refactoring of the SSH transport protocol. New feature: support for cli
 
   Use the ML-KEM implementations from SunJCE if run on Java >= 24. For Java < 24, the Bouncy Castle implementations
   are used. The SunJCE ML-KEMs are advertised in the `SunJCESecurityProviderRegistrar`.
+
+* OSGi: the upper bound of the version range for package imports from `org.bouncycastle.*` has been raised from 2.0.0
+  to 3.0.0. This enables using BC-FIPS in an OSGi environment. BC-FIPS provides OSGi manifests as of version 2.1.0.
diff --git a/pom.xml b/pom.xml
index 724516732..edcb092df 100644
--- a/pom.xml
+++ b/pom.xml
@@ -93,6 +93,8 @@
 
         <groovy.version>4.0.17</groovy.version>
         <bouncycastle.version>1.82</bouncycastle.version>
+        <!-- BC FIPS has version numbers 2.x.y. -->
+        <bouncycastle.upper.bound>3</bouncycastle.upper.bound>
             <!-- NOTE: upgrading slf4j beyond this version causes
 
             Execution verify-style of goal org.apache.maven.plugins:maven-checkstyle-plugin:3.1.2:check failed.: NullPointerException
@@ -1274,6 +1276,7 @@
                                 <Import-Package><![CDATA[
                                   org.apache.sshd*;version="$<range;[===,=+);$<maven_version;${project.version}>>",
                                   org.slf4j*;version="$<range;[==,${slf4j.upper.bound})>",
+                                  org.bouncycastle*;version="[${bouncycastle.version},${bouncycastle.upper.bound})",
                                   ${bnd.extraImports}
                                   *
                                 ]]></Import-Package>
diff --git a/sshd-osgi/pom.xml b/sshd-osgi/pom.xml
index 2b49d7931..19ad6e46f 100644
--- a/sshd-osgi/pom.xml
+++ b/sshd-osgi/pom.xml
@@ -37,13 +37,12 @@
         <!--
           The BC FIPS security provider class resides in a package that is referenced nowhere, except reflectively in the BouncyCastleSecurityRegistrar.
           The (optional) package import will thus be missing in the generated MANIFEST.MF. However, the BouncyCastleSecurityRegistrar expects to find
-          class org.bouncycastle.jce.provider.BouncyCastleProvider on the classpath; otherwise its isSupported() returns false and Bouncycastle is
-          considered not available.
+          the provider class on the classpath; otherwise its isSupported() returns false and Bouncycastle is considered not available.
 
           However, in OSGi the package will not be on the bundle classpath if there is no Import-Package for it. (And using a Require-Bundle would restrict
           bundle wiring too much.)
         -->
-        <bnd.extraImports>org.bouncycastle.jcajce.provider;version="$$&lt;range;[==,+);${bouncycastle.version}&gt;";resolution:=optional,</bnd.extraImports>
+        <bnd.extraImports>org.bouncycastle.jcajce.provider;version="[${bouncycastle.version},${bouncycastle.upper.bound})";resolution:=optional,</bnd.extraImports>
     </properties>
 
     <dependencies>


(mina-sshd) 09/09: Post-release documentation updates

Posted by tw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

twolf pushed a commit to branch dev_3.0
in repository https://gitbox.apache.org/repos/asf/mina-sshd.git

commit b327b81b696ce1437e8ed92bbda7b0e204272b74
Author: Thomas Wolf <tw...@apache.org>
AuthorDate: Sun Oct 19 10:18:07 2025 +0200

    Post-release documentation updates
---
 CHANGES.md                             | 62 ++++++----------------------------
 CHANGES.md => docs/changes/3.0.0-M2.md | 27 +++------------
 sshd-site/src/site/markdown/index.md   | 10 +++---
 3 files changed, 21 insertions(+), 78 deletions(-)

diff --git a/CHANGES.md b/CHANGES.md
index 1d40a2ba8..7189eb027 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -8,8 +8,11 @@
 generated by [japicmp](https://siom79.github.io/japicmp) are published at
 [https://apache.github.io/mina-sshd](https://apache.github.io/mina-sshd).
 
-Version 3 includes all the features and bug fixes of [version 2.16.0](./docs/changes/2.16.0.md) and up to
-[commit f9887391](https://github.com/apache/mina-sshd/blob/f9887391/CHANGES.md#planned-for-next-version).
+Version 3 includes all the features and bug fixes of version 2, including the
+[latest ones](https://github.com/apache/mina-sshd/blob/master/CHANGES.md#planned-for-next-version).
+
+* For building Apache MINA SSHD 3.0, **Java >= 24** and Apache **Maven >= 3.9.11** are required. Generated artifacts
+  still use Java 8 as minimum runtime requirement.
 
 ## Milestone 1: Pre-Release 3.0.0-M1
 
@@ -17,66 +20,21 @@ Complete refactoring of the SSH transport protocol. New feature: support for cli
 
 * [Change notes for 3.0.0-M1](./docs/changes/3.0.0-M1.md)
 
-# Milestone 2: Pre-Release 3.0.0-M2
+## Milestone 2: Pre-Release 3.0.0-M2
 
 Refactoring of cryptography. New feature: multi-release JARs for `sshd-common` and `sshd-osgi` and using on
 newer Java versions the already built-in cryptographic algorithms for ChaCha20, ed25519, and ML-KEM.
 
-* For building Apache MINA SSHD 3.0, Java >= 24 and Apache Maven >= 3.9.11 are required. Generated artifacts
-  still use Java 8 as minimum runtime requirement.
+* [Change notes for 3.0.0-M2](./docs/changes/3.0.0-M2.md)
+
+# Planned for the Next Milestone Release
+
 
 ## Bug Fixes
 
-* [GH-502](https://github.com/apache/mina-sshd/issues/502) Don't load security provider classes reflectively
-  for Bouncy Castle and `net.i2p.crypto:eddsa:0.3.0`.
 
 ## Major Code Re-factoring
 
-* The classes dealing with serializing or de-serializing public and private keys have been de-generified,
-  which simplifies them a lot. Previous code from version 2 tried to tie particular public key types and
-  private key types together via generics, such that it could be statically checked that only matching key
-  types were used. But that never worked well and in a few crucial places unchecked conversions or raw
-  types were used anyway, which makes the point moot. Code now just uses `PublicKey` and `PrivateKey` instead
-  of generic types, and checks at run-time that keys are of the expected kind.
-* The way ed25519 keys are handled has been refactored. Duplicate code has been removed, and the handling
-  has been simplified to make it easier to include support for other eddsa implementations. This brings
-  additional API breaks, but in code areas that are unlikely to be used in customer code.
 
 ## New Features
 
-* [GH-585](https://github.com/apache/mina-sshd/issues/585) Support the JDK built-in ed25519 on Java15+
-
-  With this change `sshd-common` and `sshd-osgi` become MRJARs (multi-release JARs). When run on Java >= 15,
-  Apache MINA SSHD will use the built-in ed25519 from the SunEC security provider. On Java < 15, ed25519 is
-  supported if Bouncy Castle or `net.i2p.crypto:eddsa:0.3.0` is present.
-
-  On Java >= 15, Apache MINA SSHD will use the JDK ed25519 even if Bouncy Castle or `net.i2p.crypto:eddsa:0.3.0`
-  are present. (Including `net.i2p.crypto:eddsa:0.3.0` makes no sense on Java >= 15.) There is a new
-  [registrar](./docs/security-providers.md) `SunECSecurityProviderRegistrar` with the name "SunECWrapper". It
-  is by default registered ahead of the Bouncy Castle or net.i2p registrars, and has by default ed25519,
-  X25519, and X448 enabled if SunEC is registered and has these algorithms. This new registrar can be 
-  configured like any other registrar via system properties; in particular it can also be disabled via system
-  property `org.apache.sshd.security.provider.SunECWrapper.enabled=false`.
-
-  The sole purpose of this new registrar is to prefer the SunEC implementations of ed25519, X25519, or X448 over
-  the Bouncy Castle or net.i2p implementations if Bouncy Castle or net.i2p are also available.
-
-* Use the JDK's built-in ChaCha20 cipher on Java11+
-
-  With `sshd-common` being a MRJAR, it is finally possible to use the JDK's built-in ChaCha20 cipher for the
-  chacha20-poly1305@<!-- -->openssh.com cipher on Java >= 11. This brings a substantial speed-up for this
-  encryption. On Java < 11, Apache MINA SSHD still uses its own implementation written in Java.
-  
-  (Note that one cannot use the JDK's "ChaCha20-Poly1305" cipher for SSH; Java implements
-  [RFC 8439](https://datatracker.ietf.org/doc/html/rfc8439), which has a different AEAD tag construction than
-  the version used in SSH. Since the Poly1305 MAC in Java is not accessible separately (see
-  [JDK-8253394](https://bugs.openjdk.org/browse/JDK-8253394)), Apache MINA SSHD still has to use its own
-  implementation for that part.)
-
-* [GH-803](https://github.com/apache/mina-sshd/issues/803) Support the JDK built-in ML-KEMs on Java24+
-
-  Use the ML-KEM implementations from SunJCE if run on Java >= 24. For Java < 24, the Bouncy Castle implementations
-  are used. The SunJCE ML-KEMs are advertised in the `SunJCESecurityProviderRegistrar`.
-
-* OSGi: the upper bound of the version range for package imports from `org.bouncycastle.*` has been raised from 2.0.0
-  to 3.0.0. This enables using BC-FIPS in an OSGi environment. BC-FIPS provides OSGi manifests as of version 2.1.0.
diff --git a/CHANGES.md b/docs/changes/3.0.0-M2.md
similarity index 77%
copy from CHANGES.md
copy to docs/changes/3.0.0-M2.md
index 1d40a2ba8..61c79fcab 100644
--- a/CHANGES.md
+++ b/docs/changes/3.0.0-M2.md
@@ -1,28 +1,11 @@
-# Previous Versions
+# Milestone Pre-Release 3.0.0-M2
 
-* [Change Notes for Version 2](./docs/changes/version2.md)
-
-# Version 3
-
-**This is work in progress.**  Version 3 contains many API breaks from version 2. API comparison reports
-generated by [japicmp](https://siom79.github.io/japicmp) are published at
-[https://apache.github.io/mina-sshd](https://apache.github.io/mina-sshd).
-
-Version 3 includes all the features and bug fixes of [version 2.16.0](./docs/changes/2.16.0.md) and up to
+Includes all the features and bug fixes of [version 2.16.0](./2.16.0.md) and up to
 [commit f9887391](https://github.com/apache/mina-sshd/blob/f9887391/CHANGES.md#planned-for-next-version).
 
-## Milestone 1: Pre-Release 3.0.0-M1
-
-Complete refactoring of the SSH transport protocol. New feature: support for client-side proxies.
-
-* [Change notes for 3.0.0-M1](./docs/changes/3.0.0-M1.md)
-
-# Milestone 2: Pre-Release 3.0.0-M2
-
-Refactoring of cryptography. New feature: multi-release JARs for `sshd-common` and `sshd-osgi` and using on
-newer Java versions the already built-in cryptographic algorithms for ChaCha20, ed25519, and ML-KEM.
+* [Change notes for 3.0.0-M1](./3.0.0-M1.md)
 
-* For building Apache MINA SSHD 3.0, Java >= 24 and Apache Maven >= 3.9.11 are required. Generated artifacts
+* For building Apache MINA SSHD 3.0, **Java >= 24** and Apache **Maven >= 3.9.11** are required. Generated artifacts
   still use Java 8 as minimum runtime requirement.
 
 ## Bug Fixes
@@ -52,7 +35,7 @@ newer Java versions the already built-in cryptographic algorithms for ChaCha20,
 
   On Java >= 15, Apache MINA SSHD will use the JDK ed25519 even if Bouncy Castle or `net.i2p.crypto:eddsa:0.3.0`
   are present. (Including `net.i2p.crypto:eddsa:0.3.0` makes no sense on Java >= 15.) There is a new
-  [registrar](./docs/security-providers.md) `SunECSecurityProviderRegistrar` with the name "SunECWrapper". It
+  [registrar](./../security-providers.md) `SunECSecurityProviderRegistrar` with the name "SunECWrapper". It
   is by default registered ahead of the Bouncy Castle or net.i2p registrars, and has by default ed25519,
   X25519, and X448 enabled if SunEC is registered and has these algorithms. This new registrar can be 
   configured like any other registrar via system properties; in particular it can also be disabled via system
diff --git a/sshd-site/src/site/markdown/index.md b/sshd-site/src/site/markdown/index.md
index 99963b103..56e84f506 100644
--- a/sshd-site/src/site/markdown/index.md
+++ b/sshd-site/src/site/markdown/index.md
@@ -42,14 +42,16 @@ volunteers in their free time and resources are limited.
 
 But we can give you a rough outline of what we want to do:
 
-* **3.0.0-M1**: Rework of the SSH transport protocol as a filter chain. The main user-visible new feature is support for client-side proxies.
+* **3.0.0-M1**: Rework of the SSH transport protocol as a filter chain. The main user-visible
+  new feature is support for client-side proxies.
+* **3.0.0-M2**: Refactoring of cryptography. New feature: multi-release JARs for `sshd-common`
+  and `sshd-osgi` and using on newer Java versions the already built-in cryptographic algorithms
+  for ChaCha20, ed25519, and ML-KEM.
 
 Further possible milestones (the order might change, though):
 
-* Some rework of handling of private/public keys. No new feature planned, it's necessary clean-up that will require some public API changes.
-* Resolve the split packages between `sshd-common` and `sshd-core`.
-* Support Java native ed25519 on Java >= 15. This may result in a multi-release JAR artifact.
 * Some refactoring of SFTP code; current code has shortcomings regarding SFTP file systems.
+* Resolve the split packages between `sshd-common` and `sshd-core`.
 * Anything else we stumble upon and that we cannot fix reasonably without breaking API.
 
 We reserve the right to make arbitrary API changes between M-releases.
\ No newline at end of file


(mina-sshd) 03/09: BouncyCastleAccessor: completely separate paths for BC and BC-FIPS

Posted by tw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

twolf pushed a commit to branch dev_3.0
in repository https://gitbox.apache.org/repos/asf/mina-sshd.git

commit f7fd089956149c1f77eaed2d4819bbfef39f14d0
Author: Thomas Wolf <tw...@apache.org>
AuthorDate: Sat Oct 18 14:32:39 2025 +0200

    BouncyCastleAccessor: completely separate paths for BC and BC-FIPS
---
 .../bouncycastle/BouncyCastleAccessor.java         | 47 +++++++++++-----------
 1 file changed, 23 insertions(+), 24 deletions(-)

diff --git a/sshd-common/src/main/java/org/apache/sshd/common/util/security/bouncycastle/BouncyCastleAccessor.java b/sshd-common/src/main/java/org/apache/sshd/common/util/security/bouncycastle/BouncyCastleAccessor.java
index e36ceca9e..048ddb13d 100644
--- a/sshd-common/src/main/java/org/apache/sshd/common/util/security/bouncycastle/BouncyCastleAccessor.java
+++ b/sshd-common/src/main/java/org/apache/sshd/common/util/security/bouncycastle/BouncyCastleAccessor.java
@@ -21,7 +21,6 @@ package org.apache.sshd.common.util.security.bouncycastle;
 import java.security.Provider;
 
 import org.apache.sshd.common.util.ReflectionUtils;
-import org.bouncycastle.jce.provider.BouncyCastleProvider;
 
 final class BouncyCastleAccessor {
 
@@ -33,7 +32,12 @@ final class BouncyCastleAccessor {
 
     public Class<?> getProviderClass(String className) {
         try {
-            return Inner.getProviderClass(className);
+            if (BouncyCastleSecurityProviderRegistrar.FIPS_PROVIDER_CLASS.equals(className)) {
+                return Class.forName(className);
+            } else if (BouncyCastleSecurityProviderRegistrar.PROVIDER_CLASS.equals(className)) {
+                return Inner.getProviderClass();
+            }
+            return null;
         } catch (Throwable t) {
             return null;
         }
@@ -41,7 +45,16 @@ final class BouncyCastleAccessor {
 
     public Provider createProvider(String className) throws ReflectiveOperationException {
         try {
-            return Inner.createProvider(className);
+            if (BouncyCastleSecurityProviderRegistrar.FIPS_PROVIDER_CLASS.equals(className)) {
+                try {
+                    return ReflectionUtils.newInstance(Class.forName(className), Provider.class);
+                } catch (ClassNotFoundException e) {
+                    return null;
+                }
+            } else if (BouncyCastleSecurityProviderRegistrar.PROVIDER_CLASS.equals(className)) {
+                return Inner.createProvider();
+            }
+            return null;
         } catch (Throwable t) {
             return null;
         }
@@ -53,34 +66,20 @@ final class BouncyCastleAccessor {
             super();
         }
 
-        static Class<?> getProviderClass(String className) {
+        static Class<?> getProviderClass() {
             try {
-                if (BouncyCastleSecurityProviderRegistrar.PROVIDER_CLASS.equals(className)) {
-                    return BouncyCastleProvider.class;
-                } else if (BouncyCastleSecurityProviderRegistrar.FIPS_PROVIDER_CLASS.equals(className)) {
-                    return Class.forName(className);
-                }
-                return null;
+                return org.bouncycastle.jce.provider.BouncyCastleProvider.class;
             } catch (Throwable t) {
                 return null;
             }
         }
 
-        static Provider createProvider(String className) throws ReflectiveOperationException {
-            if (BouncyCastleSecurityProviderRegistrar.PROVIDER_CLASS.equals(className)) {
-                try {
-                    return new BouncyCastleProvider();
-                } catch (Throwable t) {
-                    return null;
-                }
-            } else if (BouncyCastleSecurityProviderRegistrar.FIPS_PROVIDER_CLASS.equals(className)) {
-                try {
-                    return ReflectionUtils.newInstance(Class.forName(className), Provider.class);
-                } catch (ClassNotFoundException e) {
-                    throw new ReflectiveOperationException("Cannot instantiate " + className, e);
-                }
+        static Provider createProvider() {
+            try {
+                return new org.bouncycastle.jce.provider.BouncyCastleProvider();
+            } catch (Throwable t) {
+                return null;
             }
-            return null;
         }
     }
 


(mina-sshd) 04/09: Merge branch 'master' into 3.0.0

Posted by tw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

twolf pushed a commit to branch dev_3.0
in repository https://gitbox.apache.org/repos/asf/mina-sshd.git

commit 576ae31f8cdbcd0c52b990b9c7f534d71b37d356
Merge: f7fd08995 f98873919
Author: Thomas Wolf <tw...@apache.org>
AuthorDate: Sat Oct 18 21:52:08 2025 +0200

    Merge branch 'master' into 3.0.0

 pom.xml                                            |  4 +-
 .../sftp/server/AbstractSftpSubsystemHelper.java   |  2 +-
 .../org/apache/sshd/sftp/server/SftpSubsystem.java |  2 +-
 .../apache/sshd/sftp/client/SftpVersionsTest.java  | 85 ++++++++++++++++++++++
 4 files changed, 89 insertions(+), 4 deletions(-)

diff --cc sshd-sftp/src/test/java/org/apache/sshd/sftp/client/SftpVersionsTest.java
index e4c2ef65a,f43f6b502..2d883afd7
--- a/sshd-sftp/src/test/java/org/apache/sshd/sftp/client/SftpVersionsTest.java
+++ b/sshd-sftp/src/test/java/org/apache/sshd/sftp/client/SftpVersionsTest.java
@@@ -70,7 -71,7 +71,8 @@@ import org.apache.sshd.sftp.server.Sftp
  import org.apache.sshd.sftp.server.SftpSubsystemEnvironment;
  import org.apache.sshd.sftp.server.SftpSubsystemFactory;
  import org.apache.sshd.util.test.CommonTestSupportUtils;
+ import org.junit.jupiter.api.Assumptions;
 +import org.junit.jupiter.api.BeforeEach;
  import org.junit.jupiter.api.MethodOrderer.MethodName;
  import org.junit.jupiter.api.TestMethodOrder;
  import org.junit.jupiter.params.ParameterizedTest;
@@@ -542,6 -571,96 +544,89 @@@ public class SftpVersionsTest extends A
          }
      }
  
+     @MethodSource("parameters")
+     @ParameterizedTest(name = "version={0}")
 -    public void sftpRemoveFileWithSymlinkInPath(int version) throws Exception {
++    void sftpRemoveFileWithSymlinkInPath(int version) throws Exception {
+         Assumptions.assumeFalse(OsUtils.isWin32(), "Symlinks not reliably supported on Windows");
+ 
 -        initSftpVersionsTest(version);
+         Path targetPath = detectTargetFolder();
+         Path lclSftp = CommonTestSupportUtils.resolve(
+                 targetPath,
+                 SftpConstants.SFTP_SUBSYSTEM_NAME,
+                 getClass().getSimpleName());
+         Path lclParent = assertHierarchyTargetFolderExists(lclSftp);
+         String testFileName = "test-file.txt";
+ 
 -        Path actualDir = lclParent.resolve("actual-dir-" + getTestedVersion());
++        Path actualDir = lclParent.resolve("actual-dir-" + version);
+         CommonTestSupportUtils.deleteRecursive(actualDir);
+         Files.createDirectories(actualDir);
+ 
 -        Path symlinkDir = lclParent.resolve("symlink-dir-" + getTestedVersion());
++        Path symlinkDir = lclParent.resolve("symlink-dir-" + version);
+         Files.deleteIfExists(symlinkDir);
+         Files.createSymbolicLink(symlinkDir, actualDir);
+ 
+         Path fileViaSymlink = symlinkDir.resolve(testFileName);
+         Files.write(fileViaSymlink, "test content".getBytes(StandardCharsets.UTF_8));
+ 
+         assertTrue(Files.exists(fileViaSymlink), "File should exist via symlink path");
+         assertTrue(Files.exists(actualDir.resolve(testFileName)), "File should exist in actual directory");
+ 
+         Path parentPath = targetPath.getParent();
+         String remotePath = CommonTestSupportUtils.resolveRelativeRemotePath(parentPath, fileViaSymlink);
+ 
+         try (ClientSession session = createAuthenticatedClientSession();
 -             SftpClient sftp = createSftpClient(session, getTestedVersion())) {
++             SftpClient sftp = createSftpClient(session, version)) {
+             sftp.remove(remotePath);
+ 
+             assertFalse(Files.exists(fileViaSymlink), "File should be deleted via symlink path");
+             assertFalse(Files.exists(actualDir.resolve(testFileName)), "File should be deleted from actual directory");
+         } finally {
+             Files.deleteIfExists(symlinkDir);
+             CommonTestSupportUtils.deleteRecursive(actualDir);
+         }
+     }
+ 
+     @MethodSource("parameters")
+     @ParameterizedTest(name = "version={0}")
 -    public void sftpFStatWithSymlinkInPath(int version) throws Exception {
++    void sftpFStatWithSymlinkInPath(int version) throws Exception {
+         Assumptions.assumeFalse(OsUtils.isWin32(), "Symlinks not reliably supported on Windows");
+ 
 -        initSftpVersionsTest(version);
+         Path targetPath = detectTargetFolder();
+         Path lclSftp = CommonTestSupportUtils.resolve(targetPath,
+                 SftpConstants.SFTP_SUBSYSTEM_NAME, getClass().getSimpleName());
+         Path lclParent = assertHierarchyTargetFolderExists(lclSftp);
+ 
 -        Path actualDir = lclParent.resolve("actual-fstat-" + getTestedVersion());
++        Path actualDir = lclParent.resolve("actual-fstat-" + version);
+         CommonTestSupportUtils.deleteRecursive(actualDir);
+         Files.createDirectories(actualDir);
+ 
 -        Path symlinkDir = lclParent.resolve("symlink-fstat-" + getTestedVersion());
++        Path symlinkDir = lclParent.resolve("symlink-fstat-" + version);
+         Files.deleteIfExists(symlinkDir);
+         Files.createSymbolicLink(symlinkDir, actualDir);
+ 
+         Path testFile = symlinkDir.resolve("test.txt");
+         String content = getCurrentTestName();
+         Files.write(testFile, content.getBytes(StandardCharsets.UTF_8));
+ 
+         Path parentPath = targetPath.getParent();
+         String remotePath = CommonTestSupportUtils.resolveRelativeRemotePath(parentPath, testFile);
+ 
+         try (ClientSession session = createAuthenticatedClientSession();
 -             SftpClient sftp = createSftpClient(session, getTestedVersion())) {
++             SftpClient sftp = createSftpClient(session, version)) {
+             try (SftpClient.CloseableHandle handle = sftp.open(remotePath, SftpClient.OpenMode.Read)) {
+                 Attributes attrs = sftp.stat(handle);
+ 
+                 assertNotNull(attrs, "Attributes should be retrieved");
+                 assertEquals(content.length(), attrs.getSize(), "File size mismatch");
+                 assertTrue(attrs.isRegularFile(), "Should be a regular file");
+             }
+         } finally {
+             Files.deleteIfExists(testFile);
+             Files.deleteIfExists(symlinkDir);
+             CommonTestSupportUtils.deleteRecursive(actualDir);
+         }
+     }
+ 
 -    @Override
 -    public String toString() {
 -        return getClass().getSimpleName() + "[" + getTestedVersion() + "]";
 -    }
 -
      public static void assertExtensionsMapEquals(String message, Map<String, String> expected, Map<String, byte[]> actual) {
          assertMapEquals(message, expected, SftpHelper.toStringExtensions(actual));
      }