comparison web/secure.py @ 489:46e327c00246

gets current params
author Matt Johnston <matt@ucc.asn.au>
date Tue, 11 Feb 2014 22:10:32 +0800
parents 4792e9910cde
children 4fa8cbf31065
comparison
equal deleted inserted replaced
488:4792e9910cde 489:46e327c00246
13 __all__ = ["get_csrf_blob", "check_csrf_blob", "setup_csrf", "get_user_hash"] 13 __all__ = ["get_csrf_blob", "check_csrf_blob", "setup_csrf", "get_user_hash"]
14 14
15 HASH=hashlib.sha1 15 HASH=hashlib.sha1
16 16
17 def get_user_hash(): 17 def get_user_hash():
18 if bottle.request.environ.get('SSL_CLIENT_VERIFY', '') != 'GENEROUS': 18 verify = bottle.request.environ.get('SSL_CLIENT_VERIFY', '')
19 if not (verify == 'GENEROUS' or verify == 'SUCCESS'):
19 return 'FAILVERIFY' 20 return 'FAILVERIFY'
20 blob = bottle.request.environ.get('SSL_CLIENT_CERT') 21 blob = bottle.request.environ.get('SSL_CLIENT_CERT')
21 if not blob: 22 if not blob:
22 return 'NOCERT' 23 return 'NOCERT'
23 24