mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-10-30 19:20:40 -04:00 
			
		
		
		
	Add a function to remove classic crypto dependencies
A list of symbols to remove will be added in a subsequent commit. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
		
							parent
							
								
									2d2e924401
								
							
						
					
					
						commit
						9bbba5ea69
					
				| @ -22,6 +22,15 @@ import os | |||||||
| import re | import re | ||||||
| import sys | import sys | ||||||
| 
 | 
 | ||||||
|  | CLASSIC_DEPENDENCIES = frozenset([ | ||||||
|  | ]) | ||||||
|  | 
 | ||||||
|  | def is_classic_dependency(dep): | ||||||
|  |     """Whether dep is a classic dependency that PSA test cases should not use.""" | ||||||
|  |     if dep.startswith('!'): | ||||||
|  |         dep = dep[1:] | ||||||
|  |     return dep in CLASSIC_DEPENDENCIES | ||||||
|  | 
 | ||||||
| def is_systematic_dependency(dep): | def is_systematic_dependency(dep): | ||||||
|     """Whether dep is a PSA dependency which is determined systematically.""" |     """Whether dep is a PSA dependency which is determined systematically.""" | ||||||
|     return dep.startswith('PSA_WANT_') |     return dep.startswith('PSA_WANT_') | ||||||
| @ -50,7 +59,8 @@ def updated_dependencies(file_name, function_name, arguments, dependencies): | |||||||
|     """ |     """ | ||||||
|     automatic = systematic_dependencies(file_name, function_name, arguments) |     automatic = systematic_dependencies(file_name, function_name, arguments) | ||||||
|     manual = [dep for dep in dependencies |     manual = [dep for dep in dependencies | ||||||
|               if not is_systematic_dependency(dep)] |               if not (is_systematic_dependency(dep) or | ||||||
|  |                       is_classic_dependency(dep))] | ||||||
|     return automatic + manual |     return automatic + manual | ||||||
| 
 | 
 | ||||||
| def keep_manual_dependencies(file_name, function_name, arguments): | def keep_manual_dependencies(file_name, function_name, arguments): | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Gilles Peskine
						Gilles Peskine