remove unnecessary der
This commit is contained in:
parent
1bbd7c3573
commit
4a7e776916
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -1,3 +0,0 @@
|
|||
/.vscode
|
||||
/target
|
||||
/Cargo.lock
|
||||
|
|
@ -35,4 +35,4 @@ fn main() -> toes_matter::Result<()> {
|
|||
|
||||
## 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.
|
||||
|
|
|
|||
Binary file not shown.
14
src/lib.rs
14
src/lib.rs
|
|
@ -125,12 +125,11 @@ impl Config {
|
|||
/// Write the development Matter credentials and setup metadata used by this crate.
|
||||
///
|
||||
/// 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<()> {
|
||||
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("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"),
|
||||
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(
|
||||
DiscoveryCapabilities::BLE,
|
||||
CommFlowType::Standard,
|
||||
|
|
@ -162,11 +156,9 @@ pub async fn generate_credentials(path: impl AsRef<Path>) -> Result<()> {
|
|||
"setup_passcode=20202021\n\
|
||||
discriminator=3840\n\
|
||||
manual_code={}\n\
|
||||
qr_code={}\n\
|
||||
chip_tool_paa_trust_store={}\n",
|
||||
qr_code={}\n",
|
||||
TEST_DEV_COMM.compute_pretty_pairing_code(),
|
||||
qr_text,
|
||||
paa_dir.display(),
|
||||
);
|
||||
|
||||
std::fs::write(path.join("setup.txt"), setup)?;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user