3 from time import time, strftime, localtime
12 if cfg.has_option('global', 'warning_days'):
13 warning_days = int(cfg.get('global', 'warning_days'))
14 for tag in cfg.sections():
15 if tag == 'global' or tag == 'ca' or tag == 'DEFAULT':
17 crt_file = getpath('rsa_crt', tag)
18 crt_date = getcertdate(crt_file)
20 days = int((now - crt_date)/86400)
21 if days > -warning_days:
23 The certificate '%s' should be renewed!
25 ''' % (tag, strftime('%d/%m/%Y', localtime(crt_date)))