Conversation
Add self-signed CA and server certificate generation using hand-coded ASN.1/DER encoding with only Node.js built-in crypto. Certificates include LAN IP SANs for mobile companion app connectivity. Implements cert reuse logic (CA preserved across server cert rotations), pairing URL generation, and LAN IP detection. Closes #65
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- Make ensureTls sync (no await expressions existed) - Remove unused TlsError class (YAGNI) - Extract shared cert generation into buildCertTbs/wrapAndSign helpers - Inline signTbs wrapper into wrapAndSign - Add derLength overflow guard for lengths > 65535 - Add test for corrupt PEM file handling (graceful regeneration)
Summary
crypto(no external dependencies)getLanIps()(IPv4 non-internal + 127.0.0.1),buildPairingUrl()(ppg:// protocol with CA fingerprint for trust pinning), andensureTls()entry point.ppg/serve/tls/directory structure andTlsErrorclassFiles changed
src/server/tls.ts— Certificate generation, reuse logic, pairing URL, LAN IP detectionsrc/server/tls.test.ts— 14 integration tests using real crypto + temp directoriessrc/lib/paths.ts— 6 new path helpers (serveDir,tlsDir,tlsCaKeyPath,tlsCaCertPath,tlsServerKeyPath,tlsServerCertPath)src/lib/paths.test.ts— Tests for new path helperssrc/lib/errors.ts—TlsErrorclassTest plan
npm run typecheck)Closes #65