[mina-sshd] branch master updated (bba481a9b -> 1ccde6cdf)

2022-11-09 Thread twolf
This is an automated email from the ASF dual-hosted git repository.

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


from bba481a9b MinaSession: avoid synthetic accesses
 new 5a8fe830b Better file handling for host keys
 new 1ccde6cdf Minor comment fix

The 2 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:
 .../sshd/common/util/buffer/BufferUtils.java   |   2 +-
 .../AbstractGeneratorHostKeyProvider.java  |  88 ++---
 .../SimpleGeneratorHostKeyProvider.java| 109 ++---
 .../SimpleGeneratorHostKeyProviderTest.java|  26 -
 4 files changed, 195 insertions(+), 30 deletions(-)



[mina-sshd] 02/02: Minor comment fix

2022-11-09 Thread twolf
This is an automated email from the ASF dual-hosted git repository.

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

commit 1ccde6cdfe72adf13ef9dd49138434a74aabd784
Author: Thomas Wolf 
AuthorDate: Wed Nov 9 12:25:20 2022 +0100

Minor comment fix
---
 .../src/main/java/org/apache/sshd/common/util/buffer/BufferUtils.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/sshd-common/src/main/java/org/apache/sshd/common/util/buffer/BufferUtils.java 
b/sshd-common/src/main/java/org/apache/sshd/common/util/buffer/BufferUtils.java
index cdb583153..b1c68a0fe 100644
--- 
a/sshd-common/src/main/java/org/apache/sshd/common/util/buffer/BufferUtils.java
+++ 
b/sshd-common/src/main/java/org/apache/sshd/common/util/buffer/BufferUtils.java
@@ -35,7 +35,7 @@ import org.apache.sshd.common.util.io.IoUtils;
 import org.apache.sshd.common.util.logging.SimplifiedLog;
 
 /**
- * TODO Add javadoc
+ * General utilities for working with byte-encoded data.
  *
  * @author mailto:d...@mina.apache.org;>Apache MINA SSHD Project
  */



[mina-sshd] 01/02: Better file handling for host keys

2022-11-09 Thread twolf
This is an automated email from the ASF dual-hosted git repository.

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

commit 5a8fe830b2a2308a2b24ac8115a391af477f64f5
Author: Thomas Wolf 
AuthorDate: Sat Nov 5 21:00:40 2022 +0100

Better file handling for host keys

Store host keys in the OpenSSH format. This makes it possible to use
EdDSA host keys. Also set file permissions and read legacy files more
carefully.
---
 .../AbstractGeneratorHostKeyProvider.java  |  88 ++---
 .../SimpleGeneratorHostKeyProvider.java| 109 ++---
 .../SimpleGeneratorHostKeyProviderTest.java|  26 -
 3 files changed, 194 insertions(+), 29 deletions(-)

diff --git 
a/sshd-common/src/main/java/org/apache/sshd/server/keyprovider/AbstractGeneratorHostKeyProvider.java
 
b/sshd-common/src/main/java/org/apache/sshd/server/keyprovider/AbstractGeneratorHostKeyProvider.java
index f8cb53334..29b6e3d80 100644
--- 
a/sshd-common/src/main/java/org/apache/sshd/server/keyprovider/AbstractGeneratorHostKeyProvider.java
+++ 
b/sshd-common/src/main/java/org/apache/sshd/server/keyprovider/AbstractGeneratorHostKeyProvider.java
@@ -18,6 +18,7 @@
  */
 package org.apache.sshd.server.keyprovider;
 
+import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
@@ -25,6 +26,11 @@ 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.AbstractKeyPairProvider;
 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 abstract class AbstractGeneratorHostKeyProvider
 }
 }
 
