You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ro...@apache.org on 2022/09/03 07:54:10 UTC

[couchdb] branch main updated: Show supported hash algorithms at node-local _versions endpoint (#4162)

This is an automated email from the ASF dual-hosted git repository.

ronny pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb.git


The following commit(s) were added to refs/heads/main by this push:
     new 0481ace8e Show supported hash algorithms at node-local _versions endpoint (#4162)
0481ace8e is described below

commit 0481ace8ed1f6d90563ba52276379f88a95c5f64
Author: Ronny <ro...@apache.org>
AuthorDate: Sat Sep 3 09:54:01 2022 +0200

    Show supported hash algorithms at node-local _versions endpoint (#4162)
---
 src/chttpd/src/chttpd_node.erl | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/chttpd/src/chttpd_node.erl b/src/chttpd/src/chttpd_node.erl
index 6196b5a7d..a63236db7 100644
--- a/src/chttpd/src/chttpd_node.erl
+++ b/src/chttpd/src/chttpd_node.erl
@@ -42,8 +42,12 @@ handle_node_req(#httpd{method = 'GET', path_parts = [_, _Node, <<"_versions">>]}
     IcuVer = couch_ejson_compare:get_icu_version(),
     UcaVer = couch_ejson_compare:get_uca_version(),
     ColVer = couch_ejson_compare:get_collator_version(),
+    Hashes = crypto:supports(hashs),
     send_json(Req, 200, #{
-        erlang_version => ?l2b(?COUCHDB_ERLANG_VERSION),
+        erlang => #{
+            version => ?l2b(?COUCHDB_ERLANG_VERSION),
+            supported_hashes => Hashes
+        },
         collation_driver => #{
             name => <<"libicu">>,
             library_version => couch_util:version_to_binary(IcuVer),