Tool to generate a self-signed TLS certificate
Find a file
2026-03-09 01:56:32 -05:00
brutus fix 2024-11-15 06:43:33 +00:00
.gitignore init 2024-11-15 06:26:41 +00:00
LICENSE init 2024-11-15 06:26:41 +00:00
mypy.ini init 2024-11-15 06:26:41 +00:00
README.md revert, didn't notice i already added a credit 2026-03-09 01:56:32 -05:00
setup.py bump version 2024-11-15 06:44:23 +00:00

Brutus

Generate a self-signed TLS certificate for development.

Installation

pip install git+https://git.hiden.cc/CrossTalk/brutus.git@0.1.0

# Check that it works (runs a server, opens localhost in your browser).
python -m brutus.server

If you're using Firefox, or if you're not on Windows, you'll need to install the root cert manually, and then run this again. (See Manual Root Cert Install)

Certificate Store Implementation Status

  • Windows ROOT store (used by Chrome and Edge)
  • Linux
  • OS X
  • NSS (used by Firefox, and Chrome/Chromium on non-Windows)
  • Java

Manual Root Cert Install

If your system isn't supported, you'll see this exception thrown by create_ssl_context or brutus.server:

# New root certificate created:
# #   <cert_dir>\DO_NOT_TRUST_Brutus_<app_name>.crt
# # It expires in 30 days.
# #
# # You must add it to <...>

This message will only be shown the first time, i.e. when a new root cert is created (either because it's the first time, or the old cert is expired). You have to manually add the root cert to the relevant stores, or you'll get certificate errors.

Credits

Heavily based on devtls by valtron. This is used as an internal library for CrossTalk.