GeezerVison is showing github.com — deps: upgrade openssl sources to 1.0.2c · shigeki/node@e548abb
File treeExpand file treeCollapse file tree Open diff view settings Some content is hiddenLarge Commits have some content hidden by default. Use the searchbox below for content that may be hidden. Dismiss bannerExpand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: deps/openssl/openssl/CHANGES +6Lines changed: 6 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 2 | 2 | OpenSSL CHANGES | 3 | 3 | _______________ | 4 | 4 |
| | 5 | + Changes between 1.0.2b and 1.0.2c [12 Jun 2015] | | 6 | + | | 7 | + *) Fix HMAC ABI incompatibility. The previous version introduced an ABI | | 8 | + incompatibility in the handling of HMAC. The previous ABI has now been | | 9 | + restored. | | 10 | + | 5 | 11 | Changes between 1.0.2a and 1.0.2b [11 Jun 2015] | 6 | 12 |
| 7 | 13 | *) Malformed ECParameters causes infinite loop | |
Collapse file Copy file name to clipboardExpand all lines: deps/openssl/openssl/Makefile +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 4 | 4 | ## Makefile for OpenSSL | 5 | 5 | ## | 6 | 6 |
| 7 | | -VERSION=1.0.2b | | 7 | +VERSION=1.0.2c | 8 | 8 | MAJOR=1 | 9 | 9 | MINOR=0.2 | 10 | 10 | SHLIB_VERSION_NUMBER=1.0.0 | |
Collapse file Copy file name to clipboardExpand all lines: deps/openssl/openssl/Makefile.bak +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 4 | 4 | ## Makefile for OpenSSL | 5 | 5 | ## | 6 | 6 |
| 7 | | -VERSION=1.0.2b-dev | | 7 | +VERSION=1.0.2c-dev | 8 | 8 | MAJOR=1 | 9 | 9 | MINOR=0.2 | 10 | 10 | SHLIB_VERSION_NUMBER=1.0.0 | |
Collapse file Copy file name to clipboardExpand all lines: deps/openssl/openssl/NEWS +4Lines changed: 4 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 5 | 5 | This file gives a brief overview of the major changes between each OpenSSL | 6 | 6 | release. For more details please read the CHANGES file. | 7 | 7 |
| | 8 | + Major changes between OpenSSL 1.0.2b and OpenSSL 1.0.2c [12 Jun 2015] | | 9 | + | | 10 | + o Fix HMAC ABI incompatibility | | 11 | + | 8 | 12 | Major changes between OpenSSL 1.0.2a and OpenSSL 1.0.2b [11 Jun 2015] | 9 | 13 |
| 10 | 14 | o Malformed ECParameters causes infinite loop (CVE-2015-1788) | |
Collapse file Copy file name to clipboardExpand all lines: deps/openssl/openssl/README +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 |
| 2 | | - OpenSSL 1.0.2b 11 Jun 2015 | | 2 | + OpenSSL 1.0.2c 12 Jun 2015 | 3 | 3 |
| 4 | 4 | Copyright (c) 1998-2011 The OpenSSL Project | 5 | 5 | Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson | |
Collapse file Copy file name to clipboardExpand all lines: deps/openssl/openssl/apps/app_rand.c +4-10Lines changed: 4 additions & 10 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -124,16 +124,10 @@ int app_RAND_load_file(const char *file, BIO *bio_e, int dont_warn) | 124 | 124 | char buffer[200]; | 125 | 125 |
| 126 | 126 | #ifdef OPENSSL_SYS_WINDOWS | 127 | | - /* | 128 | | - * allocate 2 to dont_warn not to use RAND_screen() via | 129 | | - * -no_rand_screen option in s_client | 130 | | - */ | 131 | | - if (dont_warn != 2) { | 132 | | - BIO_printf(bio_e, "Loading 'screen' into random state -"); | 133 | | - BIO_flush(bio_e); | 134 | | - RAND_screen(); | 135 | | - BIO_printf(bio_e, " done\n"); | 136 | | - } | | 127 | + BIO_printf(bio_e, "Loading 'screen' into random state -"); | | 128 | + BIO_flush(bio_e); | | 129 | + RAND_screen(); | | 130 | + BIO_printf(bio_e, " done\n"); | 137 | 131 | #endif | 138 | 132 |
| 139 | 133 | if (file == NULL) | |
Collapse file Copy file name to clipboardExpand all lines: deps/openssl/openssl/apps/s_client.c +8-23Lines changed: 8 additions & 23 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -180,13 +180,6 @@ typedef unsigned int u_int; | 180 | 180 | # include <fcntl.h> | 181 | 181 | #endif | 182 | 182 |
| 183 | | -/* Use Windows API with STD_INPUT_HANDLE when checking for input? | 184 | | - Don't look at OPENSSL_SYS_MSDOS for this, since it is always defined if | 185 | | - OPENSSL_SYS_WINDOWS is defined */ | 186 | | -#if defined(OPENSSL_SYS_WINDOWS) && !defined(OPENSSL_SYS_WINCE) && defined(STD_INPUT_HANDLE) | 187 | | -#define OPENSSL_USE_STD_INPUT_HANDLE | 188 | | -#endif | 189 | | - | 190 | 183 | #undef PROG | 191 | 184 | #define PROG s_client_main | 192 | 185 |
| @@ -236,7 +229,6 @@ static BIO *bio_c_msg = NULL; | 236 | 229 | static int c_quiet = 0; | 237 | 230 | static int c_ign_eof = 0; | 238 | 231 | static int c_brief = 0; | 239 | | -static int c_no_rand_screen = 0; | 240 | 232 |
| 241 | 233 | #ifndef OPENSSL_NO_PSK | 242 | 234 | /* Default PSK identity and key */ | @@ -449,10 +441,6 @@ static void sc_usage(void) | 449 | 441 | " -keymatexport label - Export keying material using label\n"); | 450 | 442 | BIO_printf(bio_err, | 451 | 443 | " -keymatexportlen len - Export len bytes of keying material (default 20)\n"); | 452 | | -#ifdef OPENSSL_SYS_WINDOWS | 453 | | - BIO_printf(bio_err, | 454 | | - " -no_rand_screen - Do not use RAND_screen() to initialize random state\n"); | 455 | | -#endif | 456 | 444 | } | 457 | 445 |
| 458 | 446 | #ifndef OPENSSL_NO_TLSEXT | @@ -1132,10 +1120,6 @@ int MAIN(int argc, char **argv) | 1132 | 1120 | keymatexportlen = atoi(*(++argv)); | 1133 | 1121 | if (keymatexportlen == 0) | 1134 | 1122 | goto bad; | 1135 | | -#ifdef OPENSSL_SYS_WINDOWS | 1136 | | - } else if (strcmp(*argv, "-no_rand_screen") == 0) { | 1137 | | - c_no_rand_screen = 1; | 1138 | | -#endif | 1139 | 1123 | } else { | 1140 | 1124 | BIO_printf(bio_err, "unknown option %s\n", *argv); | 1141 | 1125 | badop = 1; | @@ -1241,7 +1225,7 @@ int MAIN(int argc, char **argv) | 1241 | 1225 | if (!load_excert(&exc, bio_err)) | 1242 | 1226 | goto end; | 1243 | 1227 |
| 1244 | | - if (!app_RAND_load_file(NULL, bio_err, ++c_no_rand_screen) && inrand == NULL | | 1228 | + if (!app_RAND_load_file(NULL, bio_err, 1) && inrand == NULL | 1245 | 1229 | && !RAND_status()) { | 1246 | 1230 | BIO_printf(bio_err, | 1247 | 1231 | "warning, not much extra random data, consider using the -rand option\n"); | @@ -1774,16 +1758,17 @@ int MAIN(int argc, char **argv) | 1774 | 1758 | tv.tv_usec = 0; | 1775 | 1759 | i = select(width, (void *)&readfds, (void *)&writefds, | 1776 | 1760 | NULL, &tv); | 1777 | | -#if defined(OPENSSL_USE_STD_INPUT_HANDLE) | | 1761 | +# if defined(OPENSSL_SYS_WINCE) || defined(OPENSSL_SYS_MSDOS) | | 1762 | + if (!i && (!_kbhit() || !read_tty)) | | 1763 | + continue; | | 1764 | +# else | 1778 | 1765 | if (!i && (!((_kbhit()) | 1779 | 1766 | || (WAIT_OBJECT_0 == | 1780 | 1767 | WaitForSingleObject(GetStdHandle | 1781 | 1768 | (STD_INPUT_HANDLE), | 1782 | 1769 | 0))) | 1783 | 1770 | || !read_tty)) | 1784 | 1771 | continue; | 1785 | | -#else | 1786 | | - if(!i && (!_kbhit() || !read_tty) ) continue; | 1787 | 1772 | # endif | 1788 | 1773 | } else | 1789 | 1774 | i = select(width, (void *)&readfds, (void *)&writefds, | @@ -1985,12 +1970,12 @@ int MAIN(int argc, char **argv) | 1985 | 1970 | } | 1986 | 1971 | } | 1987 | 1972 | #if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS) | 1988 | | -#if defined(OPENSSL_USE_STD_INPUT_HANDLE) | | 1973 | +# if defined(OPENSSL_SYS_WINCE) || defined(OPENSSL_SYS_MSDOS) | | 1974 | + else if (_kbhit()) | | 1975 | +# else | 1989 | 1976 | else if ((_kbhit()) | 1990 | 1977 | || (WAIT_OBJECT_0 == | 1991 | 1978 | WaitForSingleObject(GetStdHandle(STD_INPUT_HANDLE), 0))) | 1992 | | -#else | 1993 | | - else if (_kbhit()) | 1994 | 1979 | # endif | 1995 | 1980 | #elif defined (OPENSSL_SYS_NETWARE) | 1996 | 1981 | else if (_kbhit()) | |
Collapse file Copy file name to clipboardExpand all lines: deps/openssl/openssl/crypto/hmac/hmac.c +7-12Lines changed: 7 additions & 12 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -97,6 +97,9 @@ int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, | 97 | 97 | return FIPS_hmac_init_ex(ctx, key, len, md, NULL); | 98 | 98 | } | 99 | 99 | #endif | | 100 | + /* If we are changing MD then we must have a key */ | | 101 | + if (md != NULL && md != ctx->md && (key == NULL || len < 0)) | | 102 | + return 0; | 100 | 103 |
| 101 | 104 | if (md != NULL) { | 102 | 105 | reset = 1; | @@ -107,9 +110,6 @@ int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, | 107 | 110 | return 0; | 108 | 111 | } | 109 | 112 |
| 110 | | - if (!ctx->key_init && key == NULL) | 111 | | - return 0; | 112 | | - | 113 | 113 | if (key != NULL) { | 114 | 114 | reset = 1; | 115 | 115 | j = EVP_MD_block_size(md); | @@ -131,7 +131,6 @@ int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, | 131 | 131 | if (ctx->key_length != HMAC_MAX_MD_CBLOCK) | 132 | 132 | memset(&ctx->key[ctx->key_length], 0, | 133 | 133 | HMAC_MAX_MD_CBLOCK - ctx->key_length); | 134 | | - ctx->key_init = 1; | 135 | 134 | } | 136 | 135 |
| 137 | 136 | if (reset) { | @@ -169,7 +168,7 @@ int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, size_t len) | 169 | 168 | if (FIPS_mode() && !ctx->i_ctx.engine) | 170 | 169 | return FIPS_hmac_update(ctx, data, len); | 171 | 170 | #endif | 172 | | - if (!ctx->key_init) | | 171 | + if (!ctx->md) | 173 | 172 | return 0; | 174 | 173 |
| 175 | 174 | return EVP_DigestUpdate(&ctx->md_ctx, data, len); | @@ -184,7 +183,7 @@ int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len) | 184 | 183 | return FIPS_hmac_final(ctx, md, len); | 185 | 184 | #endif | 186 | 185 |
| 187 | | - if (!ctx->key_init) | | 186 | + if (!ctx->md) | 188 | 187 | goto err; | 189 | 188 |
| 190 | 189 | if (!EVP_DigestFinal_ex(&ctx->md_ctx, buf, &i)) | @@ -205,7 +204,6 @@ void HMAC_CTX_init(HMAC_CTX *ctx) | 205 | 204 | EVP_MD_CTX_init(&ctx->i_ctx); | 206 | 205 | EVP_MD_CTX_init(&ctx->o_ctx); | 207 | 206 | EVP_MD_CTX_init(&ctx->md_ctx); | 208 | | - ctx->key_init = 0; | 209 | 207 | ctx->md = NULL; | 210 | 208 | } | 211 | 209 |
| @@ -217,11 +215,8 @@ int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx) | 217 | 215 | goto err; | 218 | 216 | if (!EVP_MD_CTX_copy(&dctx->md_ctx, &sctx->md_ctx)) | 219 | 217 | goto err; | 220 | | - dctx->key_init = sctx->key_init; | 221 | | - if (sctx->key_init) { | 222 | | - memcpy(dctx->key, sctx->key, HMAC_MAX_MD_CBLOCK); | 223 | | - dctx->key_length = sctx->key_length; | 224 | | - } | | 218 | + memcpy(dctx->key, sctx->key, HMAC_MAX_MD_CBLOCK); | | 219 | + dctx->key_length = sctx->key_length; | 225 | 220 | dctx->md = sctx->md; | 226 | 221 | return 1; | 227 | 222 | err: | |
Collapse file Copy file name to clipboardExpand all lines: deps/openssl/openssl/crypto/hmac/hmac.h -1Lines changed: 0 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -79,7 +79,6 @@ typedef struct hmac_ctx_st { | 79 | 79 | EVP_MD_CTX o_ctx; | 80 | 80 | unsigned int key_length; | 81 | 81 | unsigned char key[HMAC_MAX_MD_CBLOCK]; | 82 | | - int key_init; | 83 | 82 | } HMAC_CTX; | 84 | 83 |
| 85 | 84 | # define HMAC_size(e) (EVP_MD_size((e)->md)) | |
Collapse file Copy file name to clipboardExpand all lines: deps/openssl/openssl/crypto/hmac/hmactest.c +6-1Lines changed: 6 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -233,7 +233,12 @@ int main(int argc, char *argv[]) | 233 | 233 | err++; | 234 | 234 | goto test6; | 235 | 235 | } | 236 | | - if (!HMAC_Init_ex(&ctx, NULL, 0, EVP_sha256(), NULL)) { | | 236 | + if (HMAC_Init_ex(&ctx, NULL, 0, EVP_sha256(), NULL)) { | | 237 | + printf("Should disallow changing MD without a new key (test 5)\n"); | | 238 | + err++; | | 239 | + goto test6; | | 240 | + } | | 241 | + if (!HMAC_Init_ex(&ctx, test[4].key, test[4].key_len, EVP_sha256(), NULL)) { | 237 | 242 | printf("Failed to reinitialise HMAC (test 5)\n"); | 238 | 243 | err++; | 239 | 244 | goto test6; | |
|