Merge pull request #66 from duritong/fix-fingerprint-verification

disable verification of ssl certs via CA if fingerpint is set
This commit is contained in:
Rodolfo García Peñas (kix) 2021-05-09 11:28:17 +02:00 committed by GitHub
commit 721d579a32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -95,6 +95,9 @@ class IMAPServer:
self.__verifycert = None # Disable cert verification.
# This way of working sucks hard...
self.fingerprint = repos.get_ssl_fingerprint()
if self.fingerprint is not None:
self.__verifycert = None # if we have a cert fingerprint
# we do not require verfication via CA
self.tlslevel = repos.gettlslevel()
self.sslversion = repos.getsslversion()
self.starttls = repos.getstarttls()