-
Notifications
You must be signed in to change notification settings - Fork 550
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
[Core] Remove call to setkeySize in KeyProvider18 #967
Conversation
@@ -151,7 +151,6 @@ private void initializeRSAKeyFromKeyStore(Context context, | |||
.setSerialNumber(BigInteger.TEN) | |||
.setStartDate(start.getTime()) | |||
.setEndDate(end.getTime()) | |||
.setKeySize(RSA_KEY_SIZE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The RSA_KEY_SIZE constant definition should also be removed. Potentially update the javadoc regarding the key size and how the default is used. Did we rule out splitting KeyProvider18 into 18 and 19?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the constant and updated the Javadoc. Since the default key size is 2048 bits, I recommend to not invoke the method and keep the implementation the same for 18-22.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. The default size will not be lowered in the future.
0967000
to
235bfb6
Compare
…ng key-pair for KeyProvider18'
510b615
to
b101c43
Compare
b101c43
to
78f9ebd
Compare
78f9ebd
to
7f31921
Compare
Issue #, if available:
#964
Description of changes:
setKeySize
is not available in API Level 18. The default key size used by RSA inKeyPairGeneratorSpec
is 2048 when not specified. This change will use the default of 2048 in all API levels (18-22).Added build automation for verifying if the fix works for API 18-22.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.