Commit 029bdaff by Julien Muchembled

Fix too many NewSessionError when nodes are in different timezones

Using datetime objects was a bad idea anyway. Its extra accuracy for
microseconds is lost because datime.utcnow() is slower than time.time().
1 parent 9751e221
# -*- coding: utf-8 -*-
import calendar, hashlib, hmac, logging, os, struct, subprocess, threading, time
from datetime import datetime
from OpenSSL import crypto
from . import utils
def newHmacSecret():
x = datetime.utcnow()
return utils.newHmacSecret(int(time.mktime(x.timetuple())) * 1000000
+ x.microsecond)
return utils.newHmacSecret(int(time.time() * 1000000))
def networkFromCa(ca):
return bin(ca.get_serial_number())[3:]
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!