| 
					
				 | 
			
			
				@@ -21,11 +21,13 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 #include <string.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 #include <grpc/grpc.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <grpc/grpc_security_constants.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 #include <grpc/support/alloc.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 #include <grpc/support/log.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 #include <grpc/support/string_util.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 #include <grpc/support/subprocess.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 #include <grpc/support/sync.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include "src/core/lib/gpr/env.h" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 #include "src/core/lib/iomgr/iomgr.h" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 #include "test/core/util/port.h" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 #include "test/core/util/test_config.h" 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -154,7 +156,7 @@ int main(int argc, char** argv) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   char* root; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   if (lslash != nullptr) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     /* Hack for bazel target */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    if (lslash - me >= (unsigned)(sizeof("http") - 1) && 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if ((unsigned)(lslash - me) >= (sizeof("http") - 1) && 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         strncmp(me + (lslash - me) - sizeof("http") + 1, "http", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 sizeof("http") - 1) == 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       lslash = me + (lslash - me) - sizeof("http"); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -176,6 +178,12 @@ int main(int argc, char** argv) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     gpr_asprintf(&args[1], "%s/test/core/http/test_server.py", root); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  /* Set the environment variable for the SSL certificate file */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  char* pem_file; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  gpr_asprintf(&pem_file, "%s/src/core/tsi/test_creds/ca.pem", root); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  gpr_setenv(GRPC_DEFAULT_SSL_ROOTS_FILE_PATH_ENV_VAR, pem_file); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  gpr_free(pem_file); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   /* start the server */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   args[1 + arg_shift] = const_cast<char*>("--port"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   gpr_asprintf(&args[2 + arg_shift], "%d", port); 
			 |