gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [libebics] branch master updated: HPB.


From: gnunet
Subject: [GNUnet-SVN] [libebics] branch master updated: HPB.
Date: Mon, 29 Oct 2018 15:08:39 +0100

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

marcello pushed a commit to branch master
in repository libebics.

The following commit(s) were added to refs/heads/master by this push:
     new a242d9e  HPB.
a242d9e is described below

commit a242d9ef0a6346801d2b6a86281a3c1d47870ace
Author: Marcello Stanisci <address@hidden>
AuthorDate: Mon Oct 29 15:07:53 2018 +0100

    HPB.
    
    Include key's mod and exp in the request.  +, use
    --data-binary when POSTing with the shell script.
---
 src/post_xml.sh   |  2 +-
 src/xmlmessages.c | 23 ++++++++++++++++++-----
 src/xmlproto.c    |  6 ++++--
 3 files changed, 23 insertions(+), 8 deletions(-)

diff --git a/src/post_xml.sh b/src/post_xml.sh
index f02490b..6e58d76 100755
--- a/src/post_xml.sh
+++ b/src/post_xml.sh
@@ -8,7 +8,7 @@ fi
 URL="https://ebics.ubs-paymentstandards.ch/ebics/EbicsServlet";
 
 curl \
-  address@hidden \
+  --data-binary @$1 \
   -H"Content-Type: text/xml" \
   -H"Expect:" \
   -v \
diff --git a/src/xmlmessages.c b/src/xmlmessages.c
index 96033f9..5b3c264 100644
--- a/src/xmlmessages.c
+++ b/src/xmlmessages.c
@@ -672,9 +672,13 @@ void
 EBICS_build_auth_signature (void *cls,
                             struct EBICS_genex_document *document)
 {
-  char *hash_mapping[2] = {
-    "http://www.w3.org/2001/04/xmlenc#sha256";,
-    "http://www.w3.org/2001/04/xmlenc#sha512"; };
+  char *authExp;
+  char *authMod;
+
+  util_extract_public_RSAKeyValue
+    (&keyList[EBICS_USER_AUTH_KEY],
+     &authExp,
+     &authMod);
 
   struct EBICS_MSG_Spec auth[] = {
 
@@ -706,8 +710,17 @@ EBICS_build_auth_signature (void *cls,
       ("//ebics:AuthSignature//ds:DigestValue",
        ""),
     /* Optional node, temporary deletion to pass validation */
-    EBICS_MSG_op_del_node
-      ("//ebics:AuthSignature//ds:KeyInfo"),
+    EBICS_MSG_op_del_attribute
+      ("//ebics:AuthSignature/ds:KeyInfo/@Id"),
+    EBICS_MSG_op_select_choice
+      ("//ds:KeyInfo/schema:CHOICES",
+       1),
+    EBICS_MSG_op_set_string
+      ("//ebics:AuthSignature//ds:KeyInfo//ds:Modulus",
+       authMod),
+    EBICS_MSG_op_set_string
+      ("//ebics:AuthSignature//ds:KeyInfo//ds:Exponent",
+       authExp),
     EBICS_MSG_op_del_attribute 
       ("//ebics:AuthSignature/ds:SignatureValue/@Id"),
     EBICS_MSG_op_set_string 
diff --git a/src/xmlproto.c b/src/xmlproto.c
index b605d00..061b01c 100644
--- a/src/xmlproto.c
+++ b/src/xmlproto.c
@@ -41,11 +41,13 @@
  * Selects a choice from the tree, unlinks the unselected choices 
  * and relinks the content to the choices parent node.
  *
- * @param xpath XPath expression that specifies _one_ CHOCIES element.
+ * @param xpath XPath expression that specifies _one_ CHOICE element.
  * @param choice Index of the CHOICE to select.
+ * @return the MSG command.
  */
 struct EBICS_MSG_Spec
-EBICS_MSG_op_select_choice (const char *xpath, const uint8_t choice) 
+EBICS_MSG_op_select_choice (const char *xpath,
+                            const uint8_t choice) 
 {
   struct EBICS_MSG_Spec result = 
     {

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]