aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcorvid <devnull@localhost>2015-05-29 22:14:32 +0000
committercorvid <devnull@localhost>2015-05-29 22:14:32 +0000
commit5b317d03a17331f400d93fb957216030a8c86fd2 (patch)
treeab68ec3bb16fcaa3646f8bc227940a813668ce68
parent1970b812237a507a95394be1f31d3caa3242020b (diff)
documentation and not-currently-possible error case
-rw-r--r--src/IO/tls.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/IO/tls.c b/src/IO/tls.c
index b16c2ed1..dbdb1c92 100644
--- a/src/IO/tls.c
+++ b/src/IO/tls.c
@@ -466,10 +466,16 @@ static bool_t pattern_match (const char *pattern, const char *string)
return *n == '\0';
}
+/*
+ * Check that the certificate corresponds to the site it's presented for.
+ *
+ * Return TRUE if the hostname matched or the user indicated acceptance.
+ * FALSE on failure.
+ */
static bool_t Tls_check_cert_hostname(X509 *cert, const DilloUrl *url,
int *choice)
{
- dReturn_val_if_fail(cert && url, -1);
+ dReturn_val_if_fail(cert && url, FALSE);
char *msg;
const char *host = URL_HOST(url);