aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantinos Kallas <[email protected]>2017-07-25 19:39:54 +0300
committerKonstantinos Kallas <[email protected]>2017-07-25 19:39:54 +0300
commit1a86ef1a6a15dd52fd31ddf15af1e509816288b0 (patch)
treedaebb521d73aa45807c98ad9b1c9a3e6082ccda0
parent13193403c7ec44632db37b455640867c1cf87f60 (diff)
downloadotp-1a86ef1a6a15dd52fd31ddf15af1e509816288b0.tar.gz
otp-1a86ef1a6a15dd52fd31ddf15af1e509816288b0.tar.bz2
otp-1a86ef1a6a15dd52fd31ddf15af1e509816288b0.zip
RSAPrivateKey version is set to 'two-prime', as stated in documentation, and not 0
-rw-r--r--lib/public_key/src/public_key.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/public_key/src/public_key.erl b/lib/public_key/src/public_key.erl
index 1776baf830..c2060c144c 100644
--- a/lib/public_key/src/public_key.erl
+++ b/lib/public_key/src/public_key.erl
@@ -419,7 +419,7 @@ generate_key({rsa, ModulusSize, PublicExponent}) ->
{[E, N], [E, N, D, P, Q, D_mod_P_1, D_mod_Q_1, InvQ_mod_P]} ->
Nint = crypto:bytes_to_integer(N),
Eint = crypto:bytes_to_integer(E),
- #'RSAPrivateKey'{version = 0, % Two-factor (I guess since otherPrimeInfos is not given)
+ #'RSAPrivateKey'{version = 'two-prime', % Two-factor (I guess since otherPrimeInfos is not given)
modulus = Nint,
publicExponent = Eint,
privateExponent = crypto:bytes_to_integer(D),
@@ -437,7 +437,7 @@ generate_key({rsa, ModulusSize, PublicExponent}) ->
% 1976.
Nint = crypto:bytes_to_integer(N),
Eint = crypto:bytes_to_integer(E),
- #'RSAPrivateKey'{version = 0, % Two-factor (I guess since otherPrimeInfos is not given)
+ #'RSAPrivateKey'{version = 'two-prime', % Two-factor (I guess since otherPrimeInfos is not given)
modulus = Nint,
publicExponent = Eint,
privateExponent = crypto:bytes_to_integer(D),