-
Notifications
You must be signed in to change notification settings - Fork 59
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
Added support for NIAPSEC updates #3
base: master
Are you sure you want to change the base?
Conversation
…hout biometric hardware.
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.
Just some minor nits. Otherwise, LGTM.
@Override | ||
public void onMessage(String message) { | ||
showMessage(message); | ||
} | ||
}; | ||
dataManager = new EncryptionManager(getApplicationContext(), biometricSupport); | ||
dataManager = new EncryptionManager(getApplicationContext(), |
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.
Move first arg to separate line to match other args.
@@ -147,7 +146,8 @@ private void createKeys(String fileName) { | |||
asymmetricKeyPairAlias, | |||
testDataString.getBytes(), | |||
(byte[] encryptedData) -> { | |||
SecureCipher secureCipher = SecureCipher.getDefault(biometricSupport); | |||
SecureCipher secureCipher = SecureCipher.getDefault( |
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.
Can this be one line? If not, leave as is.
|
||
public EncryptionManager(Context context, BiometricSupport biometricSupport) { | ||
public EncryptionManager(Context context, |
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.
Can you move this to new line? Arguments below don't look like they follow right spacing?
.then(sdpFailureTestWorker) | ||
.enqueue(); | ||
OneTimeWorkRequest sdpTestWorker; | ||
if(useDeviceCredentialCheckBox.isChecked()) { |
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.
space after if to follow guidelines
|
||
WorkContinuation workContinuation = | ||
WorkManager.getInstance(getApplicationContext()).beginWith(sdpTestWorker); | ||
if(testNoAuthCheckBox.isChecked()) { |
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.
space after if to follow guidelines
|
||
@Override | ||
public void onAuthenticationFailed() { | ||
TestUtil.logFailure(getClass(), |
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.
put argument one on new line
@Override | ||
public void onAuthenticationSucceeded() { | ||
TestUtil.logSuccess(getClass(), "SDP Device Credential Unlock " + | ||
"Succeeded, private key available for decryption through the " + |
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.
Is this indentation right? Makes it seems like an argument even though it is a continuation of argument 2... what happens on AS when you hit enter?
If that default, then ignore this comment.
public void onAuthenticationFailed() { | ||
TestUtil.logFailure(getClass(), | ||
"SDP Device Credential Unlock failed, " + | ||
"file not available for decryption."); |
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.
As noted earlier, just check indentation... ignore this comment if correct.
SecureConfig.getStrongDeviceCredentialConfig(biometricSupport); | ||
secureConfig.setDebugLoggingEnabled(true); | ||
SecureKeyGenerator keyGenerator = SecureKeyGenerator.getInstance(secureConfig); | ||
TestUtil.logSuccess(getClass(), "Generated RSA with provider AndroidKeyStore.", |
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.
Put all arguments on new lines for better readability.
} else { | ||
TestUtil.logFailure(getClass(), "Decryption failed"); | ||
} | ||
|
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.
Remove this extra line.
… no copies of keys are made across threads.
…e code path with no lambdas or callbacks involved.
Hi Jon, Let me know when you have a chance to address comments and I will look again. Looks like there are some other parts coming in for PR, but I don't think you want me to review yet. I could be wrong. Let me know if I am. :D |
Added the ability to test devices without biometric hardware.