mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 18:55:19 +00:00 
			
		
		
		
	res_crypto: make keys reloadable on demand for testing
ASTERISK-30045 Change-Id: If59bbb50c1771084bfe2fef307a6077c90d35ce8
This commit is contained in:
		
				
					committed by
					
						 George Joseph
						George Joseph
					
				
			
			
				
	
			
			
			
						parent
						
							945193cc5a
						
					
				
				
					commit
					c1f5913b45
				
			| @@ -95,6 +95,8 @@ struct ast_key { | ||||
|  | ||||
| static AST_RWLIST_HEAD_STATIC(keys, ast_key); | ||||
|  | ||||
| static void crypto_load(int ifd, int ofd); | ||||
|  | ||||
| /*! | ||||
|  * \brief setting of priv key | ||||
|  * \param buf | ||||
| @@ -465,6 +467,12 @@ int AST_OPTIONAL_API_NAME(ast_crypto_loaded)(void) | ||||
| 	return 1; | ||||
| } | ||||
|  | ||||
| int AST_OPTIONAL_API_NAME(ast_crypto_reload)(void) | ||||
| { | ||||
| 	crypto_load(-1, -1); | ||||
| 	return 1; | ||||
| } | ||||
|  | ||||
| int AST_OPTIONAL_API_NAME(ast_aes_set_encrypt_key)(const unsigned char *key, ast_aes_encrypt_key *ctx) | ||||
| { | ||||
| 	return AES_set_encrypt_key(key, 128, ctx); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user