[Fuchsia] Fix root SSL cert path

Fuchsia stores the root SSL cert in a different location than Linux.
This commit corrects this, so that SSL connections work.
pull/25448/head
Aidan Wolter 4 years ago
parent 6102f67ade
commit 1538078745
  1. 1
      include/grpc/impl/codegen/port_platform.h
  2. 10
      src/core/lib/security/security_connector/ssl_utils.cc

@ -387,6 +387,7 @@
#define GPR_POSIX_TIME 1 #define GPR_POSIX_TIME 1
#define GPR_HAS_PTHREAD_H 1 #define GPR_HAS_PTHREAD_H 1
#define GPR_GETPID_IN_UNISTD_H 1 #define GPR_GETPID_IN_UNISTD_H 1
#define GRPC_ROOT_PEM_PATH "/config/ssl/cert.pem"
#else #else
#error "Could not auto-detect platform" #error "Could not auto-detect platform"
#endif #endif

@ -41,11 +41,13 @@
/* -- Constants. -- */ /* -- Constants. -- */
#ifndef INSTALL_PREFIX #if defined(GRPC_ROOT_PEM_PATH)
static const char* installed_roots_path = "/usr/share/grpc/roots.pem"; static const char* installed_roots_path = GRPC_ROOT_PEM_PATH;
#else #elif defined(INSTALL_PREFIX)
static const char* installed_roots_path = static const char* installed_roots_path =
INSTALL_PREFIX "/share/grpc/roots.pem"; INSTALL_PREFIX "/usr/share/grpc/roots.pem";
#else
static const char* installed_roots_path = "/usr/share/grpc/roots.pem";
#endif #endif
#ifndef TSI_OPENSSL_ALPN_SUPPORT #ifndef TSI_OPENSSL_ALPN_SUPPORT

Loading…
Cancel
Save