pymensago/keycard.py
def verify_chain(self, previous: EntryBase) -> RetVal:
		'''Verifies the chain of custody between the provided previous entry and the current one.'''

		if previous.type != 'User':
			return RetVal(ErrBadValue, 'entry type mismatch')
		
		if 'Custody' not in self.signatures or not self.signatures['Custody']:
			return RetVal(ErrNotFound, 'custody signature missing')
		
		if 'Contact-Request-Verification-Key' not in previous.fields or \
				not previous.fields['Contact-Request-Verification-Key']:
			return RetVal(ErrNotFound, 'signing key missing')
		
		status = self.verify_signature(CryptoString(previous.fields['Contact-Request-Verification-Key']),
				'Custody')
		return status
Verifies the chain of custody between the provided previous entry and the current one.
Verifies the chain of custody between the provided previous entry and the current one.
Verifies the chain of custody between the provided previous entry and the current one .
def verify_chain(self, previous: EntryBase) -> RetVal:
		if previous.type != 'User':
			return RetVal(ErrBadValue, 'entry type mismatch')
		if 'Custody' not in self.signatures or not self.signatures['Custody']:
			return RetVal(ErrNotFound, 'custody signature missing')
		if 'Contact-Request-Verification-Key' not in previous.fields or \
				not previous.fields['Contact-Request-Verification-Key']:
			return RetVal(ErrNotFound, 'signing key missing')
		status = self.verify_signature(CryptoString(previous.fields['Contact-Request-Verification-Key']),
				'Custody')
		return status
def verify_chain ( self , previous : EntryBase ) -> RetVal : if previous . type != 'User' : return RetVal ( ErrBadValue , 'entry type mismatch' ) if 'Custody' not in self . signatures or not self . signatures [ 'Custody' ] : return RetVal ( ErrNotFound , 'custody signature missing' ) if 'Contact-Request-Verification-Key' not in previous . fields or not previous . fields [ 'Contact-Request-Verification-Key' ] : return RetVal ( ErrNotFound , 'signing key missing' ) status = self . verify_signature ( CryptoString ( previous . fields [ 'Contact-Request-Verification-Key' ] ) , 'Custody' ) return status
Verifies the chain of custody between the provided previous entry and the current one.
Verifies the chain of custody between the provided previous entry and the current one .
'''Verifies the chain of custody between the provided previous entry and the current one.'''
self
previous
EntryBase