Include accept within non-digest http signature

main
Bob Mottram 2021-08-31 21:53:53 +01:00
parent ed516c8ff7
commit a69ac4c883
3 changed files with 4 additions and 3 deletions

View File

@ -199,7 +199,8 @@ def createSignedHeader(privateKeyPem: str, nickname: str,
headers = { headers = {
'(request-target)': f'post {path}', '(request-target)': f'post {path}',
'host': headerDomain, 'host': headerDomain,
'date': dateStr 'date': dateStr,
'accept': contentType
} }
signatureHeader = \ signatureHeader = \
signPostHeaders(dateStr, privateKeyPem, nickname, signPostHeaders(dateStr, privateKeyPem, nickname,

View File

@ -181,7 +181,7 @@ def _getJsonSigned(session, url: str, domainFull: str, sessionHeaders: {},
print('Signed GET url: ' + url) print('Signed GET url: ' + url)
print('Signed GET httpPrefix: ' + httpPrefix) print('Signed GET httpPrefix: ' + httpPrefix)
messageStr = '' messageStr = ''
withDigest = True withDigest = False
signatureHeaderJson = \ signatureHeaderJson = \
createSignedHeader(signingPrivateKeyPem, nickname, domain, port, createSignedHeader(signingPrivateKeyPem, nickname, domain, port,
toDomain, toPort, url, httpPrefix, withDigest, toDomain, toPort, url, httpPrefix, withDigest,

View File

@ -1457,7 +1457,7 @@ def testSharedItemsFederation():
} }
bobInstanceActorJson = \ bobInstanceActorJson = \
getJson(signingPrivateKeyPem, sessionClient, getJson(signingPrivateKeyPem, sessionClient,
'http://' + bobAddress + '/@actor', testHeaders, {}, True, 'http://' + bobAddress + '/@actor', testHeaders, {}, True,
__version__, 'http', 'somedomain.or.other', 10, True) __version__, 'http', 'somedomain.or.other', 10, True)
assert bobInstanceActorJson assert bobInstanceActorJson
pprint(bobInstanceActorJson) pprint(bobInstanceActorJson)