[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libeufin] branch master updated: load key from disk (pytho
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libeufin] branch master updated: load key from disk (python tool) |
Date: |
Tue, 01 Oct 2019 16:33:43 +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 3cd3983 load key from disk (python tool)
3cd3983 is described below
commit 3cd39830cf475ad02fde1eab85fa6d8402d90ee5
Author: Marcello Stanisci <address@hidden>
AuthorDate: Tue Oct 1 16:33:26 2019 +0200
load key from disk (python tool)
---
src/main/python/libeufin-cli | 44 ++++++++++++++++++++++++++++++++++++--------
1 file changed, 36 insertions(+), 8 deletions(-)
diff --git a/src/main/python/libeufin-cli b/src/main/python/libeufin-cli
index e6620f7..879357b 100755
--- a/src/main/python/libeufin-cli
+++ b/src/main/python/libeufin-cli
@@ -1,6 +1,7 @@
#!/usr/bin/env python3
import click
+from requests import post, get
@click.group()
@click.option(
@@ -17,13 +18,40 @@ def admin():
@admin.command(help="Create a new customer")
@click.pass_obj
def customers(obj):
- click.echo("Request creation of new customer or send initialization
letter")
-
-@admin.command(help="Confirm INI and HIA messages via JSON API")
-@click.option("--enc-key", help="Encryption RSA public key in PEM format")
-@click.option("--es-key", help="Signature RSA public key in PEM format")
-@click.option("--ia-key", help="Identification and authentication RSA public
key in PEM format")
-def initletter(enc_key, es_key, ia_key):
- click.echo("Send initialization letter to confirm INI / HIA messages")
+ pass
+
+@admin.command(help="Ask details about a customer")
+@click.option("--customer-id", help="bank non-EBICS identifier of the
customer")
+@click.pass_obj
+def customer_info(obj):
+ pass
+
+@admin.command(
+ help="Confirm INI and HIA messages via JSON API"
+)
+@click.option(
+ "--enc-key", required=True,
+ help="Path of encryption RSA public key in PEM format"
+)
+@click.option(
+ "--es-key", required=True,
+ help="Path of signature RSA public key in PEM format"
+)
+@click.option(
+ "--ia-key", required=True,
+ help="Path of identification and authentication RSA public key in PEM
format"
+)
+def keyletter(enc_key, es_key, ia_key):
+
+ from Crypto.PublicKey import RSA
+
+ try:
+ enckey = RSA.importKey(open(enc_key, "rb"))
+ eskey = RSA.importKey(open(enc_key, "rb"))
+ iakey = RSA.importKey(open(enc_key, "rb"))
+ except FileNotFoundError:
+ print("Could not find all the keys")
+
+ # post(url, json=body)
cli()
--
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: load key from disk (python tool),
gnunet <=