Rocco Rutte:
[apps/madmutt.git] / mutt_ssl.c
index 0cf05f7..020cd1d 100644 (file)
@@ -374,7 +374,7 @@ static char *x509_get_part (char *line, const char *ndx)
 
   c = strstr (line, ndx);
   if (c) {
-    c += safe_strlen (ndx);
+    c += mutt_strlen (ndx);
     c2 = strchr (c, '/');
     if (c2)
       *c2 = '\0';
@@ -590,7 +590,9 @@ static int ssl_check_certificate (sslsockdata * data)
   snprintf (menu->dialog[row++], SHORT_STRING, _("Fingerprint: %s"), buf);
 
   menu->title = _("SSL Certificate check");
-  if (SslCertFile) {
+
+  if (SslCertFile && X509_cmp_current_time (X509_get_notAfter (data->cert)) >= 0
+      && X509_cmp_current_time (X509_get_notBefore (data->cert)) < 0) {
     menu->prompt = _("(r)eject, accept (o)nce, (a)ccept always");
     menu->keys = _("roa");
   }