~ubuntu-branches/ubuntu/raring/nss/raring-security

« back to all changes in this revision

Viewing changes to mozilla/security/nss/lib/softoken/sftkpwd.c

  • Committer: Bazaar Package Importer
  • Author(s): Chris Coulson
  • Date: 2010-03-25 13:46:06 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20100325134606-bl6liuok2w9l7snv
Tags: 3.12.6-0ubuntu1
* New upstream release 3.12.6 RTM (NSS_3_12_6_RTM)
  - fixes CVE-2009-3555 aka US-CERT VU#120541
* Adjust patches to changed upstream code base
  - update debian/patches/38_kbsd.patch
  - update debian/patches/38_mips64_build.patch
  - update debian/patches/85_security_load.patch
* Remove patches that are merged upstream
  - delete debian/patches/91_nonexec_stack.patch
  - update debian/patches/series
* Bump nspr dependency to 4.8
  - update debian/control
* Add new symbols for 3.12.6
  - update debian/libnss3-1d.symbols

Show diffs side-by-side

added added

removed removed

Lines of Context:
610
610
{
611
611
    SECItem *key = NULL;
612
612
 
 
613
    /* don't have one */
 
614
    if (!handle) {
 
615
        return;
 
616
    }
 
617
 
613
618
    /* if we're a cert db, we don't have one */
614
619
    if (handle->type == SFTK_CERTDB_TYPE) {
615
620
        return;
616
621
    }
617
622
 
618
 
    /* don't have one */
619
 
    if (!handle) {
620
 
        return;
621
 
    }
622
 
 
623
623
    PZ_Lock(handle->passwordLock);
624
624
    if (handle->updatePasswordKey) {
625
625
        key = handle->updatePasswordKey;
686
686
    value.data = valueData;
687
687
    value.len = sizeof(valueData);
688
688
    crv = (*db->sdb_GetMetaData)(db, "password", &salt, &value);
 
689
 
 
690
    /* If no password is set, we can update right away */
 
691
    if (((keydb->db->sdb_flags & SDB_RDONLY) == 0) && keydb->update 
 
692
        && crv != CKR_OK) {
 
693
        /* update the peer certdb if it exists */
 
694
        if (keydb->peerDB) {
 
695
            sftkdb_Update(keydb->peerDB, NULL);
 
696
        }
 
697
        sftkdb_Update(keydb, NULL);
 
698
    }
689
699
    return (crv == CKR_OK) ? SECSuccess : SECFailure;
690
700
}
691
701