X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=keyconvert%2Fkeyconvert.py;h=143a8c86e17e327892c01c2b3b9a30ffd19d0b1f;hb=ae8c3ef9652be2d40dc2b39473aab6f7a08f961f;hp=de904ee69898791031c4f678d4b4873f588b266c;hpb=b71e2b56234bca1d29285a395e6f64c04d9104c4;p=sfa.git diff --git a/keyconvert/keyconvert.py b/keyconvert/keyconvert.py index de904ee6..143a8c86 100755 --- a/keyconvert/keyconvert.py +++ b/keyconvert/keyconvert.py @@ -12,7 +12,8 @@ class RSA_pub_fix(RSA.RSA_pub): 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) @@ -102,7 +103,7 @@ def convert(fin, fout): 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__":