Closed Bug 602509 Opened 16 years ago Closed 15 years ago

signed email appears as not trustworthy

Categories

(NSS :: Libraries, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
3.12.11

People

(Reporter: lukas.kraus, Assigned: mozbgz)

Details

Attachments

(2 files, 1 obsolete file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; cs; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10 ( .NET CLR 3.5.30729) Build Identifier: 3.1.4 Emails signed by certificates from www.postsignum.cz are visible as not trustworthy. Even when I import all necesarry certificate authorities. Under MS Outlook everything works fine, but same email under Thunderbird appears as not verified. I have correctly imported all necesarry certification authorities. Lukas Kraus Reproducible: Always Steps to Reproduce: 1. Download email from http://store.aec.cz/store/email.zip 2. Import it into Thunderbird 3. Download all necessary Certification authorities from www.postsignum.cz 4. Check if email is verified as trustworthy under Thunderbird 5. Check if email is verified as trustworthy under MS Outlook 2007 Actual Results: Under Thunderbird email is not verified Under MS Outlook email is verified Expected Results: Verify the email
Attached file Signed email —
So the certificates are available at http://www.postsignum.cz/certificates_of_authorities.html. I can definitively reproduce the issue with the email. But I'm not knowledgable on why this is.
Kaspar could you have a look please (and explain a bit so next time I don't need to bug you) ?
Component: General → Security
QA Contact: general → thunderbird
Hello, any results with my problem? Regards. Lukas Kraus
It's sort of a counterpart to the issue reported in bug 559243 (although it should be noted that this message was NOT created by Outlook 2010). To identify the signing cert, this message uses the second option for the "SignerIdentifier" field as specified in RFC 5652: SignerIdentifier ::= CHOICE { issuerAndSerialNumber IssuerAndSerialNumber, subjectKeyIdentifier [0] SubjectKeyIdentifier } I.e., the "SignerInfo" structure starts like this: SET { SEQUENCE { INTEGER 3 [0] 5B 1B 90 97 5A 16 97 A5 3B 1D 78 10 AD 3F 7F 95 87 2A 4E F0 ... where "5B 1B..." correctly refers to the value of the subjectKeyIdentifier extension of the signing cert (with "CN=Elektronická podatelna - Statutární město Chomutov"). NSS is actually able to parse the message - which is also the reason why Thunderbird/PSM will show the signature icon, but the "Message Security" dialog does not have any information about the signature certificate (it just says "Digital Signature is Not Valid"), and there's no way to get at the certificate with PSM. NSS fails to find the cert due to the problem outlined by Nelson in 2003 already, in bug 211051 comment 7: > CERT_FindCertBySubjectKeyID searches a temporary in-memory map of > subjectKeyID values to certs. The search appears to be correct. That is, > if the cert is in the map, the function should find it. But this map is not > populated automatically when NSS starts up. By default, this map is empty. > It is not updated when certs are imported (either as temporary or permanent > certs), nor when certs are deleted, nor when tokens are inserted or removed. One possible fix for this is to add entries to this map in CERT_ImportCerts (in certdb.c). I'm going to attach a patch next.
Assignee: nobody → mozbugzilla
Severity: major → normal
Status: UNCONFIRMED → NEW
Component: Security → Libraries
Ever confirmed: true
OS: Windows XP → All
Product: Thunderbird → NSS
QA Contact: thunderbird → libraries
Hardware: x86 → All
Version: unspecified → trunk
Attached patch Proposed patch — — Splinter Review
Adding entries to the SubjKeyIDHash for certs where we don't have the private key shouldn't hurt, as there are currently only two callers of CERT_FindCertBySubjectKeyID (or cert_FindDERCertBySubjectKeyID, respectively): - pk11cert.c:pk11_FindCertObjectByRecipientNew explicitly checks if it gets a "user cert", in the end (http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/security/nss/lib/pk11wrap/pk11cert.c&rev=1.175&mark=1320-1325#1301) - cmssiginfo.c:NSS_CMSSignerInfo_GetSigningCertificate is actually the place where NSS fails to retrieve the signer cert, as reported in this bug (i.e., this caller explicitly wants "non-user certs", too) Bob, can you review this patch together with those in bug 592489? Although they do not depend on each other, it would make sense to get them in at the same time.
Attachment #483711 - Flags: review?(rrelyea)
Comment on attachment 483711 [details] [diff] [review] Proposed patch r+ rrelyea
Attachment #483711 - Flags: review?(rrelyea) → review+
Keywords: checkin-needed
Do you want me to check this in?
Hi, I´ve posted this bug more than half a year ago, Im surprized that somebody still didn´t do anything about it. Yes, it would be great if somebody would check that. Best regards.
Needs updating to tip, so removing checkin-needed flag to tidy up the checkin-needed search. How this has gone 5 months without someone either checking in or removing the flag is beyond me, but oh well! :-)
Keywords: checkin-needed
Whiteboard: [patchlove][needs new assignee?]
Attached patch updated patch (obsolete) — — Splinter Review
carrying r+
Attachment #483711 - Attachment is obsolete: true
Attachment #541014 - Flags: review+
Keywords: checkin-needed
Whiteboard: [patchlove][needs new assignee?]
(In reply to comment #7) > Do you want me to check this in? Kaie or Ed , please do :-)
Comment on attachment 541014 [details] [diff] [review] updated patch Ludovic, In NSS, we don't "carry forward" R+ reviews from one patch to another. A new patch needs a new review. In comparing your previous patch to your new one, I see that the new one has eliminated all use of the TAB character. NSS's style is to use TAB characters on 8-column boundaries, indenting with tabs and (where necessary) 4 spaces. Please fix that.
Attachment #541014 - Flags: review-
Comment on attachment 483711 [details] [diff] [review] Proposed patch Sorry, this is getting ridiculous. Attachment 483711 [details] [diff] still applies cleanly to certdb.c revision 1.112 - no "updating to tip" is needed. See http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/security/nss/lib/certdb/certdb.c&rev=1.112&mark=2550-2556#2546 which shows that this part of the file was last touched in 2002. Would be great if someone with NSS commit privileges could check this into the CVS repository, yes.
Attachment #483711 - Attachment is obsolete: false
Comment on attachment 541014 [details] [diff] [review] updated patch This newer patch is not necessary. Marking obsolete.
Attachment #541014 - Attachment is obsolete: true
Trunk: Checking in certdb.c; /cvsroot/mozilla/security/nss/lib/certdb/certdb.c,v <-- certdb.c new revision: 1.113; previous revision: 1.112 3.12 branch: Checking in certdb.c; /cvsroot/mozilla/security/nss/lib/certdb/certdb.c,v <-- certdb.c new revision: 1.104.2.3; previous revision: 1.104.2.2 Kaspar, thank you very much for your contribution!
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.12.11
Keywords: checkin-needed
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: