[cpp-xmltooling] branch master updated: CPPXT-136 Test cases for malformed/missing DSA keyinfo <G:>

Rod Widdowson rdw at steadingsoftware.com
Mon Oct 1 11:03:24 EDT 2018


This is an automated email from the git hooks/post-receive script.

rdw pushed a commit to branch master
in repository cpp-xmltooling.

View the commit online:
http://git.shibboleth.net/view/?p=cpp-xmltooling.git;a=commit;h=d55ead46fd25864255f9d6aedc7cfaf8d261d67a

The following commit(s) were added to refs/heads/master by this push:
       new  d55ead4   CPPXT-136 Test cases for malformed/missing DSA keyinfo <G:>
d55ead4 is described below

commit d55ead46fd25864255f9d6aedc7cfaf8d261d67a
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Mon Oct 1 14:43:15 2018 +0100

    CPPXT-136 Test cases for malformed/missing DSA keyinfo <G:>
    
    https://issues.shibboleth.net/jira/browse/CPPXT-136
---
 xmltoolingtest/BadKeyInfoTest.h   | 27 +++++++++++++++++++++++++++
 xmltoolingtest/data/DSABadG.xml   | 16 ++++++++++++++++
 xmltoolingtest/data/DSABadG64.xml | 16 ++++++++++++++++
 xmltoolingtest/data/DSANoG.xml    | 15 +++++++++++++++
 xmltoolingtest/data/DSANullG.xml  | 16 ++++++++++++++++
 5 files changed, 90 insertions(+)

diff --git a/xmltoolingtest/BadKeyInfoTest.h b/xmltoolingtest/BadKeyInfoTest.h
index c011a0b..d8db8e9 100644
--- a/xmltoolingtest/BadKeyInfoTest.h
+++ b/xmltoolingtest/BadKeyInfoTest.h
@@ -375,4 +375,31 @@ public:
         DSATest("DSANullQP.xml", true, true, false, true);
     }
 
+    // G:
+    void testDSABadG()
+    {
+        // Round trip fails, XmlTooling returns a public key, Santuario returns a public key, verifyBase64Signature throws doesn't throw (both cases)
+        DSATest("DSABadG.xml", true, false, false, false);
+    }
+
+    void testDSABadG64()
+    {
+        // Round trip fails, XmlTooling returns a public key, Santuario returns a public key, verifyBase64Signature throws doesn't throw (both cases)
+        DSATest("DSABadG64.xml", true, false, false, false);
+    }
+
+    void testDSANoG()
+    {
+        // Round trip fails, XmlTooling returns a public key, Santuario returns a public key, verifyBase64Signature throws (xsec)
+        DSATest("DSANoG.xml", true, false, false, true);
+    }
+
+    void testDSANullG()
+    {
+        // Round trip fails, XmlTooling returns NO public key, Santuario returns a public key, verifyBase64Signature throws (xsec)
+        DSATest("DSANullG.xml", true, true, false, true);
+    }
+
+
+
 };
