Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!
openssl genrsa -des3 -out rootCA.key 4096
#!/usr/bin/env python3 | |
# ~*~ coding: utf-8 ~*~ | |
# | |
# >> | |
# .. created: 5/20/16 | |
# .. author: blake.vandemerwe | |
# | |
# LICENSE | |
# << |
from cryptography import x509 | |
from cryptography.hazmat.backends import default_backend | |
from cryptography.hazmat.primitives import hashes, serialization | |
from cryptography.hazmat.primitives.asymmetric import rsa | |
from cryptography.x509.oid import NameOID | |
import datetime | |
import uuid | |
one_day = datetime.timedelta(1, 0, 0) | |
private_key = rsa.generate_private_key( | |
public_exponent=65537, |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
#!/usr/bin/env python | |
from gevent import monkey | |
monkey.patch_all() # Patch everything | |
import gevent | |
import time | |
class Hub(object): | |
"""A simple reactor hub... In async!""" |