gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [libeufin] branch master updated: notes on exporting key HE


From: gnunet
Subject: [GNUnet-SVN] [libeufin] branch master updated: notes on exporting key HEXs
Date: Tue, 01 Oct 2019 16:54:51 +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 6d540d7  notes on exporting key HEXs
6d540d7 is described below

commit 6d540d721fc60c03aea8487ea9e1a7cdd1f5215d
Author: Marcello Stanisci <address@hidden>
AuthorDate: Tue Oct 1 16:54:32 2019 +0200

    notes on exporting key HEXs
---
 src/main/python/libeufin-cli | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/main/python/libeufin-cli b/src/main/python/libeufin-cli
index 879357b..eddab4a 100755
--- a/src/main/python/libeufin-cli
+++ b/src/main/python/libeufin-cli
@@ -30,15 +30,15 @@ def customer_info(obj):
     help="Confirm INI and HIA messages via JSON API"
 )
 @click.option(
-    "--enc-key", required=True,
+    "--enc-key", required=True, default="./enc.pem",
     help="Path of encryption RSA public key in PEM format"
 )
 @click.option(
-    "--es-key", required=True,
+    "--es-key", required=True, default="./es.pem",
     help="Path of signature RSA public key in PEM format"
 )
 @click.option(
-    "--ia-key", required=True,
+    "--ia-key", required=True, default="./ia.pem",
     help="Path of identification and authentication RSA public key in PEM 
format"
 )
 def keyletter(enc_key, es_key, ia_key):
@@ -46,12 +46,15 @@ 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"))
+        enckey = RSA.importKey(open(enc_key, "r").read())
+        eskey = RSA.importKey(open(enc_key, "r").read())
+        iakey = RSA.importKey(open(enc_key, "r").read())
     except FileNotFoundError:
         print("Could not find all the keys")
 
+    # hex exponent = format(key.e, "x")
+    # hex modulus = format(key.n, "x")
+
     # post(url, json=body)
 
 cli()

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



reply via email to

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