Skip to content

Commit

Permalink
Merge branch 'mfg_tool/fix_issue_about_use_existing_dac' into 'main'
Browse files Browse the repository at this point in the history
[mfg_tool]fix an issue about use existing dac cert and key

See merge request app-frameworks/esp-matter!582
  • Loading branch information
chshu committed Dec 25, 2023
2 parents 30e5b4b + 1299e6c commit 9e36311
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/mfg_tool/mfg_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,15 +236,17 @@ def use_dac_from_args(args):
out_cert_der = os.sep.join([OUT_DIR['top'], UUIDs[0], 'internal', 'DAC_cert.der'])
out_private_key_bin = out_cert_der.replace('cert.der', 'private_key.bin')
out_public_key_bin = out_cert_der.replace('cert.der', 'public_key.bin')
out_private_key_der = out_cert_der.replace('cert.der', 'key.der')

convert_x509_cert_from_pem_to_der(args.dac_cert, out_cert_der)
logging.info('Generated DAC certificate in DER format: {}'.format(out_cert_der))

generate_keypair_bin(args.dac_key, out_private_key_bin, out_public_key_bin)
logging.info('Generated DAC private key in binary format: {}'.format(out_private_key_bin))
logging.info('Generated DAC public key in binary format: {}'.format(out_public_key_bin))
convert_private_key_from_pem_to_der(args.dac_key, out_private_key_der)

return out_cert_der, out_private_key_bin, out_public_key_bin
return out_cert_der, out_private_key_bin, out_public_key_bin, out_private_key_der


def setup_out_dirs(vid, pid, count):
Expand Down

0 comments on commit 9e36311

Please sign in to comment.