From 6446f7d30ea4d6b5c4f38ce99e071bb9add25ce1 Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Fri, 11 Apr 2014 15:38:10 +0200 Subject: Add test for Figure 4 from RFC6030 This tests for key profile and key reference properties that can be used to reference external keys. --- tests/rfc6030-figure4.pskc | 38 ++++++++++++++++++++++++++++++++++++++ tests/test_rfc6030.doctest | 16 ++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 tests/rfc6030-figure4.pskc (limited to 'tests') diff --git a/tests/rfc6030-figure4.pskc b/tests/rfc6030-figure4.pskc new file mode 100644 index 0000000..981ccb2 --- /dev/null +++ b/tests/rfc6030-figure4.pskc @@ -0,0 +1,38 @@ + + + + + + + + Manufacturer + 987654321 + + + CM_ID_001 + + + Issuer + + + + keyProfile1 + MasterKeyLabel + + + + 0 + + + + OTP + + + + diff --git a/tests/test_rfc6030.doctest b/tests/test_rfc6030.doctest index 1dd163e..5e131e0 100644 --- a/tests/test_rfc6030.doctest +++ b/tests/test_rfc6030.doctest @@ -70,3 +70,19 @@ parameters. 0 >>> key.userid 'UID=jsmith,DC=example-bank,DC=net' + + +This tests Figure 4 from RFC6030. In this case the key value itself is not +contained but can be derived using the serial and out-of-band agreements +on the meanings of key_profile and key_reference. + +>>> pskc = PSKC('tests/rfc6030-figure4.pskc') +>>> key = pskc.keys[0] +>>> key.serial +'987654321' +>>> key.key_profile +'keyProfile1' +>>> key.key_reference +'MasterKeyLabel' +>>> key.counter +0 -- cgit v1.2.3