diff options
author | 2015-02-20 10:40:11 -0800 | |
---|---|---|
committer | 2015-02-20 11:27:37 -0800 | |
commit | 1bc21a46db433f3c4ac530900160d849789e832d (patch) | |
tree | e95fefdacafcc8c142e6b9eaa722c9ade421aad6 /src/core/httpcli/httpcli.c | |
parent | b472e2364af6ba2a33c7321cfa9cbbfd6cbb4eb7 (diff) |
Removing the hardcoded SSL roots.
- Makes 2 tests fail:
- httpcli_test
- interop_test
Diffstat (limited to 'src/core/httpcli/httpcli.c')
-rw-r--r-- | src/core/httpcli/httpcli.c | 12 |
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); |