aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/ssl_manager.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2018-08-07 17:56:50 +0200
committerIngela Anderton Andin <[email protected]>2018-08-09 12:04:11 +0200
commite6361e0df384d1b8358955529c1d6f02c694274b (patch)
treed12842ca769eeab345c892e4aa48b9e0df3e7024 /lib/ssl/src/ssl_manager.erl
parentca9f2fe073b587e70b5502c87be3eca6f72ddd57 (diff)
downloadotp-e6361e0df384d1b8358955529c1d6f02c694274b.tar.gz
otp-e6361e0df384d1b8358955529c1d6f02c694274b.tar.bz2
otp-e6361e0df384d1b8358955529c1d6f02c694274b.zip
ssl: Error handling improvment
Diffstat (limited to 'lib/ssl/src/ssl_manager.erl')
-rw-r--r--lib/ssl/src/ssl_manager.erl8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/ssl/src/ssl_manager.erl b/lib/ssl/src/ssl_manager.erl
index f44fe6a2bf..52aa164420 100644
--- a/lib/ssl/src/ssl_manager.erl
+++ b/lib/ssl/src/ssl_manager.erl
@@ -127,7 +127,13 @@ cache_pem_file(File, DbHandle) ->
[Content] ->
{ok, Content};
undefined ->
- ssl_pem_cache:insert(File)
+ case ssl_pkix_db:decode_pem_file(File) of
+ {ok, Content} ->
+ ssl_pem_cache:insert(File, Content),
+ {ok, Content};
+ Error ->
+ Error
+ end
end.
%%--------------------------------------------------------------------