1# Copyright 2021 The Pigweed Authors 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); you may not 4# use this file except in compliance with the License. You may obtain a copy of 5# the License at 6# 7# https://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12# License for the specific language governing permissions and limitations under 13# the License. 14 15load( 16 "//pw_build:pigweed.bzl", 17 "pw_cc_facade", 18 "pw_cc_library", 19 "pw_cc_test", 20) 21 22package(default_visibility = ["//visibility:public"]) 23 24licenses(["notice"]) 25 26pw_cc_facade( 27 name = "pw_tls_client_facade", 28 hdrs = [ 29 "public/pw_tls_client/options.h", 30 "public/pw_tls_client/session.h", 31 "public/pw_tls_client/status.h", 32 ], 33 includes = ["public"], 34 deps = [ 35 "//pw_assert", 36 "//pw_bytes", 37 "//pw_result", 38 "//pw_status", 39 "//pw_stream", 40 ], 41) 42 43pw_cc_library( 44 name = "pw_tls_client", 45 deps = [":pw_tls_client_facade"], 46) 47 48# TODO(zyecheng): Add a "backend_multiplexer" target once BoringSSL/MbedTLS is 49# ready. 50 51pw_cc_facade( 52 name = "entropy_facade", 53 hdrs = [ 54 "public/pw_tls_client/entropy.h", 55 ], 56 includes = ["public"], 57 deps = [ 58 "//pw_bytes", 59 "//pw_status", 60 ], 61) 62 63pw_cc_library( 64 name = "fake_entropy", 65 srcs = ["fake_entropy.cc"], 66 deps = [ 67 ":entropy_facade", 68 "//pw_log", 69 ], 70) 71 72# TODO(zyecheng): The target requires a build_time.h header that defines a 73# 'constexpr size_t kBuildTimeMicrosecondsUTC' variable for storing the build time. 74# In gn build, this is generated by a python action target. Need to figure out a 75# solution in bazel build. 76pw_cc_library( 77 name = "build_time", 78 srcs = [ 79 "build_time.cc", 80 ], 81 # TODO(b/257527057): Get this to build. 82 tags = ["manual"], 83) 84 85pw_cc_library( 86 name = "crlset", 87 hdrs = ["public/pw_tls_client/crlset.h"], 88 includes = ["public"], 89 deps = [ 90 "//pw_bytes", 91 ], 92) 93 94pw_cc_library( 95 name = "test_server", 96 srcs = ["test_server.cc"], 97 hdrs = ["public/pw_tls_client/test/test_server.h"], 98 includes = ["public"], 99 # TODO(b/257527057): Get this to build. 100 tags = ["manual"], 101 deps = [ 102 "//pw_bytes", 103 "//pw_log", 104 "//pw_preprocessor", 105 "//pw_result", 106 "//pw_stream", 107 ], 108) 109 110pw_cc_test( 111 name = "test_server_test", 112 srcs = ["test_server_test.cc"], 113 # TODO(b/257527057): Get this to build. 114 tags = ["manual"], 115 deps = [":test_server"], 116) 117