| 
					
				 | 
			
			
				@@ -534,7 +534,7 @@ class Archive: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         cdata = self.repository.get(id) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         _, data = self.repo_objs.parse(id, cdata) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         # we do not require TAM for archives, otherwise we can not even borg list a repo with old archives. 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        archive, self.tam_verified = self.key.unpack_and_verify_archive(data, force_tam_not_required=True) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        archive, self.tam_verified, _ = self.key.unpack_and_verify_archive(data, force_tam_not_required=True) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         metadata = ArchiveItem(internal_dict=archive) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if metadata.version not in (1, 2):  # legacy: still need to read v1 archives 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             raise Exception("Unknown archive metadata version") 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1998,7 +1998,7 @@ class ArchiveChecker: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 # **after** doing the low-level checks and having a strong indication that we 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 # are likely looking at an archive item here, also check the TAM authentication: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 try: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    archive, verified = self.key.unpack_and_verify_archive(data, force_tam_not_required=False) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    archive, verified, _ = self.key.unpack_and_verify_archive(data, force_tam_not_required=False) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 except IntegrityError: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     # TAM issues - do not accept this archive! 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     # either somebody is trying to attack us with a fake archive data or 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -2265,7 +2265,7 @@ class ArchiveChecker: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     del self.manifest.archives[info.name] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     continue 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 try: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    archive, verified = self.key.unpack_and_verify_archive(data, force_tam_not_required=False) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    archive, verified, salt = self.key.unpack_and_verify_archive(data, force_tam_not_required=False) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 except IntegrityError as integrity_error: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     # looks like there is a TAM issue with this archive, this might be an attack! 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     # when upgrading to borg 1.2.5, users are expected to TAM-authenticate all archives they 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -2293,7 +2293,7 @@ class ArchiveChecker: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 archive.item_ptrs = archive_put_items( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     items_buffer.chunks, repo_objs=self.repo_objs, add_reference=add_reference 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 ) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                data = self.key.pack_and_authenticate_metadata(archive.as_dict(), context=b"archive") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                data = self.key.pack_and_authenticate_metadata(archive.as_dict(), context=b"archive", salt=salt) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 new_archive_id = self.key.id_hash(data) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 cdata = self.repo_objs.format(new_archive_id, {}, data) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 add_reference(new_archive_id, len(data), cdata) 
			 |