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

JNI/JSSE: detect RSA_MIN_SIZE in tests, add Rsa.RSA_MIN_SIZE helper #77

Merged
merged 2 commits into from
Sep 24, 2024

Conversation

cconlon
Copy link
Member

@cconlon cconlon commented Sep 18, 2024

This PR detects the native RSA_MIN_SIZE value for use in JUnit tests. It also adds a static helper variable to com.wolfssl.wolfcrypt.Rsa called RSA_MIN_SIZE to easily use that value from Java.

This should fix failing Jenkins test: nightly-wolfcrypt-jni-ant-test-v2, which started failing after wolfSSL/wolfssl#7923 was merged.

Copy link
Contributor

@JacobBarthelmeh JacobBarthelmeh left a comment

Choose a reason for hiding this comment

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

The code change looks good. Will a github actions test be added for building with smaller RSA key sizes supported (https://github.com/wolfSSL/wolfcrypt-jni/blob/master/.github/workflows/main.yml#L114) or will the test get added to internal Jenkins?

EDIT: To clarify, a test of hitting the smaller key sizes logic. Setting RSA_MIN_SIZE to something like the previous 512 bit size.

@cconlon
Copy link
Member Author

cconlon commented Sep 24, 2024

@JacobBarthelmeh Great suggestion, I just added two GitHub Action tests (Ubuntu and OSX) that will build wolfcrypt-jni and run ant test using the wolfSSL configure --enable-jni CFLAGS="-DRSA_MIN_SIZE=1024".

Last successful runs of those on this PR are here:
https://github.com/wolfSSL/wolfcrypt-jni/actions/runs/11003415173/job/30593780628?pr=77
https://github.com/wolfSSL/wolfcrypt-jni/actions/runs/11003415173/job/30593779725?pr=77

@cconlon cconlon assigned JacobBarthelmeh and unassigned cconlon Sep 24, 2024
@JacobBarthelmeh JacobBarthelmeh merged commit bd9c895 into wolfSSL:master Sep 24, 2024
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants