lists.arthurdejong.org
RSS feed

python-pskc branch master updated. 0.4-11-gbf34209

[Date Prev][Date Next] [Thread Prev][Thread Next]

python-pskc branch master updated. 0.4-11-gbf34209



This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "python-pskc".

The branch, master has been updated
       via  bf34209656fa477744d284bb2d8e9c4e3e201fed (commit)
      from  600ae68df9d951ba853db3b9e9448fd5211ec1f5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://arthurdejong.org/git/python-pskc/commit/?id=bf34209656fa477744d284bb2d8e9c4e3e201fed

commit bf34209656fa477744d284bb2d8e9c4e3e201fed
Author: Arthur de Jong <arthur@arthurdejong.org>
Date:   Wed Sep 14 23:04:17 2016 +0200

    Some minor improvements to the tests

diff --git a/tests/invalid/no-mac-method.pskcxml 
b/tests/invalid/no-mac-method.pskcxml
index 0c7765e..64ba4e2 100644
--- a/tests/invalid/no-mac-method.pskcxml
+++ b/tests/invalid/no-mac-method.pskcxml
@@ -17,7 +17,7 @@
       <Data>
         <Secret>
           <EncryptedValue>
-            xenc:EncryptionMethod 
Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/>
+            <xenc:EncryptionMethod 
Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/>
             <xenc:CipherData>
               
<xenc:CipherValue>AAECAwQFBgcICQoLDA0OD+cIHItlB3Wra1DUpxVvOx2lef1VmNPCMl8jwZqIUqGv</xenc:CipherValue>
             </xenc:CipherData>
diff --git a/tests/test_invalid.doctest b/tests/test_invalid.doctest
index 5b06552..d110f34 100644
--- a/tests/test_invalid.doctest
+++ b/tests/test_invalid.doctest
@@ -131,13 +131,17 @@ There is a ValueMAC element but no MACMethod element.
 
 >>> pskc = PSKC('tests/invalid/no-mac-method.pskcxml')
 >>> pskc.encryption.key = a2b_hex('12345678901234567890123456789012')
+>>> pskc.encryption.algorithm
+'http://www.w3.org/2001/04/xmlenc#aes128-cbc'
+>>> pskc.mac.algorithm is None
+True
 >>> key = pskc.keys[0]
 >>> key.id
 '12345678'
 >>> key.secret  # doctest: +IGNORE_EXCEPTION_DETAIL
 Traceback (most recent call last):
     ...
-DecryptionError: No MAC key available
+DecryptionError: No MAC algorithm set
 
 
 There is an empty MACKey in the PSKC file.
@@ -171,6 +175,10 @@ transit.
 
 >>> pskc = PSKC('tests/invalid/mac-value.pskcxml')
 >>> pskc.encryption.key = a2b_hex('12345678901234567890123456789012')
+>>> pskc.encryption.algorithm
+'http://www.w3.org/2001/04/xmlenc#aes128-cbc'
+>>> pskc.mac.algorithm
+'http://www.w3.org/2000/09/xmldsig#hmac-sha1'
 >>> key = pskc.keys[0]
 >>> key.id
 '12345678'
diff --git a/tests/test_rfc6030.doctest b/tests/test_rfc6030.doctest
index ba11d59..0220952 100644
--- a/tests/test_rfc6030.doctest
+++ b/tests/test_rfc6030.doctest
@@ -164,8 +164,12 @@ DecryptionError: No key available
 >>> pskc.encryption.key_name
 'Pre-shared-key'
 >>> pskc.encryption.key = a2b_hex('12345678901234567890123456789012')
+>>> pskc.encryption.algorithm
+'http://www.w3.org/2001/04/xmlenc#aes128-cbc'
 >>> b2a_hex(pskc.mac.key)
 '1122334455667788990011223344556677889900'
+>>> pskc.mac.algorithm
+'http://www.w3.org/2000/09/xmldsig#hmac-sha1'
 >>> b2a_hex(key.secret)
 '3132333435363738393031323334353637383930'
 >>> key.check()
@@ -187,8 +191,12 @@ This tests a derived master key using PBKDF2 as seen in 
Figure 7 from RFC
 >>> pskc.encryption.derive_key('qwerty')
 >>> b2a_hex(pskc.encryption.key)
 '651e63cd57008476af1ff6422cd02e41'
+>>> pskc.encryption.algorithm
+'http://www.w3.org/2001/04/xmlenc#aes128-cbc'
 >>> b2a_hex(pskc.mac.key)
 'bdaab8d648e850d25a3289364f7d7eaaf53ce581'
+>>> pskc.mac.algorithm
+'http://www.w3.org/2000/09/xmldsig#hmac-sha1'
 >>> key = pskc.keys[0]
 >>> tostr(key.secret)
 '12345678901234567890'

-----------------------------------------------------------------------

Summary of changes:
 tests/invalid/no-mac-method.pskcxml |  2 +-
 tests/test_invalid.doctest          | 10 +++++++++-
 tests/test_rfc6030.doctest          |  8 ++++++++
 3 files changed, 18 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
python-pskc
-- 
To unsubscribe send an email to
python-pskc-commits-unsubscribe@lists.arthurdejong.org or see
https://lists.arthurdejong.org/python-pskc-commits/