Skip to content

Commit

Permalink
crypto: moving core code to core (envoyproxy#18236)
Browse files Browse the repository at this point in the history
Part of envoyproxy#9953

Signed-off-by: Alyssa Wilk <[email protected]>
  • Loading branch information
alyssawilk authored Sep 27, 2021
1 parent 2137383 commit 55fc06b
Show file tree
Hide file tree
Showing 20 changed files with 17 additions and 53 deletions.
2 changes: 0 additions & 2 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ extensions/filters/common/original_src @snowp @klarose
/*/extensions/wasm_runtime/ @PiotrSikora @mathetake @lizan
# common matcher
/*/extensions/common/matcher @mattklein123 @yangminzhu
# common crypto extension
/*/extensions/common/crypto @lizan @bdecoste @asraa
/*/extensions/common/proxy_protocol @alyssawilk @wez470
/*/extensions/filters/http/grpc_http1_bridge @snowp @jose
/*/extensions/filters/http/gzip @gsagula @dio
Expand Down
9 changes: 9 additions & 0 deletions source/common/crypto/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,17 @@ envoy_package()

envoy_cc_library(
name = "utility_lib",
srcs = [
"crypto_impl.cc",
"utility_impl.cc",
],
hdrs = [
"crypto_impl.h",
"utility.h",
"utility_impl.h",
],
external_deps = [
"ssl",
],
deps = [
"//envoy/buffer:buffer_interface",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "source/extensions/common/crypto/crypto_impl.h"
#include "source/common/crypto/crypto_impl.h"

namespace Envoy {
namespace Common {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "source/extensions/common/crypto/utility_impl.h"
#include "source/common/crypto/utility_impl.h"

#include "source/common/common/assert.h"
#include "source/extensions/common/crypto/crypto_impl.h"
#include "source/common/crypto/crypto_impl.h"

#include "absl/container/fixed_array.h"
#include "absl/strings/ascii.h"
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion source/extensions/all_extensions.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ load("@envoy_build_config//:extensions_build_config.bzl", "EXTENSIONS")
# These extensions are registered using the extension system but are required for the core Envoy build.
# The map may be overridden by extensions specified in envoy_build_config.
_required_extensions = {
"envoy.common.crypto.utility_lib": "//source/extensions/common/crypto:utility_lib",
"envoy.http.original_ip_detection.xff": "//source/extensions/http/original_ip_detection/xff:config",
"envoy.request_id.uuid": "//source/extensions/request_id/uuid:config",
"envoy.transport_sockets.tls": "//source/extensions/transport_sockets/tls:config",
Expand Down
1 change: 0 additions & 1 deletion source/extensions/common/aws/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ envoy_cc_library(
"//source/common/crypto:utility_lib",
"//source/common/http:headers_lib",
"//source/common/singleton:const_singleton",
"//source/extensions/common/crypto:utility_lib",
],
)

Expand Down
34 changes: 0 additions & 34 deletions source/extensions/common/crypto/BUILD

This file was deleted.

1 change: 0 additions & 1 deletion source/extensions/filters/http/lua/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ envoy_cc_library(
"//source/common/crypto:utility_lib",
"//source/common/http:header_utility_lib",
"//source/common/http:utility_lib",
"//source/extensions/common/crypto:utility_lib",
"//source/extensions/filters/common/lua:lua_lib",
"//source/extensions/filters/common/lua:wrappers_lib",
],
Expand Down
1 change: 1 addition & 0 deletions source/extensions/filters/http/lua/lua_filter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "source/common/common/assert.h"
#include "source/common/common/enum_to_int.h"
#include "source/common/config/datasource.h"
#include "source/common/crypto/crypto_impl.h"
#include "source/common/crypto/utility.h"
#include "source/common/http/message_impl.h"

Expand Down
1 change: 0 additions & 1 deletion source/extensions/filters/http/lua/wrappers.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include "envoy/stream_info/stream_info.h"

#include "source/common/crypto/utility.h"
#include "source/extensions/common/crypto/crypto_impl.h"
#include "source/extensions/filters/common/lua/lua.h"
#include "source/extensions/filters/common/lua/wrappers.h"

Expand Down
2 changes: 1 addition & 1 deletion source/extensions/filters/http/oauth2/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ envoy_cc_library(
"//source/common/common:assert_lib",
"//source/common/common:empty_string",
"//source/common/config:datasource_lib",
"//source/common/crypto:utility_lib",
"//source/common/formatter:substitution_formatter_lib",
"//source/common/http:rest_api_fetcher_lib",
"//source/common/protobuf:utility_lib",
"//source/extensions/common/crypto:utility_lib",
"//source/extensions/filters/http/common:pass_through_filter_lib",
"@envoy_api//envoy/config/core/v3:pkg_cc_proto",
"@envoy_api//envoy/extensions/filters/http/oauth2/v3alpha:pkg_cc_proto",
Expand Down
2 changes: 1 addition & 1 deletion test/common/config/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -486,9 +486,9 @@ envoy_cc_test(
deps = [
"//source/common/common:empty_string",
"//source/common/config:datasource_lib",
"//source/common/crypto:utility_lib",
"//source/common/http:message_lib",
"//source/common/protobuf:utility_lib",
"//source/extensions/common/crypto:utility_lib",
"//test/mocks/event:event_mocks",
"//test/mocks/init:init_mocks",
"//test/mocks/runtime:runtime_mocks",
Expand Down
4 changes: 1 addition & 3 deletions test/common/crypto/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ envoy_cc_test(
"//source/common/buffer:buffer_lib",
"//source/common/common:hex_lib",
"//source/common/crypto:utility_lib",
"//source/extensions/common/crypto:utility_lib",
],
)

Expand All @@ -35,7 +34,7 @@ envoy_cc_fuzz_test(
name = "get_sha_256_digest_fuzz_test",
srcs = ["get_sha_256_digest_fuzz_test.cc"],
corpus = "get_sha_256_digest_corpus",
deps = ["//source/extensions/common/crypto:utility_lib"],
deps = ["//source/common/crypto:utility_lib"],
)

envoy_cc_fuzz_test(
Expand All @@ -47,6 +46,5 @@ envoy_cc_fuzz_test(
":verify_signature_fuzz_proto_cc_proto",
"//source/common/common:hex_lib",
"//source/common/crypto:utility_lib",
"//source/extensions/common/crypto:utility_lib",
],
)
2 changes: 1 addition & 1 deletion test/common/crypto/utility_test.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "source/common/buffer/buffer_impl.h"
#include "source/common/common/hex.h"
#include "source/common/crypto/crypto_impl.h"
#include "source/common/crypto/utility.h"
#include "source/extensions/common/crypto/crypto_impl.h"

#include "gtest/gtest.h"

Expand Down
1 change: 0 additions & 1 deletion test/extensions/common/wasm/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ envoy_cc_test(
"//source/common/event:dispatcher_lib",
"//source/common/stats:isolated_store_lib",
"//source/common/stats:stats_lib",
"//source/extensions/common/crypto:utility_lib",
"//source/extensions/common/wasm:wasm_lib",
"//test/extensions/common/wasm:wasm_runtime",
"//test/extensions/common/wasm/test_data:test_context_cpp_plugin",
Expand Down
1 change: 0 additions & 1 deletion test/extensions/filters/http/wasm/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ envoy_extension_cc_test(
"//source/common/common:hex_lib",
"//source/common/crypto:utility_lib",
"//source/common/http:message_lib",
"//source/extensions/common/crypto:utility_lib",
"//source/extensions/common/wasm:wasm_lib",
"//source/extensions/filters/http/wasm:config",
"//test/extensions/common/wasm:wasm_runtime",
Expand Down
1 change: 0 additions & 1 deletion test/extensions/filters/network/wasm/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ envoy_extension_cc_test(
"//source/common/common:base64_lib",
"//source/common/common:hex_lib",
"//source/common/crypto:utility_lib",
"//source/extensions/common/crypto:utility_lib",
"//source/extensions/common/wasm:wasm_lib",
"//source/extensions/filters/network/wasm:config",
"//test/extensions/common/wasm:wasm_runtime",
Expand Down
1 change: 0 additions & 1 deletion test/per_file_coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ declare -a KNOWN_LOW_COVERAGE=(
"source/common/watchdog:42.9" # Death tests don't report LCOV
"source/common/config/xds_mux:94.5"
"source/exe:94.3"
"source/extensions/common/crypto:91.5"
"source/extensions/common/tap:95.9"
"source/extensions/common/wasm:95.3" # flaky: be careful adjusting
"source/extensions/common/wasm/null:77.8"
Expand Down

0 comments on commit 55fc06b

Please sign in to comment.