fix whitespace
This commit is contained in:
parent
b4d1b80e04
commit
254a3079f2
|
@ -53,14 +53,14 @@ class CfsslIssuerPlugin(IssuerPlugin):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
hex_key = current_app.config.get('CFSSL_KEY')
|
hex_key = current_app.config.get('CFSSL_KEY')
|
||||||
key=bytes.fromhex(hex_key)
|
key = bytes.fromhex(hex_key)
|
||||||
except:
|
except:
|
||||||
#unable to find CFSSL_KEY in config, continue using normal sign method
|
#unable to find CFSSL_KEY in config, continue using normal sign method
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
data=data.encode()
|
data = data.encode()
|
||||||
|
|
||||||
token = base64.b64encode(hmac.new(key,data,digestmod=hashlib.sha256).digest())
|
token = base64.b64encode(hmac.new(key, data, digestmod=hashlib.sha256).digest())
|
||||||
data = base64.b64encode(data)
|
data = base64.b64encode(data)
|
||||||
|
|
||||||
data = json.dumps({'token': token.decode('utf-8'), 'request': data.decode('utf-8')})
|
data = json.dumps({'token': token.decode('utf-8'), 'request': data.decode('utf-8')})
|
||||||
|
|
Loading…
Reference in New Issue