Certificate Manager

Certificate Manager - Handles certificate signing operations

class certica.cert_manager.CertManager(base_dir='output')[source]

Bases: object

Manages certificate signing operations

__init__(base_dir='output')[source]
sign_certificate(ca_key, ca_cert, ca_name, cert_name, cert_type='server', common_name='', dns_names=None, ip_addresses=None, organization='', country='CN', state='Beijing', city='Beijing', validity_days=365, key_size=2048)[source]

Sign a certificate using the specified CA

Parameters:
  • ca_key (str) – Path to CA private key

  • ca_cert (str) – Path to CA certificate

  • ca_name (str) – Name of the CA (for directory organization)

  • cert_name (str) – Name for the certificate

  • cert_type (str) – “server” or “client”

  • common_name (str) – Common name for the certificate

  • dns_names (List[str]) – List of DNS names

  • ip_addresses (List[str]) – List of IP addresses

  • organization (str) – Organization name

  • country (str) – Country code

  • state (str) – State/Province

  • city (str) – City

  • validity_days (int) – Certificate validity in days

  • key_size (int) – Key size in bits

Returns:

Dict with paths to generated files

Return type:

Dict[str, str]

list_certificates()[source]

List all signed certificates

get_certificate_info(cert_path)[source]

Get information about a certificate

delete_certificate(ca_name, cert_name)[source]

Delete a certificate