25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-22 17:28:25 +01:00

Remove some debugging INFO_MSGs

This commit is contained in:
Konstantinos Kallas 2017-08-19 17:47:05 +03:00
parent 15dd88385f
commit 9b3e160e18
2 changed files with 2 additions and 7 deletions

View File

@ -21,8 +21,6 @@
%% TODO: Maybe validate request here??
process(LocalPath, Request) ->
Result = ets_get_key_authorization(LocalPath),
?INFO_MSG("Trying to serve: ~p at: ~p", [Request, LocalPath]),
?INFO_MSG("Http Response: ~p", [Result]),
{200,
[{<<"Content-Type">>, <<"text/plain">>}],
Result}.
@ -31,7 +29,6 @@ process(LocalPath, Request) ->
-spec key_authorization(bitstring(), jose_jwk:key()) -> bitstring().
key_authorization(Token, Key) ->
Thumbprint = jose_jwk:thumbprint(Key),
%% ?INFO_MSG("Thumbprint: ~p~n", [Thumbprint]),
KeyAuthorization = erlang:iolist_to_binary([Token, <<".">>, Thumbprint]),
KeyAuthorization.
@ -84,7 +81,8 @@ solve_challenge1(Chal = #challenge{type = <<"http-01">>, token=Tkn}, Key) ->
ets_put_key_authorization(Tkn, KeyAuthz),
{ok, Chal#challenge.uri, KeyAuthz};
solve_challenge1(Challenge, _Key) ->
?INFO_MSG("Challenge: ~p~n", [Challenge]).
?ERROR_MSG("Unkown Challenge Type: ~p", [Challenge]),
{error, unknown_challenge}.
%% Old way of solving challenges

View File

@ -155,7 +155,6 @@ format_get_certificate({error, Domain, Reason}) ->
{'ok', bitstring(), pem()} |
{'error', bitstring(), _}.
get_certificate(CAUrl, DomainName, PrivateKey) ->
?INFO_MSG("Getting a Certificate for domain: ~p~n", [DomainName]),
try
{ok, _Authz} = create_new_authorization(CAUrl, DomainName, PrivateKey),
create_new_certificate(CAUrl, DomainName, PrivateKey)
@ -1056,14 +1055,12 @@ get_config_cert_dir() ->
-ifdef(GENERATE_RSA_KEY).
generate_key() ->
?INFO_MSG("Generate RSA key pair~n", []),
Key = public_key:generate_key({rsa, 2048, 65537}),
Key1 = Key#'RSAPrivateKey'{version = 'two-prime'},
jose_jwk:from_key(Key1).
%% jose_jwk:generate_key({rsa, 2048}).
-else.
generate_key() ->
?INFO_MSG("Generate EC key pair~n", []),
jose_jwk:generate_key({ec, secp256r1}).
-endif.