Generate private key from Python client
This commit is contained in:
6
python_device/src/pki.py
Normal file
6
python_device/src/pki.py
Normal file
@ -0,0 +1,6 @@
|
||||
from OpenSSL import crypto
|
||||
|
||||
def gen_priv_key():
|
||||
key = crypto.PKey()
|
||||
key.generate_key(crypto.TYPE_RSA, 2048)
|
||||
return crypto.dump_privatekey(crypto.FILETYPE_PEM, key).decode("utf-8")
|
Reference in New Issue
Block a user