Bug 453735 - When using cert9 (SQLite3) DB, set or change master password fails
r=wtc sr=nelson git-svn-id: svn://10.0.0.236/trunk@256932 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
7df6c971b8
commit
a416798509
@ -686,6 +686,16 @@ sftkdb_HasPasswordSet(SFTKDBHandle *keydb)
|
||||
value.data = valueData;
|
||||
value.len = sizeof(valueData);
|
||||
crv = (*db->sdb_GetMetaData)(db, "password", &salt, &value);
|
||||
|
||||
/* If no password is set, we can update right away */
|
||||
if (((keydb->db->sdb_flags & SDB_RDONLY) == 0) && keydb->update
|
||||
&& crv != CKR_OK) {
|
||||
/* update the peer certdb if it exists */
|
||||
if (keydb->peerDB) {
|
||||
sftkdb_Update(keydb->peerDB, NULL);
|
||||
}
|
||||
sftkdb_Update(keydb, NULL);
|
||||
}
|
||||
return (crv == CKR_OK) ? SECSuccess : SECFailure;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user