Skip to content

Certificate

The certificate block selects the trust set that sing-box uses when verifying TLS server certificates. You pick a base store and optionally extend it with custom certificates from strings, files, or directories.

Options

FieldTypeDefaultAllowed valuesDescription
storestringsystemsystem | mozilla | chrome | noneWhich root-CA store to use as the base trust set. `system` reads the OS root store; `mozilla` and `chrome` use bundled snapshots; `none` starts from an empty trust set.
certificatebadoption.Listable[string][]<PEM block>Inline list of PEM-encoded certificates appended to the base trust set.
certificate_pathbadoption.Listable[string][]<file path>List of PEM file paths appended to the base trust set.
certificate_directory_pathbadoption.Listable[string][]<dir path>List of directories whose .pem/.crt/.cer files are appended to the base trust set.

Source: option/certificate.go:9-14 · pinned at v1.13.11 (553cfa1)

Example

json
{
  "certificate": {
    "store": "mozilla",
    "certificate_path": ["/etc/ssl/extra/my-corp-root.pem"]
  }
}

Notes

  • An empty / missing store is normalized to system (option/certificate.go:31-33).
  • All three "extra" fields are additive — they are merged on top of the base store rather than replacing it. To use a strictly curated trust set, pick store: "none" and list every certificate explicitly.
  • Custom inline certificates are useful for self-signed setups; in most production cases prefer pointing at a directory or file path so the trust set can be rotated without changing the config.

Source: option/certificate.go:9-14 · v1.13.11 (553cfa1)

Core Tutorial by Argsment