1
0

use x509 to check if server certificate has expired

This commit is contained in:
ThomasV
2014-06-27 11:36:51 +02:00
parent 8295ef8c7f
commit f9985ae233
3 changed files with 59 additions and 46 deletions

View File

@@ -169,8 +169,11 @@ class PaymentRequest:
x.slow_parse()
x509_chain.append(x)
if i == 0:
if not x.check_name(self.domain):
self.error = "Certificate Domain Mismatch"
try:
x.check_date()
x.check_name(self.domain)
except Exception as e:
self.error = str(e)
return
else:
if not x.check_ca():