diff --git a/fizz/crypto/aead/BUCK b/fizz/crypto/aead/BUCK deleted file mode 100644 index 289a33efa12..00000000000 --- a/fizz/crypto/aead/BUCK +++ /dev/null @@ -1,42 +0,0 @@ -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") - -oncall("secure_pipes") - -cpp_library( - name = "aead", - headers = [ - "Aead.h", - ], - exported_deps = [ - "//folly:optional", - "//folly/io:iobuf", - ], -) - -cpp_library( - name = "iobuf", - srcs = [ - "IOBufUtil.cpp", - ], - headers = [ - "IOBufUtil.h", - ], - exported_deps = [ - "//folly:range", - "//folly/io:iobuf", - ], -) - -cpp_library( - name = "cryptoutil", - headers = [ - "CryptoUtil.h", - ], - exported_deps = [ - ":aead", - ":iobuf", - "//folly:conv", - "//folly:memory", - "//folly:range", - ], -) diff --git a/fizz/crypto/aead/test/BUCK b/fizz/crypto/aead/test/BUCK deleted file mode 100644 index 220f84e3f28..00000000000 --- a/fizz/crypto/aead/test/BUCK +++ /dev/null @@ -1,55 +0,0 @@ -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") -load("@fbcode_macros//build_defs:cpp_unittest.bzl", "cpp_unittest") - -oncall("secure_pipes") - -cpp_library( - name = "mocks", - headers = [ - "Mocks.h", - ], - exported_deps = [ - "//fizz/crypto/aead:aead", - "//folly/portability:gmock", - ], -) - -cpp_library( - name = "data", - headers = [ - "Data.h", - ], - exported_deps = [ - "//fizz/record:record", - ], -) - -cpp_library( - name = "test_util", - srcs = [ - "TestUtil.cpp", - ], - headers = [ - "TestUtil.h", - ], - deps = [ - "//fizz/crypto/aead:iobuf", - ], - exported_deps = [ - "//folly:memory", - "//folly:string", - "//folly/io:iobuf", - ], -) - -cpp_unittest( - name = "util_test", - srcs = [ - "IOBufUtilTest.cpp", - ], - deps = [ - "//fizz/crypto/aead:iobuf", - "//folly/io:iobuf", - "//folly/portability:gtest", - ], -) diff --git a/fizz/crypto/exchange/BUCK b/fizz/crypto/exchange/BUCK deleted file mode 100644 index 0103d2ae08c..00000000000 --- a/fizz/crypto/exchange/BUCK +++ /dev/null @@ -1,38 +0,0 @@ -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") - -oncall("secure_pipes") - -cpp_library( - name = "key_exchange", - headers = [ - "KeyExchange.h", - ], - exported_deps = [ - "//folly:range", - "//folly/io:iobuf", - ], -) - -cpp_library( - name = "async_key_exchange", - headers = [ - "AsyncKeyExchange.h", - ], - exported_deps = [ - ":key_exchange", - "//folly/futures:core", - ], -) - -cpp_library( - name = "hybrid_key_exchange", - srcs = [ - "HybridKeyExchange.cpp", - ], - headers = [ - "HybridKeyExchange.h", - ], - exported_deps = [ - ":key_exchange", - ], -) diff --git a/fizz/crypto/exchange/test/BUCK b/fizz/crypto/exchange/test/BUCK deleted file mode 100644 index aa5611f2e7d..00000000000 --- a/fizz/crypto/exchange/test/BUCK +++ /dev/null @@ -1,41 +0,0 @@ -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") -load("@fbcode_macros//build_defs:cpp_unittest.bzl", "cpp_unittest") - -oncall("secure_pipes") - -cpp_library( - name = "mocks", - headers = [ - "Mocks.h", - ], - exported_deps = [ - "//fizz/crypto/exchange:async_key_exchange", - "//fizz/crypto/exchange:key_exchange", - "//folly/portability:gmock", - ], -) - -cpp_unittest( - name = "x25519", - srcs = [ - "X25519KeyExchangeTest.cpp", - ], - deps = [ - "//fizz/backend:libsodium", - "//folly:range", - "//folly:string", - "//folly/portability:gtest", - ], -) - -cpp_unittest( - name = "HybridExchange", - srcs = [ - "HybridKeyExchangeTest.cpp", - ], - deps = [ - ":mocks", - "//fizz/crypto/exchange:hybrid_key_exchange", - "//folly/portability:gtest", - ], -) diff --git a/fizz/crypto/hpke/BUCK b/fizz/crypto/hpke/BUCK deleted file mode 100644 index 14510534d29..00000000000 --- a/fizz/crypto/hpke/BUCK +++ /dev/null @@ -1,102 +0,0 @@ -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") - -oncall("secure_pipes") - -cpp_library( - name = "utils", - srcs = [ - "Utils.cpp", - ], - headers = [ - "Utils.h", - ], - exported_deps = [ - ":types", - "//fizz/crypto:crypto", - "//fizz/protocol:types", - "//folly:optional", - ], -) - -cpp_library( - name = "hkdf", - srcs = [ - "Hkdf.cpp", - ], - headers = [ - "Hkdf.h", - ], - deps = [ - "//fizz/record:record", - ], - exported_deps = [ - "//fizz/crypto:hasher", - "//fizz/crypto:hkdf", - ], -) - -cpp_library( - name = "dhkem", - srcs = [ - "DHKEM.cpp", - ], - headers = [ - "DHKEM.h", - ], - deps = [ - "//folly/io:iobuf", - ], - exported_deps = [ - ":hkdf", - ":types", - "//fizz/crypto/exchange:key_exchange", - "//fizz/record:record", - ], -) - -cpp_library( - name = "types", - headers = [ - "Types.h", - ], - exported_deps = [ - "//folly/io:iobuf", - ], -) - -cpp_library( - name = "context", - srcs = [ - "Context.cpp", - ], - headers = [ - "Context.h", - ], - deps = [ - ":utils", - ], - exported_deps = [ - "fbcode//fizz/crypto/aead:aead", - "fbcode//fizz/crypto/hpke:hkdf", - "fbcode//fizz/crypto/hpke:types", - "fbcode//fizz/protocol:types", - ], -) - -cpp_library( - name = "hpke", - srcs = [ - "Hpke.cpp", - ], - headers = [ - "Hpke.h", - ], - deps = [ - ":types", - ], - exported_deps = [ - ":context", - ":dhkem", - "//fizz/crypto/aead:aead", - ], -) diff --git a/fizz/crypto/hpke/test/BUCK b/fizz/crypto/hpke/test/BUCK deleted file mode 100644 index 00604cbdd15..00000000000 --- a/fizz/crypto/hpke/test/BUCK +++ /dev/null @@ -1,64 +0,0 @@ -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") -load("@fbcode_macros//build_defs:cpp_unittest.bzl", "cpp_unittest") - -oncall("secure_pipes") - -cpp_unittest( - name = "dhkem_test", - srcs = [ - "DHKEMTest.cpp", - ], - deps = [ - "//fizz/backend:openssl", - "//fizz/crypto/exchange:key_exchange", - "//fizz/crypto/hpke:dhkem", - "//fizz/crypto/test:TestUtil", - "//fizz/record:record", - "//folly/portability:gtest", - ], -) - -cpp_unittest( - name = "context_test", - srcs = [ - "ContextTest.cpp", - ], - supports_static_listing = False, - deps = [ - "//fizz/backend:openssl", - "//fizz/crypto/aead/test:test_util", - "//fizz/crypto/hpke:context", - "//fizz/crypto/hpke:utils", - "//fizz/crypto/test:TestUtil", - "//fizz/record:record", - ], -) - -cpp_library( - name = "mocks", - headers = [ - "Mocks.h", - ], - exported_deps = [ - "//fizz/backend:libsodium", - "//fizz/crypto/aead:aead", - "//fizz/crypto/hpke:context", - "//folly/portability:gmock", - ], -) - -cpp_unittest( - name = "hpke_test", - srcs = [ - "HpkeTest.cpp", - ], - deps = [ - ":mocks", - "//fizz/backend:libsodium", - "//fizz/backend:openssl", - "//fizz/crypto/hpke:hpke", - "//fizz/crypto/hpke:utils", - "//fizz/crypto/test:TestUtil", - "//fizz/protocol:default_factory", - ], -) diff --git a/fizz/crypto/test/BUCK b/fizz/crypto/test/BUCK deleted file mode 100644 index ed228e60735..00000000000 --- a/fizz/crypto/test/BUCK +++ /dev/null @@ -1,164 +0,0 @@ -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") -load("@fbcode_macros//build_defs:cpp_unittest.bzl", "cpp_unittest") - -oncall("secure_pipes") - -cpp_library( - name = "mocks", - headers = [ - "Mocks.h", - ], - exported_deps = [ - "//fizz/crypto:hasher", - "//fizz/crypto:key_derivation", - "//folly/portability:gmock", - ], -) - -cpp_library( - name = "HmacTest", - srcs = [ - "HmacTest.cpp", - ], - headers = [ - "HmacTest.h", - ], - deps = [ - "//fizz/crypto:crypto", - "//folly:string", - "//folly/io:iobuf", - "//folly/portability:gtest", - ], - exported_deps = [ - "//fizz/crypto:hasher", - "//fizz/protocol:types", - ], -) - -cpp_library( - name = "hash_test", - srcs = [ - "HashTest.cpp", - ], - headers = [ - "HashTest.h", - ], - deps = [ - "//fizz/crypto:crypto", - "//folly:string", - "//folly/io:iobuf", - "//folly/portability:gtest", - ], - exported_deps = [ - "//fizz/crypto:hasher", - "//fizz/protocol:types", - ], -) - -cpp_library( - name = "TestKeys", - srcs = [ - "TestKeys.cpp", - ], - headers = [ - "TestKeys.h", - ], - deps = [ - ], - exported_deps = [ - "//fizz/crypto:crypto", - "//folly:string", - ], -) - -cpp_library( - name = "signature_test_data", - srcs = [ - "SignatureTestData.cpp", - ], - headers = [ - "SignatureTestData.h", - ], - exported_deps = [ - "//fizz/record:record", - ], -) - -cpp_library( - name = "TestUtil", - srcs = [ - "TestUtil.cpp", - ], - headers = [ - "TestUtil.h", - ], - deps = [ - "//fizz:config", - "//fizz/backend:libaegis", - "//fizz/backend:openssl", - "//folly/ssl:openssl_cert_utils", - ], - exported_deps = [ - ":TestKeys", - "//fizz/crypto/aead:aead", - "//fizz/protocol:types", - "//folly:string", - "//folly/io:iobuf", - "//folly/ssl:openssl_ptr_types", - ], - external_deps = [ - ("libsodium", None, "sodium"), - ], -) - -cpp_unittest( - name = "hkdf_tests", - srcs = [ - "HkdfTest.cpp", - ], - supports_static_listing = False, - deps = [ - ":TestUtil", - "//fizz/backend:openssl", - "//fizz/crypto:hkdf", - "//folly/portability:gtest", - ], -) - -cpp_unittest( - name = "key_derivation", - srcs = [ - "KeyDerivationTest.cpp", - ], - supports_static_listing = False, - deps = [ - "//fizz/backend:openssl", - "//fizz/crypto:key_derivation", - "//folly:string", - "//folly/io:iobuf", - "//folly/portability:gtest", - ], -) - -cpp_unittest( - name = "random_generator_test", - srcs = [ - "RandomGeneratorTest.cpp", - ], - deps = [ - ":TestUtil", - "//fizz/crypto:random", - "//folly/portability:gtest", - ], -) - -cpp_unittest( - name = "utils_test", - srcs = [ - "UtilsTest.cpp", - ], - deps = [ - "//fizz/crypto:utils", - "//folly/portability:gtest", - ], -)