Commit Graph

373 Commits

Author SHA1 Message Date
Dan Rosart 477a1aec5a Don't segfault when product name from BIOS is empty
Somehow some Dell servers we're trying to run a gRPC client on have an empty product name in the BIOS. When gRPC tries to creadte default credentials, it checks whether it's running on GCE by strcmp()ing the contents of /sys/class/dmi/id/product_name to some magic strings. When it reads that file, it gets only a newline; in trim() it skips over the newline in both directions, and since end < start it returns nullptr. This causes a segfault in the strcmp() call. Since a machine without a product name clearly isn't GCE, change it to return false instead.
2018-07-03 13:13:37 -07:00
Dan Rosart f54fc5b53a Include port_platform in gcp_environment tests.
Both the Windows and Linux tests use platform-specific macros to
determine whether they should execute, but they weren't including the
file where those macros were defined, so they were always running the
else case of that check, which meant they weren't testing anything.
2018-06-27 16:57:11 -07:00
adelez 5bdd9a8cb9
Revert "Revert "Add suppressions to sanitizers for bazel builds"" 2018-06-15 16:31:21 -07:00
Nicolas Noble 43557fee0b
Revert "Add suppressions to sanitizers for bazel builds" 2018-06-14 10:49:11 -07:00
Adele Zhou 4cd659505c Add data param to grpc_cc_library 2018-06-13 15:36:28 -07:00
Yihua Zhang e145c52286 use a new gcp env check mechansim 2018-05-18 10:03:05 -07:00
Yihua Zhang cc93663910 Add ALTS fuzzer 2018-05-08 10:15:03 -07:00
Yihua Zhang 392dad7134 incorporate alts to google default creds 2018-05-03 20:12:20 -07:00
jiangtaoli2016 310d87d509 fix namespace of security_connector test functions 2018-04-27 08:49:02 -07:00
David Cowden 116fd29a36
gRPC core: strip zone-id from IPv6 hosts before TLS verification
When initiating a connection to an IPv6 peer using an address that is
not globally scoped, there may be ambiguity regarding which zone the
destination address applies to when multiple links of the same scope
are present. The scoped address architecture and zone-id syntax are
described in rfc4007 and rfc 6874, respectively:

  * https://tools.ietf.org/html/rfc4007#section-6
  * https://tools.ietf.org/html/rfc6874

This patch allows host name verification performed during TLS session
establishment, and on a per-call basis, to work correctly when the peer
presents a certificate with a non-global IPv6 address listed as one of
its alternate names. Whether arbitrary certificate authorities choose
issue certificates of this nature, or not, is outside the scope of gRPC.

The zone-id is separated from the address using a percent (%) character.
It is considered a system implementation detail and guidance suggests it
be stripped from any paths or addresses egressing a host because it is
irrelevant and meaningless otherwise. It would not make sense for a
server to present a certificate containing non-global IPv6 addresses
with zone-ids present nor would it work unless two hosts happened to
be using the same zone-id.

ssl_host_matches_name is prefixed with grpc_ because it has been
promoted to the global namespace for testing.

