Improve NSS S/MIME tests for Thunderbird
Categories
(NSS :: Test, enhancement)
Tracking
(Not tracked)
People
(Reporter: KaiE, Assigned: KaiE)
References
Details
Attachments
(1 file, 2 obsolete files)
|
10.22 KB,
patch
|
jcj
:
review+
|
Details | Diff | Splinter Review |
NSS already has an S/MIME test script. But actually it's really just a CMS test, because it doesn't do any MIME.
We'd like to add automated testing for S/MIME message processing to Thunderbird.
I had the choice to use openssl or NSS to generate the test data that is required by Thunderbird. I'd prefer to use NSS.
The NSS test suite already produces most of the CMS data that Thunderbird needs. With just a little bit of extra string processing, we can produce the message files, too.
I'll attach an enhancement for the smime.sh script, which creates the message for TB in an extra subdirectory. With this, Thunderbird can simply run the NSS test suite and copy those files into the Thunderbird tree.
I've modified the existing alice.txt file, to make it compatible with both the NSS CMS plaintext needs, and also the TB MIME message needs. Because the NSS CMS test doesn't need a real email message, I think it should be OK to remove the email headers from alice.txt
| Assignee | ||
Comment 1•7 years ago
|
||
| Assignee | ||
Comment 2•7 years ago
|
||
| Assignee | ||
Comment 3•7 years ago
|
||
I see I have a duplicate "mkdir tb", I'll remove that before checkin.
Comment 4•7 years ago
|
||
Note that I had started an s/mime GTest in Bug 1521174 that we'll land in just over a week. That might be a lot simpler than maintaining the shell scripts.
| Assignee | ||
Comment 5•7 years ago
|
||
| Assignee | ||
Comment 6•7 years ago
|
||
(In reply to J.C. Jones [:jcj] (he/him) from comment #4)
Note that I had started an s/mime GTest in Bug 1521174 that we'll land in just over a week. That might be a lot simpler than maintaining the shell scripts.
Thanks for reminding me, that's good to know.
Your tests are CMS correctness tests. I think it's fair to use the c++ gtest for this kind of tests. However, the producing of the additional files that I need to do is more easily done with a shell script.
(I'm doing it here for convenience, because doing it inside the Thunderbird tree would be more work. I think the vast majority of time spent in the NSS test is for the certificate generation and crypto operations. Creating these files here should be very fast, and shouldn't notably affect the time required for executing the NSS test suite.)
Comment 7•7 years ago
|
||
| Assignee | ||
Comment 8•7 years ago
|
||
Thanks for the careful review, I appreciate it! I didn't know about the FreeBSD requirements, it's good you do.
I made the changes you requested.
Note sed -i "" gave some errors, I had to use -i"" (no space).
Comment 9•7 years ago
|
||
| Assignee | ||
Comment 10•7 years ago
|
||
Description
•