uclient-fetch: wolfSSL: fix certificate validation
[project/uclient.git] / uclient-fetch.c
index bbf5eec58d710c6c8e58da0e7a62ea8dd2835559..958f75618194d141d5aaaec74ca0db165a2ae8f2 100644 (file)
@@ -591,6 +591,8 @@ int main(int argc, char **argv)
                        switch (longopt_idx) {
                        case L_NO_CHECK_CERTIFICATE:
                                verify = false;
                        switch (longopt_idx) {
                        case L_NO_CHECK_CERTIFICATE:
                                verify = false;
+                               if (ssl_ctx)
+                                       ssl_ops->context_set_require_validation(ssl_ctx, verify);
                                break;
                        case L_CA_CERTIFICATE:
                                has_cert = true;
                                break;
                        case L_CA_CERTIFICATE:
                                has_cert = true;