Comments (4)
@ncopa Thanks for adding the patch for the 1.8.0 release. I added small changes to it based on the develop branch at https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/7908 .
from cloudi.
I don't have any experience with erlang but It builds with this patch:
diff --git a/src/external/cloudi_x_nodefinder/src/cloudi_x_nodefinder_ec2_api_aws.erl b/src/external/cloudi_x_nodefinder/src/cloudi_x_nodefinder_ec2_api_aws.erl
index 9c791f8..90344db 100644
--- a/src/external/cloudi_x_nodefinder/src/cloudi_x_nodefinder_ec2_api_aws.erl
+++ b/src/external/cloudi_x_nodefinder/src/cloudi_x_nodefinder_ec2_api_aws.erl
@@ -310,5 +310,5 @@ sha256(V) ->
crypto:hash(sha256, V).
sha256_mac(K, S) ->
- crypto:hmac(sha256, K, S).
+ crypto:mac(hmac, sha256, K, S).
diff --git a/src/external/cloudi_x_nodefinder/src/cloudi_x_nodefinder_multicast.erl b/src/external/cloudi_x_nodefinder/src/cloudi_x_nodefinder_multicast.erl
index 38a5e92..8506ab7 100644
--- a/src/external/cloudi_x_nodefinder/src/cloudi_x_nodefinder_multicast.erl
+++ b/src/external/cloudi_x_nodefinder/src/cloudi_x_nodefinder_multicast.erl
@@ -223,13 +223,13 @@ process_packet(_Packet, _IP, _State) ->
ok.
identifier_v4(Message, KeyV4) ->
- crypto:hmac(sha256, KeyV4, Message).
+ crypto:mac(hmac, sha256, KeyV4, Message).
identifier_v3(Message, KeyV3) ->
- crypto:hmac(sha256, KeyV3, Message).
+ crypto:mac(hmac, sha256, KeyV3, Message).
identifier_v2(Message, KeyV2) ->
- crypto:hmac(sha, KeyV2, Message).
+ crypto:mac(hmac, sha, KeyV2, Message).
key_v4() ->
crypto:hash(sha256, erlang:atom_to_binary(erlang:get_cookie(), utf8)).
diff --git a/src/lib/cloudi_service_oauth1/src/cloudi_service_oauth1_data.erl b/src/lib/cloudi_service_oauth1/src/cloudi_service_oauth1_data.erl
index 0245052..71347be 100644
--- a/src/lib/cloudi_service_oauth1/src/cloudi_service_oauth1_data.erl
+++ b/src/lib/cloudi_service_oauth1/src/cloudi_service_oauth1_data.erl
@@ -99,7 +99,7 @@ hmac_sha1_verify(Signature, HttpMethod, URL, Params, Consumer, TokenSecret) ->
TokenSecret), Signature).
hmac_sha(Key, Data) ->
- crypto:hmac(sha, Key, Data).
+ crypto:mac(hmac, sha, Key, Data).
rsa_sha1_verify(Signature, HttpMethod, URL, Params, {_, ConsumerSecret, _}) ->
BaseString = signature_base_string(HttpMethod, URL, Params),
@@ -128,25 +128,7 @@ params_encode(Params) ->
cloudi_string:join("&", Concatenated).
uri_normalize(URI) ->
- case http_uri:parse(URI) of
- {ok, {Scheme, UserInfo, Host, Port, Path, _Query}} ->
- uri_normalize(Scheme, UserInfo,
- cloudi_string:lowercase(Host), Port, [Path]);
- {error, _} = Error ->
- Error
- end.
-
-uri_normalize(Scheme, [], Acc) ->
- lists:concat([Scheme, "://" | Acc]);
-uri_normalize(Scheme, UserInfo, Acc) ->
- lists:concat([Scheme, "://", UserInfo, "@" | Acc]).
-
-uri_normalize(http, UserInfo, Host, 80, Acc) ->
- uri_normalize(http, UserInfo, [Host|Acc]);
-uri_normalize(https, UserInfo, Host, 443, Acc) ->
- uri_normalize(https, UserInfo, [Host|Acc]);
-uri_normalize(Scheme, UserInfo, Host, Port, Acc) ->
- uri_normalize(Scheme, UserInfo, [Host, ":", Port|Acc]).
+ uri_string:normalize(URI).
uri_join(Values) ->
uri_join(Values, "&").
from cloudi.
Hi @ncopa,
Yes, this is a compilation problem with Erlang/OTP 23.0 that has been fixed in the develop branch with the commit b427e1b . I can add a patch for version 1.8.0 . Still have other changes that I would like to put in before the develop branch gets released.
from cloudi.
It is merged as https://gitlab.alpinelinux.org/alpine/aports/-/commit/e0f245902c73e8b0972637f75faf64f60720becb . Thanks!
from cloudi.
Related Issues (20)
- Update elli HOT 1
- Remove ZeroMQ from main repository HOT 1
- Switch API/Quickstart docs to use JSON data HOT 1
- Build/Install Requirements HOT 2
- python cloudi.API.subscribe HOT 3
- s390x architecture needs more testing HOT 3
- configure script fails to detect Erlang version on Alpine Linux aarch64 due to shell expands $- HOT 1
- node.js `domain` use wants to be replaced with `async_hooks` HOT 1
- Haskell cabal-install >= 3.0 is not supported, so GHC 8.8.1 is not yet supported HOT 3
- Increase test timeouts for slow CI/build virtualization HOT 4
- docker HOT 4
- Elixir example HOT 4
- EUnit pqueue test timeout hardcoded HOT 1
- Erlang/OTP 25? 64bit pid External Binary Term Format support HOT 1
- cgroup service configuration option with v2 fixes HOT 1
- cloudi_service_api_requests JSON internal service output with module as string HOT 1
- cgroup service configuration option has problems when relying upon Linux capabilities HOT 1
- nongnu-libunwind 1.2.1 can cause the C/C++ CloudI API to segfault under load HOT 3
- Python/C CloudI API MemoryError/SIGSEGV with clang -O0/-O2 and gcc -O2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cloudi.