File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -1348,23 +1348,22 @@ private static String ddGetEnv(final String sysProp) {
13481348 }
13491349
13501350 private static boolean okHttpMayIndirectlyLoadJUL () {
1351- if (isIBMSASLInstalled () || isACCPInstalled ()) {
1352- return true ; // 'IBMSASL' and 'ACCP' crypto providers can load JUL when OkHttp accesses TLS
1351+ if (isCustomSecurityProviderInstalled () || isIBMSASLInstalled ()) {
1352+ return true ; // custom security providers may load JUL when OkHttp accesses TLS
13531353 }
13541354 if (isJavaVersionAtLeast (9 )) {
13551355 return false ; // JDKs since 9 have reworked JFR to use a different logging facility, not JUL
13561356 }
13571357 return isJFRSupported (); // assume OkHttp will indirectly load JUL via its JFR events
13581358 }
13591359
1360- private static boolean isIBMSASLInstalled () {
1361- return ClassLoader .getSystemResource ("com/ibm/ security/sasl/IBMSASL.class " ) != null ;
1360+ private static boolean isCustomSecurityProviderInstalled () {
1361+ return ClassLoader .getSystemResource ("META-INF/services/java. security.Provider " ) != null ;
13621362 }
13631363
1364- private static boolean isACCPInstalled () {
1365- return ClassLoader .getSystemResource (
1366- "com/amazon/corretto/crypto/provider/AmazonCorrettoCryptoProvider.class" )
1367- != null ;
1364+ private static boolean isIBMSASLInstalled () {
1365+ // need explicit check as this is installed without using the service-loader mechanism
1366+ return ClassLoader .getSystemResource ("com/ibm/security/sasl/IBMSASL.class" ) != null ;
13681367 }
13691368
13701369 private static boolean isJFRSupported () {
You can’t perform that action at this time.
0 commit comments