mirror of https://gitlab.com/bashrc2/epicyon
				
				
				
			Debug
							parent
							
								
									bc575dc6c0
								
							
						
					
					
						commit
						edf0c8880e
					
				
							
								
								
									
										1
									
								
								inbox.py
								
								
								
								
							
							
						
						
									
										1
									
								
								inbox.py
								
								
								
								
							| 
						 | 
				
			
			@ -2710,6 +2710,7 @@ def runInboxQueue(recentPostsCache: {}, maxRecentPosts: int,
 | 
			
		|||
           queueJson['original'].get('signature'):
 | 
			
		||||
            # use the original json message received, not one which may have
 | 
			
		||||
            # been modified along the way
 | 
			
		||||
            print('inbox signature: ' + str(queueJson['original']))
 | 
			
		||||
            if not jsonldVerify(queueJson['original'], pubKey):
 | 
			
		||||
                print('WARN: jsonld inbox signature check failed ' +
 | 
			
		||||
                      keyId + ' ' + pubKey + ' ' +
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -93,7 +93,6 @@ def _verifyJws(payload: {}, jwsSignature: str, publicKeyPem: str) -> bool:
 | 
			
		|||
    """
 | 
			
		||||
    Verifies a signature using the given public key
 | 
			
		||||
    """
 | 
			
		||||
    print('inbox signature: ' + str(jwsSignature))
 | 
			
		||||
    encodedHeader, encodedSignature = jwsSignature.split(b'..')
 | 
			
		||||
    signature = _b64safeDecode(encodedSignature)
 | 
			
		||||
    payload = b'.'.join([encodedHeader, payload])
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue