Wording
This commit is contained in:
		
							parent
							
								
									ec5ea5e35e
								
							
						
					
					
						commit
						2604ef9bff
					
				|  | @ -55,7 +55,7 @@ and a refresh interval: | |||
| Setting `refresh_interval` to `0` seconds will disable automatic refresh. | ||||
| 
 | ||||
| Certificates are distinguished by their **filenames**, file modification time and | ||||
| a certificate hash. | ||||
| the hash of file contents. | ||||
| 
 | ||||
| #### Installing a Certificate | ||||
| 
 | ||||
|  |  | |||
|  | @ -49,7 +49,9 @@ list_certs_0(Path) -> | |||
|     lists:map( | ||||
|         fun(FileName) -> | ||||
|             AbsName = filename:absname(FileName, Path), | ||||
|             CertId = {FileName, modification_time(AbsName), file_hash(AbsName)}, | ||||
|             CertId = {FileName, | ||||
|                       modification_time(AbsName), | ||||
|                       file_content_hash(AbsName)}, | ||||
|             {CertId, [{name, FileName}]} | ||||
|         end, | ||||
|         FileNames). | ||||
|  | @ -58,7 +60,7 @@ modification_time(Path) -> | |||
|     {ok, Info} = file:read_file_info(Path, [{time, posix}]), | ||||
|     Info#file_info.mtime. | ||||
| 
 | ||||
| file_hash(Path) -> | ||||
| file_content_hash(Path) -> | ||||
|     {ok, Data} = file:read_file(Path), | ||||
|     erlang:phash2(Data). | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue