Closed Bug 818410 Opened 12 years ago Closed 12 years ago

certutil -S writes temporary files unnecessarily

Categories

(NSS :: Tools, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
3.14.2

People

(Reporter: briansmith, Assigned: briansmith)

References

Details

Attachments

(1 file)

certutil -S ${ARGS} is approximately equivalent to: certutil -R ${ARGS} -o tempcertreq certutil -C ${ARGS} -i tempcertreq -o tempcert certutil -A ${ARGS} -i tempcert In particular, certutil will create two temporary files, named "tempcertreq" and "tempcert" in the current working directory. This means that you must run "certutil -S" from a writable directory. This requirement is one of the things that makes it difficult to adapt the NSS test suite to run on Android using ADB (vs. ssh). This patch changes certutil to avoid creating the temporary files; instead, the data that would have been written to those temporary files is passed in a buffer in memory.
Attachment #688659 - Flags: review?(emaldona)
The naive approach would have been to write to a file to a temporary directory where there would be write access but that may not be cross-platform. This request is to not write temporary files unnecessarily which is much better. Reviewing it as such.
Attachment #688659 - Flags: review?(emaldona) → review+
Thanks for the review Elio! Checking in cmd/certutil/certutil.c; /cvsroot/mozilla/security/nss/cmd/certutil/certutil.c,v <-- certutil.c new revision: 1.165; previous revision: 1.164 done
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: