0

I am trying to export some RSA Public and Private keys. Just to clarify, I am NOT trying to sign the keys. I am trying to take the raw numbers for the keys and export them to stunnel.key. My code for generating RSA Keys:

from cryptographer import RSAKey
rsa = RSAKey()
keys = (rsa.pubkey, rsa.composite)
# Export keys to stunnel.key here
3DCoded
  • 13
  • 1
  • 6
  • 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_' – 3DCoded Jan 11 '21 at 12:26
  • Sorry. I just had to delete the code (I thought I deleted them all) Thank you – 3DCoded Jan 11 '21 at 12:29

0 Answers0