Skip to content

Commit

Permalink
[nxp toup][platform][common] Add EL2GO secure DAC key and certificate…
Browse files Browse the repository at this point in the history
… support

Signed-off-by: Martin Girardot <martin.girardot@nxp.com>
  • Loading branch information
Martin-NXP committed Oct 21, 2024
1 parent a4d36bf commit 87dd0ab
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion src/platform/nxp/common/factory_data/FactoryDataProvider.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
*
* Copyright (c) 2023 Project CHIP Authors
* Copyright 2023 NXP
* Copyright 2023-2024 NXP
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -26,6 +26,21 @@
namespace chip {
namespace DeviceLayer {

#define CHIP_FACTORY_DATA_ERROR(e) \
ChipError(ChipError::Range::kLastRange, ((uint8_t) ChipError::Range::kLastRange << 2) | e, __FILE__, __LINE__)

#define CHIP_FACTORY_DATA_SHA_CHECK CHIP_FACTORY_DATA_ERROR(0x01)
#define CHIP_FACTORY_DATA_HEADER_READ CHIP_FACTORY_DATA_ERROR(0x02)
#define CHIP_FACTORY_DATA_HASH_ID CHIP_FACTORY_DATA_ERROR(0x03)
#define CHIP_FACTORY_DATA_PDM_RESTORE CHIP_FACTORY_DATA_ERROR(0x04)
#define CHIP_FACTORY_DATA_NULL CHIP_FACTORY_DATA_ERROR(0x05)
#define CHIP_FACTORY_DATA_FLASH_ERASE CHIP_FACTORY_DATA_ERROR(0x06)
#define CHIP_FACTORY_DATA_FLASH_PROGRAM CHIP_FACTORY_DATA_ERROR(0x07)
#define CHIP_FACTORY_DATA_INTERNAL_FLASH_READ CHIP_FACTORY_DATA_ERROR(0x08)
#define CHIP_FACTORY_DATA_PDM_SAVE_RECORD CHIP_FACTORY_DATA_ERROR(0x09)
#define CHIP_FACTORY_DATA_PDM_READ_RECORD CHIP_FACTORY_DATA_ERROR(0x0A)
#define CHIP_FACTORY_DATA_RESTORE_MECHANISM CHIP_FACTORY_DATA_ERROR(0x0B)

class FactoryDataProviderImpl;

/**
Expand Down Expand Up @@ -72,6 +87,10 @@ class FactoryDataProvider : public chip::Credentials::DeviceAttestationCredentia
kProductLabel,
kProductFinish,
kProductPrimaryColor,
kEl2GoBlob,
kEl2GoDacKeyId,
kEl2GoDacCertId,

kMaxId
};

Expand Down

0 comments on commit 87dd0ab

Please sign in to comment.