]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http: test-http-client - Test against missing SAN name
authorAki Tuomi <aki.tuomi@dovecot.fi>
Tue, 27 Mar 2018 07:31:53 +0000 (10:31 +0300)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Mon, 28 May 2018 06:33:04 +0000 (09:33 +0300)
Add test to make sure http client validates and ignores
missing subjectAltName in cert, when not validating names.

src/lib-http/test-http-client.c

index 9540e279807e7b1cdee01d701792e9650d946616..eb670007c03bf00821e92f3a26d77f2c2546e5ae 100644 (file)
@@ -284,6 +284,12 @@ static void run_tests(struct http_client *http_client)
        http_client_request_set_payload(http_req, post_payload, TRUE);
        i_stream_unref(&post_payload);
        http_client_request_submit(http_req);
+
+       test_req = i_new(struct http_test_request, 1);
+       http_req = http_client_request_url_str(http_client,
+               "GET", "https://invalid.dovecot.org/",
+               got_request_response, test_req);
+       http_client_request_submit(http_req);
 }
 
 static void