You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by GitBox <gi...@apache.org> on 2020/09/09 18:32:46 UTC

[GitHub] [mina-sshd] FliegenKLATSCH opened a new pull request #164: [SSHD-1053] Fix signature string for openssh certificate host key algorithms

FliegenKLATSCH opened a new pull request #164:
URL: https://github.com/apache/mina-sshd/pull/164


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org


[GitHub] [mina-sshd] lgoldstein commented on pull request #164: [SSHD-1053] Fix signature string for openssh certificate host key algorithms

Posted by GitBox <gi...@apache.org>.
lgoldstein commented on pull request #164:
URL: https://github.com/apache/mina-sshd/pull/164#issuecomment-690908807






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org


[GitHub] [mina-sshd] lgoldstein commented on a change in pull request #164: [SSHD-1053] Fix signature string for openssh certificate host key algorithms

Posted by GitBox <gi...@apache.org>.
lgoldstein commented on a change in pull request #164:
URL: https://github.com/apache/mina-sshd/pull/164#discussion_r486445262



##########
File path: sshd-common/src/main/java/org/apache/sshd/common/signature/Signature.java
##########
@@ -93,4 +93,12 @@ default void update(SessionContext session, byte[] hash) throws Exception {
      * @throws Exception If failed to calculate the signature
      */
     byte[] sign(SessionContext session) throws Exception;
+
+    /**
+     * Get the original ssh name of the signature algorithm
+     * Only used for ssh cert variants, defaults to null
+     */
+    default String getSshAlgorithmName() {
+        return null;
+    }

Review comment:
       - Javadoc is not properly formatted (missing `@return`)
   - Why return null and not the actual name even if not a variant ?

##########
File path: sshd-core/src/main/java/org/apache/sshd/server/kex/DHGServer.java
##########
@@ -129,7 +129,7 @@ public boolean next(int cmd, Buffer buffer) throws Exception {
         sig.update(session, h);
 
         buffer.clear();
-        buffer.putString(algo);
+        buffer.putString(sig.getSshAlgorithmName() != null ? sig.getSshAlgorithmName() : algo);

Review comment:
       See remark regarding `null`...

##########
File path: sshd-common/src/main/java/org/apache/sshd/common/signature/SignatureRSA.java
##########
@@ -52,8 +52,20 @@
 
     private int verifierSignatureSize = -1;
 
+    private final String sshAlgorithmName;
+
     protected SignatureRSA(String algorithm) {
+        this(algorithm, null);
+    }
+
+    protected SignatureRSA(String algorithm, String sshAlgorithmName) {
         super(algorithm);
+        this.sshAlgorithmName = sshAlgorithmName;
+    }

Review comment:
       Let's not allow null/empty SSH algorithm name - see `ValidateUtils.checkNotNullOrEmpty`




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org


[GitHub] [mina-sshd] lgoldstein commented on pull request #164: [SSHD-1053] Fix signature string for openssh certificate host key algorithms

Posted by GitBox <gi...@apache.org>.
lgoldstein commented on pull request #164:
URL: https://github.com/apache/mina-sshd/pull/164#issuecomment-691170715


   I am having trouble passing the tests - specifically `sshd-mina` - please take a look ...
   ```
   [ERROR] Failures:
   [ERROR] org.apache.sshd.common.signature.OpenSSHCertificateTest.testAbortOnInvalidPrincipal[type=[rsa-sha2-512-cert-v01@openssh.com, rsa-sha2-512]](org.apache.sshd.common.signature.OpenSSHCertificateTest)
   [ERROR]   Run 1: OpenSSHCertificateTest.testAbortOnInvalidPrincipal:174->Assert.assertEquals:633->Assert.assertEquals:647->Assert.failNotEquals:835->Assert.fail:89 expected:<3> but was:<0>
   [ERROR]   Run 2: OpenSSHCertificateTest.testAbortOnInvalidPrincipal:174->Assert.assertEquals:633->Assert.assertEquals:647->Assert.failNotEquals:835->Assert.fail:89 expected:<3> but was:<0>
   [ERROR]   Run 3: OpenSSHCertificateTest.testAbortOnInvalidPrincipal:174->Assert.assertEquals:633->Assert.assertEquals:647->Assert.failNotEquals:835->Assert.fail:89 expected:<3> but was:<0>
   [INFO]
   [ERROR] org.apache.sshd.common.signature.OpenSSHCertificateTest.testAbortOnInvalidPrincipal[type=[ssh-rsa-cert-v01@openssh.com, rsa-sha2-512]](org.apache.sshd.common.signature.OpenSSHCertificateTest)
   [ERROR]   Run 1: OpenSSHCertificateTest.testAbortOnInvalidPrincipal:174->Assert.assertEquals:633->Assert.assertEquals:647->Assert.failNotEquals:835->Assert.fail:89 expected:<3> but was:<0>
   [ERROR]   Run 2: OpenSSHCertificateTest.testAbortOnInvalidPrincipal:174->Assert.assertEquals:633->Assert.assertEquals:647->Assert.failNotEquals:835->Assert.fail:89 expected:<3> but was:<0>
   [ERROR]   Run 3: OpenSSHCertificateTest.testAbortOnInvalidPrincipal:174->Assert.assertEquals:633->Assert.assertEquals:647->Assert.failNotEquals:835->Assert.fail:89 expected:<3> but was:<0>
   [INFO]
   [ERROR] org.apache.sshd.common.signature.OpenSSHCertificateTest.testAbortOnInvalidPrincipal[type=[ssh-rsa-cert-v01@openssh.com, ssh-rsa]](org.apache.sshd.common.signature.OpenSSHCertificateTest)
   [ERROR]   Run 1: OpenSSHCertificateTest.testAbortOnInvalidPrincipal:174->Assert.assertEquals:633->Assert.assertEquals:647->Assert.failNotEquals:835->Assert.fail:89 expected:<3> but was:<0>
   [ERROR]   Run 2: OpenSSHCertificateTest.testAbortOnInvalidPrincipal:174->Assert.assertEquals:633->Assert.assertEquals:647->Assert.failNotEquals:835->Assert.fail:89 expected:<3> but was:<0>
   [ERROR]   Run 3: OpenSSHCertificateTest.testAbortOnInvalidPrincipal:174->Assert.assertEquals:633->Assert.assertEquals:647->Assert.failNotEquals:835->Assert.fail:89 expected:<3> but was:<0>
   [INFO]
   [ERROR] org.apache.sshd.common.signature.OpenSSHCertificateTest.testAbortOnInvalidPrincipal[type=[ssh-rsa]](org.apache.sshd.common.signature.OpenSSHCertificateTest)
   [ERROR]   Run 1: OpenSSHCertificateTest.testAbortOnInvalidPrincipal:174->Assert.assertEquals:633->Assert.assertEquals:647->Assert.failNotEquals:835->Assert.fail:89 expected:<3> but was:<0>
   [ERROR]   Run 2: OpenSSHCertificateTest.testAbortOnInvalidPrincipal:174->Assert.assertEquals:633->Assert.assertEquals:647->Assert.failNotEquals:835->Assert.fail:89 expected:<3> but was:<0>
   [ERROR]   Run 3: OpenSSHCertificateTest.testAbortOnInvalidPrincipal:174->Assert.assertEquals:633->Assert.assertEquals:647->Assert.failNotEquals:835->Assert.fail:89 expected:<3> but was:<0>
   [INFO]
   [ERROR] Errors:
   [ERROR] org.apache.sshd.common.signature.OpenSSHCertificateTest.testContinueOnInvalidPrincipal[type=[rsa-sha2-512-cert-v01@openssh.com, rsa-sha2-512]](org.apache.sshd.common.signature.OpenSSHCertificateTest)
   [ERROR]   Run 1: OpenSSHCertificateTest.testContinueOnInvalidPrincipal:156 » Ssh Session is bei...
   [ERROR]   Run 2: OpenSSHCertificateTest.testContinueOnInvalidPrincipal:156 » Ssh Session is bei...
   [ERROR]   Run 3: OpenSSHCertificateTest.testContinueOnInvalidPrincipal:156 » Ssh Session is bei...
   [INFO]
   [ERROR] org.apache.sshd.common.signature.OpenSSHCertificateTest.testContinueOnInvalidPrincipal[type=[ssh-rsa-cert-v01@openssh.com, rsa-sha2-512]](org.apache.sshd.common.signature.OpenSSHCertificateTest)
   [ERROR]   Run 1: OpenSSHCertificateTest.testContinueOnInvalidPrincipal:156 » Ssh Session is bei...
   [ERROR]   Run 2: OpenSSHCertificateTest.testContinueOnInvalidPrincipal:156 » Ssh Session is bei...
   [ERROR]   Run 3: OpenSSHCertificateTest.testContinueOnInvalidPrincipal:156 » Ssh Session is bei...
   [INFO]
   [ERROR] org.apache.sshd.common.signature.OpenSSHCertificateTest.testContinueOnInvalidPrincipal[type=[ssh-rsa-cert-v01@openssh.com, ssh-rsa]](org.apache.sshd.common.signature.OpenSSHCertificateTest)
   [ERROR]   Run 1: OpenSSHCertificateTest.testContinueOnInvalidPrincipal:156 » Ssh Session is bei...
   [ERROR]   Run 2: OpenSSHCertificateTest.testContinueOnInvalidPrincipal:156 » Ssh Session is bei...
   [ERROR]   Run 3: OpenSSHCertificateTest.testContinueOnInvalidPrincipal:156 » Ssh Session is bei...
   [INFO]
   [ERROR] org.apache.sshd.common.signature.OpenSSHCertificateTest.testContinueOnInvalidPrincipal[type=[ssh-rsa]](org.apache.sshd.common.signature.OpenSSHCertificateTest)
   [ERROR]   Run 1: OpenSSHCertificateTest.testContinueOnInvalidPrincipal:156 » Ssh Session is bei...
   [ERROR]   Run 2: OpenSSHCertificateTest.testContinueOnInvalidPrincipal:156 » Ssh Session is bei...
   [ERROR]   Run 3: OpenSSHCertificateTest.testContinueOnInvalidPrincipal:156 » Ssh Session is bei...
   [INFO]
   [ERROR] org.apache.sshd.common.signature.OpenSSHCertificateTest.testContinueOnInvalidPrincipal[type=null](org.apache.sshd.common.signature.OpenSSHCertificateTest)
   [ERROR]   Run 1: OpenSSHCertificateTest.testContinueOnInvalidPrincipal:156 » Ssh Session is bei...
   [ERROR]   Run 2: OpenSSHCertificateTest.testContinueOnInvalidPrincipal:156 » Ssh DefaultAuthFut...
   [ERROR]   Run 3: OpenSSHCertificateTest.testContinueOnInvalidPrincipal:156 » Ssh Session is bei...
   [INFO]
   [ERROR] org.apache.sshd.common.signature.OpenSSHCertificateTest.testOpenSshCertificates[type=[rsa-sha2-512-cert-v01@openssh.com, rsa-sha2-512]](org.apache.sshd.common.signature.OpenSSHCertificateTest)
   [ERROR]   Run 1: OpenSSHCertificateTest.testOpenSshCertificates:145 » Ssh Session is being clos...
   [ERROR]   Run 2: OpenSSHCertificateTest.testOpenSshCertificates:145 » Ssh Session is being clos...
   [ERROR]   Run 3: OpenSSHCertificateTest.testOpenSshCertificates:145 » Ssh Session is being clos...
   [INFO]
   [ERROR] org.apache.sshd.common.signature.OpenSSHCertificateTest.testOpenSshCertificates[type=[ssh-rsa-cert-v01@openssh.com, rsa-sha2-512]](org.apache.sshd.common.signature.OpenSSHCertificateTest)
   [ERROR]   Run 1: OpenSSHCertificateTest.testOpenSshCertificates:145 » Ssh Session is being clos...
   [ERROR]   Run 2: OpenSSHCertificateTest.testOpenSshCertificates:145 » Ssh Session is being clos...
   [ERROR]   Run 3: OpenSSHCertificateTest.testOpenSshCertificates:145 » Ssh Session is being clos...
   [INFO]
   [ERROR] org.apache.sshd.common.signature.OpenSSHCertificateTest.testOpenSshCertificates[type=[ssh-rsa-cert-v01@openssh.com, ssh-rsa]](org.apache.sshd.common.signature.OpenSSHCertificateTest)
   [ERROR]   Run 1: OpenSSHCertificateTest.testOpenSshCertificates:145 » Ssh Session is being clos...
   [ERROR]   Run 2: OpenSSHCertificateTest.testOpenSshCertificates:145 » Ssh Session is being clos...
   [ERROR]   Run 3: OpenSSHCertificateTest.testOpenSshCertificates:145 » Ssh Session is being clos...
   [INFO]
   [ERROR] org.apache.sshd.common.signature.OpenSSHCertificateTest.testOpenSshCertificates[type=[ssh-rsa]](org.apache.sshd.common.signature.OpenSSHCertificateTest)
   [ERROR]   Run 1: OpenSSHCertificateTest.testOpenSshCertificates:145 » Ssh Session is being clos...
   [ERROR]   Run 2: OpenSSHCertificateTest.testOpenSshCertificates:145 » Ssh Session is being clos...
   [ERROR]   Run 3: OpenSSHCertificateTest.testOpenSshCertificates:145 » Ssh Session is being clos...
   [INFO]
   [ERROR] org.apache.sshd.common.signature.OpenSSHCertificateTest.testOpenSshCertificates[type=null](org.apache.sshd.common.signature.OpenSSHCertificateTest)
   [ERROR]   Run 1: OpenSSHCertificateTest.testOpenSshCertificates:145 » Ssh Session is being clos...
   [ERROR]   Run 2: OpenSSHCertificateTest.testOpenSshCertificates:145 » Ssh Session is being clos...
   [ERROR]   Run 3: OpenSSHCertificateTest.testOpenSshCertificates:145 » Ssh Session is being clos...
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org


[GitHub] [mina-sshd] lgoldstein commented on a change in pull request #164: [SSHD-1053] Fix signature string for openssh certificate host key algorithms

Posted by GitBox <gi...@apache.org>.
lgoldstein commented on a change in pull request #164:
URL: https://github.com/apache/mina-sshd/pull/164#discussion_r486801409



##########
File path: sshd-common/src/main/java/org/apache/sshd/common/signature/SignatureRSA.java
##########
@@ -52,8 +52,21 @@
 
     private int verifierSignatureSize = -1;
 
+    private final String sshAlgorithmName;
+
     protected SignatureRSA(String algorithm) {
+        this(algorithm, null);

Review comment:
       Since you are using `ValidateUtils.checkNotNullAndNotEmpty` this constructor is invalid since whoever uses it will get an exception.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org


[GitHub] [mina-sshd] FliegenKLATSCH closed pull request #164: [SSHD-1053] Fix signature string for openssh certificate host key algorithms

Posted by GitBox <gi...@apache.org>.
FliegenKLATSCH closed pull request #164:
URL: https://github.com/apache/mina-sshd/pull/164






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org


[GitHub] [mina-sshd] FliegenKLATSCH commented on a change in pull request #164: [SSHD-1053] Fix signature string for openssh certificate host key algorithms

Posted by GitBox <gi...@apache.org>.
FliegenKLATSCH commented on a change in pull request #164:
URL: https://github.com/apache/mina-sshd/pull/164#discussion_r486450085



##########
File path: sshd-common/src/main/java/org/apache/sshd/common/signature/Signature.java
##########
@@ -93,4 +93,12 @@ default void update(SessionContext session, byte[] hash) throws Exception {
      * @throws Exception If failed to calculate the signature
      */
     byte[] sign(SessionContext session) throws Exception;
+
+    /**
+     * Get the original ssh name of the signature algorithm
+     * Only used for ssh cert variants, defaults to null
+     */
+    default String getSshAlgorithmName() {
+        return null;
+    }

Review comment:
       Because I am too lazy to fill it for _all_ algorithms.. For most it doesn't make a difference.
   But can do it for all..




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org


[GitHub] [mina-sshd] FliegenKLATSCH closed pull request #164: [SSHD-1053] Fix signature string for openssh certificate host key algorithms

Posted by GitBox <gi...@apache.org>.
FliegenKLATSCH closed pull request #164:
URL: https://github.com/apache/mina-sshd/pull/164






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org


[GitHub] [mina-sshd] FliegenKLATSCH commented on a change in pull request #164: [SSHD-1053] Fix signature string for openssh certificate host key algorithms

Posted by GitBox <gi...@apache.org>.
FliegenKLATSCH commented on a change in pull request #164:
URL: https://github.com/apache/mina-sshd/pull/164#discussion_r486450085



##########
File path: sshd-common/src/main/java/org/apache/sshd/common/signature/Signature.java
##########
@@ -93,4 +93,12 @@ default void update(SessionContext session, byte[] hash) throws Exception {
      * @throws Exception If failed to calculate the signature
      */
     byte[] sign(SessionContext session) throws Exception;
+
+    /**
+     * Get the original ssh name of the signature algorithm
+     * Only used for ssh cert variants, defaults to null
+     */
+    default String getSshAlgorithmName() {
+        return null;
+    }

Review comment:
       Because I am too lazy to fill it for _all_ algorithms.. For most it doesn't make a difference.
   But can do it for all.. Or we do it like in the original PR - handing in a default, would that also be an option?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org


[GitHub] [mina-sshd] FliegenKLATSCH closed pull request #164: [SSHD-1053] Fix signature string for openssh certificate host key algorithms

Posted by GitBox <gi...@apache.org>.
FliegenKLATSCH closed pull request #164:
URL: https://github.com/apache/mina-sshd/pull/164


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org


[GitHub] [mina-sshd] lgoldstein commented on a change in pull request #164: [SSHD-1053] Fix signature string for openssh certificate host key algorithms

Posted by GitBox <gi...@apache.org>.
lgoldstein commented on a change in pull request #164:
URL: https://github.com/apache/mina-sshd/pull/164#discussion_r486801409



##########
File path: sshd-common/src/main/java/org/apache/sshd/common/signature/SignatureRSA.java
##########
@@ -52,8 +52,21 @@
 
     private int verifierSignatureSize = -1;
 
+    private final String sshAlgorithmName;
+
     protected SignatureRSA(String algorithm) {
+        this(algorithm, null);

Review comment:
       Since you are using `ValidateUtils.checkNotNullAndNotEmpty` this constructor is invalid since whoever uses it will get an exception.

##########
File path: sshd-common/src/main/java/org/apache/sshd/common/signature/SignatureRSA.java
##########
@@ -52,8 +52,21 @@
 
     private int verifierSignatureSize = -1;
 
+    private final String sshAlgorithmName;
+
     protected SignatureRSA(String algorithm) {
+        this(algorithm, null);

Review comment:
       Since you are using `ValidateUtils.checkNotNullAndNotEmpty` this constructor is invalid since whoever uses it will get an exception.

##########
File path: sshd-common/src/main/java/org/apache/sshd/common/signature/SignatureRSA.java
##########
@@ -52,8 +52,21 @@
 
     private int verifierSignatureSize = -1;
 
+    private final String sshAlgorithmName;
+
     protected SignatureRSA(String algorithm) {
+        this(algorithm, null);

Review comment:
       Since you are using `ValidateUtils.checkNotNullAndNotEmpty` this constructor is invalid since whoever uses it will get an exception.

##########
File path: sshd-common/src/main/java/org/apache/sshd/common/signature/SignatureRSA.java
##########
@@ -52,8 +52,21 @@
 
     private int verifierSignatureSize = -1;
 
+    private final String sshAlgorithmName;
+
     protected SignatureRSA(String algorithm) {
+        this(algorithm, null);

Review comment:
       Since you are using `ValidateUtils.checkNotNullAndNotEmpty` this constructor is invalid since whoever uses it will get an exception.

##########
File path: sshd-common/src/main/java/org/apache/sshd/common/signature/SignatureRSA.java
##########
@@ -52,8 +52,21 @@
 
     private int verifierSignatureSize = -1;
 
+    private final String sshAlgorithmName;
+
     protected SignatureRSA(String algorithm) {
+        this(algorithm, null);

Review comment:
       Since you are using `ValidateUtils.checkNotNullAndNotEmpty` this constructor is invalid since whoever uses it will get an exception.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org


[GitHub] [mina-sshd] lgoldstein commented on pull request #164: [SSHD-1053] Fix signature string for openssh certificate host key algorithms

Posted by GitBox <gi...@apache.org>.
lgoldstein commented on pull request #164:
URL: https://github.com/apache/mina-sshd/pull/164#issuecomment-690908807


   Great - I will create a branch with it, run some tests and ask Feng to try it out. Thx for the patch.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org


[GitHub] [mina-sshd] lgoldstein commented on pull request #164: [SSHD-1053] Fix signature string for openssh certificate host key algorithms

Posted by GitBox <gi...@apache.org>.
lgoldstein commented on pull request #164:
URL: https://github.com/apache/mina-sshd/pull/164#issuecomment-690908807






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org


[GitHub] [mina-sshd] lgoldstein commented on a change in pull request #164: [SSHD-1053] Fix signature string for openssh certificate host key algorithms

Posted by GitBox <gi...@apache.org>.
lgoldstein commented on a change in pull request #164:
URL: https://github.com/apache/mina-sshd/pull/164#discussion_r486801409



##########
File path: sshd-common/src/main/java/org/apache/sshd/common/signature/SignatureRSA.java
##########
@@ -52,8 +52,21 @@
 
     private int verifierSignatureSize = -1;
 
+    private final String sshAlgorithmName;
+
     protected SignatureRSA(String algorithm) {
+        this(algorithm, null);

Review comment:
       Since you are using `ValidateUtils.checkNotNullAndNotEmpty` this constructor is invalid since whoever uses it will get an exception.

##########
File path: sshd-common/src/main/java/org/apache/sshd/common/signature/SignatureRSA.java
##########
@@ -52,8 +52,21 @@
 
     private int verifierSignatureSize = -1;
 
+    private final String sshAlgorithmName;
+
     protected SignatureRSA(String algorithm) {
+        this(algorithm, null);

Review comment:
       Since you are using `ValidateUtils.checkNotNullAndNotEmpty` this constructor is invalid since whoever uses it will get an exception.

##########
File path: sshd-common/src/main/java/org/apache/sshd/common/signature/SignatureRSA.java
##########
@@ -52,8 +52,21 @@
 
     private int verifierSignatureSize = -1;
 
+    private final String sshAlgorithmName;
+
     protected SignatureRSA(String algorithm) {
+        this(algorithm, null);

Review comment:
       Since you are using `ValidateUtils.checkNotNullAndNotEmpty` this constructor is invalid since whoever uses it will get an exception.

##########
File path: sshd-common/src/main/java/org/apache/sshd/common/signature/SignatureRSA.java
##########
@@ -52,8 +52,21 @@
 
     private int verifierSignatureSize = -1;
 
+    private final String sshAlgorithmName;
+
     protected SignatureRSA(String algorithm) {
+        this(algorithm, null);

Review comment:
       Since you are using `ValidateUtils.checkNotNullAndNotEmpty` this constructor is invalid since whoever uses it will get an exception.

##########
File path: sshd-common/src/main/java/org/apache/sshd/common/signature/SignatureRSA.java
##########
@@ -52,8 +52,21 @@
 
     private int verifierSignatureSize = -1;
 
+    private final String sshAlgorithmName;
+
     protected SignatureRSA(String algorithm) {
+        this(algorithm, null);

Review comment:
       Since you are using `ValidateUtils.checkNotNullAndNotEmpty` this constructor is invalid since whoever uses it will get an exception.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org