Keystore 2.0: Implement legacy blob support.

This CL implements on-demand migration of legacy key blobs into
the Keystore 2.0.

This CL has joined authorship by
hasinigt@google.com and jdanis@google.com

Test: keystore2_test
      CTS Test.
      And manual test with key upgrade app.
Change-Id: I0a1f266c12f06cc2e196692d759dedf48b4d347a
diff --git a/keystore2/src/user_manager.rs b/keystore2/src/user_manager.rs
index 9ee6727..8b7aad9 100644
--- a/keystore2/src/user_manager.rs
+++ b/keystore2/src/user_manager.rs
@@ -16,7 +16,7 @@
 
 use crate::error::map_or_log_err;
 use crate::error::Error as KeystoreError;
-use crate::globals::{DB, SUPER_KEY};
+use crate::globals::{DB, LEGACY_MIGRATOR, SUPER_KEY};
 use crate::permission::KeystorePerm;
 use crate::super_key::UserState;
 use crate::utils::check_keystore_permission;
@@ -50,6 +50,7 @@
             .with(|db| {
                 UserState::get_with_password_changed(
                     &mut db.borrow_mut(),
+                    &LEGACY_MIGRATOR,
                     &SUPER_KEY,
                     user_id as u32,
                     password,