You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I start the server with a CA certificate which uses an RSA public key certificate, the code produces the exception:
java.security.cert.CertificateException: X.509 algorithm is not supported, Only EC algorithm is supported
The code looks like this, from org.eclipse.leshan.core.util.SecurityUtil:
// we support only EC algorithmif (!"EC".equals(certificate.getPublicKey().getAlgorithm())) {
thrownewCertificateException(String.format(
"%s algorithm is not supported, Only EC algorithm is supported", certificate.getType()));
// ^^^^^^^^^^^^^^^^^^^^^
}
I believe this (and similar code nearby in the same file) should instead be:
// we support only EC algorithmif (!"EC".equals(certificate.getPublicKey().getAlgorithm())) {
thrownewCertificateException(String.format(
"%s algorithm is not supported, Only EC algorithm is supported", certificate.getPublicKey().getAlgorithm()));
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
}
How to reproduce
Create a CA certificate with an unsupported algorithm (mine looks like this):
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
<redacted>
Signature Algorithm: sha256WithRSAEncryption
Issuer: CN = <redacted>
Validity
Not Before: May 29 07:17:02 2020 GMT
Not After : May 30 03:17:32 2023 GMT
Subject: CN = <redacted>
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
RSA Public-Key: (2048 bit)
And try to use that with Leshan.
Relevant Output
No response
The text was updated successfully, but these errors were encountered:
Version(s)
v1.4.2 and v2.0.0-M10
Which components
leshan-core
Tested With
No response
What happened
When I start the server with a CA certificate which uses an RSA public key certificate, the code produces the exception:
The code looks like this, from org.eclipse.leshan.core.util.SecurityUtil:
I believe this (and similar code nearby in the same file) should instead be:
How to reproduce
Create a CA certificate with an unsupported algorithm (mine looks like this):
And try to use that with Leshan.
Relevant Output
No response
The text was updated successfully, but these errors were encountered: