aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/httpcli/httpcli.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/httpcli/httpcli.c')
-rw-r--r--src/core/httpcli/httpcli.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/core/httpcli/httpcli.c b/src/core/httpcli/httpcli.c
index 8a1c04b631..d372e694e9 100644
--- a/src/core/httpcli/httpcli.c
+++ b/src/core/httpcli/httpcli.c
@@ -43,7 +43,6 @@
#include "src/core/httpcli/httpcli_security_context.h"
#include "src/core/httpcli/parser.h"
#include "src/core/security/security_context.h"
-#include "src/core/security/google_root_certs.h"
#include "src/core/security/secure_transport_setup.h"
#include "src/core/support/string.h"
#include <grpc/support/alloc.h>
@@ -182,9 +181,16 @@ static void on_connected(void *arg, grpc_endpoint *tcp) {
req->ep = tcp;
if (req->use_ssl) {
grpc_channel_security_context *ctx = NULL;
+ const unsigned char *pem_root_certs = NULL;
+ size_t pem_root_certs_size = grpc_get_default_ssl_roots(&pem_root_certs);
+ if (pem_root_certs == NULL || pem_root_certs_size == 0) {
+ gpr_log(GPR_ERROR, "Could not get default pem root certs.");
+ finish(req, 0);
+ return;
+ }
GPR_ASSERT(grpc_httpcli_ssl_channel_security_context_create(
- grpc_google_root_certs, grpc_google_root_certs_size,
- req->host, &ctx) == GRPC_SECURITY_OK);
+ pem_root_certs, pem_root_certs_size, req->host, &ctx) ==
+ GRPC_SECURITY_OK);
grpc_setup_secure_transport(&ctx->base, tcp, on_secure_transport_setup_done,
req);
grpc_security_context_unref(&ctx->base);