\ No newline at end of file
diff --git a/xmltoolingtest/data/DSABadG.xml b/xmltoolingtest/data/DSABadG.xml
new file mode 100644
index 0000000..bf50712
--- /dev/null
+++ b/xmltoolingtest/data/DSABadG.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
+    <ds:KeyName>Foo</ds:KeyName>
+    <ds:KeyName>Bar</ds:KeyName>
+    <ds:KeyValue>
+        <ds:DSAKeyValue>
+            <ds:P>ANVGAtN1Mxr3ZkxKcQqZaMxw2Qbre4jG8G+KFhcPYJQNjhpYH2O+DVWx02vV4H9ypCnPaANktCitKuQSiDA9l1U=
+</ds:P>
+            <ds:Q>AK/apfGsK5pA4iia1j9qAR0Tdaw1
+</ds:Q>
+            <ds:G>NibbleAHappyWarthOg</ds:G>
+            <ds:Y>AMJPFxCB9Kp6ekdM90H23zv4JNEhkm1qXNix44Xdl6IABgE896kpNzGQDCKf6iecO7oX+eTJl3KwT3oNE+8EQxk=
+</ds:Y>
+        </ds:DSAKeyValue>
+    </ds:KeyValue> 
+</ds:KeyInfo>
diff --git a/xmltoolingtest/data/DSABadG64.xml b/xmltoolingtest/data/DSABadG64.xml
new file mode 100644
index 0000000..20be2a6
--- /dev/null
+++ b/xmltoolingtest/data/DSABadG64.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
+    <ds:KeyName>Foo</ds:KeyName>
+    <ds:KeyName>Bar</ds:KeyName>
+    <ds:KeyValue>
+        <ds:DSAKeyValue>
+            <ds:P>ANVGAtN1Mxr3ZkxKcQqZaMxw2Qbre4jG8G+KFhcPYJQNjhpYH2O+DVWx02vV4H9ypCnPaANktCitKuQSiDA9l1U=
+</ds:P>
+            <ds:Q>AK/apfGsK5pA4iia1j9qAR0Tdaw1
+</ds:Q>
+            <ds:G>RG1FUW9vK1lBVk5UVUdva2N5MWtpMDFXZ01mVEJzdlBxWWpSRHpjbUY3cDRvSjhuZVZDbjBCOTkwanY5Vzh2OGdwdnhyK3c1WnBRa0p5Ym5nSkZBanc9PQ==</ds:G>
+            <ds:Y>AMJPFxCB9Kp6ekdM90H23zv4JNEhkm1qXNix44Xdl6IABgE896kpNzGQDCKf6iecO7oX+eTJl3KwT3oNE+8EQxk=
+</ds:Y>
+        </ds:DSAKeyValue>
+    </ds:KeyValue> 
+</ds:KeyInfo>
diff --git a/xmltoolingtest/data/DSANoG.xml b/xmltoolingtest/data/DSANoG.xml
new file mode 100644
index 0000000..079949e
--- /dev/null
+++ b/xmltoolingtest/data/DSANoG.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
+    <ds:KeyName>Foo</ds:KeyName>
+    <ds:KeyName>Bar</ds:KeyName>
+    <ds:KeyValue>
+        <ds:DSAKeyValue>
+            <ds:P>ANVGAtN1Mxr3ZkxKcQqZaMxw2Qbre4jG8G+KFhcPYJQNjhpYH2O+DVWx02vV4H9ypCnPaANktCitKuQSiDA9l1U=
+</ds:P>
+            <ds:Q>AK/apfGsK5pA4iia1j9qAR0Tdaw1
+</ds:Q>
+            <ds:Y>AMJPFxCB9Kp6ekdM90H23zv4JNEhkm1qXNix44Xdl6IABgE896kpNzGQDCKf6iecO7oX+eTJl3KwT3oNE+8EQxk=
+</ds:Y>
+        </ds:DSAKeyValue>
+    </ds:KeyValue> 
+</ds:KeyInfo>
diff --git a/xmltoolingtest/data/DSANullG.xml b/xmltoolingtest/data/DSANullG.xml
new file mode 100644
index 0000000..9333632
--- /dev/null
+++ b/xmltoolingtest/data/DSANullG.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
+    <ds:KeyName>Foo</ds:KeyName>
+    <ds:KeyName>Bar</ds:KeyName>
+    <ds:KeyValue>
+        <ds:DSAKeyValue>
+            <ds:P>ANVGAtN1Mxr3ZkxKcQqZaMxw2Qbre4jG8G+KFhcPYJQNjhpYH2O+DVWx02vV4H9ypCnPaANktCitKuQSiDA9l1U=
+</ds:P>
+            <ds:Q>AK/apfGsK5pA4iia1j9qAR0Tdaw1
+</ds:Q>
+            <ds:G></ds:G>
+            <ds:Y>AMJPFxCB9Kp6ekdM90H23zv4JNEhkm1qXNix44Xdl6IABgE896kpNzGQDCKf6iecO7oX+eTJl3KwT3oNE+8EQxk=
+</ds:Y>
+        </ds:DSAKeyValue>
+    </ds:KeyValue> 
+</ds:KeyInfo>

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list