summaryrefslogtreecommitdiff
path: root/src/erlang-oauth
diff options
context:
space:
mode:
Diffstat (limited to 'src/erlang-oauth')
-rw-r--r--src/erlang-oauth/Makefile.am7
-rw-r--r--src/erlang-oauth/oauth_hmac_sha1.erl2
-rw-r--r--src/erlang-oauth/oauth_plaintext.erl2
3 files changed, 6 insertions, 5 deletions
diff --git a/src/erlang-oauth/Makefile.am b/src/erlang-oauth/Makefile.am
index 1d123396..48b76482 100644
--- a/src/erlang-oauth/Makefile.am
+++ b/src/erlang-oauth/Makefile.am
@@ -12,18 +12,19 @@
oauthebindir = $(localerlanglibdir)/erlang-oauth/ebin
-# Removed oauth_rsa_sha1.erl until we require R12B5 or
-# we add a ./configure option to enable it.
-
oauth_file_collection = \
oauth.app.in \
oauth.erl \
oauth_hmac_sha1.erl \
oauth_http.erl \
oauth_plaintext.erl \
+ oauth_rsa_sha1.erl \
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 \
diff --git a/src/erlang-oauth/oauth_hmac_sha1.erl b/src/erlang-oauth/oauth_hmac_sha1.erl
index 69064edd..79d59f37 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) ->
- Signature =:= signature(BaseString, CS, TS).
+ couch_util:verify(signature(BaseString, CS, TS), Signature).
diff --git a/src/erlang-oauth/oauth_plaintext.erl b/src/erlang-oauth/oauth_plaintext.erl
index d8085e02..41a1e9b2 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) ->
- Signature =:= signature(CS, TS).
+ couch_util:verify(signature(CS, TS), Signature).