commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xianda Ke (JIRA)" <>
Subject [jira] [Commented] (CRYPTO-108) OpenSSL does not handle Native code loading failure
Date Wed, 06 Jul 2016 07:31:11 GMT


Xianda Ke commented on CRYPTO-108:

Currently, OpenSSL doesn't throw exception. the native is loaded in a static block.
Class initializers are executed in the order they are defined, if we throw exception when
loading native in the static block. we are trying to use a class that is in an erroneous state.

if any loading failure, will handle it and throw an exception.
OpenSslCipher(Properties props, String transformation) {
        String loadingFailureReason = OpenSsl.getLoadingFailureReason();
        if (loadingFailureReason != null) {
            throw new RuntimeException(loadingFailureReason);

> OpenSSL does not handle Native code loading failure
> ---------------------------------------------------
>                 Key: CRYPTO-108
>                 URL:
>             Project: Commons Crypto
>          Issue Type: Bug
>            Reporter: Sebb
> OpenSSL fails to check if the Native code was loaded successfully before creating an
> This just defers the inevitable failure; it would be better to throw an error immediately.
> Also the code should provide the details of the load faiure

This message was sent by Atlassian JIRA

View raw message