From: Kent Y. <shp...@gm...> - 2011-07-08 21:06:47
|
Sorry for the ongoing review Stefan, > +++ tpm-tools/src/tpm_mgmt/tpm_nvdefine.c [cut] > + > + if (ownerpass || ownerWellKnown) { > + if (policyGet(hTpm, &hTpmPolicy) != TSS_SUCCESS) > + goto out_close; > + if (ownerpass) { > + if (opswd_len < 0) > + opswd_len = strlen(ownerpass); > + if (policySetSecret(hTpmPolicy, opswd_len, > + (BYTE *)ownerpass) != TSS_SUCCESS) > + goto out_close; > + } else { > + if (policySetSecret(hTpmPolicy, TCPA_SHA1_160_HASH_LEN, > + (BYTE *)well_known_secret) != TSS_SUCCESS) > + goto out_close; > + } > + } Since ownerauth is required for define space we should throw an error here. > + > + if (askDataPass) { > + datapass = _GETPASSWD(_("Enter NVRAM data password: "), &dpswd_len, > + FALSE, useUnicode ); Let's set confirm to TRUE here, so that the user doesn't accidentally enter a bad password. Kent |