Resolves #14371
2018-04-26 12:25:38 -07:00
Yihua Zhang fe2fa0c1c8 Add C++ experimental API extensions for ALTS C stack 2018-04-16 15:11:32 -07:00
jiangtaoli2016 144f5559da cache default SSL root cert store 2018-03-23 11:28:48 -07:00
Yihua Zhang 04fb58efbd Add ALTS code to grpc/core 2018-03-08 06:49:24 -08:00
Sree Kuchibhotla ae277dd000
Revert "Add ALTS C stack to gRPC core" 2018-03-07 14:35:36 -08:00
Yihua Zhang eaf6486677 Add ALTS code to grpc/core 2018-03-06 21:40:45 -08:00
adelez 5d0480a88c
Merge pull request #14469 from adelez/foundry_integration
Add more bazel tests
2018-02-22 13:39:39 -08:00
Mark D. Roth 9b32d9c4f3
Merge pull request #14437 from yihuazhang/security_connector_replacement
Security connector replacement
2018-02-21 07:59:04 -08:00
Adele Zhou 1c805ec901 Add more bazel tests 2018-02-20 17:46:39 -08:00
Yihua Zhang 75f0a9fbd2 place security_connector in its own subdirectory 2018-02-20 10:09:47 -08:00
Adele Zhou a2013f86a0 Fix the fuzzer corpus path. 2018-02-16 22:16:38 -08:00
Noah Eisen 4d20a66685 Run clang fmt 2018-02-09 09:34:04 -08:00
Noah Eisen be82e64b3d Autofix c casts to c++ casts 2018-02-09 09:16:55 -08:00
Vijay Pai 18b9133f31 Merge branch 'master' into gpr_review 2018-02-08 12:18:09 -08:00
Vijay Pai d4d0a30c6f Privatize useful.h and avl.h 2018-02-02 09:16:44 -08:00
Vijay Pai 8a99fdb57e Move cmdline and subprocess from public gpr to test/core/util 2018-01-25 20:11:38 -08:00
Mark D. Roth dbdf495f61 Split lib/support into lib/gpr and lib/gpr++. 2018-01-18 11:21:12 -08:00
Jan Tattermusch 148700a8ea windows needs fflush after fprintf 2018-01-12 09:59:12 +01:00
Yash Tibrewal 8cf1470a51
Revert "Revert "All instances of exec_ctx being passed around in src/core removed"" 2017-12-06 09:47:54 -08:00
Yash Tibrewal ad4d2dde00
Revert "All instances of exec_ctx being passed around in src/core removed" 2017-12-06 09:05:05 -08:00
Yash Tibrewal 73bb67d054 Merge master into execctx 2017-12-05 17:49:11 -08:00
Dan Born 53d5503fac Pass a pollset_set to some client handshakers. 2017-12-04 18:01:47 -08:00
Yash Tibrewal c354269ba7 Remove _ prefixed variable names 2017-11-29 19:07:44 -08:00
Yash Tibrewal 81fc8c9c33 Fix tests to call grpc_init and grpc_shutdown before using exec_ctx 2017-11-28 13:23:36 -08:00
Yash Tibrewal a13a8c0f3e A few src/core fixes due to missing exec_ctx_finish 2017-11-21 19:38:09 -08:00
Yash Tibrewal 177039b2f8 Merge master 2017-11-16 19:31:28 -08:00
Yash Tibrewal 6c26b16fe0 Move ExecCtx to grpc_core namespace. Make exec_ctx a private static in ExecCtx and some minor changes 2017-11-14 18:11:22 -08:00
Yash Tibrewal 75122c2357 Address some PR comments 2017-11-14 01:36:28 -08:00
Craig Tiller be98d24841 clang-format after nullptr changes 2017-11-10 15:26:57 -08:00
Craig Tiller 4ac2b8e585 Enable clang-tidy as a sanity check, fix up all known failures 2017-11-10 14:14:17 -08:00
Yash Tibrewal 4e9265c828 Merge with master 2017-11-09 17:46:29 -08:00
Yash Tibrewal 40422d5fa6 Merge master 2017-11-06 14:43:31 -08:00
Craig Tiller 9ab26feb68 Merge github.com:grpc/grpc into 50 2017-11-06 09:45:55 -08:00
Julien Boeuf a274f341d5 Removing port 443 for the service name (used as audience) when the url is https. 2017-11-03 18:43:29 -07:00
Craig Tiller baa14a975e Update clang-format to 5.0 2017-11-03 09:09:36 -07:00
Yash Tibrewal 11a518995e LLVMfuzzer extern C 2017-10-31 15:15:41 -07:00
Yash Tibrewal 77532036b6 BUILD changes. test languauge to C++ 2017-10-31 11:11:18 -07:00
Yash Tibrewal 4d71636fcc some BUILD changes and designated initializers 2017-10-30 18:29:27 -07:00
Yash Tibrewal e586324627 BUILD files changes for bazel 2017-10-30 17:52:07 -07:00
Yash Tibrewal 39aed1ae8b Remove unnecessary extern Cs 2017-10-25 17:04:35 -07:00
Yash Tibrewal af922468dd ssl_credentials_tests C++ized 2017-10-25 16:29:49 -07:00