diff options
author | Dirk Mueller <dirk@dmllr.de> | 2013-07-09 18:28:34 +0200 |
---|---|---|
committer | Dirk Mueller <dirk@dmllr.de> | 2013-07-09 18:29:56 +0200 |
commit | c555662b20bd6890a44114f2debbd7d4a63d15a7 (patch) | |
tree | 90f16d86b7f82163bae07e73da33d82e3bcfec9b /keystoneclient/common | |
parent | 6d0afcc98e3df36f9b57642daef25d4d3091acf7 (diff) | |
download | python-keystoneclient-c555662b20bd6890a44114f2debbd7d4a63d15a7.tar.gz |
Merge " Cleanup docstrings " from keystone/common/cms.py
In an attempt to unify both implementations in order to
be able to remove one of the duplicated ones, merge the
changes from this commit in keystone:
Author: Dolph Mathews <dolph.mathews@gmail.com>
Date: Fri May 24 11:36:44 2013 -0500
Cleanup docstrings (flake8 H401, H402, H403, H404)
Change-Id: Ib23c9ab5066cfdcdda4e07cd30fa8f6ff47949bd
Diffstat (limited to 'keystoneclient/common')
-rw-r--r-- | keystoneclient/common/cms.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/keystoneclient/common/cms.py b/keystoneclient/common/cms.py index f08dbe4..26f9795 100644 --- a/keystoneclient/common/cms.py +++ b/keystoneclient/common/cms.py @@ -25,9 +25,7 @@ def _ensure_subprocess(): def cms_verify(formatted, signing_cert_file_name, ca_file_name): - """ - verifies the signature of the contents IAW CMS syntax - """ + """Verifies the signature of the contents IAW CMS syntax.""" _ensure_subprocess() process = subprocess.Popen(["openssl", "cms", "-verify", "-certfile", signing_cert_file_name, @@ -76,7 +74,8 @@ def verify_token(token, signing_cert_file_name, ca_file_name): def is_ans1_token(token): - ''' + """Determine if a token appears to be PKI-based. + thx to ayoung for sorting this out. base64 decoded hex representation of MII is 3082 @@ -113,7 +112,7 @@ def is_ans1_token(token): Max length of the content using 2 octets is 7FFF or 32767 It's not practical to support a token of this length or greater in http therefore, we will check for MII only and ignore the case of larger tokens - ''' + """ return token[:3] == PKI_ANS1_PREFIX @@ -160,7 +159,8 @@ def cms_to_token(cms_text): def cms_hash_token(token_id): - """ + """Hash PKI tokens. + return: for ans1_token, returns the hash of the passed in token otherwise, returns what it was passed in. """ |