• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2023 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.
14package(
15  default_visibility = ["//visibility:public"],
16)
17
18cc_library(
19    name = "mbedtls",
20    srcs = [
21        "library/aes.c",
22        "library/aesni.c",
23        "library/aria.c",
24        "library/asn1parse.c",
25        "library/asn1write.c",
26        "library/base64.c",
27        "library/bignum.c",
28        "library/camellia.c",
29        "library/ccm.c",
30        "library/chacha20.c",
31        "library/chachapoly.c",
32        "library/cipher.c",
33        "library/cipher_wrap.c",
34        "library/cmac.c",
35        "library/constant_time.c",
36        "library/ctr_drbg.c",
37        "library/des.c",
38        "library/dhm.c",
39        "library/ecdh.c",
40        "library/ecdsa.c",
41        "library/ecjpake.c",
42        "library/ecp.c",
43        "library/ecp_curves.c",
44        "library/entropy.c",
45        "library/entropy_poll.c",
46        "library/error.c",
47        "library/gcm.c",
48        "library/hkdf.c",
49        "library/hmac_drbg.c",
50        "library/md.c",
51        "library/md5.c",
52        "library/memory_buffer_alloc.c",
53        "library/mps_reader.c",
54        "library/mps_trace.c",
55        "library/nist_kw.c",
56        "library/oid.c",
57        "library/padlock.c",
58        "library/pem.c",
59        "library/pk.c",
60        "library/pk_wrap.c",
61        "library/pkcs12.c",
62        "library/pkcs5.c",
63        "library/pkparse.c",
64        "library/pkwrite.c",
65        "library/platform.c",
66        "library/platform_util.c",
67        "library/poly1305.c",
68        "library/ripemd160.c",
69        "library/rsa.c",
70        "library/rsa_alt_helpers.c",
71        "library/sha1.c",
72        "library/sha256.c",
73        "library/sha512.c",
74        "library/ssl_debug_helpers_generated.c",
75        "library/threading.c",
76        "library/timing.c",
77        "library/version.c",
78        "library/version_features.c",
79    ],
80    includes = ["include/"],
81    textual_hdrs = [
82        "library/aesni.h",
83        "library/bignum_internal.h",
84        "library/bn_mul.h",
85        "library/cipher_wrap.h",
86        "library/common.h",
87        "library/constant_time_internal.h",
88        "library/constant_time_invasive.h",
89        "library/ecp_internal_alt.h",
90        "library/ecp_invasive.h",
91        "library/entropy_poll.h",
92        "library/md_wrap.h",
93        "library/pk_wrap.h",
94        "library/padlock.h",
95        "library/pkwrite.h",
96        "library/rsa_alt_helpers.h",
97        "library/ssl_debug_helpers.h",
98        "library/ssl_misc.h",
99    ] + glob(
100        include = ["include/**/*.h"],
101        exclude = ["include/psa/**"],
102    ),
103    deps = [
104        ":mbedtls_config",
105    ],
106)
107
108# Library containing project-specific mbedtls config header file.
109label_flag(
110    name = "mbedtls_config",
111    build_setting_default = ":empty_config",
112)
113
114cc_library(name = "empty_config")
115