0

I am trying to export some RSA Public and Private keys. My code for generating RSA Keys:

from cryptographer import RSAKey
rsa = RSAKey()
keys = (rsa.pubkey, rsa.composite)
# Export keys to stunnel.key here
smattar
  • 3
  • 1
  • 5
  • From a quick glance at [the docs](https://www.stunnel.org/howto.html) it sounds like stunnel just wants a certificate and key in standard PEM format. So you'll need to make a self-signed PEM certificate, presumably including the domain name of your stunnel proxy server in the certificate, and write it to a PEM file. – Rup Jan 10 '21 at 18:56
  • e.g. [this old question](https://stackoverflow.com/questions/27164354/create-a-self-signed-x509-certificate-in-python) – Rup Jan 10 '21 at 18:57
  • I'm getting an error saying module 'OpenSSL.crypto' has no attribute 'TYPE_' – smattar Jan 11 '21 at 12:26
  • Sorry. I just had to delete the code (I thought I deleted them all) Thank you – smattar Jan 11 '21 at 12:29

0 Answers0