diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2015-02-20 20:59:29 +0100 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2015-02-20 21:10:32 +0100 |
commit | 72743820abc861f139804b5c5e31cc8962d85b59 (patch) | |
tree | 6035fa77fa0460b2b464f1d56a2c2cc2492e3548 /src/core/security | |
parent | b681d0adba74e8f870082a15103b71038dd5beb0 (diff) |
Defining an installation prefix for grpc's root certs at compilation time.
Diffstat (limited to 'src/core/security')
-rw-r--r-- | src/core/security/security_context.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/security/security_context.c b/src/core/security/security_context.c index f9fb2407cf..ec4aa16e79 100644 --- a/src/core/security/security_context.c +++ b/src/core/security/security_context.c @@ -60,6 +60,12 @@ "AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:AES128-" \ "SHA256:AES256-SHA256" +#ifndef INSTALL_PREFIX +static const char *installed_roots_path = "/etc/grpc/roots.pem"; +#else +static const char *installed_roots_path = INSTALL_PREFIX "/etc/grpc/roots.pem"; +#endif + /* -- Common methods. -- */ grpc_security_status grpc_security_context_create_handshaker( @@ -404,6 +410,7 @@ static void init_default_pem_root_certs(void) { default_pem_root_certs = gpr_load_file(default_root_certs_path, NULL); gpr_free(default_root_certs_path); } + (void) installed_roots_path; } static size_t get_default_pem_roots(const unsigned char **pem_root_certs) { |