You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@warble.apache.org by hu...@apache.org on 2018/06/26 23:04:41 UTC

[incubator-warble-node] branch master updated (f3b6149 -> 739741f)

This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-warble-node.git.


    from f3b6149  set default server to test instance for now
     new 01c59a2  remove some text
     new c0ea6bf  fix fingerprint generation
     new 739741f  explain what the fingerprint is for

The 3 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:
 node.py                  | 7 ++++---
 plugins/basics/crypto.py | 5 ++---
 2 files changed, 6 insertions(+), 6 deletions(-)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@warble.apache.org
For additional commands, e-mail: commits-help@warble.apache.org


[incubator-warble-node] 03/03: explain what the fingerprint is for

Posted by hu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-warble-node.git

commit 739741f689f4e622a10410dc2601ba24b1226678
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Tue Jun 26 18:04:35 2018 -0500

    explain what the fingerprint is for
---
 node.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/node.py b/node.py
index 87d63e5..7af8acd 100644
--- a/node.py
+++ b/node.py
@@ -138,6 +138,8 @@ if __name__ == "__main__":
                 if payload['encrypted']:
                     apikey = str(plugins.basics.crypto.decrypt(privkey, base64.b64decode(apikey)), 'ascii')
                 print("INFO: Fetched API key %s from server" % apikey)
+                print("INFO: Registered with fingerprint: %s" % plugins.basics.crypto.fingerprint(privkey.public_key()))
+                print("INFO: Please verify that the node request has this fingerprint when verifying the node.")
                 gconf['client']['apikey'] = apikey
                 # Save updated changes to disk
                 yaml.dump(gconf, open(configpath, "w"))
@@ -150,7 +152,7 @@ if __name__ == "__main__":
             sys.exit(-1)
     else:
         apikey = gconf['client'].get('apikey')
-        
+    
     # Now we check if we're eligible to do tests.
     # If --wait is passed, we'll pause and retry until we get our way.
     print("INFO: Checking for node eligibility...")


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@warble.apache.org
For additional commands, e-mail: commits-help@warble.apache.org


[incubator-warble-node] 02/03: fix fingerprint generation

Posted by hu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-warble-node.git

commit c0ea6bf9f3dc084eec197de4729ba95a99c937d6
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Tue Jun 26 18:03:28 2018 -0500

    fix fingerprint generation
    
    - use proper class
    - use sha224 like server
---
 plugins/basics/crypto.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/plugins/basics/crypto.py b/plugins/basics/crypto.py
index 291a25a..df31691 100644
--- a/plugins/basics/crypto.py
+++ b/plugins/basics/crypto.py
@@ -89,14 +89,13 @@ def pem(key):
 def fingerprint(key):
     """ Derives a digest fingerprint from a key """
     print(type(key))
-    if isinstance(key, cryptography.hazmat.backends.openssl.rsa._RSAPublicKey):
+    if isinstance(key, cryptography.hazmat.primitives.asymmetric.rsa.RSAPublicKey):
         _pem = pem(key)
-        print("key is rsa")
     elif type(key) is str:
         _pem = bytes(key, 'ascii', errors = 'replace')
     else:
         _pem = key
-    sha = hashlib.sha256(_pem).hexdigest()
+    sha = hashlib.sha224(_pem).hexdigest()
     return sha
 
 def decrypt(key, text):


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@warble.apache.org
For additional commands, e-mail: commits-help@warble.apache.org


[incubator-warble-node] 01/03: remove some text

Posted by hu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-warble-node.git

commit 01c59a24cba7e51dc8f623e9f8316ce29810eca0
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Tue Jun 26 17:57:33 2018 -0500

    remove some text
---
 node.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/node.py b/node.py
index c85ef8f..87d63e5 100644
--- a/node.py
+++ b/node.py
@@ -24,6 +24,7 @@ _VERSION = '0.1.0'
 import os
 import sys
 import stat
+import time
 import ruamel.yaml
 import requests
 import datetime
@@ -178,7 +179,5 @@ if __name__ == "__main__":
     toffset = plugins.basics.misc.adjustTime(gconf['misc']['ntpserver'])
     gconf['misc']['offset'] = toffset
     
-    # Connect to master (or at least try to), leave a calling card if not known.
-    # TDB
     
     


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@warble.apache.org
For additional commands, e-mail: commits-help@warble.apache.org