Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions smartthings_local/protocol/owner_psk.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ def derive_mfg_certificate_owner_psk(
It performs no session access, network I/O, ownership writes, or storage.
The caller must supply state from an authenticated manufacturer-certificate
session and explicitly select the OXM label used by that transaction.
IoTivity's other 96-byte ECDH_ANON, ECDHE_PSK, and ECDHE_RSA mappings are
intentionally outside this helper's manufacturer-certificate allowlist.
"""

if not isinstance(cipher_name, str):
Expand Down
8 changes: 6 additions & 2 deletions tests/test_owner_psk.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@
}


def test_fixed_iotivity_gcm_vector():
# These synthetic expected values were generated from the fixed inputs above;
# they were not captured from IoTivity or a device. They lock deterministic
# output for the selected mappings, while the table test below states the
# key-block-length contract explicitly.
def test_fixed_synthetic_gcm_regression_vector():
assert derive_mfg_certificate_owner_psk(**_VALID_INPUTS).hex() == (
"ccd6c618a91290dee8c106544ed79a33"
)
Expand All @@ -42,7 +46,7 @@ def test_owner_then_device_uuid_order_matches_iotivity_callers():
assert reversed_context != derive_mfg_certificate_owner_psk(**_VALID_INPUTS)


def test_fixed_iotivity_ccm8_vector():
def test_fixed_synthetic_ccm8_regression_vector():
inputs = {
**_VALID_INPUTS,
"cipher_name": "ECDHE-ECDSA-AES128-CCM8",
Expand Down