Skip to content

Commit

Permalink
[WFSSL-83] add warn log when no SSL lib is found.
Browse files Browse the repository at this point in the history
  • Loading branch information
baranowb committed Oct 21, 2024
1 parent cbb5455 commit f1bf47e
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions java/src/main/java/org/wildfly/openssl/SSL.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
Expand Down Expand Up @@ -186,10 +187,18 @@ static void init() {
}
}
if (sslPath == null) {
throw new RuntimeException(Messages.MESSAGES.couldNotFindLibSSL(ORG_WILDFLY_OPENSSL_PATH, attemptedSSL.toString()));
final String warningMessage = Messages.MESSAGES.couldNotFindLibSSL(ORG_WILDFLY_OPENSSL_PATH, attemptedSSL.toString());
if(logger.isLoggable(Level.WARNING)) {
logger.warning(warningMessage);
}
throw new RuntimeException(warningMessage);
}
if (cryptoPath == null) {
throw new RuntimeException(Messages.MESSAGES.couldNotFindLibCrypto(ORG_WILDFLY_OPENSSL_PATH, attemptedCrypto.toString()));
final String warningMessage = Messages.MESSAGES.couldNotFindLibCrypto(ORG_WILDFLY_OPENSSL_PATH, attemptedCrypto.toString());
if(logger.isLoggable(Level.WARNING)) {
logger.warning(warningMessage);
}
throw new RuntimeException(warningMessage);
}
instance.initialize(cryptoPath, sslPath);
String version = instance.version();
Expand Down

0 comments on commit f1bf47e

Please sign in to comment.