summaryrefslogtreecommitdiff
path: root/security/nss/lib/softoken/pcertdb.c
diff options
context:
space:
mode:
authorian.mcgreer%sun.com <devnull@localhost>2002-01-17 00:20:53 +0000
committerian.mcgreer%sun.com <devnull@localhost>2002-01-17 00:20:53 +0000
commitd9382e624e0c8a1b9f9a05dbb433b8dbd13bd811 (patch)
tree147db60c44b2f66fafb8c86e625a5b6eebb093b2 /security/nss/lib/softoken/pcertdb.c
parent5491f9833e11a7cb9ead69ee4c2cb5bde220ee50 (diff)
downloadnss-hg-d9382e624e0c8a1b9f9a05dbb433b8dbd13bd811.tar.gz
more backwards compatibility fixes
* always send DER of serial number to PKCS#11 queries * in softoken, construct key for certificate using decoded serial number with (possibly) a leading zero, for compatibility with version 7 db * in softoken, decode serial number *without* removing leading zero for searches
Diffstat (limited to 'security/nss/lib/softoken/pcertdb.c')
-rw-r--r--security/nss/lib/softoken/pcertdb.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/security/nss/lib/softoken/pcertdb.c b/security/nss/lib/softoken/pcertdb.c
index 80972ab88..a81247031 100644
--- a/security/nss/lib/softoken/pcertdb.c
+++ b/security/nss/lib/softoken/pcertdb.c
@@ -4162,11 +4162,9 @@ nsslowcert_FindCertByIssuerAndSN(NSSLOWCERTCertDBHandle *handle, NSSLOWCERTIssue
}
}
}
- while (sn->data[index] == 0) {
- index++;
- data_len--;
- data_left--;
- }
+ /* XXX leaving any leading zeros on the serial number for backwards
+ * compatibility
+ */
/* not a valid der, must be just an unlucky serial number value */
if (data_len != data_left) {
data_len = sn->len;