-
Notifications
You must be signed in to change notification settings - Fork 603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
net.schmizz.sshj.common.SSHRuntimeException: no such algorithm: X25519 for provider BC #895
Comments
@leefine Can you provide the version of Bouncy Castle you are using? The X25519 algorithm should be supported since version 1.61 of Bouncy Castle. |
Didn't help |
@devaskim and @leefine, please provide more details on the runtime dependency configuration and Java version if you would like to receive additional help on this issue. The specific Java version and Bouncy Castle version, as well as the stack trace associated with the error, are necessary to track down the problem. |
@exceptionfactory Thanks for your time. |
@exceptionfactory Forgot to mention. Our application has a lot of dependencies and BC is common for part of them (now we use 1.60 version). When I add the latest version of sshj (0.36), I got |
Thanks for the additional details @devaskim. If you could provide the details of the class signature error, that would be helpful. The latest version of the Bouncy Castle Provider library is 1.76, and I recommend using that version. However, it sounds like Bouncy Castle could be a transitive or platform dependency. Is this running in the context of a web application container? Either way, the stack trace details would be helpful. I recommend evaluating the deployed JAR files to ensure the expected version. |
I got the same problem:
BC 1.75, which is used by sshj 0.36:
mention this in the release notehttps://www.[bouncycastle.org](https://www.bouncycastle.org/releasenotes.html#r1rv75)/releasenotes.html#r1rv75s: |
Thanks for the note and stack trace @hfhbd. The |
It is a Gradle plugin using an isolated classloader (Worker api) and these dependencies:
It does work with 0.35.0 though. |
SSHJ Pull Request #838 replaced a custom class with the standard As mentioned, the Reviewing the Gradle 8.3 dependencies, it packages an older version of Bouncy Castle 1.68:
At runtime, Gradle apparently registers the older version of the Bouncy Castle Provider, but the custom plugin seems to be conflicting. Based on Gradle including Bouncy Castle, one potential solution is to mark the |
I had the "classic" cause for this; another dependency which had transitive dependency to BC 1.60. Fixed by excluding the old version. |
when i use sftp transfer the file ,the lib give me this error:
net.schmizz.sshj.common.SSHRuntimeException: no such algorithm: X25519 for provider BC
The text was updated successfully, but these errors were encountered: