Files
holesail-browser/native-host/host/handlers/ca.js
T
Raven Scott 6fcd9fcf2b
CI / Build & Test (push) Successful in 3m19s
eat: implement Holesail-Browser enhancement plan
- Add unit tests (hostname-validator, TLDs, payload-schemas) and integration tests for message handler registry
- Refactor native host message router into handler registry (handlers/state, tunnels, ssh, rdp, backup, ca, connections)
- Add ESLint config and npm test + lint steps in CI
- Dashboard: visibility-based refresh pause, configurable refresh interval (2s/5s/10s/paused)
- Accessibility: ARIA on nav and modals, focus trap and restore, prefers-reduced-motion
- Empty states: primary action buttons for virtual hosts, servers, service tunnels
- Native host rate limiting for backup and CA operations; update SECURITY.md
- CONTRIBUTING: "Adding a new dashboard page", dev workflow; add npm run dev script
2026-03-15 00:24:31 -04:00

26 lines
645 B
JavaScript

/**
* Handlers for certificate authority (installRootCA).
* Context: certificateAuthority
*/
const rateLimit = require('../rate-limit.js');
function register(deps) {
const { certificateAuthority } = deps;
return [
{
type: 'installRootCA',
handle: async (payload, reply) => {
const rl = rateLimit.check('installRootCA');
if (!rl.allowed) { reply({ ok: false, error: rl.error }); return; }
certificateAuthority.installRootCA((err) => {
if (err) reply({ ok: false, error: err.message });
else reply({ ok: true });
});
}
}
];
}
module.exports = { register };