aboutsummaryrefslogtreecommitdiff
path: root/rpkid/rpki/x509.py
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2013-10-08 03:30:21 +0000
committerRob Austein <sra@hactrn.net>2013-10-08 03:30:21 +0000
commit9a6b8284b0912344993f6af9929915c6363396e3 (patch)
treeb63e086ce0f97c1be877ade86b4509639573e82a /rpkid/rpki/x509.py
parent5f47f2efe1f069b959d3e837234614ed0f64d25c (diff)
Switch RSA key generation to use a new .generateRSA() class method
rather than abusing the Asymmetric __init__() method, in preparation for adding support for other public key algorithms like ECDSA. svn path=/trunk/; revision=5553
Diffstat (limited to 'rpkid/rpki/x509.py')
-rw-r--r--rpkid/rpki/x509.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/rpkid/rpki/x509.py b/rpkid/rpki/x509.py
index 3bd0a3cd..fcdd988b 100644
--- a/rpkid/rpki/x509.py
+++ b/rpkid/rpki/x509.py
@@ -1011,7 +1011,7 @@ class insecure_debug_only_rsa_key_generator(object):
try:
v = rpki.POW.Asymmetric.derReadPrivate(self.db[k])
except KeyError:
- v = rpki.POW.Asymmetric(rpki.POW.RSA_CIPHER, 2048)
+ v = rpki.POW.Asymmetric.generateRSA(2048)
self.db[k] = v.derWritePrivate()
self.keyno += 1
return v
@@ -1067,7 +1067,7 @@ class RSA(DER_object):
if generate_insecure_debug_only_rsa_key is not None:
return cls(POW = generate_insecure_debug_only_rsa_key())
else:
- return cls(POW = rpki.POW.Asymmetric(rpki.POW.RSA_CIPHER, keylength))
+ return cls(POW = rpki.POW.Asymmetric.generateRSA(keylength))
def get_public_DER(self):
"""