File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -187,15 +187,14 @@ def validate_response(public_key_server: RsaKey,
187
187
188
188
189
189
def is_valid_response_header_with_body (public_key_server : RsaKey ,
190
- status_code : int ,
191
- body_bytes : bytes ,
192
- headers : Dict [str , str ]) -> bool :
190
+ status_code : int ,
191
+ body_bytes : bytes ,
192
+ headers : Dict [str , str ]) -> bool :
193
193
head_bytes = _generate_response_head_bytes (status_code , headers )
194
194
bytes_signed = head_bytes + body_bytes
195
195
signer = PKCS1_v1_5 .pkcs1_15 .new (public_key_server )
196
196
digest = SHA256 .new ()
197
197
digest .update (bytes_signed )
198
- signer .verify (digest , base64 .b64decode (headers [_HEADER_SERVER_SIGNATURE ]))
199
198
200
199
try :
201
200
signer .verify (digest , base64 .b64decode (headers [_HEADER_SERVER_SIGNATURE ]))
You can’t perform that action at this time.
0 commit comments