ssl_get_ca_certificate
Retrieve and install CA certificates for secure HTTP/HTTPS proxy integration, ensuring automated traffic monitoring and analysis with proper SSL/TLS configuration.
Instructions
Get CA certificate and installation instructions
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- Defines the tool schema: empty input object, description for retrieving CA certificate and installation instructions.ssl_get_ca_certificate: { name: "ssl_get_ca_certificate", description: "Get CA certificate and installation instructions", inputSchema: { type: "object", properties: {} } },
- src/tools/tool-handlers.js:116-123 (handler)MCP tool handler: calls SSLManager.getCACertificate() and formats response with certificate path and installation instructions as text content.case 'ssl_get_ca_certificate': const caCert = await this.sslManager.getCACertificate(); return { content: [{ type: "text", text: `π CA Certificate\n\nπ Certificate Path: ${caCert.certPath}\n\n${caCert.installationInstructions}` }] };
- src/ssl/ssl-manager.js:215-227 (handler)Core implementation: reads ca.crt file content and generates platform-specific installation instructions.async getCACertificate() { const caCertPath = path.join(this.caDir, 'ca.crt'); try { const certContent = await fs.readFile(caCertPath, 'utf-8'); return { certPath: caCertPath, certContent, installationInstructions: this._getInstallationInstructions(caCertPath) }; } catch (error) { throw new Error(`CA certificate not found: ${error.message}`); } }
- src/ssl/ssl-manager.js:232-310 (helper)Helper method generating detailed platform-specific (Linux/macOS/Windows) CA certificate installation instructions._getInstallationInstructions(caCertPath) { const platform = os.platform(); const caName = this.currentCA; const instructions = { linux: [ `π§ Linux Installation:`, ``, `1. Copy CA certificate to system store:`, ` sudo cp "${caCertPath}" /usr/local/share/ca-certificates/${caName}.crt`, ` sudo update-ca-certificates`, ``, `2. For browsers (Chrome/Chromium):`, ` chrome://settings/certificates β Authorities β Import`, ` Select: ${caCertPath}`, ``, `3. For Firefox:`, ` about:preferences#privacy β Certificates β View Certificates`, ` β Authorities β Import β Select: ${caCertPath}`, ``, `4. Verify installation:`, ` openssl verify -CAfile "${caCertPath}" <any_generated_cert>` ], darwin: [ `π macOS Installation:`, ``, `1. Add to system keychain:`, ` sudo security add-trusted-cert -d -r trustRoot -k /System/Library/Keychains/SystemRootCertificates.keychain "${caCertPath}"`, ``, `2. Alternative (user keychain):`, ` security add-trusted-cert -d -r trustRoot -k ~/Library/Keychains/login.keychain "${caCertPath}"`, ``, `3. For browsers:`, ` - Chrome: Uses system keychain automatically`, ` - Firefox: Manual import required (same as Linux)`, ``, `4. Verify in Keychain Access app` ], win32: [ `πͺ Windows Installation:`, ``, `1. Import via Certificate Manager:`, ` certmgr.msc β Trusted Root Certification Authorities`, ` β Certificates β Import β Select: ${caCertPath}`, ``, `2. Command line (as Administrator):`, ` certutil -addstore -f "ROOT" "${caCertPath}"`, ``, `3. PowerShell (as Administrator):`, ` Import-Certificate -FilePath "${caCertPath}" -CertStoreLocation Cert:\\LocalMachine\\Root`, ``, `4. Verify installation:`, ` certutil -store root | findstr "${caName}"` ] }; const platformInstructions = instructions[platform] || instructions.linux; return [ `π SSL Certificate Installation Instructions`, ``, `CA Name: ${caName}`, `CA Certificate: ${caCertPath}`, `Platform: ${platform}`, ``, ...platformInstructions, ``, `β οΈ Important Security Notes:`, `- This CA can decrypt ALL HTTPS traffic routed through the proxy`, `- Only install on development/testing systems`, `- Remove CA when proxy testing is complete`, `- Keep CA private key secure and never share it`, ``, `π To remove CA later:`, `- Linux: sudo update-ca-certificates --fresh`, `- macOS: security delete-certificate -c "${caName}" (in Keychain Access)`, `- Windows: certmgr.msc β Remove from Trusted Root CAs` ].join('\n'); }