Changeset 6919 for TI12-security/trunk/MyProxyClient
- Timestamp:
- 02/06/10 16:26:48 (11 years ago)
- Location:
- TI12-security/trunk/MyProxyClient
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
TI12-security/trunk/MyProxyClient/README
r5048 r6919 6 6 * i.e. MyProxy C client libraries are not required for this package. 7 7 8 It uses M2Cryptoto make an SSL connection to the server following the8 It uses pyOpenSSL to make an SSL connection to the server following the 9 9 messaging interface as outlined in: http://grid.ncsa.uiuc.edu/myproxy/protocol/ 10 10 -
TI12-security/trunk/MyProxyClient/documentation/Makefile
r6918 r6919 15 15 # Generate HTML from embedded epydoc text in source code. 16 16 EPYDOC=epydoc 17 EPYDOC_INDIR=../myproxy 17 18 EPYDOC_OUTDIR=. 18 EPYDOC_NAME=' MyProxy Client'19 EPYDOC_NAME='NERC DataGrid SAML 2.0' 19 20 EPYDOC_LOGFILE=epydoc.log 20 EPYDOC_FRAMES_OPT=--no-frames 21 EPYDOC_OPTS=--no-frames --include-log --graph=all -v 22 ZIP=zip 23 ZIP_OUTFILE=./documentation.zip 24 ZIP_INFILES=./*.* 25 21 26 epydoc: 22 ${EPYDOC} ../myproxy -o ${EPYDOC_OUTDIR} --name ${EPYDOC_NAME} \ 23 ${EPYDOC_FRAMES_OPT} --include-log --graph=all -v > ${EPYDOC_LOGFILE} 24 27 ${EPYDOC} ${EPYDOC_INDIR} -o ${EPYDOC_OUTDIR} --name ${EPYDOC_NAME} \ 28 ${EPYDOC_OPTS} > ${EPYDOC_LOGFILE} 29 30 zip: 31 ${ZIP} ${ZIP_OUTFILE} ${ZIP_INFILES} 32 25 33 clean: 26 rm -f *.txt *.html *.gif 34 rm -f *.txt *.html *.gif *.css *.js *.png *.log -
TI12-security/trunk/MyProxyClient/myproxy/client.py
r6918 r6919 105 105 peerCert.get_subject()) 106 106 107 return errorStatus107 return False 108 108 109 109 elif errorDepth == 0: … … 119 119 log.error('No "hostname" or "certDN" set to check peer ' 120 120 'certificate against') 121 return errorStatus121 return False 122 122 123 123 cn = self.cnPrefix + self.hostname 124 124 if peerCertSubj.commonName == cn: 125 return successStatus125 return True 126 126 else: 127 127 log.error('Peer certificate CN %r doesn\'t match the ' 128 128 'expected CN %r', peerCertSubj.commonName, cn) 129 return errorStatus129 return False 130 130 else: 131 131 if peerCertDN == self.certDN: 132 return successStatus132 return True 133 133 else: 134 134 log.error('Peer certificate DN %r doesn\'t match the ' 135 135 'expected DN %r', peerCertDN, self.certDN) 136 return errorStatus136 return False 137 137 else: 138 return successStatus138 return True 139 139 140 140 def _getCertDN(self): … … 705 705 if verifyPeerWithTrustRoots: 706 706 context.load_verify_locations(None, self.caCertDir) 707 verifyMode = SSL.VERIFY_PEER|SSL.VERIFY_FAIL_IF_NO_PEER_CERT708 else:709 log.warning("SSL Context verify mode set to SSL.VERIFY_NONE")710 verifyMode = SSL.VERIFY_NONE711 707 712 708 # Verify peer's (MyProxy server) certificate 713 context.set_verify( verifyMode, self.__serverSSLCertVerify)709 context.set_verify(SSL.VERIFY_PEER, self.__serverSSLCertVerify) 714 710 715 711 if certFile: -
TI12-security/trunk/MyProxyClient/myproxy/test/test_myproxyclient.py
r6918 r6919 308 308 309 309 client = MyProxyClient() 310 310 311 311 connection = None 312 errorStatus = 1313 successStatus = 0312 errorStatus = False 313 successStatus = True 314 314 errorDepth = 0 315 315 peerCertStr = open(self.__class__.HOSTCERT_FILEPATH).read() -
TI12-security/trunk/MyProxyClient/setup.py
r6844 r6919 28 28 setup( 29 29 name = 'MyProxyClient', 30 version = '1. 0.0',30 version = '1.1.0', 31 31 description = 'MyProxy Client', 32 long_description = '''Pure Python implementation of MyProxy client ''' 33 '''interface. 34 35 This version replaces M2Crypto with PyOpenSSL as the OpenSSL wrapper. 36 Get trust roots is now added. A stub for Put has been added but not 37 implemented as unfortunately the PyOpenSSL X.%09 extensions interface does 38 not support the required proxyCertInfo extension required for proxy 39 certificates. 40 ''', 32 long_description = ''' 33 Python implementation of the client interface to the MyProxy credential 34 management service (http://grid.ncsa.illinois.edu/myproxy/). 35 36 The code has been extended from an original program myproxy_logon by Tom Uram of 37 ANL. 38 ''', 41 39 author = 'Philip Kershaw', 42 40 author_email = 'Philip.Kershaw@stfc.ac.uk',
Note: See TracChangeset
for help on using the changeset viewer.