Hackney returning error regarding keyfile


I’m getting weird error regarding key file settings when doing request using hackney, it is like this
{:error, {:options, {:keyfile, '/cert/key_rsa.pem', []}}}, I know that when keyfile is not accesible, I get something like this {:options, {:keyfile, <path>, {:error, :enoent}}} so, anybody know what error [] during file reading means?

Thank you

[] is the same as an empty charlist '', the string type of erlang. So maybe it can read the file, but there’s no data in it.

We tried empty file and it returned {:ok, ""}, we also tried :file.read_file(...) on running system and it returned that certifikate, so I’m continuing debuging ssl module and maybe find code where keyfile is read. Thank you so far.

I found out that what actually is happening is that in ssl ssl_manager:cache_pem_file(KeyFile, DbHandle) returns [] in:

init_private_key(DbHandle, undefined, KeyFile, Password, _) ->
	{ok, List} = ssl_manager:cache_pem_file(KeyFile, DbHandle),
	[PemEntry] = [PemEntry || PemEntry = {PKey, _ , _} <- List,
				  PKey =:= 'RSAPrivateKey' orelse
				      PKey =:= 'DSAPrivateKey' orelse
				      PKey =:= 'ECPrivateKey' orelse
				      PKey =:= 'PrivateKeyInfo'
	private_key(public_key:pem_entry_decode(PemEntry, Password))
	_:Reason ->
      erlang:display("ssl config init_private_key error"),
	    file_error(KeyFile, {keyfile, Reason}) 

so now I know where it is happening but I have no clue how to fix it…