Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Unified Diff: chrome/browser/resources/cryptotoken/usbenrollhandler.js

Issue 596083002: Update cryptotoken to 0.8.63 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove a deprecated line Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/cryptotoken/usbenrollhandler.js
diff --git a/chrome/browser/resources/cryptotoken/usbenrollhandler.js b/chrome/browser/resources/cryptotoken/usbenrollhandler.js
index d6ca0ef49c99b9fa0e1b00473ddcd4f4646e3b13..55f5d06586c3dd22e766760a43b45d5199188108 100644
--- a/chrome/browser/resources/cryptotoken/usbenrollhandler.js
+++ b/chrome/browser/resources/cryptotoken/usbenrollhandler.js
@@ -98,7 +98,8 @@ UsbEnrollHandler.prototype.signerFoundGnubby_ =
// caller, as the gnubby is already enrolled. Map ok to WRONG_DATA, so the
// caller knows what to do.
this.notifyError_(DeviceStatusCodes.WRONG_DATA_STATUS);
- } else if (signResult.code == DeviceStatusCodes.WRONG_DATA_STATUS) {
+ } else if (signResult.code == DeviceStatusCodes.WRONG_DATA_STATUS ||
+ signResult.code == DeviceStatusCodes.WRONG_LENGTH_STATUS) {
var gnubby = signResult['gnubby'];
// A valid helper request contains at least one enroll challenge, so use
// the app id hash from the first challenge.
@@ -206,10 +207,13 @@ UsbEnrollHandler.prototype.tryEnroll_ = function(gnubby, version) {
this.removeWrongVersionGnubby_(gnubby);
return;
}
- var challengeChallenge = B64_decode(challenge['challenge']);
- var appIdHash = B64_decode(challenge['appIdHash']);
- gnubby.enroll(challengeChallenge, appIdHash,
- this.enrollCallback_.bind(this, gnubby, version));
+ var challengeValue = B64_decode(challenge['challengeHash']);
+ var appIdHash = challenge['appIdHash'];
+ var individualAttest =
+ DEVICE_FACTORY_REGISTRY.getIndividualAttestation().
+ requestIndividualAttestation(appIdHash);
+ gnubby.enroll(challengeValue, B64_decode(appIdHash),
+ this.enrollCallback_.bind(this, gnubby, version), individualAttest);
};
/**
« no previous file with comments | « chrome/browser/resources/cryptotoken/textfetcher.js ('k') | chrome/browser/resources/cryptotoken/usbgnubbydevice.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698