mirror of
				https://github.com/dani-garcia/vaultwarden.git
				synced 2025-10-31 10:18:19 +02:00 
			
		
		
		
	Load RSA keys as pem format directly, and using openssl crate, backported from async branch
This commit is contained in:
		| @@ -219,6 +219,14 @@ pub fn read_file(path: &str) -> IOResult<Vec<u8>> { | ||||
|     Ok(contents) | ||||
| } | ||||
|  | ||||
| pub fn write_file(path: &str, content: &[u8]) -> Result<(), crate::error::Error> { | ||||
|     use std::io::Write; | ||||
|     let mut f = File::create(path)?; | ||||
|     f.write_all(content)?; | ||||
|     f.flush()?; | ||||
|     Ok(()) | ||||
| } | ||||
|  | ||||
| pub fn read_file_string(path: &str) -> IOResult<String> { | ||||
|     let mut contents = String::new(); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user