-@Override // co-variant return
+@Override
 public synchronized List loadKeys(SessionContext session) {
 Path keyPath = getPath();
 Iterable ids;
@@ -140,7 +147,7 @@ public abstract class AbstractGeneratorHostKeyProvider
 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 @@ public abstract class AbstractGeneratorHostKeyProvider
 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 @@ public abstract class AbstractGeneratorHostKeyProvider
 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 @@ public abstract class AbstractGeneratorHostKeyProvider
 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 @@ public abstract class AbstractGeneratorHostKeyProvider
 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 

[mina-sshd] branch master updated: [maven-release-plugin] prepare release sshd-2.9.2

2022-11-09 Thread gnodet
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new f7b6a [maven-release-plugin] prepare release sshd-2.9.2
f7b6a is described below

commit f7b6af7fdf1765f297a96dfec3f198f5fd7d
Author: Guillaume Nodet 
AuthorDate: Wed Nov 9 15:17:25 2022 +0100

[maven-release-plugin] prepare release sshd-2.9.2
---
 assembly/pom.xml | 2 +-
 pom.xml  | 6 +++---
 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-spring-sftp/pom.xml | 2 +-
 16 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/assembly/pom.xml b/assembly/pom.xml
index a7054cfc7..c487f41c6 100644
--- a/assembly/pom.xml
+++ b/assembly/pom.xml
@@ -22,7 +22,7 @@
 
 org.apache.sshd
 sshd
-2.9.2-SNAPSHOT
+2.9.2
 
 
 apache-sshd
diff --git a/pom.xml b/pom.xml
index 11e49dc47..3018e1d22 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,7 +27,7 @@
 
 org.apache.sshd
 sshd
-2.9.2-SNAPSHOT
+2.9.2
 Apache Mina SSHD
 pom
 2008
@@ -75,13 +75,13 @@
 
scm:git:https://gitbox.apache.org/repos/asf/mina-sshd.git
 
scm:git:https://gitbox.apache.org/repos/asf/mina-sshd.git
 https://github.com/apache/mina-sshd/tree/${project.scm.tag}
-sshd-2.9.1
+sshd-2.9.2
 
 
 
 ${project.basedir}
 UTF-8
-
2022-08-22T12:09:31Z
+
2022-11-09T13:31:49Z
 
 
 
diff --git a/sshd-cli/pom.xml b/sshd-cli/pom.xml
index bf423b5ae..83288ada7 100644
--- a/sshd-cli/pom.xml
+++ b/sshd-cli/pom.xml
@@ -22,7 +22,7 @@
 
 org.apache.sshd
 sshd
-2.9.2-SNAPSHOT
+2.9.2
 
 
 sshd-cli
diff --git a/sshd-common/pom.xml b/sshd-common/pom.xml
index 561088b56..a73591d91 100644
--- a/sshd-common/pom.xml
+++ b/sshd-common/pom.xml
@@ -22,7 +22,7 @@
 
 org.apache.sshd
 sshd
-2.9.2-SNAPSHOT
+2.9.2
 ..
 
 
diff --git a/sshd-contrib/pom.xml b/sshd-contrib/pom.xml
index 77313c366..9bea987dd 100644
--- a/sshd-contrib/pom.xml
+++ b/sshd-contrib/pom.xml
@@ -22,7 +22,7 @@
 
 org.apache.sshd
 sshd
-2.9.2-SNAPSHOT
+2.9.2
 
 
 

[mina-sshd] annotated tag sshd-2.9.2 created (now 78faa8765)

2022-11-09 Thread gnodet
This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a change to annotated tag sshd-2.9.2
in repository https://gitbox.apache.org/repos/asf/mina-sshd.git


  at 78faa8765 (tag)
 tagging f7b6af7fdf1765f297a96dfec3f198f5fd7d (commit)
 replaces sshd-2.9.1
  by Guillaume Nodet
  on Wed Nov 9 15:17:42 2022 +0100

- Log -
[maven-release-plugin] copy for tag sshd-2.9.2
---

No new revisions were added by this update.



[mina-sshd] branch master updated: [maven-release-plugin] prepare for next development iteration

2022-11-09 Thread gnodet
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new b88724358 [maven-release-plugin] prepare for next development iteration
b88724358 is described below

commit b88724358cda5d1f37d8ed2dd5ec24327d3eb95a
Author: Guillaume Nodet 
AuthorDate: Wed Nov 9 15:17:46 2022 +0100

[maven-release-plugin] prepare for next development iteration
---
 assembly/pom.xml | 2 +-
 pom.xml  | 4 ++--
 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-spring-sftp/pom.xml | 2 +-
 16 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/assembly/pom.xml b/assembly/pom.xml
index c487f41c6..796550137 100644
--- a/assembly/pom.xml
+++ b/assembly/pom.xml
@@ -22,7 +22,7 @@
 
 org.apache.sshd
 sshd
-2.9.2
+2.9.3-SNAPSHOT
 
 
 apache-sshd
diff --git a/pom.xml b/pom.xml
index 3018e1d22..b359522c2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,7 +27,7 @@
 
 org.apache.sshd
 sshd
-2.9.2
+2.9.3-SNAPSHOT
 Apache Mina SSHD
 pom
 2008
@@ -81,7 +81,7 @@
 
 ${project.basedir}
 UTF-8
-
2022-11-09T13:31:49Z
+
2022-11-09T14:17:46Z
 
 
 
diff --git a/sshd-cli/pom.xml b/sshd-cli/pom.xml
index 83288ada7..dbe0378ed 100644
--- a/sshd-cli/pom.xml
+++ b/sshd-cli/pom.xml
@@ -22,7 +22,7 @@
 
 org.apache.sshd
 sshd
-2.9.2
+2.9.3-SNAPSHOT
 
 
 sshd-cli
diff --git a/sshd-common/pom.xml b/sshd-common/pom.xml
index a73591d91..0c20efb69 100644
--- a/sshd-common/pom.xml
+++ b/sshd-common/pom.xml
@@ -22,7 +22,7 @@
 
 org.apache.sshd
 sshd
-2.9.2
+2.9.3-SNAPSHOT
 ..
 
 
diff --git a/sshd-contrib/pom.xml b/sshd-contrib/pom.xml
index 9bea987dd..0e9efd49e 100644
--- a/sshd-contrib/pom.xml
+++ b/sshd-contrib/pom.xml
@@ -22,7 +22,7 @@
 
 org.apache.sshd
 sshd
-2.9.2
+2.9.3-SNAPSHOT
 
 
 

svn commit: r57926 - /dev/mina/sshd/2.9.2/

2022-11-09 Thread gnodet
Author: gnodet
Date: Wed Nov  9 21:06:32 2022
New Revision: 57926

Log:
Staging Mina SSHD 2.9.2 release

Added:
dev/mina/sshd/2.9.2/
dev/mina/sshd/2.9.2/apache-sshd-2.9.2-src.tar.gz   (with props)
dev/mina/sshd/2.9.2/apache-sshd-2.9.2-src.tar.gz.asc
dev/mina/sshd/2.9.2/apache-sshd-2.9.2-src.tar.gz.sha256
dev/mina/sshd/2.9.2/apache-sshd-2.9.2-src.tar.gz.sha512
dev/mina/sshd/2.9.2/apache-sshd-2.9.2-src.zip   (with props)
dev/mina/sshd/2.9.2/apache-sshd-2.9.2-src.zip.asc
dev/mina/sshd/2.9.2/apache-sshd-2.9.2-src.zip.sha256
dev/mina/sshd/2.9.2/apache-sshd-2.9.2-src.zip.sha512
dev/mina/sshd/2.9.2/apache-sshd-2.9.2.pom
dev/mina/sshd/2.9.2/apache-sshd-2.9.2.pom.asc
dev/mina/sshd/2.9.2/apache-sshd-2.9.2.pom.sha256
dev/mina/sshd/2.9.2/apache-sshd-2.9.2.pom.sha512
dev/mina/sshd/2.9.2/apache-sshd-2.9.2.tar.gz   (with props)
dev/mina/sshd/2.9.2/apache-sshd-2.9.2.tar.gz.asc
dev/mina/sshd/2.9.2/apache-sshd-2.9.2.tar.gz.sha256
dev/mina/sshd/2.9.2/apache-sshd-2.9.2.tar.gz.sha512
dev/mina/sshd/2.9.2/apache-sshd-2.9.2.zip   (with props)
dev/mina/sshd/2.9.2/apache-sshd-2.9.2.zip.asc
dev/mina/sshd/2.9.2/apache-sshd-2.9.2.zip.sha256
dev/mina/sshd/2.9.2/apache-sshd-2.9.2.zip.sha512
dev/mina/sshd/2.9.2/sign.sh   (with props)

Added: dev/mina/sshd/2.9.2/apache-sshd-2.9.2-src.tar.gz
==
Binary file - no diff available.

Propchange: dev/mina/sshd/2.9.2/apache-sshd-2.9.2-src.tar.gz
--
svn:mime-type = application/octet-stream

Added: dev/mina/sshd/2.9.2/apache-sshd-2.9.2-src.tar.gz.asc
==
--- dev/mina/sshd/2.9.2/apache-sshd-2.9.2-src.tar.gz.asc (added)
+++ dev/mina/sshd/2.9.2/apache-sshd-2.9.2-src.tar.gz.asc Wed Nov  9 21:06:32 
2022
@@ -0,0 +1,6 @@
+-BEGIN PGP SIGNATURE-
+
+iF0EABEKAB0WIQTqI9sTYNkClIHn8u/s3+o8tEk7lAUCY2veAQAKCRDs3+o8tEk7
+lBWnAKDew3C2CAW1uzx2pkc0q9Os5AxEgwCgpV0xow6y0XutEkUeveNWHUoFnfU=
+=SxxI
+-END PGP SIGNATURE-

Added: dev/mina/sshd/2.9.2/apache-sshd-2.9.2-src.tar.gz.sha256
==
--- dev/mina/sshd/2.9.2/apache-sshd-2.9.2-src.tar.gz.sha256 (added)
+++ dev/mina/sshd/2.9.2/apache-sshd-2.9.2-src.tar.gz.sha256 Wed Nov  9 21:06:32 
2022
@@ -0,0 +1,2 @@
+./apache-sshd-2.9.2-src.tar.gz: AEEA6224 7EA87213 F20F6B1D 6F817776 D2C7493F
+F23FBC4A 1F99E008 1631C02E

Added: dev/mina/sshd/2.9.2/apache-sshd-2.9.2-src.tar.gz.sha512
==
--- dev/mina/sshd/2.9.2/apache-sshd-2.9.2-src.tar.gz.sha512 (added)
+++ dev/mina/sshd/2.9.2/apache-sshd-2.9.2-src.tar.gz.sha512 Wed Nov  9 21:06:32 
2022
@@ -0,0 +1,4 @@
+./apache-sshd-2.9.2-src.tar.gz: 81DCD61E 761EBAC3 2C622F67 2DFDE78E B53465F4
+994C770E B5C6B202 2E3F0C60 8F17D5C9 2632E54F
+E09171C3 81B0275F F63300CD E9187ED7 97EDB72F
+1C8A8304

Added: dev/mina/sshd/2.9.2/apache-sshd-2.9.2-src.zip
==
Binary file - no diff available.

Propchange: dev/mina/sshd/2.9.2/apache-sshd-2.9.2-src.zip
--
svn:mime-type = application/octet-stream

Added: dev/mina/sshd/2.9.2/apache-sshd-2.9.2-src.zip.asc
==
--- dev/mina/sshd/2.9.2/apache-sshd-2.9.2-src.zip.asc (added)
+++ dev/mina/sshd/2.9.2/apache-sshd-2.9.2-src.zip.asc Wed Nov  9 21:06:32 2022
@@ -0,0 +1,6 @@
+-BEGIN PGP SIGNATURE-
+
+iF0EABEKAB0WIQTqI9sTYNkClIHn8u/s3+o8tEk7lAUCY2veAQAKCRDs3+o8tEk7
+lIWuAJ0T31canRDv/dA0feXFcKaDv7IJrQCfYFddTXWBDiNRmZjt5LMM6gW6iKs=
+=uaxg
+-END PGP SIGNATURE-

Added: dev/mina/sshd/2.9.2/apache-sshd-2.9.2-src.zip.sha256
==
--- dev/mina/sshd/2.9.2/apache-sshd-2.9.2-src.zip.sha256 (added)
+++ dev/mina/sshd/2.9.2/apache-sshd-2.9.2-src.zip.sha256 Wed Nov  9 21:06:32 
2022
@@ -0,0 +1,2 @@
+./apache-sshd-2.9.2-src.zip: 70DB125B CB1BEB75 79BC53D8 7C074638 E561AA00
+ BA64A6D9 4B0929FE 36CB722E

Added: dev/mina/sshd/2.9.2/apache-sshd-2.9.2-src.zip.sha512
==
--- dev/mina/sshd/2.9.2/apache-sshd-2.9.2-src.zip.sha512 (added)
+++ dev/mina/sshd/2.9.2/apache-sshd-2.9.2-src.zip.sha512 Wed Nov  9 21:06:32 
2022
@@ -0,0 +1,4 @@
+./apache-sshd-2.9.2-src.zip: 5225F256 5A26CA41 30C39B4C ADC4EAF5 554D96C8
+ 82298F21 0158F27A 0068EDC7 96762722 5A1E9C0E
+ 3618F76D 26751081 

svn commit: r57927 - /dev/mina/sshd/2.9.2/sign.sh

2022-11-09 Thread gnodet
Author: gnodet
Date: Wed Nov  9 21:07:08 2022
New Revision: 57927

Log:
Staging Mina SSHD 2.9.2 release

Removed:
dev/mina/sshd/2.9.2/sign.sh