| # Copyright (c) 2020-2021 Project CHIP Authors |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| import("//build_overrides/chip.gni") |
| import("//build_overrides/nlassert.gni") |
| import("${chip_root}/src/crypto/crypto.gni") |
| import("${chip_root}/src/platform/device.gni") |
| |
| static_library("credentials") { |
| output_name = "libCredentials" |
| |
| sources = [ |
| "CHIPCert.cpp", |
| "CHIPCert.h", |
| "CHIPCertFromX509.cpp", |
| "CHIPCertToX509.cpp", |
| "CHIPCertificateSet.h", |
| "CertificationDeclaration.cpp", |
| "CertificationDeclaration.h", |
| "DeviceAttestationConstructor.cpp", |
| "DeviceAttestationConstructor.h", |
| "DeviceAttestationCredsProvider.cpp", |
| "DeviceAttestationCredsProvider.h", |
| "DeviceAttestationVendorReserved.h", |
| "FabricTable.cpp", |
| "FabricTable.h", |
| "GenerateChipX509Cert.cpp", |
| "GroupDataProvider.h", |
| "GroupDataProviderImpl.cpp", |
| "LastKnownGoodTime.cpp", |
| "LastKnownGoodTime.h", |
| "OperationalCertificateStore.h", |
| "PersistentStorageOpCertStore.cpp", |
| "PersistentStorageOpCertStore.h", |
| "TestOnlyLocalCertificateAuthority.h", |
| "attestation_verifier/DeviceAttestationDelegate.h", |
| "attestation_verifier/DeviceAttestationVerifier.cpp", |
| "attestation_verifier/DeviceAttestationVerifier.h", |
| "examples/DeviceAttestationCredsExample.cpp", |
| "examples/DeviceAttestationCredsExample.h", |
| "examples/ExampleDACs.cpp", |
| "examples/ExampleDACs.h", |
| "examples/ExamplePAI.cpp", |
| "examples/ExamplePAI.h", |
| "examples/LastKnownGoodTimeCertificateValidityPolicyExample.h", |
| "examples/StrictCertificateValidityPolicyExample.h", |
| ] |
| |
| # TODO: These tests files should be removed after the DeviceAttestationCredsExample implementation |
| # is changed to generate it's own credentials instead of using Test credentials. |
| # For mbed and nrfconnect test builds, which are bilding monolithic test library these files are not needed. |
| import("${chip_root}/build/chip/tests.gni") |
| if (!(chip_build_tests && (chip_device_platform == "mbed" || |
| chip_device_platform == "nrfconnect"))) { |
| sources += [ |
| "tests/CHIPAttCert_test_vectors.cpp", |
| "tests/CHIPAttCert_test_vectors.h", |
| ] |
| } |
| |
| if (chip_device_platform == "esp32" || chip_device_platform == "nrfconnect" || |
| chip_device_platform == "efr32") { |
| defines = [ "CURRENT_TIME_NOT_IMPLEMENTED=1" ] |
| } |
| |
| cflags = [ "-Wconversion" ] |
| |
| public_deps = [ |
| "${chip_root}/src/crypto", |
| "${chip_root}/src/lib/asn1", |
| "${chip_root}/src/lib/core", |
| "${chip_root}/src/lib/support", |
| "${chip_root}/src/platform", |
| "${nlassert_root}:nlassert", |
| ] |
| } |
| |
| static_library("default_attestation_verifier") { |
| output_name = "libDefaultAttestationVerifier" |
| |
| sources = [ |
| "attestation_verifier/DacOnlyPartialAttestationVerifier.cpp", |
| "attestation_verifier/DacOnlyPartialAttestationVerifier.h", |
| "attestation_verifier/DefaultDeviceAttestationVerifier.cpp", |
| "attestation_verifier/DefaultDeviceAttestationVerifier.h", |
| "attestation_verifier/DeviceAttestationDelegate.h", |
| ] |
| |
| if (chip_device_platform == "esp32" || chip_device_platform == "nrfconnect" || |
| chip_device_platform == "efr32") { |
| defines = [ "CURRENT_TIME_NOT_IMPLEMENTED=1" ] |
| } |
| |
| public_deps = [ |
| ":credentials", |
| "${chip_root}/src/crypto", |
| "${nlassert_root}:nlassert", |
| ] |
| } |
| |
| static_library("file_attestation_trust_store") { |
| output_name = "libFileAttestationTrustStore" |
| |
| sources = [ |
| "attestation_verifier/FileAttestationTrustStore.cpp", |
| "attestation_verifier/FileAttestationTrustStore.h", |
| ] |
| |
| public_deps = [ |
| ":credentials", |
| "${nlassert_root}:nlassert", |
| ] |
| } |