python-pskc branch master updated. 1.1-12-g1790ed9
[Date Prev][
Date Next]
[Thread Prev][
Thread Next]
python-pskc branch master updated. 1.1-12-g1790ed9
- From: Commits of the python-pskc project <python-pskc-commits [at] lists.arthurdejong.org>
- To: python-pskc-commits [at] lists.arthurdejong.org
- Reply-to: python-pskc-users [at] lists.arthurdejong.org, python-pskc-commits [at] lists.arthurdejong.org
- Subject: python-pskc branch master updated. 1.1-12-g1790ed9
- Date: Sun, 5 Jan 2020 15:26:47 +0100 (CET)
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 1790ed90cec02afa7088addf472ff8763faf1746 (commit)
via 54b3bb358030b747b956b6966af216a6730e3978 (commit)
via 288a5e63f8940e4af46ce73cf4e05d3ae9f1bf85 (commit)
via 96e2a8e6cd2ece3d86bdb914c16f9c8aca322992 (commit)
from 95f65ff38fe06faef227bab56cbc28b1a32c92ac (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 -----------------------------------------------------------------
https://arthurdejong.org/git/python-pskc/commit/?id=1790ed90cec02afa7088addf472ff8763faf1746
commit 1790ed90cec02afa7088addf472ff8763faf1746
Author: Arthur de Jong <arthur@arthurdejong.org>
Date: Sun Jan 5 14:53:53 2020 +0100
Remove test for PSKC file without certificate
Remove this test for now because signxml cannor currently validate this
certificate in a backwards compatible way.
See https://github.com/XML-Security/signxml/issues/143
diff --git a/tests/test_signature.doctest b/tests/test_signature.doctest
index ce6947b..94b6a00 100644
--- a/tests/test_signature.doctest
+++ b/tests/test_signature.doctest
@@ -100,51 +100,6 @@ True
True
-We can also sign a PSKC file without a embedding certificate. This should be
-practically the same as using a self-signed certificate.
-
->>> pskc = PSKC()
->>> key = pskc.add_key(id='456', manufacturer='Manufacturer')
->>> key.secret = a2b_hex('4e1790ba272406ba309c5a31')
->>> pskc.signature.sign(signing_key)
->>> f = tempfile.NamedTemporaryFile()
->>> pskc.write(f.name)
->>> with open(f.name, 'r') as r:
-... x = sys.stdout.write(r.read()) #doctest: +ELLIPSIS +REPORT_UDIFF
+NORMALIZE_WHITESPACE
-<?xml version="1.0" encoding="UTF-8"?>
-<pskc:KeyContainer xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
xmlns:pskc="urn:ietf:params:xml:ns:keyprov:pskc" Version="1.0">
- ...
- <ds:Signature>
- <ds:SignedInfo><ds:CanonicalizationMethod
Algorithm="..."/><ds:SignatureMethod
Algorithm="..."/><ds:Reference...><ds:DigestMethod
Algorithm="..."/><ds:DigestValue>...</ds:DigestValue></ds:Reference></ds:SignedInfo>
- <ds:SignatureValue>...</ds:SignatureValue>
- <ds:KeyInfo>
- <ds:KeyValue>
- <ds:RSAKeyValue>
- <ds:Modulus>...</ds:Modulus>
- <ds:Exponent>...</ds:Exponent>
- </ds:RSAKeyValue>
- </ds:KeyValue>
- </ds:KeyInfo>
- </ds:Signature>
-</pskc:KeyContainer>
-
-Read the file back in and verify the signature using the self-signed
-certificate.
-
->>> newpskc = PSKC(f.name)
->>> newpskc.signature.certificate is None
-True
->>> newpskc.signature.signed_pskc # we need a certificate for verification
-Traceback (most recent call last):
- ...
-InvalidInput: Expected a X.509 certificate based signature
->>> newpskc.signature.verify(self_signed_certificate)
-True
->>> newpskc = newpskc.signature.signed_pskc
->>> newpskc.keys[0].secret == pskc.keys[0].secret
-True
-
-
We can also sign a PSKC file and include a certificate that can be validated
using a CA certificate.
https://arthurdejong.org/git/python-pskc/commit/?id=54b3bb358030b747b956b6966af216a6730e3978
commit 54b3bb358030b747b956b6966af216a6730e3978
Author: Arthur de Jong <arthur@arthurdejong.org>
Date: Sun Jan 5 14:53:21 2020 +0100
Have Travis fail on missing Python interpreter
diff --git a/.travis.yml b/.travis.yml
index 73419d2..e4aa7f6 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -33,4 +33,4 @@ matrix:
- python: 3.6
env: TOXENV=docs
install: pip install tox
-script: tox -e "${TOXENV:-$(echo py${TRAVIS_PYTHON_VERSION}-${FLAVOUR} | tr -d
. | sed -e 's/pypypy/pypy/')}"
+script: tox -e "${TOXENV:-$(echo py${TRAVIS_PYTHON_VERSION}-${FLAVOUR} | tr -d
. | sed -e 's/pypypy/pypy/')}" --skip-missing-interpreters false
https://arthurdejong.org/git/python-pskc/commit/?id=288a5e63f8940e4af46ce73cf4e05d3ae9f1bf85
commit 288a5e63f8940e4af46ce73cf4e05d3ae9f1bf85
Author: Arthur de Jong <arthur@arthurdejong.org>
Date: Sun Jan 5 14:52:53 2020 +0100
Support reading from stdin if input is -
This is needed for some XML parsing implementations.
diff --git a/pskc/xml.py b/pskc/xml.py
index 02bd711..7b82b0a 100644
--- a/pskc/xml.py
+++ b/pskc/xml.py
@@ -1,7 +1,7 @@
# xml.py - module for parsing and writing XML for PSKC files
# coding: utf-8
#
-# Copyright (C) 2014-2019 Arthur de Jong
+# Copyright (C) 2014-2020 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -25,6 +25,7 @@ This module provides some utility functions for parsing XML
files.
from __future__ import absolute_import
+import sys
from collections import OrderedDict
# try to find a usable ElementTree implementation
@@ -71,7 +72,7 @@ register_namespaces()
def parse(source):
"""Parse the provided file and return an element tree."""
- return xml_parse(source)
+ return xml_parse(sys.stdin if source == '-' else source)
def remove_namespaces(tree):
https://arthurdejong.org/git/python-pskc/commit/?id=96e2a8e6cd2ece3d86bdb914c16f9c8aca322992
commit 96e2a8e6cd2ece3d86bdb914c16f9c8aca322992
Author: Arthur de Jong <arthur@arthurdejong.org>
Date: Sun Jan 5 14:52:04 2020 +0100
Be consistent in referencing RFC 6030
diff --git a/docs/pskc2pskc.rst b/docs/pskc2pskc.rst
index 8f81820..6a49e58 100644
--- a/docs/pskc2pskc.rst
+++ b/docs/pskc2pskc.rst
@@ -13,7 +13,7 @@ Description
:program:`pskc2pskc` reads a PSKC file in any of the supported formats,
optionally decrypts any encrypted information and outputs a PSKC file in the
-RFC6030 format, optionally encrypting the file.
+RFC 6030 format, optionally encrypting the file.
Options
-------
diff --git a/pskc/key.py b/pskc/key.py
index 00cfad2..92aa73e 100644
--- a/pskc/key.py
+++ b/pskc/key.py
@@ -53,7 +53,7 @@ class EncryptedValue(object):
plaintext = pskc.encryption.decrypt_value(
self.cipher_value, self.algorithm)
# allow MAC over plaintext or cipertext
- # (RFC6030 implies MAC over ciphertext but older draft used
+ # (RFC 6030 implies MAC over ciphertext but older draft used
# MAC over plaintext)
if self.mac_value and self.mac_value not in (
pskc.mac.generate_mac(self.cipher_value),
-----------------------------------------------------------------------
Summary of changes:
.travis.yml | 2 +-
docs/pskc2pskc.rst | 2 +-
pskc/key.py | 2 +-
pskc/xml.py | 5 +++--
tests/test_signature.doctest | 45 --------------------------------------------
5 files changed, 6 insertions(+), 50 deletions(-)
hooks/post-receive
--
python-pskc
- python-pskc branch master updated. 1.1-12-g1790ed9,
Commits of the python-pskc project