diff options
author | Jenkins <jenkins@review.openstack.org> | 2013-05-27 00:12:20 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2013-05-27 00:12:20 +0000 |
commit | a20617607d5ad3e9da37842b62694d6ac7ca4584 (patch) | |
tree | 79d0942c85366a355f63b78a0489008033ab2fa5 /nova/crypto.py | |
parent | e1528ee7fca4f7d77e3808090c10bd304c79fc57 (diff) | |
parent | b45df38114b94fb57f7282725c837d87f9237dff (diff) | |
download | nova-a20617607d5ad3e9da37842b62694d6ac7ca4584.tar.gz nova-a20617607d5ad3e9da37842b62694d6ac7ca4584.tar.xz nova-a20617607d5ad3e9da37842b62694d6ac7ca4584.zip |
Merge "Removed superflous eval usage."
Diffstat (limited to 'nova/crypto.py')
-rw-r--r-- | nova/crypto.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/nova/crypto.py b/nova/crypto.py index aaf102d8a..0447bd9b8 100644 --- a/nova/crypto.py +++ b/nova/crypto.py @@ -230,10 +230,10 @@ def convert_from_sshrsa_to_pkcs8(pubkey): # +- INTEGER 65537 # Build the sequence for the bit string - n_val = eval( - '0x' + ''.join(['%02X' % struct.unpack('B', x)[0] for x in parts[2]])) - e_val = eval( - '0x' + ''.join(['%02X' % struct.unpack('B', x)[0] for x in parts[1]])) + n_val = int( + ''.join(['%02X' % struct.unpack('B', x)[0] for x in parts[2]]), 16) + e_val = int( + ''.join(['%02X' % struct.unpack('B', x)[0] for x in parts[1]]), 16) pkinfo = _to_sequence(univ.Integer(n_val), univ.Integer(e_val)) # Convert the sequence into a bit string |