source: TI12-security/trunk/python/Tests/m2Crypto/unicode.py @ 4082

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI12-security/trunk/python/Tests/m2Crypto/unicode.py@5907
Revision 4082, 1.5 KB checked in by pjkersha, 12 years ago (diff)

Further cleaning up of OpenID Provider code - TODO: AuthKit? and templating (if any) integration

Line 
1#!/use/bin/env python
2#from M2Crypto.httpslib import HTTPSConnection
3from ndg.security.common.m2CryptoSSLUtility import HTTPSConnection
4
5#hostname = u'ndgbeta.badc.rl.ac.uk'
6hostname = u'gabriel.badc.rl.ac.uk'
7path = u'/SessionManager'
8#
9#body = '''<SOAP-ENV:Envelope
10#xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
11#xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
12#xmlns:ns1="urn:ndg.security.sessionMgr">
13#<SOAP-ENV:Header></SOAP-ENV:Header>
14#<SOAP-ENV:Body><ns1:getAttCert/></SOAP-ENV:Body>'''
15
16#con = HTTPSConnection(hostname)
17#con.putrequest('POST', path)
18#con.putheader('Content-Type', 'text/xml')
19#con.putheader('Content-Length', str(len(body)))
20#con.endheaders()
21#con.send(body)
22#resp = con.getresponse()
23#print resp.read()
24
25con = HTTPSConnection(hostname)
26con.putrequest('GET', path)
27con.endheaders()
28resp = con.getresponse()
29print resp.read()
30
31#from httplib import HTTPConnection
32#
33#hostname = 'gabriel.badc.rl.ac.uk'
34#port = 5000
35#path = u'/AttributeAuthority'
36#
37#body = '''<SOAP-ENV:Envelope
38#xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
39#xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
40#xmlns:ns1="urn:ndg.security.attAuthority">
41#<SOAP-ENV:Header></SOAP-ENV:Header>
42#<SOAP-ENV:Body><ns1:getX509Cert/></SOAP-ENV:Body>'''
43#
44#con = HTTPConnection(hostname, port=5000)
45#con.putrequest('POST', path)
46#con.putheader('Content-Type', 'text/xml')
47#con.putheader('Content-Length', str(len(body)))
48#con.endheaders()
49#con.send(body)
50#resp = con.getresponse()
51#print resp.read()
52
53
54
Note: See TracBrowser for help on using the repository browser.