mirror of https://gitlab.com/bashrc2/epicyon
Specify signing algorithm
parent
438bb45c7a
commit
e732061e07
11
tests.py
11
tests.py
|
@ -5880,7 +5880,8 @@ def _testValidEmojiContent() -> None:
|
||||||
assert validEmojiContent('😄')
|
assert validEmojiContent('😄')
|
||||||
|
|
||||||
|
|
||||||
def _testHttpsigBaseNew(withDigest: bool, baseDir: str):
|
def _testHttpsigBaseNew(withDigest: bool, baseDir: str,
|
||||||
|
algorithm: str) -> None:
|
||||||
print('testHttpsigNew(' + str(withDigest) + ')')
|
print('testHttpsigNew(' + str(withDigest) + ')')
|
||||||
|
|
||||||
debug = True
|
debug = True
|
||||||
|
@ -5926,7 +5927,7 @@ def _testHttpsigBaseNew(withDigest: bool, baseDir: str):
|
||||||
domain, port,
|
domain, port,
|
||||||
hostDomain, port,
|
hostDomain, port,
|
||||||
boxpath, httpPrefix, messageBodyJsonStr,
|
boxpath, httpPrefix, messageBodyJsonStr,
|
||||||
'rsa-sha256', debug)
|
algorithm, debug)
|
||||||
else:
|
else:
|
||||||
bodyDigest = messageContentDigest(messageBodyJsonStr)
|
bodyDigest = messageContentDigest(messageBodyJsonStr)
|
||||||
contentLength = len(messageBodyJsonStr)
|
contentLength = len(messageBodyJsonStr)
|
||||||
|
@ -5942,7 +5943,7 @@ def _testHttpsigBaseNew(withDigest: bool, baseDir: str):
|
||||||
domain, port,
|
domain, port,
|
||||||
hostDomain, port,
|
hostDomain, port,
|
||||||
boxpath, httpPrefix, messageBodyJsonStr,
|
boxpath, httpPrefix, messageBodyJsonStr,
|
||||||
'rsa-sha256', debug)
|
algorithm, debug)
|
||||||
|
|
||||||
headers['signature'] = signatureHeader
|
headers['signature'] = signatureHeader
|
||||||
headers['signature-input'] = signatureIndexHeader
|
headers['signature-input'] = signatureIndexHeader
|
||||||
|
@ -6069,8 +6070,8 @@ def runAllTests():
|
||||||
_testHttpsig(baseDir)
|
_testHttpsig(baseDir)
|
||||||
_testHttpSignedGET(baseDir)
|
_testHttpSignedGET(baseDir)
|
||||||
_testHttpSigNew()
|
_testHttpSigNew()
|
||||||
_testHttpsigBaseNew(True, baseDir)
|
_testHttpsigBaseNew(True, baseDir, 'rsa-sha256')
|
||||||
_testHttpsigBaseNew(False, baseDir)
|
_testHttpsigBaseNew(False, baseDir, 'rsa-sha256')
|
||||||
_testCache()
|
_testCache()
|
||||||
_testThreads()
|
_testThreads()
|
||||||
_testCreatePerson(baseDir)
|
_testCreatePerson(baseDir)
|
||||||
|
|
Loading…
Reference in New Issue