]> pd.if.org Git - zpackage/commitdiff
print warning if host cert changed
authorNathan Wagner <nw@hydaspes.if.org>
Fri, 22 Feb 2019 01:53:56 +0000 (01:53 +0000)
committerNathan Wagner <nw@hydaspes.if.org>
Fri, 22 Feb 2019 01:53:56 +0000 (01:53 +0000)
src/fetchurl.c

index ace6849be2dacdd7be03b73e1655a671319ac46f..e09a43755d4aa03eb947e06577b19297753dce99 100644 (file)
@@ -209,6 +209,9 @@ int verify_first(struct TLSContext *context, struct TLSCertificate **chain, int
 
                close(trustdb);
                tls_buffer_free(&tbuf);
+               if (!match) {
+                       fprintf(stderr, "host %s certificate changed\n", host);
+               }
                return match ? no_error : bad_certificate;
        } while (!tbuf.error);