You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2015/09/25 13:08:15 UTC

[1/2] couch-mrview commit: updated refs/heads/master to 52cc9c5

Repository: couchdb-couch-mrview
Updated Branches:
  refs/heads/master aa51eb4be -> 52cc9c5f1


Fix crypto deprecations

COUCHDB-2825


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/commit/985b7fe1
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/tree/985b7fe1
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/diff/985b7fe1

Branch: refs/heads/master
Commit: 985b7fe1577e54f17abc583983b6ee7b7eafe56e
Parents: dfa6f7e
Author: Robert Newson <rn...@apache.org>
Authored: Wed Sep 23 19:32:08 2015 +0100
Committer: Robert Newson <rn...@apache.org>
Committed: Wed Sep 23 19:32:08 2015 +0100

----------------------------------------------------------------------
 src/couch_mrview.erl      | 2 +-
 src/couch_mrview_util.erl | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/985b7fe1/src/couch_mrview.erl
----------------------------------------------------------------------
diff --git a/src/couch_mrview.erl b/src/couch_mrview.erl
index bd866a2..ec8fb21 100644
--- a/src/couch_mrview.erl
+++ b/src/couch_mrview.erl
@@ -191,7 +191,7 @@ query_all_docs(Db, Args, Callback, Acc) when is_list(Args) ->
 query_all_docs(Db, Args0, Callback, Acc) ->
     Sig = couch_util:with_db(Db, fun(WDb) ->
         {ok, Info} = couch_db:get_db_info(WDb),
-        couch_index_util:hexsig(couch_util:md5(term_to_binary(Info)))
+        couch_index_util:hexsig(couch_crypto:hash(md5, term_to_binary(Info)))
     end),
     Args1 = Args0#mrargs{view_type=map},
     Args2 = couch_mrview_util:validate_args(Args1),

http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/985b7fe1/src/couch_mrview_util.erl
----------------------------------------------------------------------
diff --git a/src/couch_mrview_util.erl b/src/couch_mrview_util.erl
index f41aed6..529e895 100644
--- a/src/couch_mrview_util.erl
+++ b/src/couch_mrview_util.erl
@@ -121,7 +121,7 @@ ddoc_to_mrst(DbName, #doc{id=Id, body={Fields}}) ->
         keyseq_indexed=KeySeqIndexed
     },
     SigInfo = {Views, Language, DesignOpts, couch_index_util:sort_lib(Lib)},
-    {ok, IdxState#mrst{sig=couch_util:md5(term_to_binary(SigInfo))}}.
+    {ok, IdxState#mrst{sig=couch_crypto:hash(md5, term_to_binary(SigInfo))}}.
 
 
 set_view_type(_Args, _ViewName, []) ->
@@ -167,7 +167,7 @@ view_sig(Db, State, View, #mrargs{include_docs=true}=Args) ->
         keyseq_indexed=KeySeqIndexed
     } = State,
     Term = view_sig_term(BaseSig, UpdateSeq, PurgeSeq, KeySeqIndexed, SeqIndexed),
-    couch_index_util:hexsig(couch_util:md5(term_to_binary(Term)));
+    couch_index_util:hexsig(couch_crypto:hash(md5, term_to_binary(Term)));
 view_sig(Db, State, {_Nth, _Lang, View}, Args) ->
     view_sig(Db, State, View, Args);
 view_sig(_Db, State, View, Args0) ->
@@ -181,7 +181,7 @@ view_sig(_Db, State, View, Args0) ->
         extra=[]
     },
     Term = view_sig_term(Sig, UpdateSeq, PurgeSeq, KeySeqIndexed, SeqIndexed, Args),
-    couch_index_util:hexsig(couch_util:md5(term_to_binary(Term))).
+    couch_index_util:hexsig(couch_crypto:hash(md5, term_to_binary(Term))).
 
 view_sig_term(BaseSig, UpdateSeq, PurgeSeq, false, false) ->
     {BaseSig, UpdateSeq, PurgeSeq};
@@ -975,7 +975,7 @@ sig_vsn_12x(State) ->
         {ViewInfo, State#mrst.language, State#mrst.design_opts,
             couch_index_util:sort_lib(State#mrst.lib)}
     end,
-    couch_util:md5(term_to_binary(SigData)).
+    couch_crypto:hash(md5, term_to_binary(SigData)).
 
 old_view_format(View) ->
 {


[2/2] couch-mrview commit: updated refs/heads/master to 52cc9c5

Posted by rn...@apache.org.
Merge remote-tracking branch 'cloudant/2825-crypto-deprecations'


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/commit/52cc9c5f
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/tree/52cc9c5f
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/diff/52cc9c5f

Branch: refs/heads/master
Commit: 52cc9c5f168ddc31f3e21f73799a34dd52b9c1e4
Parents: aa51eb4 985b7fe
Author: Robert Newson <rn...@apache.org>
Authored: Fri Sep 25 12:07:55 2015 +0100
Committer: Robert Newson <rn...@apache.org>
Committed: Fri Sep 25 12:07:55 2015 +0100

----------------------------------------------------------------------
 src/couch_mrview.erl      | 2 +-
 src/couch_mrview_util.erl | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/52cc9c5f/src/couch_mrview.erl
----------------------------------------------------------------------