Home | History | Annotate | Download | only in authsecret

Lines Matching defs:password

38 /** The digest is the first 4 bytes of the sha1 of the password */
39 uint32_t CalculatePasswordDigest(const nugget_app_password& password) {
43 SHA1_Update(&c, &password.password, NUGGET_UPDATE_PASSWORD_LEN);
52 * Derive the update password from the secret:
55 * Password must point to NUGGET_UPDATE_PASSWORD_LEN bytes.
57 * The password is derived in case the secret needs to be used for another
62 nugget_app_password password;
65 "Hash output does not match update password length");
71 SHA256_Final(password.password, &c);
72 password.digest = CalculatePasswordDigest(password);
73 return password;
77 * The first time this is called, Citadel won't have its update password set so
78 * always try and enroll it. If the update password is already set, this will
82 const nugget_app_password& password) {
87 msg->new_password = password;
88 // Default password is uninitialized flash i.e. all 0xff
89 memset(&msg->old_password.password, 0xff, NUGGET_UPDATE_PASSWORD_LEN);
96 LOG(VERBOSE) << "Citadel update password already installed";
100 LOG(ERROR) << "Citadel change update password failed: "
105 LOG(INFO) << "Citadel update password installed";
119 * Try to enable a Citadel update with the update password. If this fails,
122 void TryEnablingCitadelUpdate(NuggetClientInterface& client, const nugget_app_password& password) {
127 msg->password = password;
133 LOG(ERROR) << "Incorrect Citadel update password";
145 LOG(INFO) << "Update password enabled a new image; rebooting Citadel";
160 const nugget_app_password password = DeriveCitadelUpdatePassword(secret);
161 TryEnrollCitadelUpdatePassword(_client, password);
162 TryEnablingCitadelUpdate(_client, password);