@@ -60,15 +60,19 @@ endif()
60
60
61
61
# for development purpose user can use default certs instead of generating or providing them
62
62
if (CONFIG_CHIP_FACTORY_DATA_USE_DEFAULT_CERTS)
63
+ # convert decimal VID to its hexadecimal representation to find out certification files in repository
64
+ math (EXPR LOCAL_VID "${CONFIG_CHIP_DEVICE_VENDOR_ID} " OUTPUT_FORMAT HEXADECIMAL)
65
+ string (SUBSTRING ${LOCAL_VID} 2 -1 raw_vid)
66
+ string (TOUPPER ${raw_vid} raw_vid_upper)
63
67
# convert decimal PID to its hexadecimal representation to find out certification files in repository
64
68
math (EXPR LOCAL_PID "${CONFIG_CHIP_DEVICE_PRODUCT_ID} " OUTPUT_FORMAT HEXADECIMAL)
65
69
string (SUBSTRING ${LOCAL_PID} 2 -1 raw_pid)
66
70
string (TOUPPER ${raw_pid} raw_pid_upper)
67
71
# all certs are located in ${CHIP_ROOT}/credentials/development/attestation
68
72
# it can be used during development without need to generate new certifications
69
- string (APPEND script_args "--dac_cert \" ${CHIP_ROOT} /credentials/development/attestation/Matter-Development-DAC-${raw_pid_upper} -Cert.der\"\n " )
70
- string (APPEND script_args "--dac_key \" ${CHIP_ROOT} /credentials/development/attestation/Matter-Development-DAC-${raw_pid_upper} -Key.der\"\n " )
71
- string (APPEND script_args "--pai_cert \" ${CHIP_ROOT} /credentials/development/attestation/Matter-Development-PAI-noPID-Cert.der\"\n " )
73
+ string (APPEND script_args "--dac_cert \" ${CHIP_ROOT} /credentials/development/attestation/Matter-Development-DAC-${raw_vid_upper} - ${ raw_pid_upper} -Cert.der\"\n " )
74
+ string (APPEND script_args "--dac_key \" ${CHIP_ROOT} /credentials/development/attestation/Matter-Development-DAC-${raw_vid_upper} - ${ raw_pid_upper} -Key.der\"\n " )
75
+ string (APPEND script_args "--pai_cert \" ${CHIP_ROOT} /credentials/development/attestation/Matter-Development-PAI-${raw_vid_upper} - noPID-Cert.der\"\n " )
72
76
elseif (CONFIG_CHIP_FACTORY_DATA_CERT_SOURCE_USER)
73
77
string (APPEND script_args "--dac_cert \" ${CONFIG_CHIP_FACTORY_DATA_USER_CERTS_DAC_CERT} \"\n " )
74
78
string (APPEND script_args "--dac_key \" ${CONFIG_CHIP_FACTORY_DATA_USER_CERTS_DAC_KEY} \"\n " )
0 commit comments