code: def check_ssl_valid_date(self, url_data, cert):
          
          import ssl
          try:
              notAfter = ssl.cert_time_to_seconds(cert['notAfter'])
          except ValueError as msg:
              msg = _('Invalid SSL certficate "notAfter" value %r') % cert['notAfter']
              url_data.add_warning(msg)
              return
          curTime = time.time()
          # Calculate seconds until certifcate expires. Can be negative if
          # the certificate is already expired.
          secondsValid = notAfter - curTime
          args = dict(expire=cert['notAfter'])
          if secondsValid < 0:
              msg = _('SSL certficate is expired on %(expire)s.')
              url_data.add_warning(msg % args)
          else:
              args['valid'] = strformat.strduration_long(secondsValid)
              if secondsValid < self.warn_ssl_cert_secs_valid:
                  msg = _('SSL certificate expires on %(expire)s and is only %(valid)s valid.')
                  url_data.add_warning(msg % args)
              else:
                  msg = _('SSL certificate expires on %(expire)s and is %(valid)s valid.')
                  url_data.add_info(msg % args)
docs: Check if the certificate is still valid, or if configured check
          if it's at least a number of days valid.