Skip to main content

Module TlsCommands

Module TlsCommands 

Source
Expand description

§TLS Certificate Management Commands

This module provides Tauri commands for managing TLS certificates from the webview.

§Available Commands

  • tls_get_ca_cert - Returns the CA certificate PEM for trust store installation
  • tls_get_server_cert_info - Returns information about a server certificate
  • tls_renew_certificate - Forces renewal of a server certificate
  • tls_get_all_certs - Lists all cached server certificates
  • tls_initialize - Initializes the certificate manager and loads/generates CA
  • tls_check_cert_status - Checks if a certificate needs renewal

§Usage Example

// Get CA certificate for installation
const caCert = await invoke('tls_get_ca_cert');
console.log('CA Certificate:', caCert);

// Get server certificate info
const certInfo = await invoke('tls_get_server_cert_info', {
  hostname: 'code.editor.land'
});
console.log('Valid until:', certInfo.valid_until);

// Renew a certificate
await invoke('tls_renew_certificate', {
  hostname: 'code.editor.land'
});

Structs§

CertificateGenerationResult
Certificate generation result
CertificateStatus
Certificate status information

Functions§

tls_check_cert_status
Check if a certificate needs renewal
tls_delete_cert
Delete a certificate from the cache
tls_generate_cert
Generate a server certificate for a hostname
tls_get_all_certs
Get all cached server certificates
tls_get_ca_cert
Get the CA certificate in PEM format
tls_get_server_cert_info
Get information about a server certificate
tls_initialize
Initialize TLS certificate manager
tls_renew_certificate
Force renewal of a server certificate