remove unnecessary der

This commit is contained in:
Pat Nakajima 2026-05-17 20:38:57 -07:00
parent 1bbd7c3573
commit 4a7e776916
4 changed files with 4 additions and 15 deletions

3
.gitignore vendored
View File

@ -1,3 +0,0 @@
/.vscode
/target
/Cargo.lock

View File

@ -35,4 +35,4 @@ fn main() -> toes_matter::Result<()> {
## Development credentials ## Development credentials
`generate_credentials()` writes rs-matter's built-in development/test DAC/PAI/CD and the test PAA trust-store cert. These are for local development, not production. `generate_credentials()` writes rs-matter's built-in development/test DAC/PAI/CD plus setup QR/manual-code metadata. These are for local development, not production.

View File

@ -125,12 +125,11 @@ impl Config {
/// Write the development Matter credentials and setup metadata used by this crate. /// Write the development Matter credentials and setup metadata used by this crate.
/// ///
/// This intentionally uses `rs-matter`'s upstream development/test attestation /// This intentionally uses `rs-matter`'s upstream development/test attestation
/// credentials. These are good for chip-tool and local development, not production. /// credentials. These are good for local development, not production.
pub async fn generate_credentials(path: impl AsRef<Path>) -> Result<()> { pub async fn generate_credentials(path: impl AsRef<Path>) -> Result<()> {
let path = path.as_ref(); let path = path.as_ref();
let paa_dir = path.join("paa");
std::fs::create_dir_all(&paa_dir)?; std::fs::create_dir_all(path)?;
std::fs::write(path.join("dac.der"), TEST_DEV_ATT.dac())?; std::fs::write(path.join("dac.der"), TEST_DEV_ATT.dac())?;
std::fs::write(path.join("pai.der"), TEST_DEV_ATT.pai())?; std::fs::write(path.join("pai.der"), TEST_DEV_ATT.pai())?;
@ -142,11 +141,6 @@ pub async fn generate_credentials(path: impl AsRef<Path>) -> Result<()> {
path.join("dac-private-key.raw"), path.join("dac-private-key.raw"),
TEST_DEV_ATT.dac_priv_key().access(), TEST_DEV_ATT.dac_priv_key().access(),
)?; )?;
std::fs::write(
paa_dir.join("Chip-Test-PAA-FFF1-Cert.der"),
include_bytes!("../credentials/Chip-Test-PAA-FFF1-Cert.der"),
)?;
let payload = QrPayload::new_from_basic_info( let payload = QrPayload::new_from_basic_info(
DiscoveryCapabilities::BLE, DiscoveryCapabilities::BLE,
CommFlowType::Standard, CommFlowType::Standard,
@ -162,11 +156,9 @@ pub async fn generate_credentials(path: impl AsRef<Path>) -> Result<()> {
"setup_passcode=20202021\n\ "setup_passcode=20202021\n\
discriminator=3840\n\ discriminator=3840\n\
manual_code={}\n\ manual_code={}\n\
qr_code={}\n\ qr_code={}\n",
chip_tool_paa_trust_store={}\n",
TEST_DEV_COMM.compute_pretty_pairing_code(), TEST_DEV_COMM.compute_pretty_pairing_code(),
qr_text, qr_text,
paa_dir.display(),
); );
std::fs::write(path.join("setup.txt"), setup)?; std::fs::write(path.join("setup.txt"), setup)?;