{"schema":"libjg2-1",
"vpath":"/git/",
"avatar":"/git/avatar/",
"alang":"",
"gen_ut":1752652221,
"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":"f36a1029b3a3ac53ddb6e985d8efdd55",
"commit": {"type":"commit",
"time": 1552991427,
"time_ofs": 0,
"oid_tree": { "oid": "460489899eb36114b3fe14db294ca60c92097230", "alias": []},
"oid":{ "oid": "a7e1cb8cbbefda0f31489566ad08055239ee216e", "alias": []},
"msg": "apps/speed.c: properly address NO_EC2M on systems without SIGALRM",
"sig_commit": { "git_time": { "time": 1552991427, "offset": 0 }, "name": "Matt Caswell", "email": "matt@openssl.org", "md5": "10f7b441a32d5790efad9fc68cae4af2" },
"sig_author": { "git_time": { "time": 1551822753, "offset": 60 }, "name": "Vitezslav Cizek", "email": "vcizek@suse.com", "md5": "d4bbc359c10e8d0f5b632e8322f0cd15" }},
"body": "apps/speed.c: properly address NO_EC2M on systems without SIGALRM\n\nThe ecdh_c array is allocated of the same size as ecdh_choices,\nwhose size depends on whether the support for binary curves is enabled\nor not. (The same goes for ecdsa_c).\nOn systems without SIGALRM, ecdh_c is indexed by predefined constants\nintended for representing the index of the ciphers in the ecdh_choices\narray.\nHowever, in case of NO_EC2M some of the #defined constants won't match\nand would actually access the ecdh_c out-of-bounds.\n\nUse enum instead of a macro to define the curve indexes so they're\nwithin the bounds of the ecdh_c array.\n\nReviewed-by: Paul Dale \u003cpaul.dale@oracle.com\u003e\nReviewed-by: Matt Caswell \u003cmatt@openssl.org\u003e\n(Merged from https://github.com/openssl/openssl/pull/8422)\n\n(cherry picked from commit f5c9916742655f872018426838cff4ff04da5321)\n"
,
"diff": "diff --git a/apps/speed.c b/apps/speed.c\nindex 777cee1..e47ba30 100644\n--- a/apps/speed.c\n+++ b/apps/speed.c\n@@ -489,30 +489,35 @@ static const OPT_PAIR rsa_choices[] \u003d {\n static double rsa_results[RSA_NUM][2]; /* 2 ops: sign then verify */\n #endif /* OPENSSL_NO_RSA */\n \n-#define R_EC_P160 0\n-#define R_EC_P192 1\n-#define R_EC_P224 2\n-#define R_EC_P256 3\n-#define R_EC_P384 4\n-#define R_EC_P521 5\n-#define R_EC_K163 6\n-#define R_EC_K233 7\n-#define R_EC_K283 8\n-#define R_EC_K409 9\n-#define R_EC_K571 10\n-#define R_EC_B163 11\n-#define R_EC_B233 12\n-#define R_EC_B283 13\n-#define R_EC_B409 14\n-#define R_EC_B571 15\n-#define R_EC_BRP256R1 16\n-#define R_EC_BRP256T1 17\n-#define R_EC_BRP384R1 18\n-#define R_EC_BRP384T1 19\n-#define R_EC_BRP512R1 20\n-#define R_EC_BRP512T1 21\n-#define R_EC_X25519 22\n-#define R_EC_X448 23\n+enum {\n+ R_EC_P160,\n+ R_EC_P192,\n+ R_EC_P224,\n+ R_EC_P256,\n+ R_EC_P384,\n+ R_EC_P521,\n+#ifndef OPENSSL_NO_EC2M\n+ R_EC_K163,\n+ R_EC_K233,\n+ R_EC_K283,\n+ R_EC_K409,\n+ R_EC_K571,\n+ R_EC_B163,\n+ R_EC_B233,\n+ R_EC_B283,\n+ R_EC_B409,\n+ R_EC_B571,\n+#endif\n+ R_EC_BRP256R1,\n+ R_EC_BRP256T1,\n+ R_EC_BRP384R1,\n+ R_EC_BRP384T1,\n+ R_EC_BRP512R1,\n+ R_EC_BRP512T1,\n+ R_EC_X25519,\n+ R_EC_X448\n+};\n+\n #ifndef OPENSSL_NO_EC\n static OPT_PAIR ecdsa_choices[] \u003d {\n {\u0022ecdsap160\u0022, R_EC_P160},\n@@ -521,7 +526,7 @@ static OPT_PAIR ecdsa_choices[] \u003d {\n {\u0022ecdsap256\u0022, R_EC_P256},\n {\u0022ecdsap384\u0022, R_EC_P384},\n {\u0022ecdsap521\u0022, R_EC_P521},\n-#ifndef OPENSSL_NO_EC2M\n+# ifndef OPENSSL_NO_EC2M\n {\u0022ecdsak163\u0022, R_EC_K163},\n {\u0022ecdsak233\u0022, R_EC_K233},\n {\u0022ecdsak283\u0022, R_EC_K283},\n@@ -532,7 +537,7 @@ static OPT_PAIR ecdsa_choices[] \u003d {\n {\u0022ecdsab283\u0022, R_EC_B283},\n {\u0022ecdsab409\u0022, R_EC_B409},\n {\u0022ecdsab571\u0022, R_EC_B571},\n-#endif\n+# endif\n {\u0022ecdsabrp256r1\u0022, R_EC_BRP256R1},\n {\u0022ecdsabrp256t1\u0022, R_EC_BRP256T1},\n {\u0022ecdsabrp384r1\u0022, R_EC_BRP384R1},\n@@ -551,7 +556,7 @@ static const OPT_PAIR ecdh_choices[] \u003d {\n {\u0022ecdhp256\u0022, R_EC_P256},\n {\u0022ecdhp384\u0022, R_EC_P384},\n {\u0022ecdhp521\u0022, R_EC_P521},\n-#ifndef OPENSSL_NO_EC2M\n+# ifndef OPENSSL_NO_EC2M\n {\u0022ecdhk163\u0022, R_EC_K163},\n {\u0022ecdhk233\u0022, R_EC_K233},\n {\u0022ecdhk283\u0022, R_EC_K283},\n@@ -562,7 +567,7 @@ static const OPT_PAIR ecdh_choices[] \u003d {\n {\u0022ecdhb283\u0022, R_EC_B283},\n {\u0022ecdhb409\u0022, R_EC_B409},\n {\u0022ecdhb571\u0022, R_EC_B571},\n-#endif\n+# endif\n {\u0022ecdhbrp256r1\u0022, R_EC_BRP256R1},\n {\u0022ecdhbrp256t1\u0022, R_EC_BRP256T1},\n {\u0022ecdhbrp384r1\u0022, R_EC_BRP384R1},\n@@ -1505,7 +1510,7 @@ int speed_main(int argc, char **argv)\n {\u0022nistp256\u0022, NID_X9_62_prime256v1, 256},\n {\u0022nistp384\u0022, NID_secp384r1, 384},\n {\u0022nistp521\u0022, NID_secp521r1, 521},\n-#ifndef OPENSSL_NO_EC2M\n+# ifndef OPENSSL_NO_EC2M\n /* Binary Curves */\n {\u0022nistk163\u0022, NID_sect163k1, 163},\n {\u0022nistk233\u0022, NID_sect233k1, 233},\n@@ -1517,7 +1522,7 @@ int speed_main(int argc, char **argv)\n {\u0022nistb283\u0022, NID_sect283r1, 283},\n {\u0022nistb409\u0022, NID_sect409r1, 409},\n {\u0022nistb571\u0022, NID_sect571r1, 571},\n-#endif\n+# endif\n {\u0022brainpoolP256r1\u0022, NID_brainpoolP256r1, 256},\n {\u0022brainpoolP256t1\u0022, NID_brainpoolP256t1, 256},\n {\u0022brainpoolP384r1\u0022, NID_brainpoolP384r1, 384},\n@@ -2037,6 +2042,7 @@ int speed_main(int argc, char **argv)\n }\n }\n }\n+# ifndef OPENSSL_NO_EC2M\n ecdsa_c[R_EC_K163][0] \u003d count / 1000;\n ecdsa_c[R_EC_K163][1] \u003d count / 1000 / 2;\n for (i \u003d R_EC_K233; i \u003c\u003d R_EC_K571; i++) {\n@@ -2065,6 +2071,7 @@ int speed_main(int argc, char **argv)\n }\n }\n }\n+# endif\n \n ecdh_c[R_EC_P160][0] \u003d count / 1000;\n for (i \u003d R_EC_P192; i \u003c\u003d R_EC_P521; i++) {\n@@ -2077,6 +2084,7 @@ int speed_main(int argc, char **argv)\n }\n }\n }\n+# ifndef OPENSSL_NO_EC2M\n ecdh_c[R_EC_K163][0] \u003d count / 1000;\n for (i \u003d R_EC_K233; i \u003c\u003d R_EC_K571; i++) {\n ecdh_c[i][0] \u003d ecdh_c[i - 1][0] / 2;\n@@ -2099,6 +2107,7 @@ int speed_main(int argc, char **argv)\n }\n }\n }\n+# endif\n /* repeated code good to factorize */\n ecdh_c[R_EC_BRP256R1][0] \u003d count / 1000;\n for (i \u003d R_EC_BRP384R1; i \u003c\u003d R_EC_BRP512R1; i +\u003d 2) {\n","s":{"c":1752652221,"u": 40443}}
],"g": 41639,"chitpc": 0,"ehitpc": 0,"indexed":0
,
"ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}