mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-20 16:15:59 +01:00
Remove partial RSA key support
This commit is contained in:
parent
f2876bdad7
commit
10f7b5a548
@ -96,8 +96,6 @@
|
||||
{if_have_fun, {rand, uniform, 1}, {d, 'RAND_UNIFORM'}},
|
||||
{if_have_fun, {gb_sets, iterator_from, 2}, {d, 'GB_SETS_ITERATOR_FROM'}},
|
||||
{if_have_fun, {public_key, short_name_hash, 1}, {d, 'SHORT_NAME_HASH'}},
|
||||
%% {if_have_fun, {public_key, generate_key, 1}, {d, 'GENERATE_RSA_KEY'}},
|
||||
{if_version_above, "19", {d, 'GENERATE_RSA_KEY'}},
|
||||
{if_var_true, hipe, native},
|
||||
{src_dirs, [asn1, src,
|
||||
{if_var_true, tools, tools},
|
||||
|
@ -730,18 +730,6 @@ not_before_not_after() ->
|
||||
-spec to_public(jose_jwk:key()) -> jose_jwk:key().
|
||||
to_public(PrivateKey) ->
|
||||
jose_jwk:to_public(PrivateKey).
|
||||
%% case jose_jwk:to_key(PrivateKey) of
|
||||
%% #'RSAPrivateKey'{modulus = Mod, publicExponent = Exp} ->
|
||||
%% Public = #'RSAPublicKey'{modulus = Mod, publicExponent = Exp},
|
||||
%% jose_jwk:from_key(Public);
|
||||
%% _ ->
|
||||
%% jose_jwk:to_public(PrivateKey)
|
||||
%% end.
|
||||
|
||||
%% to_public(#'RSAPrivateKey'{modulus = Mod, publicExponent = Exp}) ->
|
||||
%% #'RSAPublicKey'{modulus = Mod, publicExponent = Exp};
|
||||
%% to_public(PrivateKey) ->
|
||||
%% jose_jwk:to_public(PrivateKey).
|
||||
|
||||
-spec pem_to_certificate(pem()) -> #'Certificate'{}.
|
||||
pem_to_certificate(Pem) ->
|
||||
@ -1054,16 +1042,8 @@ get_config_cert_dir() ->
|
||||
end.
|
||||
|
||||
|
||||
-ifdef(GENERATE_RSA_KEY).
|
||||
generate_key() ->
|
||||
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() ->
|
||||
jose_jwk:generate_key({ec, secp256r1}).
|
||||
-endif.
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%%
|
||||
|
Loading…
Reference in New Issue
Block a user