Changeset 7322
- Timestamp:
- 13/08/10 15:17:22 (10 years ago)
- Location:
- TI12-security/trunk/ndg_saml/ndg/saml
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TI12-security/trunk/ndg_saml/ndg/saml/saml2/binding/soap/client/attributequery.py
r7154 r7322 138 138 self.client.openerDirector.add_handler(httpsHandler) 139 139 return super(AttributeQuerySslSOAPBinding, self).send(**kw) 140 141 @property 142 def sslCtxProxy(self): 143 """SSL Context Proxy object used for setting up an SSL Context for 144 queries 145 """ 140 141 def _getSslCtxProxy(self): 146 142 return self.__sslCtxProxy 143 144 def _setSslCtxProxy(self, value): 145 if not isinstance(value, SSLContextProxy): 146 raise TypeError('Expecting %r type for "sslCtxProxy attribute; got ' 147 '%r' % type(value)) 147 148 149 self.__sslCtxProxy = value 150 151 sslCtxProxy = property(fget=_getSslCtxProxy, fset=_setSslCtxProxy, 152 doc="SSL Context Proxy object used for setting up " 153 "an SSL Context for queries") 154 148 155 def __setattr__(self, name, value): 149 156 """Enable setting of SSLContextProxy attributes as if they were -
TI12-security/trunk/ndg_saml/ndg/saml/saml2/binding/soap/client/subjectquery.py
r7259 r7322 78 78 79 79 def __init__(self, **kw): 80 '''Create SOAP Client for SAML Subject Query'''80 '''Create SOAP Client for a SAML Subject Query''' 81 81 self.__clockSkewTolerance = timedelta(seconds=0.) 82 82 self.__verifyTimeConditions = True … … 90 90 self.__query = self.__class__.QUERY_TYPE() 91 91 self.__query.version = SAMLVersion(SAMLVersion.VERSION_20) 92 self.__query.id = str(uuid4())93 92 94 93 # These properties access the __query instance … … 244 243 classes may overload to specify as required""" 245 244 self.__query.issueInstant = datetime.utcnow() 245 246 # Set ID here to ensure it's unique for each new call 247 self.__query.id = str(uuid4()) 246 248 247 249 def _verifyTimeConditions(self, response): -
TI12-security/trunk/ndg_saml/ndg/saml/utils/m2crypto.py
r7165 r7322 48 48 'userid': 'UID' 49 49 } 50 PARSER_RE_STR = '/(%s)=' % '|'.join(__shortNameLUT.keys() + 51 __shortNameLUT.values()) 52 53 PARSER_RE = re.compile(PARSER_RE_STR) 50 SLASH_PARSER_RE_STR = '/(%s)=' % '|'.join(__shortNameLUT.keys() + 51 __shortNameLUT.values()) 52 SLASH_PARSER_RE = re.compile(SLASH_PARSER_RE_STR) 53 54 COMMA_PARSER_RE_STR = '[,]?\s*(%s)=' % '|'.join(__shortNameLUT.keys() + 55 __shortNameLUT.values()) 56 COMMA_PARSER_RE = re.compile(COMMA_PARSER_RE_STR) 54 57 55 58 def __init__(self, dn=None, m2CryptoX509Name=None, separator=None): … … 249 252 self.__separator = self.parseSeparator(dn) 250 253 254 if self.__separator == '/': 255 parserRe = self.__class__.SLASH_PARSER_RE 256 257 elif self.__separator == ',': 258 parserRe = self.__class__.COMMA_PARSER_RE 259 else: 260 raise X500DNError("DN field separator %r not recognised" % 261 self.__separator) 262 251 263 try: 252 dnFields = X500DN.PARSER_RE.split(dn)264 dnFields = parserRe.split(dn) 253 265 if len(dnFields) < 2: 254 266 raise X500DNError("Error parsing DN string: \"%s\"" % dn)
Note: See TracChangeset
for help on using the changeset viewer.