mirror of https://gitlab.com/bashrc2/epicyon
Tidying
parent
3d1c440584
commit
0b7d96f48c
5
tests.py
5
tests.py
|
@ -217,10 +217,11 @@ def testHttpSigNew():
|
||||||
# "Signature": sig
|
# "Signature": sig
|
||||||
# }
|
# }
|
||||||
dateStr = "Tue, 07 Jun 2014 20:51:35 GMT"
|
dateStr = "Tue, 07 Jun 2014 20:51:35 GMT"
|
||||||
|
secondsSinceEpoch = 1402170695
|
||||||
domain = "example.com"
|
domain = "example.com"
|
||||||
port = 443
|
port = 443
|
||||||
headers = {
|
headers = {
|
||||||
"*created": "1402170695",
|
"*created": str(secondsSinceEpoch),
|
||||||
"*request-target": "post /foo?param=value&pet=dog",
|
"*request-target": "post /foo?param=value&pet=dog",
|
||||||
"host": domain,
|
"host": domain,
|
||||||
"date": dateStr,
|
"date": dateStr,
|
||||||
|
@ -260,7 +261,7 @@ def testHttpSigNew():
|
||||||
'rsa-sha256')
|
'rsa-sha256')
|
||||||
assert signatureIndexHeader == \
|
assert signatureIndexHeader == \
|
||||||
'keyId="https://example.com/users/foo#main-key"; ' + \
|
'keyId="https://example.com/users/foo#main-key"; ' + \
|
||||||
'alg=hs2019; created=1402170695; ' + \
|
'alg=hs2019; created=' + str(secondsSinceEpoch) + '; ' + \
|
||||||
'sig1=(*request-target, *created, host, date, ' + \
|
'sig1=(*request-target, *created, host, date, ' + \
|
||||||
'digest, content-type, content-length)'
|
'digest, content-type, content-length)'
|
||||||
assert signatureHeader == \
|
assert signatureHeader == \
|
||||||
|
|
Loading…
Reference in New Issue