#include <fcntl.h>
#include "tlse.h"
-#define MARK fprintf(stderr, "%s %s:%d\n", __FILE__, __func__, __LINE__)
struct tls_uri {
char *scheme;
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);
ltc_mp = tfm_desc;
- while ((option = getopt(ac, av, "o:OrIfz:n#R:SkK")) != -1) {
+ while ((option = getopt(ac, av, "o:OrIfz:np#R:SkK")) != -1) {
switch (option) {
case 'o': outfile = optarg; break;
case 'O': calcoutfile = 1; break;
case 'z': lmfile = optarg; break;
case 'n': ifnewer = 1; break;
case 'R': redirlimit = strtol(optarg, 0, 10); break;
+ case 'p':
case '#': progressbar = 1; break;
default:
exit(EXIT_FAILURE);
switch (io.status_code) {
case 304:
+ progressbar = 0;
break;
case 301:
case 302:
pdots(50, '.', total, total+ret,
io.content_length);
} else {
- int old = total / 1000000;
- int new = (total+ret)/1000000;
- while (old < new) {
- putc('.',stderr);
- }
+ putc('\r', stderr);
+ fprintf(stderr, "%zu", total+ret);
}
total += ret;
}