[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libeufin] branch master updated: minor fixes to 'customers
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libeufin] branch master updated: minor fixes to 'customers' subcommand |
Date: |
Wed, 02 Oct 2019 12:05:18 +0200 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository libeufin.
The following commit(s) were added to refs/heads/master by this push:
new 95ea6c3 minor fixes to 'customers' subcommand
95ea6c3 is described below
commit 95ea6c3317534dc76c2f38c9d67d362fb7553d0e
Author: Marcello Stanisci <address@hidden>
AuthorDate: Wed Oct 2 11:02:42 2019 +0200
minor fixes to 'customers' subcommand
---
src/main/python/libeufin-cli | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/src/main/python/libeufin-cli b/src/main/python/libeufin-cli
index caca4b1..f06c7db 100755
--- a/src/main/python/libeufin-cli
+++ b/src/main/python/libeufin-cli
@@ -1,5 +1,6 @@
#!/usr/bin/env python3
+import os
import click
from requests import post, get
from Crypto.PublicKey import RSA
@@ -28,7 +29,7 @@ def customers(obj):
name = Faker().name()
url = urljoin(obj["base_url"], "/admin/customers")
- print("Sending request for: {} to {}".format(name, url))
+ print("Submitting '{}' to {}".format(name, url))
try:
resp = post(url, json=dict(name=name))
except Exception:
@@ -36,11 +37,10 @@ def customers(obj):
# use the customer id contained in the response to
# query for your details.
- print(resp)
- customer_id = resp.get("id")
+ customer_id = resp.json().get("id")
assert(customer_id != None)
- customer_path = "{}/{}".format(CUSTOMERS_PATH, customer_id)
+ customer_path = "{}/{}/".format(CUSTOMERS_PATH, customer_id)
try:
os.makedirs(customer_path)
except OSError as e:
@@ -56,7 +56,7 @@ def customers(obj):
keyfile.write(pem)
keyfile.write("\n")
keyfile.close()
- print("{} saved".format(keytype))
+ print("Customer and private keys ({}) correctly
generated.".format(customer_path))
@admin.command(help="Ask details about a customer")
@click.option("--customer-id", help="bank non-EBICS identifier of the
customer")
@@ -73,6 +73,14 @@ def customer_info(obj):
)
def keyletter(enc_key, es_key, ia_key):
+ #
+ # Missing:
+ #
+ # 1) all the fields to put in the request
+ # 2) hashing the key
+ # 3) actual send
+ #
+
try:
eskey = RSA.importKey(
open("{}/{}/eskey.pem".format(
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [libeufin] branch master updated: minor fixes to 'customers' subcommand,
gnunet <=