-#!/usr/bin/env python
+#!/usr/bin/env python3
import sys
import base64
def save_key_bio(self, bio, *args, **kw):
return self.save_pub_key_bio(bio)
-def rsa_new_pub_key((e, n)):
+def rsa_new_pub_key(couple):
+ (e, n)=couple
rsa = m2.rsa_new()
m2.rsa_set_e(rsa, e)
m2.rsa_set_n(rsa, n)
dsa.save_pub_key(fout)
# FIXME: This is wrong.
# M2Crypto doesn't allow us to set the public key parameter
- raise(Exception, "DSA keys are not supported yet: M2Crypto doesn't allow us to set the public key parameter")
+ raise Exception("DSA keys are not supported yet: M2Crypto doesn't allow us to set the public key parameter")
if __name__ == "__main__":
if len(sys.argv) != 3:
- print "Usage: %s <input-file> <output-file>"
+ print("Usage: %s <input-file> <output-file>")
sys.exit(1)
fin = sys.argv[1]