summaryrefslogtreecommitdiffstats
path: root/src/lib/tlslite/mathtls.py
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2009-02-06 13:32:53 +0000
committerNarayan Desai <desai@mcs.anl.gov>2009-02-06 13:32:53 +0000
commit37401bf9e4b9f627662af7b9d1f50937eea2c99d (patch)
treea1122fd34890cc7ee18102ca450e00ae203b010c /src/lib/tlslite/mathtls.py
parent44541d050d74d9952e47c56611c73f80523fdd37 (diff)
downloadbcfg2-37401bf9e4b9f627662af7b9d1f50937eea2c99d.tar.gz
bcfg2-37401bf9e4b9f627662af7b9d1f50937eea2c99d.tar.bz2
bcfg2-37401bf9e4b9f627662af7b9d1f50937eea2c99d.zip
TLSlite updates for python 2.6 (From Kamil Kisiel)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5066 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/tlslite/mathtls.py')
-rwxr-xr-xsrc/lib/tlslite/mathtls.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/tlslite/mathtls.py b/src/lib/tlslite/mathtls.py
index 3b8ede601..59f1f10d6 100755
--- a/src/lib/tlslite/mathtls.py
+++ b/src/lib/tlslite/mathtls.py
@@ -4,8 +4,12 @@ from utils.compat import *
from utils.cryptomath import *
import hmac
-import md5
-import sha
+try:
+ import hashlib as md5
+ import hashlib as sha
+except:
+ import md5
+ import sha
#1024, 1536, 2048, 3072, 4096, 6144, and 8192 bit groups]
goodGroupParameters = [(2,0xEEAF0AB9ADB38DD69C33F80AFA8FC5E86072618775FF3C0B9EA2314C9C256576D674DF7496EA81D3383B4813D692C6E0E0D5D8E250B98BE48E495C1D6089DAD15DC7D7B46154D6B6CE8EF4AD69B15D4982559B297BCF1885C529F566660E57EC68EDBC3C05726CC02FD4CBF4976EAA9AFD5138FE8376435B9FC61D2FC0EB06E3),\