Skip to content

Commit

Permalink
updated voucher_status example, close #50
Browse files Browse the repository at this point in the history
  • Loading branch information
mcr committed Nov 26, 2020
1 parent 33f2e32 commit 8e8f7b6
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 5 deletions.
11 changes: 7 additions & 4 deletions constrained-voucher.mkd
Original file line number Diff line number Diff line change
Expand Up @@ -671,10 +671,13 @@ A 2.05 Content response with a non signed CBOR voucher status (ct=60) will then
~~~~
2.05 Content (Content-Format: application/cbor)
Payload =
A46776657273696F6E6131665374617475730166526561736F6E7822
496E666F726D61746976652068756D616E207265616461626C65206D
6573736167656e726561736F6E2D636F6E74657874
764164646974696F6E616C20696E666F726D6174696F6E
INSERT_TEXT_FROM_FILE examples/voucher_status.hex END
~~~~

The payload above is represented in hexadecimal.

~~~~
INSERT_TEXT_FROM_FILE examples/voucher_status.diag END
~~~~

#CMS signed messages
Expand Down
11 changes: 10 additions & 1 deletion examples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ all: vr_00-D0-E5-F2-00-03.b64 vr_00-D0-E5-F2-00-03.diag \
parboiled_vr_00-D0-E5-F2-00-03.b64 parboiled_vr_00-D0-E5-F2-00-03.diag \
voucher_00-D0-E5-F2-00-03.b64 voucher_00-D0-E5-F2-00-03.diag \
key_00-D0-E5-F2-00-03.pem device_00-D0-E5-F2-00-03.crt-txt \
masa_00-D0-E5-F2-00-03.crt-txt
masa_00-D0-E5-F2-00-03.crt-txt voucher_status.hex

%.b64: %.vrq
base64 -w 60 $< >$@
Expand All @@ -21,6 +21,15 @@ all: vr_00-D0-E5-F2-00-03.b64 vr_00-D0-E5-F2-00-03.diag \
%.crt-txt: %.crt
openssl x509 -noout -text -in $< | sed -e's/ / /g' | fold -60 >$@

#%.diag: %.hex
# xxd -r -p $< | cbor2diag.rb | fold -60 >$@

%.bin: %.diag
diag2cbor.rb $< | fold -60 >$@

%.hex: %.bin
xxd -p $< | fold -60 >$@

update:
cp /corp/projects/pandora/reach/spec/files/product/00-D0-E5-F2-00-03/vr_00-D0-E5-F2-00-03.vrq .
cp /corp/projects/pandora/reach/spec/files/product/00-D0-E5-F2-00-03/parboiled_vr_00-D0-E5-F2-00-03.vrq .
Expand Down
6 changes: 6 additions & 0 deletions examples/voucher_status.diag
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{"version": 1,
"status": false,
"reason": "Informative human readable message",
"reason-context": {1: "Additional information"}
}

4 changes: 4 additions & 0 deletions examples/voucher_status.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
a46776657273696f6e0166737461747573f466726561736f6e7822496e66
6f726d61746976652068756d616e207265616461626c65206d6573736167
0a656e726561736f6e2d636f6e74657874a101764164646974696f6e616c
20696e666f726d6174696f6e

0 comments on commit 8e8f7b6

Please sign in to comment.