summaryrefslogtreecommitdiffstats
path: root/nova/utils.py
diff options
context:
space:
mode:
authorRussell Bryant <rbryant@redhat.com>2013-02-06 19:30:51 +0100
committerRussell Bryant <rbryant@redhat.com>2013-02-06 15:27:51 -0500
commit08a5066d5d8781d2cc6bd3b2fb2c27e4e16e8adb (patch)
tree376f4391e78fed46295463aa90cada74f080c99f /nova/utils.py
parentab987734228f00afb34d7a1cb22f693d29a520fe (diff)
downloadnova-08a5066d5d8781d2cc6bd3b2fb2c27e4e16e8adb.tar.gz
nova-08a5066d5d8781d2cc6bd3b2fb2c27e4e16e8adb.tar.xz
nova-08a5066d5d8781d2cc6bd3b2fb2c27e4e16e8adb.zip
Remove strcmp_const_time.
This function was used with deprecated auth and is no longer used anywhere in the code, so just remove it. Change-Id: I1e5472c312bfc49c57bf031593cf82c32bc77dfd
Diffstat (limited to 'nova/utils.py')
-rw-r--r--nova/utils.py20
1 files changed, 0 insertions, 20 deletions
diff --git a/nova/utils.py b/nova/utils.py
index fb56df05c..da0ad131f 100644
--- a/nova/utils.py
+++ b/nova/utils.py
@@ -1172,26 +1172,6 @@ def tempdir(**kwargs):
LOG.error(_('Could not remove tmpdir: %s'), str(e))
-def strcmp_const_time(s1, s2):
- """Constant-time string comparison.
-
- :params s1: the first string
- :params s2: the second string
-
- :return: True if the strings are equal.
-
- This function takes two strings and compares them. It is intended to be
- used when doing a comparison for authentication purposes to help guard
- against timing attacks.
- """
- if len(s1) != len(s2):
- return False
- result = 0
- for (a, b) in zip(s1, s2):
- result |= ord(a) ^ ord(b)
- return result == 0
-
-
def walk_class_hierarchy(clazz, encountered=None):
"""Walk class hierarchy, yielding most derived classes first."""
if not encountered: