gnunet-svn
[Top][All Lists]
Advanced

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

[taler-anastasis] branch master updated (dadd427 -> 6d97014)


From: gnunet
Subject: [taler-anastasis] branch master updated (dadd427 -> 6d97014)
Date: Tue, 16 Jun 2020 15:25:44 +0200

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

dennis-neufeld pushed a change to branch master
in repository anastasis.

    from dadd427  fix figure label
     new 041ea16  handling for zero cost
     new fe53e52  worked on cli assembler
     new a74c1a5  worked on cli assembler command 'truth'
     new 6d97014  worked on cli assembler command 'policies'

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 doc/ledger/illustration/system-architecture.svg | 671 ++++++++++++------------
 src/backend/anastasis-httpd.c                   |  31 ++
 src/backend/anastasis-httpd.h                   |  12 +
 src/backend/anastasis-httpd_config.c            |   6 +-
 src/backend/anastasis-httpd_policy_upload.c     |  30 ++
 src/cli/anastasis-cli-assembler.c               | 208 +++++++-
 src/cli/anastasis-cli-splitter.c                |  24 +-
 src/include/anastasis.h                         |  16 +-
 src/include/anastasis_service.h                 |  16 +-
 src/lib/anastasis.c                             |  41 +-
 src/lib/anastasis_api_config.c                  |   8 +-
 src/lib/anastasis_api_keyshare_lookup.c         |   2 +
 src/lib/test_anastasis_api.c                    |  11 +
 src/lib/test_anastasis_api.conf                 |   6 +-
 src/stasis/Datenbank-Schema.xml                 |   2 +-
 src/stasis/plugin_anastasis_postgres.c          |   6 +-
 16 files changed, 720 insertions(+), 370 deletions(-)

diff --git a/doc/ledger/illustration/system-architecture.svg 
b/doc/ledger/illustration/system-architecture.svg
index 25d43f3..00f0595 100644
--- a/doc/ledger/illustration/system-architecture.svg
+++ b/doc/ledger/illustration/system-architecture.svg
@@ -7,37 +7,37 @@
    xmlns="http://www.w3.org/2000/svg";
    xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd";
    xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape";
-   sodipodi:docname="system-architecture.svg"
-   inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
-   id="svg8"
-   version="1.1"
-   viewBox="0 0 210 297"
-   height="297mm"
-   width="210mm"
-   
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/ledger/illustration/system-architecture.png"
+   inkscape:export-ydpi="232.22856"
    inkscape:export-xdpi="232.22856"
-   inkscape:export-ydpi="232.22856">
+   
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/ledger/illustration/system-architecture.png"
+   width="210mm"
+   height="297mm"
+   viewBox="0 0 210 297"
+   version="1.1"
+   id="svg8"
+   inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
+   sodipodi:docname="system-architecture.svg">
   <defs
      id="defs2" />
   <sodipodi:namedview
-     inkscape:window-maximized="1"
-     inkscape:window-y="0"
-     inkscape:window-x="0"
-     inkscape:window-height="1055"
-     inkscape:window-width="1920"
-     showgrid="false"
-     inkscape:document-rotation="0"
-     inkscape:current-layer="layer1"
-     inkscape:document-units="mm"
-     inkscape:cy="369.24639"
-     inkscape:cx="422.59885"
-     inkscape:zoom="0.98994949"
-     inkscape:pageshadow="2"
-     inkscape:pageopacity="0.0"
-     borderopacity="1.0"
-     bordercolor="#666666"
+     id="base"
      pagecolor="#ffffff"
-     id="base" />
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="0.98994949"
+     inkscape:cx="422.59885"
+     inkscape:cy="369.24639"
+     inkscape:document-units="mm"
+     inkscape:current-layer="layer1"
+     inkscape:document-rotation="0"
+     showgrid="false"
+     inkscape:window-width="1920"
+     inkscape:window-height="1028"
+     inkscape:window-x="1920"
+     inkscape:window-y="27"
+     inkscape:window-maximized="1" />
   <metadata
      id="metadata5">
     <rdf:RDF>
@@ -51,422 +51,447 @@
     </rdf:RDF>
   </metadata>
   <g
-     id="layer1"
+     inkscape:label="Ebene 1"
      inkscape:groupmode="layer"
-     inkscape:label="Ebene 1">
+     id="layer1">
     <rect
-       inkscape:export-ydpi="232.22856"
-       inkscape:export-xdpi="232.22856"
-       y="0.5754323"
-       x="59.279423"
-       height="89.917648"
-       width="91.441154"
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       style="fill:#fff6d5;stroke:#000000;stroke-width:0.865"
        id="rect10"
-       style="fill:#fff6d5;stroke:#000000;stroke-width:0.865" />
+       width="91.441154"
+       height="89.917648"
+       x="59.279423"
+       y="0.5754323"
+       inkscape:export-xdpi="232.22856"
+       inkscape:export-ydpi="232.22856" />
     <g
-       inkscape:export-ydpi="232.22856"
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       id="g268"
        inkscape:export-xdpi="232.22856"
-       id="g268">
+       inkscape:export-ydpi="232.22856">
       <g
-         id="g235"
-         transform="translate(0,18.909963)">
+         transform="translate(0,18.909963)"
+         id="g235">
         <rect
-           y="56.65221"
-           x="0.35112599"
-           height="15.012281"
-           width="51.988171"
+           style="fill:#fff6d5;stroke:#000000;stroke-width:0.702252"
            id="rect12-6-7"
-           style="fill:#fff6d5;stroke:#000000;stroke-width:0.702252" />
+           width="51.988171"
+           height="15.012281"
+           x="0.35112599"
+           y="56.65221" />
         <text
-           id="text230"
-           y="66.469841"
-           x="3.1667819"
+           xml:space="preserve"
            
style="font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583"
-           xml:space="preserve"><tspan
-             style="stroke-width:0.264583"
-             y="66.469841"
-             x="3.1667819"
+           x="3.1667819"
+           y="66.469841"
+           id="text230"><tspan
+             sodipodi:role="line"
              id="tspan228"
-             sodipodi:role="line">VIDEO INDENT</tspan></text>
+             x="3.1667819"
+             y="66.469841"
+             style="stroke-width:0.264583">VIDEO INDENT</tspan></text>
       </g>
       <g
          id="g250">
         <rect
-           y="0.35112599"
-           x="0.35112599"
-           height="15.012281"
-           width="51.988171"
+           style="fill:#fff6d5;stroke:#000000;stroke-width:0.702252"
            id="rect12-6-3"
-           style="fill:#fff6d5;stroke:#000000;stroke-width:0.702252" />
+           width="51.988171"
+           height="15.012281"
+           x="0.35112599"
+           y="0.35112599" />
         <text
-           id="text213"
-           y="10.168754"
-           x="19.542526"
+           xml:space="preserve"
            
style="font-style:normal;font-weight:normal;font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
-           xml:space="preserve"><tspan
-             style="font-size:6.35px;stroke-width:0.264583"
-             y="10.168754"
-             x="19.542526"
+           x="19.542526"
+           y="10.168754"
+           id="text213"><tspan
+             sodipodi:role="line"
              id="tspan211"
-             sodipodi:role="line">SMS</tspan></text>
+             x="19.542526"
+             y="10.168754"
+             style="font-size:6.35px;stroke-width:0.264583">SMS</tspan></text>
       </g>
       <g
-         id="g245"
-         transform="translate(0,6.3033213)">
+         transform="translate(0,6.3033213)"
+         id="g245">
         <rect
-           y="19.118155"
-           x="0.35112599"
-           height="15.012281"
-           width="51.988171"
+           style="fill:#fff6d5;stroke:#000000;stroke-width:0.702252"
            id="rect12-6-9"
-           style="fill:#fff6d5;stroke:#000000;stroke-width:0.702252" />
+           width="51.988171"
+           height="15.012281"
+           x="0.35112599"
+           y="19.118155" />
         <text
-           id="text217"
-           y="28.938883"
-           x="15.282321"
+           xml:space="preserve"
            
style="font-style:normal;font-weight:normal;font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
-           xml:space="preserve"><tspan
-             style="font-size:6.35px;stroke-width:0.264583"
-             y="28.938883"
-             x="15.282321"
+           x="15.282321"
+           y="28.938883"
+           id="text217"><tspan
+             sodipodi:role="line"
              id="tspan215"
-             sodipodi:role="line">E-MAIL</tspan></text>
+             x="15.282321"
+             y="28.938883"
+             
style="font-size:6.35px;stroke-width:0.264583">E-MAIL</tspan></text>
       </g>
       <g
-         id="g240"
-         transform="translate(0,12.606645)">
+         transform="translate(0,12.606645)"
+         id="g240">
         <rect
-           y="37.885185"
-           x="0.35112599"
-           height="15.012281"
-           width="51.988171"
+           style="fill:#fff6d5;stroke:#000000;stroke-width:0.702252"
            id="rect12-6-0"
-           style="fill:#fff6d5;stroke:#000000;stroke-width:0.702252" />
+           width="51.988171"
+           height="15.012281"
+           x="0.35112599"
+           y="37.885185" />
         <text
-           id="text226"
-           y="47.702812"
-           x="4.569797"
+           xml:space="preserve"
            
style="font-style:normal;font-weight:normal;font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
-           xml:space="preserve"><tspan
-             style="font-size:6.35px;stroke-width:0.264583"
-             y="47.702812"
-             x="4.569797"
+           x="4.569797"
+           y="47.702812"
+           id="text226"><tspan
+             sodipodi:role="line"
              id="tspan224"
-             sodipodi:role="line">POST INDENT</tspan></text>
+             x="4.569797"
+             y="47.702812"
+             style="font-size:6.35px;stroke-width:0.264583">POST 
INDENT</tspan></text>
       </g>
     </g>
     <rect
-       inkscape:export-ydpi="232.22856"
-       inkscape:export-xdpi="232.22856"
-       style="fill:#fff6d5;stroke:#000000;stroke-width:0.702252"
-       id="rect12-6-7-2"
-       width="51.988171"
-       height="15.012281"
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       y="75.562172"
        x="157.66071"
-       y="75.562172" />
-    <text
-       inkscape:export-ydpi="232.22856"
+       height="15.012281"
+       width="51.988171"
+       id="rect12-6-7-2"
+       style="fill:#fff6d5;stroke:#000000;stroke-width:0.702252"
        inkscape:export-xdpi="232.22856"
-       xml:space="preserve"
-       
style="font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583"
-       x="159.0997"
+       inkscape:export-ydpi="232.22856" />
+    <text
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       id="text230-0"
        y="85.379799"
-       id="text230-0"><tspan
-         sodipodi:role="line"
-         id="tspan228-2"
-         x="159.0997"
+       x="159.0997"
+       
style="font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583"
+       xml:space="preserve"
+       inkscape:export-xdpi="232.22856"
+       inkscape:export-ydpi="232.22856"><tspan
+         style="stroke-width:0.264583"
          y="85.379799"
-         style="stroke-width:0.264583">NOTIFICATIONS</tspan></text>
+         x="159.0997"
+         id="tspan228-2"
+         sodipodi:role="line">NOTIFICATIONS</tspan></text>
     <rect
-       inkscape:export-ydpi="232.22856"
-       inkscape:export-xdpi="232.22856"
-       style="fill:#fff6d5;stroke:#000000;stroke-width:0.702252"
-       id="rect12-6-3-7"
-       width="51.988171"
-       height="15.012281"
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       y="0.35112599"
        x="157.66071"
-       y="0.35112599" />
-    <text
-       inkscape:export-ydpi="232.22856"
+       height="15.012281"
+       width="51.988171"
+       id="rect12-6-3-7"
+       style="fill:#fff6d5;stroke:#000000;stroke-width:0.702252"
        inkscape:export-xdpi="232.22856"
-       xml:space="preserve"
-       
style="font-style:normal;font-weight:normal;font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
-       x="162.63747"
+       inkscape:export-ydpi="232.22856" />
+    <text
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       id="text213-5"
        y="10.168754"
-       id="text213-5"><tspan
-         sodipodi:role="line"
-         id="tspan211-9"
-         x="162.63747"
+       x="162.63747"
+       
style="font-style:normal;font-weight:normal;font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
+       xml:space="preserve"
+       inkscape:export-xdpi="232.22856"
+       inkscape:export-ydpi="232.22856"><tspan
+         style="font-size:6.35px;stroke-width:0.264583"
          y="10.168754"
-         
style="font-size:6.35px;stroke-width:0.264583">MONITORING</tspan></text>
+         x="162.63747"
+         id="tspan211-9"
+         sodipodi:role="line">MONITORING</tspan></text>
     <rect
-       inkscape:export-ydpi="232.22856"
-       inkscape:export-xdpi="232.22856"
-       style="fill:#fff6d5;stroke:#000000;stroke-width:0.702252"
-       id="rect12-6-9-2"
-       width="51.988171"
-       height="15.012281"
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       y="25.421476"
        x="157.66071"
-       y="25.421476" />
-    <text
-       inkscape:export-ydpi="232.22856"
+       height="15.012281"
+       width="51.988171"
+       id="rect12-6-9-2"
+       style="fill:#fff6d5;stroke:#000000;stroke-width:0.702252"
        inkscape:export-xdpi="232.22856"
-       xml:space="preserve"
-       
style="font-style:normal;font-weight:normal;font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
-       x="162.43127"
+       inkscape:export-ydpi="232.22856" />
+    <text
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       id="text217-8"
        y="35.239105"
-       id="text217-8"><tspan
-         sodipodi:role="line"
-         id="tspan215-9"
-         x="162.43127"
+       x="162.43127"
+       
style="font-style:normal;font-weight:normal;font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
+       xml:space="preserve"
+       inkscape:export-xdpi="232.22856"
+       inkscape:export-ydpi="232.22856"><tspan
+         style="font-size:6.35px;stroke-width:0.264583"
          y="35.239105"
-         
style="font-size:6.35px;stroke-width:0.264583">ACCOUNTING</tspan></text>
+         x="162.43127"
+         id="tspan215-9"
+         sodipodi:role="line">ACCOUNTING</tspan></text>
     <rect
-       inkscape:export-ydpi="232.22856"
-       inkscape:export-xdpi="232.22856"
-       style="fill:#fff6d5;stroke:#000000;stroke-width:0.702252"
-       id="rect12-6-0-3"
-       width="51.988171"
-       height="15.012281"
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       y="50.491829"
        x="157.66071"
-       y="50.491829" />
-    <text
-       inkscape:export-ydpi="232.22856"
+       height="15.012281"
+       width="51.988171"
+       id="rect12-6-0-3"
+       style="fill:#fff6d5;stroke:#000000;stroke-width:0.702252"
        inkscape:export-xdpi="232.22856"
-       xml:space="preserve"
-       
style="font-style:normal;font-weight:normal;font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
-       x="168.75803"
+       inkscape:export-ydpi="232.22856" />
+    <text
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       id="text226-6"
        y="60.309456"
-       id="text226-6"><tspan
-         sodipodi:role="line"
-         id="tspan224-1"
-         x="168.75803"
+       x="168.75803"
+       
style="font-style:normal;font-weight:normal;font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
+       xml:space="preserve"
+       inkscape:export-xdpi="232.22856"
+       inkscape:export-ydpi="232.22856"><tspan
+         style="font-size:6.35px;stroke-width:0.264583"
          y="60.309456"
-         style="font-size:6.35px;stroke-width:0.264583">BACKUPS</tspan></text>
+         x="168.75803"
+         id="tspan224-1"
+         sodipodi:role="line">BACKUPS</tspan></text>
     <g
-       inkscape:export-ydpi="232.22856"
-       inkscape:export-xdpi="232.22856"
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       id="g426"
        transform="translate(0,-1.1374593)"
-       id="g426">
+       inkscape:export-xdpi="232.22856"
+       inkscape:export-ydpi="232.22856">
       <rect
-         y="96.170982"
-         x="59.279423"
-         height="57.691296"
-         width="19.228834"
+         style="fill:#fff6d5;stroke:#000000;stroke-width:0.740319"
          id="rect79-5"
-         style="fill:#fff6d5;stroke:#000000;stroke-width:0.740319" />
+         width="19.228834"
+         height="57.691296"
+         x="59.279423"
+         y="96.170982" />
       <text
-         xml:space="preserve"
-         
style="font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583"
-         x="-143.11784"
-         y="71.20533"
+         transform="rotate(-90)"
          id="text363"
-         transform="rotate(-90)"><tspan
-           sodipodi:role="line"
-           id="tspan361"
-           x="-143.11784"
+         y="71.20533"
+         x="-143.11784"
+         
style="font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583"
+         xml:space="preserve"><tspan
+           style="stroke-width:0.264583"
            y="71.20533"
-           style="stroke-width:0.264583">GNU TALER</tspan></text>
+           x="-143.11784"
+           id="tspan361"
+           sodipodi:role="line">GNU TALER</tspan></text>
     </g>
     <g
-       inkscape:export-ydpi="232.22856"
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       id="g421"
        inkscape:export-xdpi="232.22856"
-       id="g421">
+       inkscape:export-ydpi="232.22856">
       <rect
-         style="fill:#fff6d5;stroke:#000000;stroke-width:0.74032"
-         id="rect79-5-9"
-         width="19.228834"
-         height="57.691296"
+         y="95.033524"
          x="83.350197"
-         y="95.033524" />
+         height="57.691296"
+         width="19.228834"
+         id="rect79-5-9"
+         style="fill:#fff6d5;stroke:#000000;stroke-width:0.74032" />
       <g
          id="g415">
         <text
-           xml:space="preserve"
-           
style="font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583"
-           x="-145.498"
-           y="94.911781"
+           transform="rotate(-90)"
            id="text363-2"
-           transform="rotate(-90)"><tspan
-             sodipodi:role="line"
-             id="tspan361-9"
-             x="-145.498"
+           y="94.911781"
+           x="-145.498"
+           
style="font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583"
+           xml:space="preserve"><tspan
+             style="stroke-width:0.264583"
              y="94.911781"
-             style="stroke-width:0.264583">POSTGRESQL</tspan></text>
+             x="-145.498"
+             id="tspan361-9"
+             sodipodi:role="line">POSTGRESQL</tspan></text>
       </g>
     </g>
     <g
-       inkscape:export-ydpi="232.22856"
-       inkscape:export-xdpi="232.22856"
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       id="g411"
        transform="translate(0,-1.1374588)"
-       id="g411">
+       inkscape:export-xdpi="232.22856"
+       inkscape:export-ydpi="232.22856">
       <rect
-         style="fill:#fff6d5;stroke:#000000;stroke-width:0.74032"
-         id="rect79-5-1"
-         width="19.228834"
-         height="57.691296"
+         y="96.170982"
          x="107.42097"
-         y="96.170982" />
+         height="57.691296"
+         width="19.228834"
+         id="rect79-5-1"
+         style="fill:#fff6d5;stroke:#000000;stroke-width:0.74032" />
       <text
-         transform="rotate(-90)"
-         id="text363-3"
-         y="119.34687"
-         x="-138.65456"
+         xml:space="preserve"
          
style="font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583"
-         xml:space="preserve"><tspan
-           style="stroke-width:0.264583"
-           y="119.34687"
-           x="-138.65456"
+         x="-138.65456"
+         y="119.34687"
+         id="text363-3"
+         transform="rotate(-90)"><tspan
+           sodipodi:role="line"
            id="tspan361-1"
-           sodipodi:role="line">LIBCURL</tspan></text>
+           x="-138.65456"
+           y="119.34687"
+           style="stroke-width:0.264583">LIBCURL</tspan></text>
     </g>
     <g
-       inkscape:export-ydpi="232.22856"
-       inkscape:export-xdpi="232.22856"
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       id="g406"
        transform="translate(0,-1.1374588)"
-       id="g406">
+       inkscape:export-xdpi="232.22856"
+       inkscape:export-ydpi="232.22856">
       <rect
-         style="fill:#fff6d5;stroke:#000000;stroke-width:0.74032"
-         id="rect79-5-2"
-         width="19.228834"
-         height="57.691296"
+         y="96.170982"
          x="131.49174"
-         y="96.170982" />
+         height="57.691296"
+         width="19.228834"
+         id="rect79-5-2"
+         style="fill:#fff6d5;stroke:#000000;stroke-width:0.74032" />
       <text
-         transform="rotate(-90)"
-         id="text363-9"
-         y="143.41765"
-         x="-148.82603"
+         xml:space="preserve"
          
style="font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583"
-         xml:space="preserve"><tspan
-           style="stroke-width:0.264583"
-           y="143.41765"
-           x="-148.82603"
+         x="-151.19177"
+         y="143.41765"
+         id="text363-9"
+         transform="rotate(-90)"><tspan
+           sodipodi:role="line"
            id="tspan361-4"
-           sodipodi:role="line">LIBMICROHTTP</tspan></text>
+           x="-151.19177"
+           y="143.41765"
+           style="stroke-width:0.264583">LIBMICROHTTPD</tspan></text>
     </g>
     <text
-       inkscape:export-ydpi="232.22856"
-       inkscape:export-xdpi="232.22856"
-       id="text430"
-       y="8.1892481"
-       x="87.585556"
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       xml:space="preserve"
        
style="font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583"
-       xml:space="preserve"><tspan
-         style="stroke-width:0.264583"
-         y="8.1892481"
-         x="87.585556"
+       x="87.585556"
+       y="8.1892481"
+       id="text430"
+       inkscape:export-xdpi="232.22856"
+       inkscape:export-ydpi="232.22856"><tspan
+         sodipodi:role="line"
          id="tspan428"
-         sodipodi:role="line">ANASTASIS</tspan></text>
+         x="87.585556"
+         y="8.1892481"
+         style="stroke-width:0.264583">ANASTASIS</tspan></text>
     <rect
-       inkscape:export-ydpi="232.22856"
-       inkscape:export-xdpi="232.22856"
-       y="69.096367"
-       x="62.343716"
-       height="18.504324"
-       width="85.312561"
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       style="fill:#f9f9f9;stroke:#000000;stroke-width:0.865"
        id="rect432"
-       style="fill:#f9f9f9;stroke:#000000;stroke-width:0.865" />
-    <rect
-       inkscape:export-ydpi="232.22856"
+       width="85.312561"
+       height="18.504324"
+       x="62.343716"
+       y="69.096367"
        inkscape:export-xdpi="232.22856"
-       style="fill:#f9f9f9;stroke:#000000;stroke-width:0.865"
-       id="rect432-7"
-       width="85.312569"
-       height="18.504326"
-       x="62.343712"
-       y="47.417034" />
+       inkscape:export-ydpi="232.22856" />
     <rect
-       inkscape:export-ydpi="232.22856"
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       y="47.417034"
+       x="62.343712"
+       height="18.504326"
+       width="85.312569"
+       id="rect432-7"
+       style="fill:#f9f9f9;stroke:#000000;stroke-width:0.865"
        inkscape:export-xdpi="232.22856"
-       style="fill:#f9f9f9;stroke:#000000;stroke-width:0.48329"
-       id="rect432-8"
-       width="26.093239"
-       height="18.886036"
-       x="62.248283"
-       y="25.017683" />
+       inkscape:export-ydpi="232.22856" />
     <rect
-       inkscape:export-ydpi="232.22856"
-       inkscape:export-xdpi="232.22856"
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
        y="25.017683"
-       x="91.953377"
+       x="62.248283"
        height="18.886036"
        width="26.093239"
-       id="rect432-8-4"
-       style="fill:#f9f9f9;stroke:#000000;stroke-width:0.483291" />
-    <rect
-       inkscape:export-ydpi="232.22856"
+       id="rect432-8"
+       style="fill:#f9f9f9;stroke:#000000;stroke-width:0.48329"
        inkscape:export-xdpi="232.22856"
-       y="25.017683"
-       x="121.65847"
-       height="18.886036"
+       inkscape:export-ydpi="232.22856" />
+    <rect
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       style="fill:#f9f9f9;stroke:#000000;stroke-width:0.483291"
+       id="rect432-8-4"
        width="26.093239"
+       height="18.886036"
+       x="91.953377"
+       y="25.017683"
+       inkscape:export-xdpi="232.22856"
+       inkscape:export-ydpi="232.22856" />
+    <rect
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       style="fill:#f9f9f9;stroke:#000000;stroke-width:0.483291"
        id="rect432-8-5"
-       style="fill:#f9f9f9;stroke:#000000;stroke-width:0.483291" />
-    <text
-       inkscape:export-ydpi="232.22856"
+       width="26.093239"
+       height="18.886036"
+       x="121.65847"
+       y="25.017683"
        inkscape:export-xdpi="232.22856"
-       id="text483"
-       y="80.660019"
-       x="76.017273"
+       inkscape:export-ydpi="232.22856" />
+    <text
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       xml:space="preserve"
        
style="font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583"
-       xml:space="preserve"><tspan
-         style="stroke-width:0.264583"
-         y="80.660019"
-         x="76.017273"
+       x="76.017273"
+       y="80.660019"
+       id="text483"
+       inkscape:export-xdpi="232.22856"
+       inkscape:export-ydpi="232.22856"><tspan
+         sodipodi:role="line"
          id="tspan481"
-         sodipodi:role="line">ANASTASIS HTTPD</tspan></text>
+         x="76.017273"
+         y="80.660019"
+         style="stroke-width:0.264583">ANASTASIS HTTPD</tspan></text>
     <text
-       inkscape:export-ydpi="232.22856"
-       inkscape:export-xdpi="232.22856"
-       id="text487"
-       y="58.980682"
-       x="82.415329"
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       xml:space="preserve"
        
style="font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583"
-       xml:space="preserve"><tspan
-         style="stroke-width:0.264583"
-         y="58.980682"
-         x="82.415329"
+       x="82.415329"
+       y="58.980682"
+       id="text487"
+       inkscape:export-xdpi="232.22856"
+       inkscape:export-ydpi="232.22856"><tspan
+         sodipodi:role="line"
          id="tspan485"
-         sodipodi:role="line">LIBANASTASIS</tspan></text>
+         x="82.415329"
+         y="58.980682"
+         style="stroke-width:0.264583">LIBANASTASIS</tspan></text>
     <text
-       inkscape:export-ydpi="232.22856"
-       inkscape:export-xdpi="232.22856"
-       id="text491"
-       y="36.772186"
-       x="70.50605"
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       xml:space="preserve"
        
style="font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583"
-       xml:space="preserve"><tspan
-         style="stroke-width:0.264583"
-         y="36.772186"
-         x="70.50605"
+       x="70.50605"
+       y="36.772186"
+       id="text491"
+       inkscape:export-xdpi="232.22856"
+       inkscape:export-ydpi="232.22856"><tspan
+         sodipodi:role="line"
          id="tspan489"
-         sodipodi:role="line">CLI</tspan></text>
+         x="70.50605"
+         y="36.772186"
+         style="stroke-width:0.264583">CLI</tspan></text>
     <text
-       inkscape:export-ydpi="232.22856"
-       inkscape:export-xdpi="232.22856"
-       id="text495"
-       y="36.772186"
-       x="97.099701"
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       xml:space="preserve"
        
style="font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583"
-       xml:space="preserve"><tspan
-         style="stroke-width:0.264583"
-         y="36.772186"
-         x="97.099701"
+       x="97.099701"
+       y="36.772186"
+       id="text495"
+       inkscape:export-xdpi="232.22856"
+       inkscape:export-ydpi="232.22856"><tspan
+         sodipodi:role="line"
          id="tspan493"
-         sodipodi:role="line">TEST</tspan></text>
+         x="97.099701"
+         y="36.772186"
+         style="stroke-width:0.264583">TEST</tspan></text>
     <text
-       inkscape:export-ydpi="232.22856"
-       inkscape:export-xdpi="232.22856"
-       id="text499"
-       y="36.772186"
-       x="126.84045"
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       xml:space="preserve"
        
style="font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583"
-       xml:space="preserve"><tspan
-         style="stroke-width:0.264583"
-         y="36.772186"
-         x="126.84045"
+       x="126.84045"
+       y="36.772186"
+       id="text499"
+       inkscape:export-xdpi="232.22856"
+       inkscape:export-ydpi="232.22856"><tspan
+         sodipodi:role="line"
          id="tspan497"
-         sodipodi:role="line">APPS</tspan></text>
+         x="126.84045"
+         y="36.772186"
+         style="stroke-width:0.264583">APPS</tspan></text>
   </g>
 </svg>
diff --git a/src/backend/anastasis-httpd.c b/src/backend/anastasis-httpd.c
index 11d48b5..8b91971 100644
--- a/src/backend/anastasis-httpd.c
+++ b/src/backend/anastasis-httpd.c
@@ -55,11 +55,24 @@ char *AH_supported_methods;
  */
 struct TALER_Amount AH_annual_fee;
 
+/**
+ * Cost of authentication by question
+ * FIXME: Implement a more elegant way to
+ * list costs of authentication methods
+ */
+struct TALER_Amount AH_question_cost;
+
 /**
  * Our Taler backend to process payments.
  */
 char *AH_backend_url;
 
+/**
+ * Taler currency.
+ */
+char *AH_currency;
+
+
 /**
  * Our fulfillment URL.
  */
@@ -572,6 +585,24 @@ run (void *cls,
     GNUNET_SCHEDULER_shutdown ();
     return;
   }
+  if (GNUNET_OK !=
+      TALER_config_get_amount (config,
+                               "anastasis",
+                               "QUESTION_COST",
+                               &AH_question_cost))
+  {
+    GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
+                               "anastasis",
+                               "QUESTION_COST");
+    GNUNET_SCHEDULER_shutdown ();
+    return;
+  }
+  if (GNUNET_OK !=
+      TALER_config_get_currency (config,
+                                 &AH_currency))
+  {
+    return GNUNET_SYSERR;
+  }
   if (GNUNET_OK !=
       GNUNET_CONFIGURATION_get_value_string (config,
                                              "anastasis",
diff --git a/src/backend/anastasis-httpd.h b/src/backend/anastasis-httpd.h
index 1f78555..478de60 100644
--- a/src/backend/anastasis-httpd.h
+++ b/src/backend/anastasis-httpd.h
@@ -146,11 +146,23 @@ extern unsigned long long AH_upload_limit_mb;
  */
 extern struct TALER_Amount AH_annual_fee;
 
+/**
+ * Cost of authentication by question
+ * FIXME: Implement a more elegant way to
+ * list costs of authentication methods
+ */
+extern struct TALER_Amount AH_question_cost;
+
 /**
  * Our Taler backend to process payments.
  */
 extern char *AH_backend_url;
 
+/**
+ * Taler currency.
+ */
+extern char *AH_currency;
+
 /**
  * Supported methods.
  */
diff --git a/src/backend/anastasis-httpd_config.c 
b/src/backend/anastasis-httpd_config.c
index d5b0840..2d56a5f 100644
--- a/src/backend/anastasis-httpd_config.c
+++ b/src/backend/anastasis-httpd_config.c
@@ -44,13 +44,17 @@ AH_handler_config (struct TMH_RequestHandler *rh,
 {
   return TALER_MHD_reply_json_pack (connection,
                                     MHD_HTTP_OK,
-                                    "{s:s, s:I, s:o, s:s}",
+                                    "{s:s, s:I, s:s, s:o, s:o, s:s}",
                                     "methods",
                                     (char *) AH_supported_methods,
                                     "storage_limit_in_megabytes",
                                     (json_int_t) AH_upload_limit_mb,
+                                    "currency",
+                                    (char *) AH_currency,
                                     "annual_fee",
                                     TALER_JSON_from_amount (&AH_annual_fee),
+                                    "question_cost",
+                                    TALER_JSON_from_amount 
(&AH_question_cost), // FIXME: implement a more elegant solution
                                     "version",
                                     "0.0");
 }
diff --git a/src/backend/anastasis-httpd_policy_upload.c 
b/src/backend/anastasis-httpd_policy_upload.c
index b6a0691..f721498 100644
--- a/src/backend/anastasis-httpd_policy_upload.c
+++ b/src/backend/anastasis-httpd_policy_upload.c
@@ -827,10 +827,40 @@ AH_handler_policy_post (struct MHD_Connection *connection,
     {
       struct GNUNET_HashCode hc;
       enum ANASTASIS_DB_QueryStatus qs;
+      struct TALER_Amount zero_cost;
+
+      TALER_amount_get_zero (AH_currency, &zero_cost);
+      if (0 == TALER_amount_cmp (&AH_annual_fee, &zero_cost))
+      {
+        // generate new payment identifier
+        GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_WEAK,
+                                    &puc->payment_identifier,
+                                    sizeof (
+                                      struct ANASTASIS_PaymentSecretP));
+        GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                    "Payment-Identifier generated: %s\n",
+                    TALER_B2S (&puc->payment_identifier));
+
+        int post_counter = 10;
+
+        qs = db->record_payment (db->cls,
+                                 &accountPubP,
+                                 post_counter,
+                                 &puc->payment_identifier,
+                                 &AH_annual_fee);
+        if (qs >= 0)
+        {
+          qs = db->increment_lifetime (db->cls,
+                                       &accountPubP,
+                                       &puc->payment_identifier,
+                                       GNUNET_TIME_UNIT_YEARS);
+        }
+      }
 
       qs = db->lookup_account (db->cls,
                                &accountPubP,
                                &hc);
+
       if (qs < 0)
         return handle_database_error (puc,
                                       qs);
diff --git a/src/cli/anastasis-cli-assembler.c 
b/src/cli/anastasis-cli-assembler.c
index c3b4425..ade518e 100644
--- a/src/cli/anastasis-cli-assembler.c
+++ b/src/cli/anastasis-cli-assembler.c
@@ -35,6 +35,11 @@
  */
 static char *import_id;
 
+/**
+ * Currency
+ */
+static char *currency;
+
 /**
  * Global option '--import' to import json containing recovery document.
  */
@@ -59,9 +64,67 @@ static struct GNUNET_CURL_Context *ctx;
  */
 static struct GNUNET_CURL_RescheduleContext *rc;
 
+/**
+ * Information about the challenges.
+ */
+static struct ANASTASIS_ChallengeInformation *challenges;
+
+/**
+ * Amount of challenges.
+ */
+static unsigned int challenges_length = 0;
+
+/**
+ * Policies with information how to decrypt master key
+ */
+static struct ANASTASIS_DecryptionPolicy *policies;
+
+/**
+ * Amount of policies.
+ */
+static unsigned int policies_length = 0;
+
 static void
 start_read_keyboard (void);
 
+/**
+ * State for a "get config" CMD.
+ */
+struct ConfigState
+{
+  /**
+   * Expected status code.
+   */
+  unsigned int http_status;
+
+  /**
+   * The /config GET operation handle.
+   */
+  struct ANASTASIS_ConfigOperation *co;
+
+  /**
+   * Reference to a ServerInfo.
+   */
+  struct ServerInfo *server;
+
+  /**
+   * Cost.
+   */
+  struct TALER_Amount cost;
+
+  /**
+   * Currency of the cost;
+   */
+  char *currency;
+
+  /**
+   * Supported methods.
+   */
+  char *methods;
+
+  // FIXME add configs
+};
+
 
 /**
  * State for a "recover secret" CMD.
@@ -145,7 +208,7 @@ read_keyboard_command (void *cls)
         "'x' to quit\n"
         "'o' to show these options\n"
         "'truth' to show all truths\n"
-        "'policy' to show all policies\n"
+        "'policies' to show all policies with missing challenges\n"
         "'try' to check whether you have to pay for truth\n"
         "'answer' to solve a challenge\n"
         "\n"
@@ -165,22 +228,68 @@ read_keyboard_command (void *cls)
     return;
   }
 
-  if (0 == strncmp ("truth",
-                    buffer,
-                    strlen ("truth")))
+  if ((0 == strncmp ("truth",
+                     buffer,
+                     strlen ("truth")))
+      && (characters == strlen ("truth")))
   {
-    // FIXME "truth" logic here
+    for (unsigned int i = 0; i < challenges_length; i++)
+    {
+      char solved_state = '-';
+      if (challenges[i].solved == 1)
+        solved_state = '+';
+      printf ("truth#%u(%c): %s %s ",
+              i,
+              solved_state,
+              TALER_amount_to_string (challenges[i].cost),
+              challenges[i].method);
+      if (0 == strcmp (challenges[i].method, "question"))
+        printf ("\"%s\"", challenges[i].instructions);
+      printf ("\n");
+    }
     start_read_keyboard ();
     GNUNET_free (buffer);
     buffer = NULL;
     return;
   }
 
-  if (0 == strncmp ("policy",
-                    buffer,
-                    strlen ("policy")))
+  if ((0 == strncmp ("policies",
+                     buffer,
+                     strlen ("policies")))
+      && (characters == strlen ("policies")))
   {
-    // FIXME "policy" logic here
+    for (unsigned int i = 0; i < policies_length; i++)
+    {
+      // Calculate costs
+      struct TALER_Amount cost;
+      GNUNET_assert (GNUNET_OK == TALER_amount_get_zero (currency,
+                                                         &cost));
+      for (unsigned int j = 0; j < policies[i].uuids_length; j++)
+      {
+        for (unsigned int k = 0; k < challenges_length; k++)
+        {
+          if (0 == uuid_compare (policies[i].escrow_uuids[j],
+                                 challenges[k].uuid))
+            TALER_amount_add (&cost,
+                              &cost,
+                              challenges[k].cost);
+        }
+      }
+      printf ("policy#%u: %s ",
+              i,
+              TALER_amount_to_string (&cost));
+      for (unsigned int j = 0; j < policies[i].uuids_length; j++)
+      {
+        for (unsigned int k = 0; k < challenges_length; k++)
+        {
+          if (0 == uuid_compare (policies[i].escrow_uuids[j],
+                                 challenges[k].uuid))
+            if (1 != challenges[k].solved)
+              printf ("truth#%u ", k);
+        }
+      }
+      printf ("missing\n");
+    }
     start_read_keyboard ();
     GNUNET_free (buffer);
     buffer = NULL;
@@ -216,6 +325,7 @@ read_keyboard_command (void *cls)
   buffer = NULL;
   start_read_keyboard ();
 }
+
 /**
  * @brief Wait for a keyboard input
  */
@@ -245,6 +355,78 @@ start_read_keyboard ()
 }
 
 
+/**
+ * Function called with the results of a #ANASTASIS_get_config().
+ *
+ * @param cls closure
+ * @param http_status HTTP status of the request
+ * @param methods supported methods by this provider
+ * @param conf_currency
+ * @param annual_fee Annual fee of this service
+ * @param question_cost Cost for authentication by question
+ */
+static void
+config_cb (void *cls,
+           unsigned int http_status,
+           const char *methods,
+           const char *conf_currency,
+           const struct TALER_Amount *annual_fee,
+           const struct TALER_Amount *question_cost)
+{
+  struct ConfigState *cs = cls;
+
+  cs->co = NULL;
+  if (http_status != cs->http_status)
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "Unexpected response code %u in %s:%u\n",
+                http_status,
+                __FILE__,
+                __LINE__);
+    return;
+  }
+
+  cs->cost = *question_cost;
+  if (NULL == currency)
+  {
+    currency = conf_currency;
+  }
+}
+
+
+/**
+ * Defines a Challenge Callback which is initially sent with the get 
challenge. It gives back the previously
+ * defined Challenge Information and a Status Code, like "payment missing".
+ *
+ * @param cls handle for the callback
+ * @param ec enum which defines the different status codes
+ *
+*/
+static void
+challenge_cb (void *cls,
+              enum TALER_ErrorCode ec)
+{
+  // FIXME handle ec
+  struct ANASTASIS_ChallengeInformation *ci = cls;
+  struct ConfigState *cs = GNUNET_new (struct ConfigState);
+
+  cs->http_status = MHD_HTTP_OK;
+  cs->co = ANASTASIS_get_config (ctx,
+                                 ci->url,
+                                 config_cb,
+                                 cs);
+  if (NULL == cs->co)
+  {
+    GNUNET_break (0);
+    return;
+  }
+  ci->cost = &cs->cost;
+  GNUNET_array_append (challenges,
+                       challenges_length,
+                       *ci);
+}
+
+
 static void
 policy_lookup_cb (void *cls,
                   const struct ANASTASIS_RecoveryInformation *ri,
@@ -257,6 +439,14 @@ policy_lookup_cb (void *cls,
     GNUNET_break (0);
     return;
   }
+  for (unsigned int i = 0; i < rss->ri->cs_len; i++)
+  {
+    ANASTASIS_get_challenge (rss->ri->cs[i],
+                             &challenge_cb);
+  }
+  policies = rss->ri->dps;
+  policies_length = rss->ri->dps_len;
+
   start_read_keyboard ();
   return;
 }
