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

CRYPTO-162 openSslCipher support engine. #165

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

wenwj0
Copy link

@wenwj0 wenwj0 commented Jun 14, 2022

No description provided.

Copy link
Member

@garydgregory garydgregory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wenwj0
Thank you for the PR. See the scattered comments.
-1 until this PR has tests to cover all the new code.

@@ -378,4 +378,7 @@ protected void finalize() throws Throwable {
clean();
}

public void engineSetDefaultCiphers(String engineId){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing Javadoc, fix formatting.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@@ -60,6 +60,11 @@ public OpenSslCipher(final Properties props, final String transformation) // NOP
}

openSslEngine = OpenSsl.getInstance(transformation);

String engineId = props.getProperty(CryptoCipherFactory.CIPHER_ENGINE_KEY);
if(engineId != null && !engineId.isEmpty()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix formatting.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@wenwj0
Copy link
Author

wenwj0 commented Jun 24, 2022

This PR is a wrapper over OpenSSL, but If we want to test it, we need to install a specific engine. In my case, i installed kae engine and it worked. But I have no idea that which engine should i choose in the unit test.
Do you hava any idea?

@markwkern
Copy link

You could use the Intel rdrand engine in the unit test. It's always available in OpenSSL for machines of the Ivy Bridge or later generation.
% openssl engine -v
(rdrand) Intel RDRAND engine

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