diff options
author | 2017-11-28 14:56:17 -0800 | |
---|---|---|
committer | 2017-11-28 14:56:17 -0800 | |
commit | 80453cbd38ea373fde367e2f374643f055bc223d (patch) | |
tree | bc2d12f07104995e936578a2dfc116055184fbad | |
parent | d9475e55cc57703fe9286d2236430b91c3608952 (diff) | |
parent | 2a0432edc56b6a1b2ade4c30bc3267717eac5a86 (diff) |
Merge pull request #13525 from vjpai/desecure
Remove unnecessary secure dependences
-rw-r--r-- | BUILD | 1 | ||||
-rw-r--r-- | bazel/cc_grpc_library.bzl | 4 | ||||
-rw-r--r-- | examples/BUILD | 4 | ||||
-rwxr-xr-x | tools/run_tests/sanity/check_unsecure.sh | 24 | ||||
-rw-r--r-- | tools/run_tests/sanity/sanity_tests.yaml | 1 |
5 files changed, 29 insertions, 5 deletions
@@ -418,7 +418,6 @@ grpc_cc_library( ], external_deps = [ "nanopb", - "libssl", ], language = "c++", public_hdrs = [ diff --git a/bazel/cc_grpc_library.bzl b/bazel/cc_grpc_library.bzl index afc5543795..94781ed7ae 100644 --- a/bazel/cc_grpc_library.bzl +++ b/bazel/cc_grpc_library.bzl @@ -60,10 +60,10 @@ def cc_grpc_library(name, srcs, deps, proto_only, well_known_protos, generate_mo if use_external: # when this file is used by non-grpc projects - grpc_deps = ["//external:grpc++", "//external:grpc++_codegen_proto", + grpc_deps = ["//external:grpc++_codegen_proto", "//external:protobuf"] else: - grpc_deps = ["//:grpc++", "//:grpc++_codegen_proto", "//external:protobuf"] + grpc_deps = ["//:grpc++_codegen_proto", "//external:protobuf"] native.cc_library( name = name, diff --git a/examples/BUILD b/examples/BUILD index 3e9e508ec2..0f18cfa9ba 100644 --- a/examples/BUILD +++ b/examples/BUILD @@ -42,12 +42,12 @@ cc_binary( name = "greeter_client", srcs = ["cpp/helloworld/greeter_client.cc"], defines = ["BAZEL_BUILD"], - deps = [":helloworld"], + deps = [":helloworld", "//:grpc++"], ) cc_binary( name = "greeter_server", srcs = ["cpp/helloworld/greeter_server.cc"], defines = ["BAZEL_BUILD"], - deps = [":helloworld"], + deps = [":helloworld", "//:grpc++"], ) diff --git a/tools/run_tests/sanity/check_unsecure.sh b/tools/run_tests/sanity/check_unsecure.sh new file mode 100755 index 0000000000..aabafedfb8 --- /dev/null +++ b/tools/run_tests/sanity/check_unsecure.sh @@ -0,0 +1,24 @@ +#!/bin/sh +# Copyright 2017 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +set -e + +# Make sure that there is no path from a known unsecure target +# to an SSL library + +test `bazel query "somepath(//test/cpp/microbenchmarks:helpers, //external:libssl)" 2>/dev/null | wc -l` -eq 0 + +# Fall through with the exit code of that command diff --git a/tools/run_tests/sanity/sanity_tests.yaml b/tools/run_tests/sanity/sanity_tests.yaml index 81eec4d149..3ce864a8bd 100644 --- a/tools/run_tests/sanity/sanity_tests.yaml +++ b/tools/run_tests/sanity/sanity_tests.yaml @@ -6,6 +6,7 @@ - script: tools/run_tests/sanity/check_submodules.sh - script: tools/run_tests/sanity/check_test_filtering.py - script: tools/run_tests/sanity/check_tracer_sanity.py +- script: tools/run_tests/sanity/check_unsecure.sh - script: tools/run_tests/sanity/core_banned_functions.py - script: tools/run_tests/sanity/core_untyped_structs.sh - script: tools/buildgen/generate_projects.sh -j 3 |