[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [stem/master] Generated onion-key were invalid



commit eb07135e7b0f11ab784858c577c6d12e189722c2
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Wed Jun 28 10:13:13 2017 -0700

    Generated onion-key were invalid
    
    Oops, our change to create random fields caused this to be rendered as a list.
---
 stem/descriptor/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/stem/descriptor/__init__.py b/stem/descriptor/__init__.py
index 21e7bd7..f293c6c 100644
--- a/stem/descriptor/__init__.py
+++ b/stem/descriptor/__init__.py
@@ -1047,7 +1047,7 @@ def _random_crypto_blob(block_type = None):
   Provides a random string that can be used for crypto blocks.
   """
 
-  crypto_blob = stem.util.str_tools._split_by_length(base64.b64encode('%0140x' % random.randrange(16 ** 140)), 64)
+  crypto_blob = '\n'.join(stem.util.str_tools._split_by_length(base64.b64encode('%0140x' % random.randrange(16 ** 140)), 64))
 
   if block_type:
     return '\n-----BEGIN %s-----\n%s\n-----END %s-----' % (block_type, crypto_blob, block_type)

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits