Skip to content

Instantly share code, notes, and snippets.

View c4p-n1ck's full-sized avatar
🦖
Working from home

|| Prof. - Xadk3!#0000 || c4p-n1ck

🦖
Working from home
View GitHub Profile
@c4p-n1ck
c4p-n1ck / m2crypto-certificates.py
Created February 13, 2023 03:43 — forked from eskil/m2crypto-certificates.py
Example of generating CA certs and CA signed certs using python m2crypto.
"""
Tools for creating a CA cert and signed server certs.
Divined from http://svn.osafoundation.org/m2crypto/trunk/tests/test_x509.py
The mk_temporary_xxx calls return a NamedTemporaryFile with certs.
Usage ;
# Create a temporary CA cert and it's private key
cacert, cakey = mk_temporary_cacert()