Merge branch 'fingerprint-colons' into next

Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
Nicolas Sebrecht 2018-05-15 00:41:15 +02:00
commit 356bd0b78f
2 changed files with 6 additions and 3 deletions

View File

@ -788,8 +788,11 @@ remotehost = examplehost
# In Windows, Microsoft uses the term "thumbprint" instead of "fingerprint". # In Windows, Microsoft uses the term "thumbprint" instead of "fingerprint".
# #
# Supported fingerprint hashes are sha512, sha384, sha256, sha224 and sha1. # Supported fingerprint hashes are sha512, sha384, sha256, sha224 and sha1.
# Fingerprints must be in hexadecimal form without leading '0x': # Fingerprints must be in hexadecimal form without leading '0x', and may have
# 40 hex digits like bbfe29cf97acb204591edbafe0aa8c8f914287c9. # the separating colons. This is non case-sensitive.
# Examples:
# sha1 "bbfe29cf97acb204591edbafe0aa8c8f914287c9".
# sha1 with colons "BB:FE:29:CF:97:AC:B2:04:59:1E:DB:AF:E0:AA:8C:8F:91:42:87:C9"
# #
#cert_fingerprint = <SHAn_of_server_certificate_here>[, <another_SHAm>] #cert_fingerprint = <SHAn_of_server_certificate_here>[, <another_SHAm>]

View File

@ -293,7 +293,7 @@ class IMAPRepository(BaseRepository):
comma-separated fingerprints in hex form.""" comma-separated fingerprints in hex form."""
value = self.getconf('cert_fingerprint', "") value = self.getconf('cert_fingerprint', "")
return [f.strip().lower() for f in value.split(',') if f] return [f.strip().lower().replace(":", "") for f in value.split(',') if f]
def setoauth2_request_url(self, url): def setoauth2_request_url(self, url):
self.oauth2_request_url = url self.oauth2_request_url = url