diff options
author | Julien Boeuf <jboeuf@google.com> | 2016-01-27 16:23:41 -0800 |
---|---|---|
committer | Julien Boeuf <jboeuf@google.com> | 2016-01-27 16:23:41 -0800 |
commit | a50da4757ae7eb75b67d78b7e82fba79d2c987da (patch) | |
tree | ede3dac93b6288e47edbcd8c26b5f7e0eb32f84e /src/core/security/security_connector.c | |
parent | 373debd5c094a3a1c60b2d1b4adc420e933653e7 (diff) |
Addressing comments.
The new API is now actually useful...
Diffstat (limited to 'src/core/security/security_connector.c')
-rw-r--r-- | src/core/security/security_connector.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/security/security_connector.c b/src/core/security/security_connector.c index 7e5cb67146..8a67243a18 100644 --- a/src/core/security/security_connector.c +++ b/src/core/security/security_connector.c @@ -61,12 +61,12 @@ static const char *installed_roots_path = INSTALL_PREFIX "/share/grpc/roots.pem"; #endif -/* -- Overridden default roots file path. -- */ +/* -- Overridden default roots. -- */ -static const char *overridden_default_roots_file_path = NULL; +static gpr_slice overridden_default_roots; -void grpc_override_ssl_default_roots_file_path(const char *roots_path) { - overridden_default_roots_file_path = roots_path; +void grpc_override_ssl_default_roots(const char *roots_pem) { + overridden_default_roots = gpr_slice_from_copied_string(roots_pem); } /* -- Cipher suites. -- */ @@ -616,8 +616,8 @@ static gpr_slice compute_default_pem_root_certs_once(void) { /* Try overridden roots path if needed. */ if (GPR_SLICE_IS_EMPTY(result) && - overridden_default_roots_file_path != NULL) { - result = gpr_load_file(overridden_default_roots_file_path, 0, NULL); + !GPR_SLICE_IS_EMPTY(overridden_default_roots)) { + result = gpr_slice_ref(overridden_default_roots); } /* Fall back to installed certs if needed. */ |