summaryrefslogtreecommitdiffstats
path: root/src/lib/tlslite/integration/IntegrationHelper.py
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2009-05-06 01:26:53 +0000
committerNarayan Desai <desai@mcs.anl.gov>2009-05-06 01:26:53 +0000
commit9590d0bb421cb7fdf7dd04d4b1d0d77e3f06f13b (patch)
tree768763aa48be1a5a2c8dae7cba81859510f1146e /src/lib/tlslite/integration/IntegrationHelper.py
parent13f6d1554dd24d08d44662906fa9f3f008a23058 (diff)
downloadbcfg2-9590d0bb421cb7fdf7dd04d4b1d0d77e3f06f13b.tar.gz
bcfg2-9590d0bb421cb7fdf7dd04d4b1d0d77e3f06f13b.tar.bz2
bcfg2-9590d0bb421cb7fdf7dd04d4b1d0d77e3f06f13b.zip
more to python 2.6 ssl
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5187 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/tlslite/integration/IntegrationHelper.py')
-rwxr-xr-xsrc/lib/tlslite/integration/IntegrationHelper.py52
1 files changed, 0 insertions, 52 deletions
diff --git a/src/lib/tlslite/integration/IntegrationHelper.py b/src/lib/tlslite/integration/IntegrationHelper.py
deleted file mode 100755
index af5193b48..000000000
--- a/src/lib/tlslite/integration/IntegrationHelper.py
+++ /dev/null
@@ -1,52 +0,0 @@
-
-class IntegrationHelper:
-
- def __init__(self,
- username=None, password=None, sharedKey=None,
- certChain=None, privateKey=None,
- cryptoID=None, protocol=None,
- x509Fingerprint=None,
- x509TrustList=None, x509CommonName=None,
- settings = None):
-
- self.username = None
- self.password = None
- self.sharedKey = None
- self.certChain = None
- self.privateKey = None
- self.checker = None
-
- #SRP Authentication
- if username and password and not \
- (sharedKey or certChain or privateKey):
- self.username = username
- self.password = password
-
- #Shared Key Authentication
- elif username and sharedKey and not \
- (password or certChain or privateKey):
- self.username = username
- self.sharedKey = sharedKey
-
- #Certificate Chain Authentication
- elif certChain and privateKey and not \
- (username or password or sharedKey):
- self.certChain = certChain
- self.privateKey = privateKey
-
- #No Authentication
- elif not password and not username and not \
- sharedKey and not certChain and not privateKey:
- pass
-
- else:
- raise ValueError("Bad parameters")
-
- #Authenticate the server based on its cryptoID or fingerprint
- if sharedKey and (cryptoID or protocol or x509Fingerprint):
- raise ValueError("Can't use shared keys with other forms of"\
- "authentication")
-
- self.checker = Checker(cryptoID, protocol, x509Fingerprint,
- x509TrustList, x509CommonName)
- self.settings = settings \ No newline at end of file