-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
HADOOP-13694. Add support for AES-192 in OpensslCipher. #135
base: trunk
Are you sure you want to change the base?
Conversation
QwertyManiac
commented
Oct 6, 2016
- Adds equivalent support for 192-bit AES/CTR/NoPadding codec in the OpensslCipher
- Adds test-cases to cover 192-bit (24-bytes) and 256-bit (32-bytes) keys to both JCE and OpenSSL crypto tests
- Enhances the error message when an invalid Key or IV size is passed into OpensslCipher
4e08baf
to
952bf94
Compare
952bf94
to
82cdd6a
Compare
if (asprintf(&keyLenErrMsg, "Invalid key length: %d bytes", jKeyLen) < 0) { | ||
THROW(env, "java/lang/IllegalArgumentException", "Invalid key length"); | ||
} else { | ||
THROW(env, "java/lang/IllegalArgumentException", keyLenErrMsg); |
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.
You need to free keyLenErrMsg
here.
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.
Thank you for the review! Done in the new commit.
if (asprintf(&ivLenErrMsg, "Invalid iv length: %d bytes", jIvLen) < 0) { | ||
THROW(env, "java/lang/IllegalArgumentException", "Invalid iv length."); | ||
} else { | ||
THROW(env, "java/lang/IllegalArgumentException", ivLenErrMsg); |
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.
Same here -- you need to free ivLenErrMsg
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.
Thank you for the review! Done in the new commit.
- Added missing free calls to the messages generated, after the throw
Clean up the LocalApplicationRunner based on the further feedback. The changes include the following: 1. Remove the processorId from the JobCoordinatorFactory/JobCoordinator interfaces 2. LocalApplicationRunner.run() is non-blocking. Add LocalApplicationRunner.waitForFinish() for blocking for completion 3. Remove the config for CooridnatorServiceFactory, and now the CoordinatorService is created based on the type of JobCoordinator. 4. Clean up the StreamProcessor life cycle listener logic inside LocalApplicationRunner. Author: Xinyu Liu <[email protected]> Reviewers: Navina Ramesh <[email protected]> Closes apache#135 from xinyuiscool/SAMZA-1222