Skip to content

Commit

Permalink
Added build flag to allow/skip building Example Credential files (#25953
Browse files Browse the repository at this point in the history
)
  • Loading branch information
sharadb-amazon authored and pull[bot] committed Oct 10, 2023
1 parent 2dd3fbb commit 4107418
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions src/credentials/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ import("//build_overrides/nlassert.gni")
import("${chip_root}/src/crypto/crypto.gni")
import("${chip_root}/src/platform/device.gni")

declare_args() {
chip_build_example_creds = true
}

static_library("credentials") {
output_name = "libCredentials"

Expand Down Expand Up @@ -47,16 +51,21 @@ static_library("credentials") {
"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",
]

if (chip_build_example_creds) {
sources += [
"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 some platforms test builds, which are bilding monolithic test library these files are not needed.
Expand Down

0 comments on commit 4107418

Please sign in to comment.