{"schema":"libjg2-1",
"vpath":"/git/",
"avatar":"/git/avatar/",
"alang":"",
"gen_ut":1753165439,
"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":"7460d9f736e76dd8eb5e5f02edd7f151",
"commit": {"type":"commit",
"time": 1497960724,
"time_ofs": 18446744073709551376,
"oid_tree": { "oid": "ce65d1e7d33585e961b598b74bd0e22ffa2e2bca", "alias": []},
"oid":{ "oid": "0ea155fc1c4e6ba3655f435164ea3f884883df29", "alias": []},
"msg": "Add RAND_UNIMPLEMENTED error code",
"sig_commit": { "git_time": { "time": 1497960724, "offset": -240 }, "name": "Rich Salz", "email": "rsalz@openssl.org", "md5": "3ed6b9cf7bbe83902a044f6590346d26" },
"sig_author": { "git_time": { "time": 1497891486, "offset": -240 }, "name": "Rich Salz", "email": "rsalz@openssl.org", "md5": "3ed6b9cf7bbe83902a044f6590346d26" }},
"body": "Add RAND_UNIMPLEMENTED error code\n\nSee old GitHub PR 38.\n\nReviewed-by: Matt Caswell \u003cmatt@openssl.org\u003e\n(Merged from https://github.com/openssl/openssl/pull/3714)"
,
"diff": "diff --git a/crypto/err/openssl.txt b/crypto/err/openssl.txt\nindex 37e3166..e2cf2c5 100644\n--- a/crypto/err/openssl.txt\n+++ b/crypto/err/openssl.txt\n@@ -2042,6 +2042,7 @@ PKCS7_R_UNSUPPORTED_CIPHER_TYPE:111:unsupported cipher type\n PKCS7_R_UNSUPPORTED_CONTENT_TYPE:112:unsupported content type\n PKCS7_R_WRONG_CONTENT_TYPE:113:wrong content type\n PKCS7_R_WRONG_PKCS7_TYPE:114:wrong pkcs7 type\n+RAND_R_FUNC_NOT_IMPLEMENTED:101:Function not implemented\n RAND_R_PRNG_NOT_SEEDED:100:PRNG not seeded\n RSA_R_ALGORITHM_MISMATCH:100:algorithm mismatch\n RSA_R_BAD_E_VALUE:101:bad e value\ndiff --git a/crypto/rand/rand_err.c b/crypto/rand/rand_err.c\nindex 177a109..6888ed9 100644\n--- a/crypto/rand/rand_err.c\n+++ b/crypto/rand/rand_err.c\n@@ -19,6 +19,8 @@ static const ERR_STRING_DATA RAND_str_functs[] \u003d {\n };\n \n static const ERR_STRING_DATA RAND_str_reasons[] \u003d {\n+ {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_FUNC_NOT_IMPLEMENTED),\n+ \u0022Function not implemented\u0022},\n {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_PRNG_NOT_SEEDED), \u0022PRNG not seeded\u0022},\n {0, NULL}\n };\ndiff --git a/crypto/rand/rand_lib.c b/crypto/rand/rand_lib.c\nindex 7ffd10b..84d6b5d 100644\n--- a/crypto/rand/rand_lib.c\n+++ b/crypto/rand/rand_lib.c\n@@ -137,6 +137,7 @@ int RAND_bytes(unsigned char *buf, int num)\n const RAND_METHOD *meth \u003d RAND_get_rand_method();\n if (meth \u0026\u0026 meth-\u003ebytes)\n return meth-\u003ebytes(buf, num);\n+ RANDerr(RAND_F_RAND_BYTES, RAND_R_FUNC_NOT_IMPLEMENTED);\n return (-1);\n }\n \ndiff --git a/doc/man3/RAND_bytes.pod b/doc/man3/RAND_bytes.pod\nindex a12f867..58aa962 100644\n--- a/doc/man3/RAND_bytes.pod\n+++ b/doc/man3/RAND_bytes.pod\n@@ -22,24 +22,20 @@ RAND_bytes() puts B\u003cnum\u003e cryptographically strong pseudo-random bytes\n into B\u003cbuf\u003e. An error occurs if the PRNG has not been seeded with\n enough randomness to ensure an unpredictable byte sequence.\n \n-RAND_pseudo_bytes() has been deprecated. Users should use RAND_bytes() instead.\n-RAND_pseudo_bytes() puts B\u003cnum\u003e pseudo-random bytes into B\u003cbuf\u003e.\n-Pseudo-random byte sequences generated by RAND_pseudo_bytes() will be\n-unique if they are of sufficient length, but are not necessarily\n-unpredictable. They can be used for non-cryptographic purposes and for\n-certain purposes in cryptographic protocols, but usually not for key\n-generation etc.\n+RAND_pseudo_bytes() has been deprecated; use RAND_bytes() instead.\n \n The contents of B\u003cbuf\u003e is mixed into the entropy pool before retrieving\n the new pseudo-random bytes unless disabled at compile time (see FAQ).\n \n \u003dhead1 RETURN VALUES\n \n-RAND_bytes() returns 1 on success, 0 otherwise. The error code can be\n-obtained by L\u003cERR_get_error(3)\u003e. RAND_pseudo_bytes() returns 1 if the\n-bytes generated are cryptographically strong, 0 otherwise. Both\n-functions return -1 if they are not supported by the current RAND\n-method.\n+RAND_bytes() returns 1 on success, -1 if not supported by the current\n+RAND method, or 0 on other failure. The error code can be\n+obtained by L\u003cERR_get_error(3)\u003e.\n+\n+\u003dhead HISTORY\n+\n+RAND_pseudo_bytes() was deprecated in OpenSSL 1.1.0.\n \n \u003dhead1 SEE ALSO\n \n@@ -48,7 +44,7 @@ L\u003cRAND_add(3)\u003e\n \n \u003dhead1 COPYRIGHT\n \n-Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.\n+Copyright 2000-2017 The OpenSSL Project Authors. All Rights Reserved.\n \n Licensed under the OpenSSL license (the \u0022License\u0022). You may not use\n this file except in compliance with the License. You can obtain a copy\ndiff --git a/include/openssl/randerr.h b/include/openssl/randerr.h\nindex 80f1a68..5c9ab86 100644\n--- a/include/openssl/randerr.h\n+++ b/include/openssl/randerr.h\n@@ -27,6 +27,7 @@ int ERR_load_RAND_strings(void);\n /*\n * RAND reason codes.\n */\n+# define RAND_R_FUNC_NOT_IMPLEMENTED 101\n # define RAND_R_PRNG_NOT_SEEDED 100\n \n #endif\n","s":{"c":1753165439,"u": 29073}}
],"g": 30907,"chitpc": 0,"ehitpc": 0,"indexed":0
,
"ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}