Skip to content

Commit

Permalink
fix(coap): update aiocoap versions, credentials and instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
chrysn committed Nov 28, 2024
1 parent 082ef83 commit 8917935
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
3 changes: 2 additions & 1 deletion examples/coap-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ making the former configurable and the latter dynamic is work in progress.
Hello from Ariel OS
```

The argument `--credentials client.diag` tells the client to establish a secure connection.
The argument `--credentials client.diag` tells the client to establish a secure connection;
that file describes the server's public key, and that the client can use a random key.
Without the argument, the requests come through just as well,
but the client has no assurance on the server's identity.

Expand Down
1 change: 0 additions & 1 deletion examples/coap-server/client.cosekey

This file was deleted.

5 changes: 1 addition & 4 deletions examples/coap-server/client.diag
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
"edhoc-oscore": {
"suite": 2,
"method": 3,
"own_cred_style": "by-value",
/ From the server's point of view, this is unauthenticated; we could use any key pair, as long as we send it by value. /
"own_cred": {14: {2: "", 8: {1: {1: 2, 2: h'2b', -1: 1, -2: h'ac75e9ece3e50bfc8ed60399889522405c47bf16df96660a41298cb4307f7eb6', -3: h'6e5de611388a4b8a8211334ac7d37ecb52a387d257e6db3c2a93df21ff3affc8'}}}},
"private_key_file": "client.cosekey",
"own_cred": {"unauthenticated": true},
"peer_cred": {14: {2: "", 8: {1: {1: 2, 2: h'0a', -1: 1, -2: h'bbc34960526ea4d32e940cad2a234148ddc21791a12afbcbac93622046dd44f0', -3: h'4519e257236b2a0ce2023f0931f1f386ca7afda64fcde0108c224c51eabf6072'}}}},
}
},
Expand Down
8 changes: 4 additions & 4 deletions tests/coap/fauxhoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# /// script
# requires-python = ">= 3.10"
# dependencies = [
# "lakers-python == 0.3.1",
# "aiocoap[oscore] == 0.4.8",
# "lakers-python == 0.4.1",
# "aiocoap[oscore] == 0.4.12",
# "cbor2",
# "coap_console == 0.0.1",
# "coap_console == 0.0.3",
# ]
# ///
"""
Expand Down Expand Up @@ -67,7 +67,7 @@
eligible_responders = {} # mapping ID_CRED_R to CRED_R
# when ID_CRED_R is the KID. 8/1/2 is cnf/COSE_Key/kid, IIUC those should be present in suitable CCSs
eligible_responders |= {
parsed[8][1][2]: ccs
cbor2.dumps({4: bytes.fromhex('0a')}): ccs
for (parsed, ccs) in ((cbor2.loads(ccs), ccs) for ccs in eligible_responders_ccs)
}
# when ID_CRED_R is CRED_R
Expand Down

0 comments on commit 8917935

Please sign in to comment.