From 24053bba1d00ee959d2b388b08e1bd845d9c6bfa Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Mon, 11 Sep 2017 15:45:10 +0200 Subject: public_key: clearify random set bounderys in comments --- lib/public_key/test/erl_make_certs.erl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lib/public_key/test') diff --git a/lib/public_key/test/erl_make_certs.erl b/lib/public_key/test/erl_make_certs.erl index e4118bab0d..9996f757ca 100644 --- a/lib/public_key/test/erl_make_certs.erl +++ b/lib/public_key/test/erl_make_certs.erl @@ -178,8 +178,13 @@ make_tbs(SubjectKey, Opts) -> _ -> subject(proplists:get_value(subject, Opts),false) end, - - {#'OTPTBSCertificate'{serialNumber = trunc(random:uniform()*100000000)*10000 + 1, + Rnd = trunc(random:uniform()*100000000)*10000 + 1, + %% 0.0 =< random:uniform() < 1.0 + %% => + %% 0.0 =< random:uniform()*100000000 < 100000000.0 + %% => + %% 1 =< Rnd < 1000000000001 + {#'OTPTBSCertificate'{serialNumber = Rnd, signature = SignAlgo, issuer = Issuer, validity = validity(Opts), -- cgit v1.2.3