Repository navigation
Replies: 2 comments 1 reply
|
The warning occurs because To resolve this, remove the |
|
That thread only gets started if The reason it leaks is that BC keeps the thread in a private static and there's no API to shut it down (DRBG.java). If you do need that property for some reason, you can stop the thread yourself when the app is undeployed. It exits cleanly when interrupted: @WebListener
public class BcEntropyShutdown implements ServletContextListener {
@Override
public void contextDestroyed(ServletContextEvent sce) {
for (Thread t : Thread.getAllStackTraces().keySet()) {
if ("BC Entropy Daemon".equals(t.getName())) {
t.interrupt();
}
}
}
}I tried it with bcprov 1.87 on Java 21. Without the property there's no daemon thread at all, with it the thread shows up, and after Moving bcprov to Tomcat's |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
When I deploy a war file, with bcprov packaged inside it, tomcat logs a resource leakage warning:
Can someone explain what the issue is and how to avoid it?
BouncyCastle version used
LTS 2.73.13
All reactions