Skip to content

Instantly share code, notes, and snippets.

View Arbitrage0's full-sized avatar
💾
_information economy 牛乳

Arbitrage0

💾
_information economy 牛乳
View GitHub Profile
@Arbitrage0
Arbitrage0 / google-hsm-x509.py
Created September 7, 2020 18:53
Create an x509 certificate for a key hosted on Google HSM
"""
Here's how to create an x509 public key certificate
for your private key hosted on Google HSM in python.
Assumes 2048-bit RSA with PKCS#1 v1.5 Padding
"""
from google.cloud import kms
from asn1crypto import x509