iSulad/0011-verify-peer-if-it-s-secure-registry.patch
haozi007 112089d24b sync from openeuler
1. support default container log options
2. fix bugs
3. show all mutl network's ips
4. update api.proto to k8s v1.19.3

Signed-off-by: haozi007 <liuhao27@huawei.com>
2020-12-03 19:20:13 +08:00

30 lines
999 B
Diff

From 1f8f03ebc44a763a7686eda8cbf6341b9c057a6f Mon Sep 17 00:00:00 2001
From: WangFengTu <wangfengtu@huawei.com>
Date: Sat, 28 Nov 2020 10:45:59 +0800
Subject: [PATCH 11/17] verify peer if it's secure registry
we verify peer only when CA file is provided before,
now we verify peer if it's secure registry
Signed-off-by: WangFengTu <wangfengtu@huawei.com>
---
src/daemon/modules/image/oci/registry/http_request.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/daemon/modules/image/oci/registry/http_request.c b/src/daemon/modules/image/oci/registry/http_request.c
index 60644ed5..fb44a7b6 100644
--- a/src/daemon/modules/image/oci/registry/http_request.c
+++ b/src/daemon/modules/image/oci/registry/http_request.c
@@ -118,7 +118,7 @@ static int setup_ssl_config(pull_descriptor *desc, struct http_get_options *opti
}
}
- if (options->ca_file != NULL) {
+ if (!desc->insecure_registry) {
options->ssl_verify_peer = true;
}
--
2.25.1