CERT_FindCertByIssuerAndSN doesn't work with NSS SQL file format

RESOLVED INVALID

Status

NSS
Libraries
RESOLVED INVALID
5 months ago
5 months ago

People

(Reporter: kaie, Assigned: Robert Relyea)

Tracking

(Blocks: 1 bug)

3.31

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

6.28 KB, application/octet-stream
Details
(Reporter)

Description

5 months ago
Firefox has a test case, in which it uses CERT_FindCertByIssuerAndSN to find a certificate in a database. This works with the old DBM file format.

After changing NSS to use the SQL file format, and after converting the cert8.db/key3.db that was used by Firefox to the cert9.db/key4.db file format, the test no longer works.

CERT_FindCertByIssuerAndSN returns NULL

Input key is
  const letsEncryptCertDBKey = `AAAAAAAAAAAAAAARAAAAQQCYE
    /R1E+V1C0PnQx6XHkS9MD8xJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRyd
    XN0IENvLjEXMBUGA1UEAxMORFNUIFJvb3QgQ0EgWDM=`;

PSM code to convert to the encoding is here:
https://hg.mozilla.org/mozilla-central/file/173533a31006/security/manager/ssl/nsNSSCertificateDB.cpp#l128

I'll attach an archive that contains both old and new DB files.
(Reporter)

Comment 1

5 months ago
Created attachment 8884298 [details]
bug1379160.zip
(Reporter)

Comment 2

5 months ago
Sigh, the problem was between the chair and the monitor.
Status: NEW → RESOLVED
Last Resolved: 5 months ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.