Skip to content
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

JCE cannot authenticate the provider BC #232

Closed
romanstrobl opened this issue Jan 21, 2022 · 10 comments
Closed

JCE cannot authenticate the provider BC #232

romanstrobl opened this issue Jan 21, 2022 · 10 comments
Assignees

Comments

@romanstrobl
Copy link
Member

The following error occurs on Java 17 when using the BC provider from fat jar:

JCE cannot authenticate the provider BC

java.security.NoSuchProviderException: JCE cannot authenticate the provider BC
	at java.base/javax.crypto.JceSecurity.getInstance(JceSecurity.java:131)
	at java.base/javax.crypto.KeyAgreement.getInstance(KeyAgreement.java:240)

The error seems to be caused by following issue in Spring Boot: spring-projects/spring-boot#28837

@romanstrobl romanstrobl self-assigned this Jan 21, 2022
@evgenyigumnov
Copy link

Hi, how do you plan to fix this bug?

@romanstrobl
Copy link
Member Author

We plan to wait for Spring Boot project to fix the bug. The workaround is to use Java 15 or older.

@evgenyigumnov
Copy link

I have the same plan :) But this bug reproduced from 12 to 17 java. As result I have to use 11 java

@romanstrobl
Copy link
Member Author

The fixing effort moved to: spring-projects/spring-boot#32106

@romanstrobl
Copy link
Member Author

The issue seems to be fixed after migrating to Spring Boot 3, we can close this issue.

@romanstrobl
Copy link
Member Author

Reopening issue, it is still present with recent versions of Java 17 and Spring Boot 3.1.3.

@banterCZ
Copy link
Member

It seems to me, that it is an issue only in Oracle Java. I was able to reproduce it using

java version "21" 2023-09-19 LTS
Java(TM) SE Runtime Environment (build 21+35-LTS-2513)
Java HotSpot(TM) 64-Bit Server VM (build 21+35-LTS-2513, mixed mode, sharing)

But not with

openjdk version "17.0.8.1" 2023-08-24
OpenJDK Runtime Environment Homebrew (build 17.0.8.1+0)
OpenJDK 64-Bit Server VM Homebrew (build 17.0.8.1+0, mixed mode, sharing)

This is in accordance with Wilkinsona's statement spring-projects/spring-boot#28837 (comment)

@SubhiSingh
Copy link

This bouncycastly signed jar issue has been resolved in java 17.0.10.
https://www.oracle.com/java/technologies/javase/17-0-10-relnotes.html

@petrdvorak
Copy link
Member

Thank you, @SubhiSingh - we can retest and if everything is OK, close the issue.

@romanstrobl
Copy link
Member Author

We can close the issue, I was not able to reproduce it on Java 17.0.10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants