diff options
author | Ingela Anderton Andin <[email protected]> | 2017-09-11 12:00:37 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2017-09-11 14:33:56 +0200 |
commit | 66e0aa61b84db86d52f081278c571852b3c90a62 (patch) | |
tree | 8c1eccbd9fb2acb14179d5ad2d8d94a1ca613e27 /lib/ssl/src/ssl_pkix_db.erl | |
parent | 85f7e5876a66f5054a50c148fc312810defd4057 (diff) | |
download | otp-66e0aa61b84db86d52f081278c571852b3c90a62.tar.gz otp-66e0aa61b84db86d52f081278c571852b3c90a62.tar.bz2 otp-66e0aa61b84db86d52f081278c571852b3c90a62.zip |
ssl: Do not break abstraction
ssl_pkix_db should not hard code names. On the other hand the names
are nicer with as <Prefix>_dist than <Prefix>dist.
Diffstat (limited to 'lib/ssl/src/ssl_pkix_db.erl')
-rw-r--r-- | lib/ssl/src/ssl_pkix_db.erl | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/ssl/src/ssl_pkix_db.erl b/lib/ssl/src/ssl_pkix_db.erl index b28636569d..8828c3a0d8 100644 --- a/lib/ssl/src/ssl_pkix_db.erl +++ b/lib/ssl/src/ssl_pkix_db.erl @@ -76,10 +76,17 @@ remove(Dbs) -> true = ets:delete(Db1); (undefined) -> ok; - (ssl_pem_cache) -> - ok; - (ssl_pem_cache_dist) -> - ok; + (Name) when is_atom(Name) -> + NormalName = ssl_pem_cache:name(normal), + DistName = ssl_pem_cache:name(dist), + case Name of + NormalName -> + ok; + DistName -> + ok; + _ -> + true = ets:delete(Name) + end; (Db) -> true = ets:delete(Db) end, Dbs). |