diff --git a/constrained-voucher.mkd b/constrained-voucher.mkd index 7451eeb..683c924 100644 --- a/constrained-voucher.mkd +++ b/constrained-voucher.mkd @@ -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 diff --git a/examples/Makefile b/examples/Makefile index e4b3177..f7a311f 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -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 $< >$@ @@ -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 . diff --git a/examples/voucher_status.diag b/examples/voucher_status.diag new file mode 100644 index 0000000..b05ad92 --- /dev/null +++ b/examples/voucher_status.diag @@ -0,0 +1,6 @@ +{"version": 1, + "status": false, + "reason": "Informative human readable message", + "reason-context": {1: "Additional information"} +} + diff --git a/examples/voucher_status.hex b/examples/voucher_status.hex new file mode 100644 index 0000000..bfa130e --- /dev/null +++ b/examples/voucher_status.hex @@ -0,0 +1,4 @@ +a46776657273696f6e0166737461747573f466726561736f6e7822496e66 +6f726d61746976652068756d616e207265616461626c65206d6573736167 +0a656e726561736f6e2d636f6e74657874a101764164646974696f6e616c +20696e666f726d6174696f6e