Tracking issue from closed PR #766.
Replace check-then-act pattern (existsSync + writeFileSync) with atomic file creation using the wx flag (O_WRONLY | O_CREAT | O_EXCL) in initSslDb().
Changes needed
- Replace
existsSync + writeFileSync with atomic wx flag writes
- Handle
EEXIST errors gracefully (file already exists is not an error)
- Eliminate TOCTOU (time-of-check-time-of-use) race conditions
Original PR: #766