From af11bc83244f67b9ed1fe1b75d951daadc370219 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Tue, 5 Jun 2018 17:37:41 +0200 Subject: crypto: Make 'curve' entry in crypto:supports() appear iff Curves is non-empty --- lib/crypto/src/crypto.erl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 6cff8a487a..37c3e557a4 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -112,8 +112,13 @@ supports()-> [{hashs, Hashs}, {ciphers, Ciphers}, {public_keys, PubKeys}, - {macs, Macs}, - {curves, Curves} + {macs, Macs} + | case Curves of + [] -> []; + _ -> [{curves, Curves}] % Only show this experimental feature + % if OpenSSL 1.1.1 beta4 or higher (where + % eddsa and eddh is enabled) + end ]. info_lib() -> ?nif_stub. -- cgit v1.2.3