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 2011/10/10 23:10:29 UTC
[2/2] git commit: Backport erlang-oauth from master for R15 compat
Backport erlang-oauth from master for R15 compat
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/1a111277
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/1a111277
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/1a111277
Branch: refs/heads/1.1.x
Commit: 1a111277d10db221d35629e1b0b9060f7ba42891
Parents: da22c19
Author: Robert Newson <rn...@apache.org>
Authored: Mon Oct 10 22:02:07 2011 +0100
Committer: Robert Newson <rn...@apache.org>
Committed: Mon Oct 10 22:04:04 2011 +0100
----------------------------------------------------------------------
src/erlang-oauth/Makefile.am | 4 +++-
src/erlang-oauth/oauth.app.in | 2 +-
src/erlang-oauth/oauth_hmac_sha1.erl | 2 +-
src/erlang-oauth/oauth_http.erl | 2 +-
src/erlang-oauth/oauth_plaintext.erl | 2 +-
5 files changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/1a111277/src/erlang-oauth/Makefile.am
----------------------------------------------------------------------
diff --git a/src/erlang-oauth/Makefile.am b/src/erlang-oauth/Makefile.am
index 50782e7..48b7648 100644
--- a/src/erlang-oauth/Makefile.am
+++ b/src/erlang-oauth/Makefile.am
@@ -22,13 +22,15 @@ oauth_file_collection = \
oauth_unix.erl \
oauth_uri.erl
+# Removed oauth_rsa_sha1.beam until we require R12B5 or
+# we add a ./configure option to enable it.
+
oauthebin_make_generated_file_list = \
oauth.app \
oauth.beam \
oauth_hmac_sha1.beam \
oauth_http.beam \
oauth_plaintext.beam \
- oauth_rsa_sha1.beam \
oauth_unix.beam \
oauth_uri.beam
http://git-wip-us.apache.org/repos/asf/couchdb/blob/1a111277/src/erlang-oauth/oauth.app.in
----------------------------------------------------------------------
diff --git a/src/erlang-oauth/oauth.app.in b/src/erlang-oauth/oauth.app.in
index 6357b9b..a8ec17c 100644
--- a/src/erlang-oauth/oauth.app.in
+++ b/src/erlang-oauth/oauth.app.in
@@ -1,6 +1,6 @@
{application, oauth, [
{description, "Erlang OAuth implementation"},
- {vsn, "dev"},
+ {vsn, "7d85d3ef"},
{modules, [
oauth,
oauth_hmac_sha1,
http://git-wip-us.apache.org/repos/asf/couchdb/blob/1a111277/src/erlang-oauth/oauth_hmac_sha1.erl
----------------------------------------------------------------------
diff --git a/src/erlang-oauth/oauth_hmac_sha1.erl b/src/erlang-oauth/oauth_hmac_sha1.erl
index 79d59f3..69064ed 100644
--- a/src/erlang-oauth/oauth_hmac_sha1.erl
+++ b/src/erlang-oauth/oauth_hmac_sha1.erl
@@ -8,4 +8,4 @@ signature(BaseString, CS, TS) ->
base64:encode_to_string(crypto:sha_mac(Key, BaseString)).
verify(Signature, BaseString, CS, TS) ->
- couch_util:verify(signature(BaseString, CS, TS), Signature).
+ Signature =:= signature(BaseString, CS, TS).
http://git-wip-us.apache.org/repos/asf/couchdb/blob/1a111277/src/erlang-oauth/oauth_http.erl
----------------------------------------------------------------------
diff --git a/src/erlang-oauth/oauth_http.erl b/src/erlang-oauth/oauth_http.erl
index bf5a4ba..92c806c 100644
--- a/src/erlang-oauth/oauth_http.erl
+++ b/src/erlang-oauth/oauth_http.erl
@@ -10,7 +10,7 @@ post(URL, Data) ->
request(post, {URL, [], "application/x-www-form-urlencoded", Data}).
request(Method, Request) ->
- http:request(Method, Request, [{autoredirect, false}], []).
+ httpc:request(Method, Request, [{autoredirect, false}], []).
response_params(Response) ->
oauth_uri:params_from_string(response_body(Response)).
http://git-wip-us.apache.org/repos/asf/couchdb/blob/1a111277/src/erlang-oauth/oauth_plaintext.erl
----------------------------------------------------------------------
diff --git a/src/erlang-oauth/oauth_plaintext.erl b/src/erlang-oauth/oauth_plaintext.erl
index 41a1e9b..d8085e0 100644
--- a/src/erlang-oauth/oauth_plaintext.erl
+++ b/src/erlang-oauth/oauth_plaintext.erl
@@ -7,4 +7,4 @@ signature(CS, TS) ->
oauth_uri:calate("&", [CS, TS]).
verify(Signature, CS, TS) ->
- couch_util:verify(signature(CS, TS), Signature).
+ Signature =:= signature(CS, TS).