jpn-e opened a new issue, #364: URL: https://github.com/apache/mina-sshd/issues/364
### Version 2.10.0-SNAPSHOT ### Bug description I'm facing problems using LocalAgentFactory when the other side sends a signing request requesting rsa-sha2-256 as signature algorithm. ### Actual behavior It appears the agent responds as if the request was for ssh-rsa even though rsa-sha2-256 was requested. ### Expected behavior The response should be signed as rsa-sha2-256 ### Relevant log output _No response_ ### Other information Trying to narrow down the problem I believe it may be in sshd-core/src/main/java/org/apache/sshd/agent/common/AbstractAgentClient.java. In handling [SshAgentConstants.SSH2_AGENTC_SIGN_REQUEST](https://github.com/apache/mina-sshd/blob/master/sshd-core/src/main/java/org/apache/sshd/agent/common/AbstractAgentClient.java#L121) the flags value is extracted from the request but never used, I believe that the flags should be considered when setting keyType. I see that [AbstractAgentProxy.sign(...)](https://github.com/apache/mina-sshd/blob/master/sshd-core/src/main/java/org/apache/sshd/agent/common/AbstractAgentProxy.java#L138) sets flags to 2 for signatureAlgorithm KeyUtils.RSA_SHA256_KEY_TYPE_ALIAS. I expected the opposite needs to be done in AbstractAgentClient, that keyType should be set to RSA_SHA256_KEY_TYPE_ALIAS when the key type is RSA and flags 2. -- 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. To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org