• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_test",
18    "pw_facade",
19)
20
21package(default_visibility = ["//visibility:public"])
22
23licenses(["notice"])
24
25pw_facade(
26    name = "pw_tls_client",
27    hdrs = [
28        "public/pw_tls_client/options.h",
29        "public/pw_tls_client/session.h",
30        "public/pw_tls_client/status.h",
31    ],
32    backend = ":pw_tls_client_backend",
33    includes = ["public"],
34    deps = [
35        "//pw_assert",
36        "//pw_bytes",
37        "//pw_result",
38        "//pw_status",
39        "//pw_stream",
40        "//pw_string",
41    ],
42)
43
44label_flag(
45    name = "pw_tls_client_backend",
46    # TODO(zyecheng): Add a "backend_multiplexer" target once BoringSSL/MbedTLS
47    # is ready.
48    build_setting_default = "//pw_build:empty_cc_library",
49)
50
51pw_facade(
52    name = "entropy",
53    hdrs = [
54        "public/pw_tls_client/entropy.h",
55    ],
56    backend = ":entropy_backend",
57    includes = ["public"],
58    deps = [
59        "//pw_bytes",
60        "//pw_status",
61    ],
62)
63
64label_flag(
65    name = "entropy_backend",
66    # TODO(zyecheng): Add a "backend_multiplexer" target once BoringSSL/MbedTLS
67    # is ready.
68    build_setting_default = "//pw_build:empty_cc_library",
69)
70
71cc_library(
72    name = "fake_entropy",
73    srcs = ["fake_entropy.cc"],
74    hdrs = [
75        "public/pw_tls_client/entropy.h",
76    ],
77    includes = ["public"],
78    deps = [
79        "//pw_bytes",
80        "//pw_log",
81        "//pw_status",
82    ],
83)
84
85cc_library(
86    name = "crlset",
87    hdrs = ["public/pw_tls_client/crlset.h"],
88    includes = ["public"],
89    deps = [
90        "//pw_bytes",
91    ],
92)
93
94cc_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