--- davfs2-1.4.7.orig/src/webdav.c 2012-07-19 13:27:51.000000000 +0200 +++ davfs2-1.4.7/src/webdav.c 2014-01-01 20:14:54.000000000 +0100 @@ -21,7 +21,6 @@ #include "config.h" #include -#include #ifdef HAVE_FCNTL_H #include #endif @@ -52,6 +51,8 @@ #include #endif +#include + #include #include #include @@ -1921,6 +1922,7 @@ quota_result(void *userdata, const ne_ur static int ssl_verify(void *userdata, int failures, const ne_ssl_certificate *cert) { + regex_t *re; char *issuer = ne_ssl_readable_dname(ne_ssl_cert_issuer(cert)); char *subject = ne_ssl_readable_dname(ne_ssl_cert_subject(cert)); char *digest = ne_calloc(NE_SSL_DIGESTLEN); @@ -1967,8 +1969,13 @@ ssl_verify(void *userdata, int failures, len = getline(&s, &n, stdin); if (len < 0) abort(); - if (rpmatch(s) > 0) - ret = 0; + if (regcomp(&re, "^[yY]", REG_EXTENDED) != 0) { + if (regexec(&re, s, (size_t)0, NULL, 0) < 1) { + regfree(&re); + ret = -1; + } + ret = 0; + } free(s); }