diff --git a/src/cli/anastasis-cli-splitter.c b/src/cli/anastasis-cli-splitter.c
index 776dd51..ab8c7fe 100644
--- a/src/cli/anastasis-cli-splitter.c
+++ b/src/cli/anastasis-cli-splitter.c
@@ -489,7 +489,6 @@ secret_share_result_cb (void *cls,
     }
   }
   printf ("Thank you for using Anastasis");
-  GNUNET_break (0);
   keyboard_task = NULL;
   start_read_keyboard ();
   return;
@@ -551,14 +550,17 @@ truth_upload_cb (void *cls,
  *
  * @param cls closure
  * @param http_status HTTP status of the request
- * @param cost Cost of this service
  * @param methods supported methods by this provider
+ * @param annual_fee Annual fee of this service
+ * @param question_cost Cost for authentication by question
  */
 static void
 config_cb (void *cls,
            unsigned int http_status,
            const char *methods,
-           const struct TALER_Amount *cost)
+           const char *conf_currency,
+           const struct TALER_Amount *annual_fee,
+           const struct TALER_Amount *question_cost)
 {
   struct ConfigState *cs = cls;
   struct ANASTASIS_PaymentDetails *pd = GNUNET_new (struct
@@ -582,7 +584,7 @@ config_cb (void *cls,
     return;
   }
 
-  cs->cost = *cost;
+  cs->cost = *annual_fee;
   cs->methods = GNUNET_malloc (strlen (methods) + 1);
   GNUNET_strlcpy (cs->methods,
                   methods,
@@ -722,7 +724,6 @@ read_keyboard_command (void *cls)
                      strlen ("server")))
       && (characters == strlen ("server")))
   {
-    // FIXME "server" logic here
     if (NULL != servers)
     {
       for (unsigned int i = 0; i < servers_length; i++)
@@ -749,7 +750,6 @@ read_keyboard_command (void *cls)
                     buffer,
                     strlen ("server add")))
   {
-    // FIXME "server add" logic here
     struct ServerInfo *server = GNUNET_new (struct ServerInfo);
     struct SaltState *ss = GNUNET_new (struct SaltState);
 
@@ -786,7 +786,6 @@ read_keyboard_command (void *cls)
                      strlen ("truth")))
       && (characters == strlen ("truth")))
   {
-    // FIXME "truth" logic here
     if (NULL != tu_states)
     {
       for (unsigned int i = 0; i < tu_states_length; i++)
@@ -820,7 +819,6 @@ read_keyboard_command (void *cls)
                     buffer,
                     strlen ("truth add")))
   {
-    // FIXME "truth add" logic here
     if (NULL != servers)
     {
       struct TruthUploadState *tus = GNUNET_new (struct TruthUploadState);
@@ -871,8 +869,7 @@ read_keyboard_command (void *cls)
             GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                         "At %s:%d answer is %s\n", __FILE__, __LINE__,
                         tus->secret_answer);
-
-            tus->instructions = "Please answer the question.";
+            tus->instructions = tus->secret_question;
             tus->mime_type = "text/plain";
             struct GNUNET_HashCode truth_data;
             GNUNET_CRYPTO_hash (tus->secret_answer,
@@ -909,7 +906,7 @@ read_keyboard_command (void *cls)
             GNUNET_SCHEDULER_shutdown ();
             return;
           }
-          tus->index = (tu_states_length > 0) ? tu_states_length - 1 : 0;
+          tus->index = tu_states_length;
           tus->tuo = ANASTASIS_truth_upload (ctx,
                                              tus->id_data,
                                              servers[server_num].backend_url,
@@ -957,7 +954,6 @@ read_keyboard_command (void *cls)
                     buffer,
                     strlen ("truth --secrets")))
   {
-    // FIXME "truth --secrets" logic here
     if (NULL != tu_states)
     {
       for (unsigned int i = 0; i < tu_states_length; i++)
@@ -992,7 +988,6 @@ read_keyboard_command (void *cls)
                      strlen ("policy")))
       && (characters == strlen ("policy")))
   {
-    // FIXME "policy" logic here
     if (NULL != pc_states)
     {
       for (unsigned int i = 0; i < pc_states_length; i++)
@@ -1018,7 +1013,6 @@ read_keyboard_command (void *cls)
                     buffer,
                     strlen ("policy add")))
   {
-    // FIXME "policy add" logic here
     struct PolicyCreateState *pcs = GNUNET_new (struct PolicyCreateState);
     char *token_start = &buffer[strlen ("policy add ")];
     char *token = strtok (token_start, " ");
@@ -1056,7 +1050,6 @@ read_keyboard_command (void *cls)
                     buffer,
                     strlen ("publish")))
   {
-    // FIXME "publish" logic here
     if (NULL != pc_states)
     {
       struct SecretShareState *sss = GNUNET_new (struct SecretShareState);
@@ -1228,6 +1221,7 @@ shutdown_task (void *cls)
     {
       GNUNET_free (tu_states[i].truth);
       GNUNET_free (tu_states[i].method);
+      GNUNET_free (tu_states[i].instructions);
       GNUNET_free_non_null (tu_states[i].secret_question);
       GNUNET_free_non_null (tu_states[i].secret_answer);
     }
diff --git a/src/include/anastasis.h b/src/include/anastasis.h
index 2fe1e35..4ca4e22 100644
--- a/src/include/anastasis.h
+++ b/src/include/anastasis.h
@@ -144,12 +144,20 @@ ANASTASIS_challenge_answer (struct GNUNET_CURL_Context 
*ctx,
  * @param method which method is this challenge (E-Mail, Security Question, 
SMS...)
  * @param url can be NULL defines the url or mail address used for the 
challenge
  * @param instructions defines which steps need to be done e.g. ( please look 
for the pin for recovery #1234)
+ * @param cost Cost to solve this challenge
+ * @param solved 1 if solved, else 0
+ * @param uuid Uuid of the challenge
+ * @param currency Currency of the cost
  */
 struct ANASTASIS_ChallengeInformation
 {
   const char *method;
   const char *url;
   const char *instructions;
+  const struct TALER_Amount *cost;
+  const unsigned int *solved;
+  const uuid_t *uuid;
+  const char *currency;
 };
 
 /**
@@ -157,13 +165,11 @@ struct ANASTASIS_ChallengeInformation
  * defined Challenge Information and a Status Code, like "payment missing".
  *
  * @param cls handle for the callback
- * @param ci reference to the challenge information struct
  * @param ec enum which defines the different status codes
  *
 */
 typedef void
 (*ANASTASIS_ChallengeCallback)(void *cls,
-                               const struct ANASTASIS_ChallengeInformation *ci,
                                enum TALER_ErrorCode ec); // i.e. payment 
missing
 
 /**
@@ -172,12 +178,10 @@ typedef void
  *
  * @param challenge reference to the escrow challenge which is started
  * @param cc opens a callback for the requested information
- * @param cc_cls handle for the request
  */
 void
-ANASTASIS_challenge_run (struct ANASTASIS_Challenge *challenge,
-                         ANASTASIS_ChallengeCallback cc,
-                         void *cc_cls);
+ANASTASIS_get_challenge (struct ANASTASIS_Challenge *challenge,
+                         ANASTASIS_ChallengeCallback cc);
 
 /**
  * Defines a Callback for the payment of an escrow challenge. Sends back a 
payment link
diff --git a/src/include/anastasis_service.h b/src/include/anastasis_service.h
index 7b46e8a..9544458 100644
--- a/src/include/anastasis_service.h
+++ b/src/include/anastasis_service.h
@@ -252,7 +252,9 @@ typedef void
 (*ANASTASIS_ConfigCallback)(void *cls,
                             unsigned int http_status,
                             const char *methods,
-                            const struct TALER_Amount *cost);
+                            const char *conf_currency,
+                            const struct TALER_Amount *annual_fee,
+                            const struct TALER_Amount *question_cost);
 
 
 struct ANASTASIS_ConfigOperation *
@@ -306,6 +308,18 @@ struct ANASTASIS_ConfigOperation
    */
   const char *methods;
 
+  /**
+   * Cost of authentication by question
+   * FIXME: Implement a more elegant way to
+   * list costs of authentication methods
+   */
+  struct TALER_Amount question_cost;
+
+  /**
+   * Currency of the cost;
+   */
+  const char *currency;
+
   // FIXME add configs
 };
 
diff --git a/src/lib/anastasis.c b/src/lib/anastasis.c
index 7f8626d..aaab198 100644
--- a/src/lib/anastasis.c
+++ b/src/lib/anastasis.c
@@ -204,75 +204,98 @@ struct ANASTASIS_Challenge
    * Callback which gives back the instructions and a status code of the 
request to the user
    */
   ANASTASIS_ChallengeCallback cc;
+
   /**
    * Closure for the challenge callback
    */
   void *cc_cls;
+
   /**
    * Callback which gives back the instructions and a status code of the 
request to the user
    */
   ANASTASIS_AnswerFeedback af;
+
   /**
    * Closure for the challenge callback
    */
   void *af_cls;
+
   /**
    * Reference to the recovery proccess which is ongoing
    */
   struct ANASTASIS_Recovery *recovery;
+
   /**
    * url to the escrow provider for this challenge
    */
   const char *url;
+
   /**
    * uuid which defines this challenge
    */
   uuid_t challenge_uuid;
+
   /**
    * Key used to encrypt the truth passed to the server
    */
   struct ANASTASIS_CRYPTO_TruthKeyP truth_key;
+
   /**
    * Salt used to encrypt the truth
    */
   struct ANASTASIS_CRYPTO_SaltP truth_salt;
+
   /**
    * plaintext challenge which is sent to the client
    */
   void *challenge;
+
   /**
    * size of the challenge
    */
   size_t challenge_size;
+
   /**
    * method of the challenge
    */
   const char *escrow_method;
+
   /**
    * keyshare lookup operation
    */
   struct ANASTASIS_KeyShareLookupOperation *kslo;
+
   /**
    * Curl context
    */
   struct GNUNET_CURL_Context *ctx;
+
   /**
    * Encrypted key share
    */
   struct ANASTASIS_CRYPTO_KeyShareP *key_share;
+
   /**
    * Status of the challenge 0 pending, 1 solved
    */
   unsigned int solved;
+
   /**
    * Expected http status
    */
   unsigned int http_status;
+
   /**
    * Challenge instructions
    */
   char *instructions;
+
+  /**
+   * Cost for authentication
+   */
+  struct TALER_Amount cost;
 };
+
 /**
  * Function called with the results of a #ANASTASIS_keyshare_lookup().
  *
@@ -449,24 +472,21 @@ ANASTASIS_challenge_answer (struct GNUNET_CURL_Context 
*ctx,
  *
  * @param challenge reference to the escrow challenge which is started
  * @param cc opens a callback for the requested information
- * @param cc_cls handle for the request
  */
 void
-ANASTASIS_challenge_run (struct ANASTASIS_Challenge *challenge,
-                         ANASTASIS_ChallengeCallback cc,
-                         void *cc_cls)
+ANASTASIS_get_challenge (struct ANASTASIS_Challenge *challenge,
+                         ANASTASIS_ChallengeCallback cc)
 {
-
   // FIXME
   struct ANASTASIS_ChallengeInformation *ci;
   ci = GNUNET_new (struct ANASTASIS_ChallengeInformation);
   challenge->cc = cc;
-  challenge->cc_cls = cc_cls;
+  ci->uuid = &challenge->challenge_uuid;
   ci->method = challenge->escrow_method;
   ci->url = challenge->url;
   ci->instructions = challenge->instructions;
-  challenge->cc (challenge->cc_cls,
-                 ci,
+  ci->solved = &challenge->solved;
+  challenge->cc (ci,
                  200);
 }
 
@@ -599,11 +619,13 @@ policy_lookup_cb (void *cls,
                    json_unpack (json_array_get (esc_methods, i),
                                 "{s:s,"       /* truth uuid */
                                 " s:s,"       /* provider url */
+                                " s:s,"       /* instructions */
                                 " s:s,"       /* truth key */
                                 " s:s,"       /* truth salt */
                                 " s:s}",       /* escrow method */
                                 "uuid", &uuid,
                                 "url", &cs[i]->url,
+                                "instructions", &cs[i]->instructions,
                                 "truth_key", &truth_key,
                                 "salt", &truth_salt,
                                 "escrow_method", &cs[i]->escrow_method));
@@ -1788,6 +1810,7 @@ ANASTASIS_secret_share (struct GNUNET_CURL_Context *ctx,
             esc_methods,
             json_pack ("{s:s," /* truth uuid */
                        " s:s," /* provider url */
+                       " s:s," /* instructions */
                        " s:o," /* truth key */
                        " s:o," /* truth salt */
                        " s:s}", /* escrow method */
@@ -1795,6 +1818,8 @@ ANASTASIS_secret_share (struct GNUNET_CURL_Context *ctx,
                        &uuid,
                        "url",
                        policies[k]->truths[l]->url,
+                       "instructions",
+                       policies[k]->truths[l]->instructions,
                        "truth_key", GNUNET_JSON_from_data_auto (
                          &policies[k]->truths[l]->truth_key),
                        "salt", GNUNET_JSON_from_data_auto (
diff --git a/src/lib/anastasis_api_config.c b/src/lib/anastasis_api_config.c
index 9aad899..7f1a41b 100644
--- a/src/lib/anastasis_api_config.c
+++ b/src/lib/anastasis_api_config.c
@@ -60,7 +60,9 @@ handle_config_finished (void *cls,
     {
       struct GNUNET_JSON_Specification spec[] = {
         GNUNET_JSON_spec_string ("methods", &co->methods),
+        GNUNET_JSON_spec_string ("currency", &co->currency),
         TALER_JSON_spec_amount ("annual_fee", &co->cost),
+        TALER_JSON_spec_amount ("question_cost", &co->question_cost),
         // FIXME add configs
         GNUNET_JSON_spec_end ()
       };
@@ -77,7 +79,9 @@ handle_config_finished (void *cls,
       co->cb (co->cb_cls,
               response_code,
               co->methods,
-              &co->cost
+              co->currency,
+              &co->cost,
+              &co->question_cost
               // FIXME add configs
               );
       ANASTASIS_config_cancel (co);
@@ -108,6 +112,8 @@ handle_config_finished (void *cls,
     co->cb (co->cb_cls,
             response_code,
             NULL,
+            NULL,
+            NULL,
             NULL);
     co->cb = NULL;
   }
diff --git a/src/lib/anastasis_api_keyshare_lookup.c 
b/src/lib/anastasis_api_keyshare_lookup.c
index 8e0dcaf..2dcaf4b 100644
--- a/src/lib/anastasis_api_keyshare_lookup.c
+++ b/src/lib/anastasis_api_keyshare_lookup.c
@@ -282,8 +282,10 @@ ANASTASIS_keyshare_lookup (struct GNUNET_CURL_Context *ctx,
   }
   kslo = GNUNET_new (struct ANASTASIS_KeyShareLookupOperation);
   kslo->ctx = ctx;
+  /** FIXME duplicate? see line 323
   kslo->cb = cb;
   kslo->cb_cls = cb_cls;
+  */
   kslo->truth_key = truth_key;
 
   GNUNET_assert (GNUNET_NO == uuid_is_null (*truth_uuid));
diff --git a/src/lib/test_anastasis_api.c b/src/lib/test_anastasis_api.c
index 0aeff30..fb8ec66 100644
--- a/src/lib/test_anastasis_api.c
+++ b/src/lib/test_anastasis_api.c
@@ -188,6 +188,15 @@ run (void *cls,
 
     // FIXME: Code for policy handling
 
+    ANASTASIS_TESTING_cmd_policy_store ("policy-store-1",
+                                        anastasis_url,
+                                        NULL /* prev upload */,
+                                        NULL /* last upload */,
+                                        MHD_HTTP_PAYMENT_REQUIRED,
+                                        ANASTASIS_TESTING_PSO_NONE,
+                                        "Test-1",
+                                        strlen ("Test-1")),
+
 
     ANASTASIS_TESTING_cmd_policy_store ("policy-store-1",
                                         anastasis_url,
@@ -228,6 +237,8 @@ run (void *cls,
                                          MHD_HTTP_OK,
                                          "policy-store-2"),
 
+
+
     TALER_TESTING_cmd_end ()
   };
 
diff --git a/src/lib/test_anastasis_api.conf b/src/lib/test_anastasis_api.conf
index 8aa1c8f..560b005 100644
--- a/src/lib/test_anastasis_api.conf
+++ b/src/lib/test_anastasis_api.conf
@@ -15,7 +15,7 @@ TALER_CACHE_HOME = $TALER_TEST_HOME/.cache/taler/
 
 [taler]
 # What currency do we use?
-CURRENCY = EUR
+currency = EUR
 CURRENCY_ROUND_UNIT = EUR:0.01
 
 [bank]
@@ -38,6 +38,10 @@ PAYMENT_BACKEND_URL = http://localhost:8080/
 
 # Annual fee we charge.
 ANNUAL_FEE = EUR:4.99
+#ANNUAL_FEE = EUR:0
+
+# Cost of authentication by question
+QUESTION_COST = EUR:0
 
 # Upload limit
 UPLOAD_LIMIT_MB = 1
diff --git a/src/stasis/Datenbank-Schema.xml b/src/stasis/Datenbank-Schema.xml
index 4cbd9ca..0591d22 100644
--- a/src/stasis/Datenbank-Schema.xml
+++ b/src/stasis/Datenbank-Schema.xml
@@ -1 +1 @@
-<mxfile host="www.draw.io" modified="2020-05-14T10:40:44.222Z" 
agent="Mozilla/5.0 (X11; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0" 
etag="yZcycUT-wwwuXJpvhy9n" version="12.8.8"><diagram id="UF0pCA7TQTvobU7b0bed" 
name="Seite-1">7V1bc5s4GP01ntl92A53O4+2615mkzaTuLvtk0cBxTDFiBFyYu+vXwkkMBZuiQ0YZtRmJtYVpO/o6Eif5IzM+Wb3EYPYv0MeDEeG5u1G5vuRYeiW7tBfLGafxYwdM4tY48DjmYqIx+A/yCM1HrsNPJiUMhKEQhLE5UgXRRF0SSkOYIxey9meUVh+agzWUIp4dEEox/4beMTnsbpzUyR8gsHa54+eGOMsYQNEZt6SxAceej2IMhcjc44RItmnzW4OQ
 [...]
\ No newline at end of file
+<mxfile host="Electron" modified="2020-06-11T14:26:00.822Z" agent="5.0 (X11; 
Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/13.2.1 
Chrome/83.0.4103.100 Electron/9.0.3 Safari/537.36" etag="akhPIe-celB06UuOFgWh" 
version="13.2.1" type="device"><diagram id="UF0pCA7TQTvobU7b0bed" 
name="Seite-1">7V1bc9o4GP01zOw+bMdXcB6B0sts0mYSdrd9YhRbwZ7aFiOLBPrrV7IlX5BpXGyDmVGbmaCrLX1HR0f6JDIy59HuIwYb/w55MBwZmrcbme9HhqHrmkF/sZh9FuPYWhaxxoHHMxURj8FPyCNFtm3gwaSSkSAUkmBTjXRRHEOXVOIAxui1mu0ZhdWnbsA
 [...]
\ No newline at end of file
diff --git a/src/stasis/plugin_anastasis_postgres.c 
b/src/stasis/plugin_anastasis_postgres.c
index 661ae65..8a862bf 100644
--- a/src/stasis/plugin_anastasis_postgres.c
+++ b/src/stasis/plugin_anastasis_postgres.c
@@ -471,14 +471,11 @@ postgres_store_recovery_document (void *cls,
                 "Public key used to query db: %s\n",
                 TALER_B2S (anastasis_pub));
 
-    struct GNUNET_TIME_Absolute ed;
     struct GNUNET_PQ_QueryParam params[] = {
       GNUNET_PQ_query_param_auto_from_type (anastasis_pub),
       GNUNET_PQ_query_param_end
     };
     struct GNUNET_PQ_ResultSpec rs[] = {
-      GNUNET_PQ_result_spec_auto_from_type ("expiration_date",
-                                            &ed),
       GNUNET_PQ_result_spec_end
     };
 
@@ -1182,8 +1179,9 @@ postgres_lookup_account (void *cls,
   {
     struct GNUNET_TIME_Absolute expiration_date;
     struct GNUNET_PQ_ResultSpec rs[] = {
+      /* FIXME: DELETE
       GNUNET_PQ_result_spec_auto_from_type ("expiration_date",
-                                            &expiration_date),
+                                            &expiration_date),*/
       GNUNET_PQ_result_spec_end
     };
 

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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