{"schema":"libjg2-1",
"vpath":"/git/",
"avatar":"/git/avatar/",
"alang":"",
"gen_ut":1752057069,
"reponame":"openssl",
"desc":"OpenSSL",
"owner": { "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },"url":"https://warmcat.com/repo/openssl",
"f":3,
"items": [
{"schema":"libjg2-1",
"cid":"d1078b67b67c65bf25c76136aaea5fc7",
"commit": {"type":"commit",
"time": 1523634322,
"time_ofs": 120,
"oid_tree": { "oid": "e9cd38c1687ddf8a452f3c896120440c0d0a95b2", "alias": []},
"oid":{ "oid": "1b9f41a0df6ed2fac1c5303be909c2f70c404f20", "alias": []},
"msg": "test/recipes/test_genrsa.t : don't fail because of size limit changes",
"sig_commit": { "git_time": { "time": 1523634322, "offset": 120 }, "name": "Richard Levitte", "email": "levitte@openssl.org", "md5": "b737120f0642a6a5c30c6291e6170c77" },
"sig_author": { "git_time": { "time": 1522055292, "offset": 120 }, "name": "Richard Levitte", "email": "levitte@openssl.org", "md5": "b737120f0642a6a5c30c6291e6170c77" }},
"body": "test/recipes/test_genrsa.t : don't fail because of size limit changes\n\nThere is a test to check that 'genrsa' doesn't accept absurdly low\nnumber of bits. Apart from that, this test is designed to check the\nworking functionality of 'openssl genrsa', so instead of having a hard\ncoded lower limit on the size key, let's figure out what it is.\n\nPartially fixes #5751\n\nReviewed-by: Paul Dale \u003cpaul.dale@oracle.com\u003e\n(Merged from https://github.com/openssl/openssl/pull/5754)\n\n(cherry picked from commit ec46830f8a4ce62c0c8ee7677b1eb8e53ee16df1)\n"
,
"diff": "diff --git a/test/recipes/15-test_genrsa.t b/test/recipes/15-test_genrsa.t\nindex 72a58bc..c497533 100644\n--- a/test/recipes/15-test_genrsa.t\n+++ b/test/recipes/15-test_genrsa.t\n@@ -18,9 +18,37 @@ setup(\u0022test_genrsa\u0022);\n \n plan tests \u003d\u003e 5;\n \n-is(run(app([ 'openssl', 'genrsa', '-3', '-out', 'genrsatest.pem', '256'])), 0, \u0022genrsa -3 256\u0022);\n-ok(run(app([ 'openssl', 'genrsa', '-3', '-out', 'genrsatest.pem', '512'])), \u0022genrsa -3 512\u0022);\n-ok(run(app([ 'openssl', 'rsa', '-check', '-in', 'genrsatest.pem', '-noout'])), \u0022rsa -check\u0022);\n-ok(run(app([ 'openssl', 'genrsa', '-f4', '-out', 'genrsatest.pem', '512'])), \u0022genrsa -f4 512\u0022);\n-ok(run(app([ 'openssl', 'rsa', '-check', '-in', 'genrsatest.pem', '-noout'])), \u0022rsa -check\u0022);\n-unlink 'genrsatest.pem';\n+# We want to know that an absurdly small number of bits isn't support\n+is(run(app([ 'openssl', 'genrsa', '-3', '-out', 'genrsatest.pem', '8'])), 0, \u0022genrsa -3 8\u0022);\n+\n+# Depending on the shared library, we might have different lower limits.\n+# Let's find it! This is a simple binary search\n+# ------------------------------------------------------------\n+# NOTE: $good may need an update in the future\n+# ------------------------------------------------------------\n+note \u0022Looking for lowest amount of bits\u0022;\n+my $bad \u003d 3; # Log2 of number of bits (2 \u003c\u003c 3 \u003d\u003d 8)\n+my $good \u003d 11; # Log2 of number of bits (2 \u003c\u003c 11 \u003d\u003d 2048)\n+while ($good \u003e $bad + 1) {\n+ my $checked \u003d int(($good + $bad + 1) / 2);\n+ if (run(app([ 'openssl', 'genrsa', '-3', '-out', 'genrsatest.pem',\n+ 2 ** $checked ], stderr \u003d\u003e undef))) {\n+ note 2 ** $checked, \u0022 bits is good\u0022;\n+ $good \u003d $checked;\n+ } else {\n+ note 2 ** $checked, \u0022 bits is bad\u0022;\n+ $bad \u003d $checked;\n+ }\n+}\n+$good++ if $good \u003d\u003d $bad;\n+$good \u003d 2 ** $good;\n+note \u0022Found lowest allowed amount of bits to be $good\u0022;\n+\n+ok(run(app([ 'openssl', 'genrsa', '-3', '-out', 'genrsatest.pem', $good ])),\n+ \u0022genrsa -3 $good\u0022);\n+ok(run(app([ 'openssl', 'rsa', '-check', '-in', 'genrsatest.pem', '-noout' ])),\n+ \u0022rsa -check\u0022);\n+ok(run(app([ 'openssl', 'genrsa', '-f4', '-out', 'genrsatest.pem', $good ])),\n+ \u0022genrsa -f4 $good\u0022);\n+ok(run(app([ 'openssl', 'rsa', '-check', '-in', 'genrsatest.pem', '-noout' ])),\n+ \u0022rsa -check\u0022);\n","s":{"c":1752057069,"u": 38515}}
],"g": 39308,"chitpc": 0,"ehitpc": 0,"indexed":0
,
"ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}