From no-reply at appveyor.com Sun Apr 1 00:14:04 2018 From: no-reply at appveyor.com (AppVeyor) Date: Sun, 01 Apr 2018 00:14:04 +0000 Subject: [openssl-commits] Build completed: openssl master.16924 Message-ID: <20180401001404.1.7DB4ECEA70C86FD6@appveyor.com> An HTML attachment was scrubbed... URL: From scan-admin at coverity.com Sun Apr 1 07:32:33 2018 From: scan-admin at coverity.com (scan-admin at coverity.com) Date: Sun, 01 Apr 2018 07:32:33 +0000 (UTC) Subject: [openssl-commits] Coverity Scan: Analysis completed for openssl/openssl Message-ID: <5ac08b10c9117_45412af689ce6f5871744@node1.mail> Your request for analysis of openssl/openssl has been completed successfully. The results are available at https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRakUl6QyjujEohY7rPpoYUEcf-2B75FkFkxwwFKGZV8c1xA-3D-3D_19DGMz38yO7VfzGQuXkecdlEmzBoDG4v8Dvyanv-2F1I1W0j9RvGjrTwXZT-2Bll-2Bku3JhczP0FMaW9v7DoirYLaLl8caC42PFbBCmOnK337aI6xhNWzk3-2FTMuoIHVpGm1Na3AILk5bbruhodFT4QCam96iVISHsJzMQc87LC6picD4MOpCkR2IjrI6r7gvxbUvQokASAauelFcP0JkXGOMyauk9KItuFdsBXJZAFppgIcs-3D Build ID: 204586 Analysis Summary: New defects found: 2 Defects eliminated: 2 If you have difficulty understanding any defects, email us at scan-admin at coverity.com, or post your question to StackOverflow at https://u2389337.ct.sendgrid.net/wf/click?upn=OgIsEqWzmIl4S-2FzEUMxLXL-2BukuZt9UUdRZhgmgzAKchwAzH1nH3073xDEXNRgHN6q227lMNIWoOb8ZgSjAjKcg-3D-3D_19DGMz38yO7VfzGQuXkecdlEmzBoDG4v8Dvyanv-2F1I1W0j9RvGjrTwXZT-2Bll-2Bku3JhczP0FMaW9v7DoirYLaLjKjHRGmhBi2YBomp2ggEuIJCsdArxKfTO6FfRbJyLvTPIiT8V2exaAYZD0HJdx84W9dqSlzOuCUrGQ6A4Ch85ngW8XIPIBJbLVmH5DtvhQxT3g4c-2BFQaPtbyvodJwnZfGVDpQHV1oFUXyZDSUHEWyk-3D From scan-admin at coverity.com Sun Apr 1 07:42:56 2018 From: scan-admin at coverity.com (scan-admin at coverity.com) Date: Sun, 01 Apr 2018 07:42:56 +0000 (UTC) Subject: [openssl-commits] Coverity Scan: Analysis completed for OpenSSL-1.0.2 Message-ID: <5ac08d7f862cf_4daf2af689ce6f587173d@node1.mail> Your request for analysis of OpenSSL-1.0.2 has been completed successfully. The results are available at https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRakUl6QyjujEohY7rPpoYUEeuRTZVWU4ku8PUBnVPw8PQ-3D-3D_19DGMz38yO7VfzGQuXkecdlEmzBoDG4v8Dvyanv-2F1I2SCRJtr-2FM9Eby3IU9i5-2FCxBAPlTkK4g7OoRgV7nlHATyFh-2Ber54coH5jLexkk6FQrcGTSkaxwzBAZqgf7AU6JifVrdOOXecnlEC-2FHTd0KSmumkhQ-2BbB5oW31hh-2B4NcYYZxACdZlKd4JL3qWAfgpqOGrHVwxXPA2Jr7hWRWx3XQGrYA9JUbqvbUVA8GOZIS9WY-3D Build ID: 204590 Analysis Summary: New defects found: 0 Defects eliminated: 0 From levitte at openssl.org Sun Apr 1 16:08:40 2018 From: levitte at openssl.org (Richard Levitte) Date: Sun, 01 Apr 2018 16:08:40 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1522598920.267699.8686.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via 6025c6619aa95a114a89ac3a60f8fac8abf0380a (commit) from cde87deafa7486f26bdf954867a6d72ca4ea06e7 (commit) - Log ----------------------------------------------------------------- commit 6025c6619aa95a114a89ac3a60f8fac8abf0380a Author: Richard Levitte Date: Thu Apr 20 10:14:03 2017 +0200 VMS: Copy DECC inclusion epi- and prologues to internals Because many of our test programs use internal headers, we need to make sure they know how, exactly, to mangle the symbols. So far, we've done so by specifying it in the affected test programs, but as things change, that will develop into a goose chase. Better then to declare once and for all how symbols belonging in our libraries are meant to be treated, internally as well as publically. Reviewed-by: Andy Polyakov (Merged from https://github.com/openssl/openssl/pull/3259) (cherry picked from commit f46f69f4092768ec4b911ced45c8cc73cc008739) ----------------------------------------------------------------------- Summary of changes: {include/openssl => crypto/include/internal}/__DECC_INCLUDE_EPILOGUE.H | 0 {include/openssl => crypto/include/internal}/__DECC_INCLUDE_PROLOGUE.H | 0 include/{openssl => internal}/__DECC_INCLUDE_EPILOGUE.H | 0 include/{openssl => internal}/__DECC_INCLUDE_PROLOGUE.H | 0 4 files changed, 0 insertions(+), 0 deletions(-) copy {include/openssl => crypto/include/internal}/__DECC_INCLUDE_EPILOGUE.H (100%) copy {include/openssl => crypto/include/internal}/__DECC_INCLUDE_PROLOGUE.H (100%) copy include/{openssl => internal}/__DECC_INCLUDE_EPILOGUE.H (100%) copy include/{openssl => internal}/__DECC_INCLUDE_PROLOGUE.H (100%) diff --git a/include/openssl/__DECC_INCLUDE_EPILOGUE.H b/crypto/include/internal/__DECC_INCLUDE_EPILOGUE.H similarity index 100% copy from include/openssl/__DECC_INCLUDE_EPILOGUE.H copy to crypto/include/internal/__DECC_INCLUDE_EPILOGUE.H diff --git a/include/openssl/__DECC_INCLUDE_PROLOGUE.H b/crypto/include/internal/__DECC_INCLUDE_PROLOGUE.H similarity index 100% copy from include/openssl/__DECC_INCLUDE_PROLOGUE.H copy to crypto/include/internal/__DECC_INCLUDE_PROLOGUE.H diff --git a/include/openssl/__DECC_INCLUDE_EPILOGUE.H b/include/internal/__DECC_INCLUDE_EPILOGUE.H similarity index 100% copy from include/openssl/__DECC_INCLUDE_EPILOGUE.H copy to include/internal/__DECC_INCLUDE_EPILOGUE.H diff --git a/include/openssl/__DECC_INCLUDE_PROLOGUE.H b/include/internal/__DECC_INCLUDE_PROLOGUE.H similarity index 100% copy from include/openssl/__DECC_INCLUDE_PROLOGUE.H copy to include/internal/__DECC_INCLUDE_PROLOGUE.H From kurt at openssl.org Sun Apr 1 19:09:11 2018 From: kurt at openssl.org (Kurt Roeckx) Date: Sun, 01 Apr 2018 19:09:11 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1522609751.154522.6529.nullmailer@dev.openssl.org> The branch master has been updated via 2f6f913e9e02441245c974d7c5abe57f37c0420e (commit) from 094925de1ecfcfb8019b21994c45f3dc00ab4e2c (commit) - Log ----------------------------------------------------------------- commit 2f6f913e9e02441245c974d7c5abe57f37c0420e Author: Kurt Roeckx Date: Sat Mar 31 14:43:01 2018 +0200 Update documentation on how to close a connection Reviewed-by: Bernd Edlinger GH: #5823 ----------------------------------------------------------------------- Summary of changes: doc/man3/SSL_get_error.pod | 9 +++---- doc/man3/SSL_shutdown.pod | 65 ++++++++++++++++++++++++++++++---------------- 2 files changed, 46 insertions(+), 28 deletions(-) diff --git a/doc/man3/SSL_get_error.pod b/doc/man3/SSL_get_error.pod index 4e26514..688f772 100644 --- a/doc/man3/SSL_get_error.pod +++ b/doc/man3/SSL_get_error.pod @@ -38,11 +38,10 @@ if and only if B 0>. =item SSL_ERROR_ZERO_RETURN -The TLS/SSL connection has been closed. -If the protocol version is SSL 3.0 or higher, this result code is returned only -if a closure alert has occurred in the protocol, i.e. if the connection has been -closed cleanly. -Note that in this case B does not necessarily +The TLS/SSL peer has closed the connection for writing by sending the +"close notify" alert. +No more data can be read. +Note that B does not necessarily indicate that the underlying transport has been closed. =item SSL_ERROR_WANT_READ, SSL_ERROR_WANT_WRITE diff --git a/doc/man3/SSL_shutdown.pod b/doc/man3/SSL_shutdown.pod index c40956c..5d467c8 100644 --- a/doc/man3/SSL_shutdown.pod +++ b/doc/man3/SSL_shutdown.pod @@ -35,35 +35,52 @@ performed, so that the peers stay synchronized. SSL_shutdown() supports both uni- and bidirectional shutdown by its 2 step behaviour. -=over 4 +SSL_shutdown() only closes the write direction. +It is not possible to call SSL_write() after calling SSL_shutdown(). +The read direction is closed by the peer. + +=head2 First to close the connection -=item When the application is the first party to send the "close notify" +When the application is the first party to send the "close notify" alert, SSL_shutdown() will only send the alert and then set the SSL_SENT_SHUTDOWN flag (so that the session is considered good and will -be kept in cache). SSL_shutdown() will then return with 0. If a unidirectional -shutdown is enough (the underlying connection shall be closed anyway), this -first call to SSL_shutdown() is sufficient. In order to complete the -bidirectional shutdown handshake, SSL_shutdown() must be called again. -The second call will make SSL_shutdown() wait for the peer's "close notify" -shutdown alert. On success, the second call to SSL_shutdown() will return -with 1. - -=item If the peer already sent the "close notify" alert B it was +be kept in the cache). +SSL_shutdown() will then return with 0. +If a unidirectional shutdown is enough (the underlying connection shall be +closed anyway), this first call to SSL_shutdown() is sufficient. + +In order to complete the bidirectional shutdown handshake, the peer needs +to send back a "close notify" alert. +The SSL_RECEIVED_SHUTDOWN flag will be set after receiving and processing +it. +SSL_shutdown() will return 1 when it has been received. + +The peer is still allowed to send data after receiving the "close notify" +event. +If the peer did send data it needs to be processed by calling SSL_read() +before calling SSL_shutdown() a second time. +SSL_read() will indicate the end of the peer data by returning <= 0 +and SSL_get_error() returning SSL_ERROR_ZERO_RETURN. +It is recommended to call SSL_read() between SSL_shutdown() calls. + +=head2 Peer closes the connection + +If the peer already sent the "close notify" alert B it was already processed implicitly inside another function (L), the SSL_RECEIVED_SHUTDOWN flag is set. +SSL_read() will return <= 0 in that case, and SSL_get_error() will return +SSL_ERROR_ZERO_RETURN. SSL_shutdown() will send the "close notify" alert, set the SSL_SENT_SHUTDOWN flag and will immediately return with 1. Whether SSL_RECEIVED_SHUTDOWN is already set can be checked using the SSL_get_shutdown() (see also L call. -=back +=head1 NOTES -It is therefore recommended, to check the return value of SSL_shutdown() -and call SSL_shutdown() again, if the bidirectional shutdown is not yet -complete (return value of the first call is 0). +It is recommended to do a bidirectional shutdown by checking the return value +of SSL_shutdown() and call it again until it returns 1 or a fatal error. The behaviour of SSL_shutdown() additionally depends on the underlying BIO. - If the underlying BIO is B, SSL_shutdown() will only return once the handshake step has been finished or an error occurred. @@ -92,8 +109,9 @@ The following return values can occur: =item Z<>0 -The shutdown is not yet finished. Call SSL_shutdown() for a second time, -if a bidirectional shutdown shall be performed. +The shutdown is not yet finished: the "close notify" was send but the peer +did not send it back yet. +Call SSL_shutdown() again to do a bidirectional shutdown. The output of L may be misleading, as an erroneous SSL_ERROR_SYSCALL may be flagged even though no error occurred. @@ -104,11 +122,12 @@ and the peer's "close notify" alert was received. =item E0 -The shutdown was not successful because a fatal error occurred either -at the protocol level or a connection failure occurred. It can also occur if -action is need to continue the operation for non-blocking BIOs. -Call L with the return value B -to find out the reason. +The shutdown was not successful. +Call L with the return value B to find out the reason. +It can occur if an action is needed to continue the operation for non-blocking +BIOs. + +It can also occur when not all data was read using SSL_read(). =back From kurt at openssl.org Sun Apr 1 19:13:45 2018 From: kurt at openssl.org (Kurt Roeckx) Date: Sun, 01 Apr 2018 19:13:45 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1522610025.735570.13073.nullmailer@dev.openssl.org> The branch master has been updated via 2a70d65b99e1f2376be705d18bca88703b7e774a (commit) from 2f6f913e9e02441245c974d7c5abe57f37c0420e (commit) - Log ----------------------------------------------------------------- commit 2a70d65b99e1f2376be705d18bca88703b7e774a Author: Kurt Roeckx Date: Sat Mar 3 23:19:03 2018 +0100 Make sure we use a nonce when a nonce is required If a nonce is required and the get_nonce callback is NULL, request 50% more entropy following NIST SP800-90Ar1 section 9.1. Reviewed-by: Dr. Matthias St. Pierre GH: #5503 ----------------------------------------------------------------------- Summary of changes: crypto/rand/drbg_lib.c | 30 +++++++++++++++++------- crypto/rand/rand_lcl.h | 21 +++++++++++++++++ crypto/rand/rand_lib.c | 21 ----------------- test/drbgtest.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 106 insertions(+), 29 deletions(-) diff --git a/crypto/rand/drbg_lib.c b/crypto/rand/drbg_lib.c index e1b3ddb..b9ad1b8 100644 --- a/crypto/rand/drbg_lib.c +++ b/crypto/rand/drbg_lib.c @@ -266,6 +266,9 @@ int RAND_DRBG_instantiate(RAND_DRBG *drbg, { unsigned char *nonce = NULL, *entropy = NULL; size_t noncelen = 0, entropylen = 0; + size_t min_entropy = drbg->strength; + size_t min_entropylen = drbg->min_entropylen; + size_t max_entropylen = drbg->max_entropylen; if (perslen > drbg->max_perslen) { RANDerr(RAND_F_RAND_DRBG_INSTANTIATE, @@ -288,22 +291,33 @@ int RAND_DRBG_instantiate(RAND_DRBG *drbg, } drbg->state = DRBG_ERROR; + + /* + * NIST SP800-90Ar1 section 9.1 says you can combine getting the entropy + * and nonce in 1 call by increasing the entropy with 50% and increasing + * the minimum length to accomadate the length of the nonce. + * We do this in case a nonce is require and get_nonce is NULL. + */ + if (drbg->min_noncelen > 0 && drbg->get_nonce == NULL) { + min_entropy += drbg->strength / 2; + min_entropylen += drbg->min_noncelen; + max_entropylen += drbg->max_noncelen; + } + if (drbg->get_entropy != NULL) - entropylen = drbg->get_entropy(drbg, &entropy, drbg->strength, - drbg->min_entropylen, - drbg->max_entropylen, 0); - if (entropylen < drbg->min_entropylen - || entropylen > drbg->max_entropylen) { + entropylen = drbg->get_entropy(drbg, &entropy, min_entropy, + min_entropylen, max_entropylen, 0); + if (entropylen < min_entropylen + || entropylen > max_entropylen) { RANDerr(RAND_F_RAND_DRBG_INSTANTIATE, RAND_R_ERROR_RETRIEVING_ENTROPY); goto end; } - if (drbg->max_noncelen > 0 && drbg->get_nonce != NULL) { + if (drbg->min_noncelen > 0 && drbg->get_nonce != NULL) { noncelen = drbg->get_nonce(drbg, &nonce, drbg->strength / 2, drbg->min_noncelen, drbg->max_noncelen); if (noncelen < drbg->min_noncelen || noncelen > drbg->max_noncelen) { - RANDerr(RAND_F_RAND_DRBG_INSTANTIATE, - RAND_R_ERROR_RETRIEVING_NONCE); + RANDerr(RAND_F_RAND_DRBG_INSTANTIATE, RAND_R_ERROR_RETRIEVING_NONCE); goto end; } } diff --git a/crypto/rand/rand_lcl.h b/crypto/rand/rand_lcl.h index 0a34aa0..94ffc96 100644 --- a/crypto/rand/rand_lcl.h +++ b/crypto/rand/rand_lcl.h @@ -108,6 +108,27 @@ typedef struct rand_drbg_ctr_st { /* + * The 'random pool' acts as a dumb container for collecting random + * input from various entropy sources. The pool has no knowledge about + * whether its randomness is fed into a legacy RAND_METHOD via RAND_add() + * or into a new style RAND_DRBG. It is the callers duty to 1) initialize the + * random pool, 2) pass it to the polling callbacks, 3) seed the RNG, and + * 4) cleanup the random pool again. + * + * The random pool contains no locking mechanism because its scope and + * lifetime is intended to be restricted to a single stack frame. + */ +struct rand_pool_st { + unsigned char *buffer; /* points to the beginning of the random pool */ + size_t len; /* current number of random bytes contained in the pool */ + + size_t min_len; /* minimum number of random bytes requested */ + size_t max_len; /* maximum number of random bytes (allocated buffer size) */ + size_t entropy; /* current entropy count in bits */ + size_t requested_entropy; /* requested entropy count in bits */ +}; + +/* * The state of all types of DRBGs, even though we only have CTR mode * right now. */ diff --git a/crypto/rand/rand_lib.c b/crypto/rand/rand_lib.c index defa3ec..143dfb0 100644 --- a/crypto/rand/rand_lib.c +++ b/crypto/rand/rand_lib.c @@ -467,27 +467,6 @@ err: } /* - * The 'random pool' acts as a dumb container for collecting random - * input from various entropy sources. The pool has no knowledge about - * whether its randomness is fed into a legacy RAND_METHOD via RAND_add() - * or into a new style RAND_DRBG. It is the callers duty to 1) initialize the - * random pool, 2) pass it to the polling callbacks, 3) seed the RNG, and - * 4) cleanup the random pool again. - * - * The random pool contains no locking mechanism because its scope and - * lifetime is intended to be restricted to a single stack frame. - */ -struct rand_pool_st { - unsigned char *buffer; /* points to the beginning of the random pool */ - size_t len; /* current number of random bytes contained in the pool */ - - size_t min_len; /* minimum number of random bytes requested */ - size_t max_len; /* maximum number of random bytes (allocated buffer size) */ - size_t entropy; /* current entropy count in bits */ - size_t requested_entropy; /* requested entropy count in bits */ -}; - -/* * Allocate memory and initialize a new random pool */ diff --git a/test/drbgtest.c b/test/drbgtest.c index bef504e..5426046 100644 --- a/test/drbgtest.c +++ b/test/drbgtest.c @@ -16,6 +16,7 @@ #include #include #include "../crypto/rand/rand_lcl.h" +#include "../crypto/include/internal/rand_int.h" #if defined(_WIN32) # include @@ -864,6 +865,67 @@ static int test_multi_thread(void) } #endif +/* + * This function only returns the entropy already added with RAND_add(), + * and does not get entropy from the OS. + * + * Returns 0 on failure and the size of the buffer on success. + */ +static size_t get_pool_entropy(RAND_DRBG *drbg, + unsigned char **pout, + int entropy, size_t min_len, size_t max_len, + int prediction_resistance) +{ + if (drbg->pool == NULL) + return 0; + + if (drbg->pool->entropy < (size_t)entropy || drbg->pool->len < min_len + || drbg->pool->len > max_len) + return 0; + + *pout = drbg->pool->buffer; + return drbg->pool->len; +} + +/* + * Clean up the entropy that get_pool_entropy() returned. + */ +static void cleanup_pool_entropy(RAND_DRBG *drbg, unsigned char *out, size_t outlen) +{ + OPENSSL_secure_clear_free(drbg->pool->buffer, drbg->pool->max_len); + OPENSSL_free(drbg->pool); + drbg->pool = NULL; +} + +/* + * Test that instantiating works when OS entropy is not available and that + * RAND_add() is enough to reseed it. + */ +static int test_rand_add(void) +{ + RAND_DRBG *master = RAND_DRBG_get0_master(); + RAND_DRBG_get_entropy_fn old_get_entropy = master->get_entropy; + RAND_DRBG_cleanup_entropy_fn old_cleanup_entropy = master->cleanup_entropy; + int rv = 0; + unsigned char rand_add_buf[256]; + + master->get_entropy = get_pool_entropy; + master->cleanup_entropy = cleanup_pool_entropy; + master->reseed_counter++; + RAND_DRBG_uninstantiate(master); + memset(rand_add_buf, 0xCD, sizeof(rand_add_buf)); + RAND_add(rand_add_buf, sizeof(rand_add_buf), sizeof(rand_add_buf)); + if (!TEST_true(RAND_DRBG_instantiate(master, NULL, 0))) + goto error; + + rv = 1; + +error: + master->get_entropy = old_get_entropy; + master->cleanup_entropy = old_cleanup_entropy; + return rv; +} + int setup_tests(void) { app_data_index = RAND_DRBG_get_ex_new_index(0L, NULL, NULL, NULL, NULL); @@ -871,6 +933,7 @@ int setup_tests(void) ADD_ALL_TESTS(test_kats, OSSL_NELEM(drbg_test)); ADD_ALL_TESTS(test_error_checks, OSSL_NELEM(drbg_test)); ADD_TEST(test_rand_reseed); + ADD_TEST(test_rand_add); #if defined(OPENSSL_THREADS) ADD_TEST(test_multi_thread); #endif From levitte at openssl.org Sun Apr 1 20:39:37 2018 From: levitte at openssl.org (Richard Levitte) Date: Sun, 01 Apr 2018 20:39:37 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1522615177.022348.29649.nullmailer@dev.openssl.org> The branch master has been updated via 2cc8fe11add1b21f3f30cbcf365bb8d8da4fd2b4 (commit) from 2a70d65b99e1f2376be705d18bca88703b7e774a (commit) - Log ----------------------------------------------------------------- commit 2cc8fe11add1b21f3f30cbcf365bb8d8da4fd2b4 Author: Richard Levitte Date: Sun Apr 1 17:41:16 2018 +0200 Windows builds: remove over-quotation of LIBZ macro The LIBZ macro definition was already quoted in BASE_windows, then got quotified once more in windows-makefile.tmpl. That's a bit too much quotations, ending up with the compiler being asked to define the macro |"LIBZ=\"ZLIB1\""| (no, not the macro LIBZ with the value "ZLIB1"). This is solved by removing the extra quoting in BASE_windows. Along with this, change the quotation of macro definitions and include file specification, so we end up with things like -I"QuotedPath" and -D"Macro=\"some weird value\"" rather than "-IQuotedPath" and "-DMacro=\"some weird value\"". Fixes #5827 Reviewed-by: Andy Polyakov (Merged from https://github.com/openssl/openssl/pull/5833) ----------------------------------------------------------------------- Summary of changes: Configurations/00-base-templates.conf | 2 +- Configurations/windows-makefile.tmpl | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Configurations/00-base-templates.conf b/Configurations/00-base-templates.conf index c074bd6..edcc454 100644 --- a/Configurations/00-base-templates.conf +++ b/Configurations/00-base-templates.conf @@ -114,7 +114,7 @@ my %targets=( my @defs = (); unless ($disabled{"zlib-dynamic"}) { my $zlib = $withargs{zlib_lib} // "ZLIB1"; - push @defs, quotify("perl", 'LIBZ="' . $zlib . '"'); + push @defs, 'LIBZ=' . (quotify("perl", $zlib))[0]; } return [ @defs ]; }, diff --git a/Configurations/windows-makefile.tmpl b/Configurations/windows-makefile.tmpl index 49da786..e9179a4 100644 --- a/Configurations/windows-makefile.tmpl +++ b/Configurations/windows-makefile.tmpl @@ -207,10 +207,10 @@ CNF_ASFLAGS={- join(' ', $target{asflags} || (), @{$config{asflags}}) -} CNF_CPPFLAGS={- our $cppfags2 = join(' ', $target{cppflags} || (), - (map { quotify_l("-D".$_) } @{$target{defines}}, - @{$config{defines}}), - (map { quotify_l("-I".$_) } @{$target{includes}}, - @{$config{includes}}), + (map { '-D'.quotify1($_) } @{$target{defines}}, + @{$config{defines}}), + (map { '-I'.quotify1($_) } @{$target{includes}}, + @{$config{includes}}), @{$config{cppflags}}) -} CNF_CFLAGS={- join(' ', $target{cflags} || (), @{$config{cflags}}) -} @@ -233,12 +233,12 @@ LIB_ASFLAGS={- join(' ', $target{lib_asflags} || (), LIB_CPPFLAGS={- our $lib_cppflags = join(' ', $target{lib_cppflags} || (), $target{shared_cppflag} || (), - (map { quotify_l("-D".$_) } + (map { '-D'.quotify1($_) } @{$target{lib_defines}}, @{$target{shared_defines}}, @{$config{lib_defines}}, @{$config{shared_defines}}), - (map { quotify_l("-I".$_) } + (map { '-I'.quotify1($_) } @{$target{lib_includes}}, @{$target{shared_includes}}, @{$config{lib_includes}}, @@ -246,7 +246,7 @@ LIB_CPPFLAGS={- our $lib_cppflags = @{$config{lib_cppflags}}, @{$config{shared_cppflag}}); join(' ', $lib_cppflags, - (map { quotify_l("-D".$_) } + (map { '-D'.quotify1($_) } "OPENSSLDIR=\"$openssldir\"", "ENGINESDIR=\"$enginesdir\""), '$(CNF_CPPFLAGS)', '$(CPPFLAGS)') -} From levitte at openssl.org Sun Apr 1 20:41:48 2018 From: levitte at openssl.org (Richard Levitte) Date: Sun, 01 Apr 2018 20:41:48 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1522615308.025084.1146.nullmailer@dev.openssl.org> The branch master has been updated via 0e34f37fb1b7474c86ac9a170dfda5226351ecc9 (commit) from 2cc8fe11add1b21f3f30cbcf365bb8d8da4fd2b4 (commit) - Log ----------------------------------------------------------------- commit 0e34f37fb1b7474c86ac9a170dfda5226351ecc9 Author: Daniel Bevenius Date: Sun Apr 1 16:17:52 2018 +0200 Remove import/use of File::Spec::Function It looks like the usage of these functions were removed in in commit 0a4edb931b883b9973721ae012e60c028387dd50 ("Unified - adapt the generation of cpuid, uplink and buildinf to use GENERATE"). This commit removes the import/use of File::Spec::Functions module as it is no longer needed by crypto/build.info. Reviewed-by: Andy Polyakov Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5832) ----------------------------------------------------------------------- Summary of changes: crypto/build.info | 1 - 1 file changed, 1 deletion(-) diff --git a/crypto/build.info b/crypto/build.info index 368671a..b515b73 100644 --- a/crypto/build.info +++ b/crypto/build.info @@ -1,4 +1,3 @@ -{- use File::Spec::Functions qw/catdir catfile/; -} LIBS=../libcrypto SOURCE[../libcrypto]=\ cryptlib.c mem.c mem_dbg.c cversion.c ex_data.c cpt_err.c \ From levitte at openssl.org Sun Apr 1 20:42:53 2018 From: levitte at openssl.org (Richard Levitte) Date: Sun, 01 Apr 2018 20:42:53 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1522615373.604307.3596.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via 89b4da476bcd0b97bd71f63b79538b358efec166 (commit) from 6025c6619aa95a114a89ac3a60f8fac8abf0380a (commit) - Log ----------------------------------------------------------------- commit 89b4da476bcd0b97bd71f63b79538b358efec166 Author: Daniel Bevenius Date: Sun Apr 1 16:17:52 2018 +0200 Remove import/use of File::Spec::Function It looks like the usage of these functions were removed in in commit 0a4edb931b883b9973721ae012e60c028387dd50 ("Unified - adapt the generation of cpuid, uplink and buildinf to use GENERATE"). This commit removes the import/use of File::Spec::Functions module as it is no longer needed by crypto/build.info. Reviewed-by: Andy Polyakov Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5832) (cherry picked from commit 0e34f37fb1b7474c86ac9a170dfda5226351ecc9) ----------------------------------------------------------------------- Summary of changes: crypto/build.info | 1 - 1 file changed, 1 deletion(-) diff --git a/crypto/build.info b/crypto/build.info index 916d24f..e693eba 100644 --- a/crypto/build.info +++ b/crypto/build.info @@ -1,4 +1,3 @@ -{- use File::Spec::Functions qw/catdir catfile/; -} LIBS=../libcrypto SOURCE[../libcrypto]=\ cryptlib.c mem.c mem_dbg.c cversion.c ex_data.c cpt_err.c \ From rsalz at openssl.org Mon Apr 2 11:14:25 2018 From: rsalz at openssl.org (Rich Salz) Date: Mon, 02 Apr 2018 11:14:25 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1522667665.501475.32215.nullmailer@dev.openssl.org> The branch master has been updated via d53df3d08f354a650912c3409a84bea225cf1cc5 (commit) from 0e34f37fb1b7474c86ac9a170dfda5226351ecc9 (commit) - Log ----------------------------------------------------------------- commit d53df3d08f354a650912c3409a84bea225cf1cc5 Author: Illya Gerasymchuk Date: Mon Apr 2 07:13:19 2018 -0400 fix typo in x509 documentation Reviewed-by: Andy Polyakov Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5829) ----------------------------------------------------------------------- Summary of changes: doc/man1/x509.pod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/man1/x509.pod b/doc/man1/x509.pod index c375b3b..6e4d288 100644 --- a/doc/man1/x509.pod +++ b/doc/man1/x509.pod @@ -429,7 +429,7 @@ the CA certificate file. Sets the CA serial number file to use. When the B<-CA> option is used to sign a certificate it uses a serial -number specified in a file. This file consist of one line containing +number specified in a file. This file consists of one line containing an even number of hex digits with the serial number to use. After each use the serial number is incremented and written out to the file again. From rsalz at openssl.org Mon Apr 2 11:16:21 2018 From: rsalz at openssl.org (Rich Salz) Date: Mon, 02 Apr 2018 11:16:21 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1522667781.533518.3525.nullmailer@dev.openssl.org> The branch master has been updated via 1238caa725a1dfb5f9d7ef3ba3b014d2af4cab60 (commit) from d53df3d08f354a650912c3409a84bea225cf1cc5 (commit) - Log ----------------------------------------------------------------- commit 1238caa725a1dfb5f9d7ef3ba3b014d2af4cab60 Author: Alexandre Perrin Date: Mon Apr 2 07:15:31 2018 -0400 Documentation typo fix in EVP_EncryptInit.pod Remove duplicate declaration of `EVP_CIPHER_key_length` in the synopsis. CLA: trivial Reviewed-by: Andy Polyakov Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5792) ----------------------------------------------------------------------- Summary of changes: doc/man3/EVP_EncryptInit.pod | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/man3/EVP_EncryptInit.pod b/doc/man3/EVP_EncryptInit.pod index 030b010..2e3a45a 100644 --- a/doc/man3/EVP_EncryptInit.pod +++ b/doc/man3/EVP_EncryptInit.pod @@ -99,7 +99,6 @@ EVP_enc_null int EVP_CIPHER_nid(const EVP_CIPHER *e); int EVP_CIPHER_block_size(const EVP_CIPHER *e); - int EVP_CIPHER_key_length(const EVP_CIPHER *e) int EVP_CIPHER_key_length(const EVP_CIPHER *e); int EVP_CIPHER_iv_length(const EVP_CIPHER *e); unsigned long EVP_CIPHER_flags(const EVP_CIPHER *e); From matthias.st.pierre at ncp-e.com Mon Apr 2 12:39:50 2018 From: matthias.st.pierre at ncp-e.com (matthias.st.pierre at ncp-e.com) Date: Mon, 02 Apr 2018 12:39:50 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1522672790.586340.14756.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via 45ae18b38401a027f231f1408e71b13ff3111021 (commit) from 89b4da476bcd0b97bd71f63b79538b358efec166 (commit) - Log ----------------------------------------------------------------- commit 45ae18b38401a027f231f1408e71b13ff3111021 Author: FdaSilvaYY Date: Thu Mar 29 20:59:58 2018 +0200 EVP,KDF: Add more error code along some return 0 in methods : - EVP_PBE_scrypt - EVP_PKEY_meth_add0 - EVP_PKEY_meth_new - EVP_PKEY_CTX_dup Backport of 3484236d8d7afedd3e5c7771bd49d3385340e3bf Reviewed-by: Bernd Edlinger Reviewed-by: Rich Salz Reviewed-by: Matthias St. Pierre (Merged from https://github.com/openssl/openssl/pull/5803) ----------------------------------------------------------------------- Summary of changes: crypto/evp/evp_err.c | 3 +++ crypto/evp/pmeth_lib.c | 16 ++++++++++++---- crypto/evp/scrypt.c | 23 ++++++++++++++++++----- include/openssl/evp.h | 3 +++ 4 files changed, 36 insertions(+), 9 deletions(-) diff --git a/crypto/evp/evp_err.c b/crypto/evp/evp_err.c index c4b163f..3543d44 100644 --- a/crypto/evp/evp_err.c +++ b/crypto/evp/evp_err.c @@ -70,6 +70,8 @@ static ERR_STRING_DATA EVP_str_functs[] = { {ERR_FUNC(EVP_F_EVP_PKEY_GET0_RSA), "EVP_PKEY_get0_RSA"}, {ERR_FUNC(EVP_F_EVP_PKEY_KEYGEN), "EVP_PKEY_keygen"}, {ERR_FUNC(EVP_F_EVP_PKEY_KEYGEN_INIT), "EVP_PKEY_keygen_init"}, + {ERR_FUNC(EVP_F_EVP_PKEY_METH_ADD0), "EVP_PKEY_meth_add0"}, + {ERR_FUNC(EVP_F_EVP_PKEY_METH_NEW), "EVP_PKEY_meth_new"}, {ERR_FUNC(EVP_F_EVP_PKEY_NEW), "EVP_PKEY_new"}, {ERR_FUNC(EVP_F_EVP_PKEY_PARAMGEN), "EVP_PKEY_paramgen"}, {ERR_FUNC(EVP_F_EVP_PKEY_PARAMGEN_INIT), "EVP_PKEY_paramgen_init"}, @@ -143,6 +145,7 @@ static ERR_STRING_DATA EVP_str_reasons[] = { {ERR_REASON(EVP_R_OPERATON_NOT_INITIALIZED), "operaton not initialized"}, {ERR_REASON(EVP_R_PARTIALLY_OVERLAPPING), "partially overlapping buffers"}, + {ERR_REASON(EVP_R_PBKDF2_ERROR), "pbkdf2 error"}, {ERR_REASON(EVP_R_PKEY_APPLICATION_ASN1_METHOD_ALREADY_REGISTERED), "pkey application asn1 method already registered"}, {ERR_REASON(EVP_R_PKEY_ASN1_METHOD_ALREADY_REGISTERED), diff --git a/crypto/evp/pmeth_lib.c b/crypto/evp/pmeth_lib.c index 5e650a9..3975e90 100644 --- a/crypto/evp/pmeth_lib.c +++ b/crypto/evp/pmeth_lib.c @@ -151,8 +151,10 @@ EVP_PKEY_METHOD *EVP_PKEY_meth_new(int id, int flags) EVP_PKEY_METHOD *pmeth; pmeth = OPENSSL_zalloc(sizeof(*pmeth)); - if (pmeth == NULL) + if (pmeth == NULL) { + EVPerr(EVP_F_EVP_PKEY_METH_NEW, ERR_R_MALLOC_FAILURE); return NULL; + } pmeth->pkey_id = id; pmeth->flags = flags | EVP_PKEY_FLAG_DYNAMIC; @@ -238,8 +240,10 @@ EVP_PKEY_CTX *EVP_PKEY_CTX_dup(EVP_PKEY_CTX *pctx) } #endif rctx = OPENSSL_malloc(sizeof(*rctx)); - if (rctx == NULL) + if (rctx == NULL) { + EVPerr(EVP_F_EVP_PKEY_CTX_DUP, ERR_R_MALLOC_FAILURE); return NULL; + } rctx->pmeth = pctx->pmeth; #ifndef OPENSSL_NO_ENGINE @@ -273,11 +277,15 @@ int EVP_PKEY_meth_add0(const EVP_PKEY_METHOD *pmeth) { if (app_pkey_methods == NULL) { app_pkey_methods = sk_EVP_PKEY_METHOD_new(pmeth_cmp); - if (app_pkey_methods == NULL) + if (app_pkey_methods == NULL) { + EVPerr(EVP_F_EVP_PKEY_METH_ADD0, ERR_R_MALLOC_FAILURE); return 0; + } } - if (!sk_EVP_PKEY_METHOD_push(app_pkey_methods, pmeth)) + if (!sk_EVP_PKEY_METHOD_push(app_pkey_methods, pmeth)) { + EVPerr(EVP_F_EVP_PKEY_METH_ADD0, ERR_R_MALLOC_FAILURE); return 0; + } sk_EVP_PKEY_METHOD_sort(app_pkey_methods); return 1; } diff --git a/crypto/evp/scrypt.c b/crypto/evp/scrypt.c index 101bb1e..119f7c7 100644 --- a/crypto/evp/scrypt.c +++ b/crypto/evp/scrypt.c @@ -171,8 +171,10 @@ int EVP_PBE_scrypt(const char *pass, size_t passlen, if (r == 0 || p == 0 || N < 2 || (N & (N - 1))) return 0; /* Check p * r < SCRYPT_PR_MAX avoiding overflow */ - if (p > SCRYPT_PR_MAX / r) + if (p > SCRYPT_PR_MAX / r) { + EVPerr(EVP_F_EVP_PBE_SCRYPT, EVP_R_MEMORY_LIMIT_EXCEEDED); return 0; + } /* * Need to check N: if 2^(128 * r / 8) overflows limit this is @@ -180,8 +182,10 @@ int EVP_PBE_scrypt(const char *pass, size_t passlen, */ if (16 * r <= LOG2_UINT64_MAX) { - if (N >= (((uint64_t)1) << (16 * r))) + if (N >= (((uint64_t)1) << (16 * r))) { + EVPerr(EVP_F_EVP_PBE_SCRYPT, EVP_R_MEMORY_LIMIT_EXCEEDED); return 0; + } } /* Memory checks: check total allocated buffer size fits in uint64_t */ @@ -199,13 +203,17 @@ int EVP_PBE_scrypt(const char *pass, size_t passlen, * This is combined size V, X and T (section 4) */ i = UINT64_MAX / (32 * sizeof(uint32_t)); - if (N + 2 > i / r) + if (N + 2 > i / r) { + EVPerr(EVP_F_EVP_PBE_SCRYPT, EVP_R_MEMORY_LIMIT_EXCEEDED); return 0; + } Vlen = 32 * r * (N + 2) * sizeof(uint32_t); /* check total allocated size fits in uint64_t */ - if (Blen > UINT64_MAX - Vlen) + if (Blen > UINT64_MAX - Vlen) { + EVPerr(EVP_F_EVP_PBE_SCRYPT, EVP_R_MEMORY_LIMIT_EXCEEDED); return 0; + } /* check total allocated size fits in size_t */ if (Blen > SIZE_MAX - Vlen) return 0; @@ -225,8 +233,10 @@ int EVP_PBE_scrypt(const char *pass, size_t passlen, return 1; B = OPENSSL_malloc(allocsize); - if (B == NULL) + if (B == NULL) { + EVPerr(EVP_F_EVP_PBE_SCRYPT, ERR_R_MALLOC_FAILURE); return 0; + } X = (uint32_t *)(B + Blen); T = X + 32 * r; V = T + 32 * r; @@ -242,6 +252,9 @@ int EVP_PBE_scrypt(const char *pass, size_t passlen, goto err; rv = 1; err: + if (rv == 0) + EVPerr(EVP_F_EVP_PBE_SCRYPT, EVP_R_PBKDF2_ERROR); + OPENSSL_clear_free(B, allocsize); return rv; } diff --git a/include/openssl/evp.h b/include/openssl/evp.h index 43c97a7..57c8231 100644 --- a/include/openssl/evp.h +++ b/include/openssl/evp.h @@ -1506,6 +1506,8 @@ int ERR_load_EVP_strings(void); # define EVP_F_EVP_PKEY_GET0_RSA 121 # define EVP_F_EVP_PKEY_KEYGEN 146 # define EVP_F_EVP_PKEY_KEYGEN_INIT 147 +# define EVP_F_EVP_PKEY_METH_ADD0 172 +# define EVP_F_EVP_PKEY_METH_NEW 173 # define EVP_F_EVP_PKEY_NEW 106 # define EVP_F_EVP_PKEY_PARAMGEN 148 # define EVP_F_EVP_PKEY_PARAMGEN_INIT 149 @@ -1570,6 +1572,7 @@ int ERR_load_EVP_strings(void); # define EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE 150 # define EVP_R_OPERATON_NOT_INITIALIZED 151 # define EVP_R_PARTIALLY_OVERLAPPING 162 +# define EVP_R_PBKDF2_ERROR 176 # define EVP_R_PKEY_APPLICATION_ASN1_METHOD_ALREADY_REGISTERED 175 # define EVP_R_PKEY_ASN1_METHOD_ALREADY_REGISTERED 164 # define EVP_R_PRIVATE_KEY_DECODE_ERROR 145 From no-reply at appveyor.com Mon Apr 2 13:19:29 2018 From: no-reply at appveyor.com (AppVeyor) Date: Mon, 02 Apr 2018 13:19:29 +0000 Subject: [openssl-commits] Build failed: openssl master.16949 Message-ID: <20180402131929.1.222938715A6556AA@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Mon Apr 2 13:42:05 2018 From: no-reply at appveyor.com (AppVeyor) Date: Mon, 02 Apr 2018 13:42:05 +0000 Subject: [openssl-commits] Build completed: openssl master.16950 Message-ID: <20180402134205.1.2F316953D815BD0C@appveyor.com> An HTML attachment was scrubbed... URL: From kurt at openssl.org Mon Apr 2 20:24:36 2018 From: kurt at openssl.org (Kurt Roeckx) Date: Mon, 02 Apr 2018 20:24:36 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1522700676.210602.25733.nullmailer@dev.openssl.org> The branch master has been updated via 4cffafe96786558f66e1900ac462f9ccba921132 (commit) from 1238caa725a1dfb5f9d7ef3ba3b014d2af4cab60 (commit) - Log ----------------------------------------------------------------- commit 4cffafe96786558f66e1900ac462f9ccba921132 Author: Kurt Roeckx Date: Fri Nov 3 20:59:16 2017 +0100 Use the private RNG for data that is not public Reviewed-by: Dr. Matthias St. Pierre Reviewed-by: Rich Salz Fixes: #4641 GH: #4665 ----------------------------------------------------------------------- Summary of changes: crypto/bio/bf_nbio.c | 4 ++-- crypto/bn/bn_blind.c | 2 +- crypto/bn/bn_prime.c | 5 +++-- crypto/bn/bn_rand.c | 2 +- crypto/bn/bn_sqrt.c | 2 +- crypto/des/rand_key.c | 2 +- crypto/evp/e_des.c | 2 +- crypto/evp/e_des3.c | 2 +- crypto/evp/evp_enc.c | 2 +- crypto/rand/randfile.c | 2 +- crypto/srp/srp_vfy.c | 2 +- ssl/ssl_lib.c | 6 +++--- ssl/statem/statem_srvr.c | 2 +- ssl/tls_srp.c | 4 ++-- 14 files changed, 20 insertions(+), 19 deletions(-) diff --git a/crypto/bio/bf_nbio.c b/crypto/bio/bf_nbio.c index c41b5d5..1acb717 100644 --- a/crypto/bio/bf_nbio.c +++ b/crypto/bio/bf_nbio.c @@ -89,7 +89,7 @@ static int nbiof_read(BIO *b, char *out, int outl) return 0; BIO_clear_retry_flags(b); - if (RAND_bytes(&n, 1) <= 0) + if (RAND_priv_bytes(&n, 1) <= 0) return -1; num = (n & 0x07); @@ -126,7 +126,7 @@ static int nbiof_write(BIO *b, const char *in, int inl) num = nt->lwn; nt->lwn = 0; } else { - if (RAND_bytes(&n, 1) <= 0) + if (RAND_priv_bytes(&n, 1) <= 0) return -1; num = (n & 7); } diff --git a/crypto/bn/bn_blind.c b/crypto/bn/bn_blind.c index 985d3ef..1ee902c 100644 --- a/crypto/bn/bn_blind.c +++ b/crypto/bn/bn_blind.c @@ -250,7 +250,7 @@ BN_BLINDING *BN_BLINDING_create_param(BN_BLINDING *b, do { int rv; - if (!BN_rand_range(ret->A, ret->mod)) + if (!BN_priv_rand_range(ret->A, ret->mod)) goto err; if (!int_bn_mod_inverse(ret->Ai, ret->A, ret->mod, ctx, &rv)) { /* diff --git a/crypto/bn/bn_prime.c b/crypto/bn/bn_prime.c index 36d6e88..4e79086 100644 --- a/crypto/bn/bn_prime.c +++ b/crypto/bn/bn_prime.c @@ -279,6 +279,7 @@ static int probable_prime(BIGNUM *rnd, int bits, prime_t *mods) char is_single_word = bits <= BN_BITS2; again: + /* TODO: Not all primes are private */ if (!BN_priv_rand(rnd, bits, BN_RAND_TOP_TWO, BN_RAND_BOTTOM_ODD)) return 0; /* we now have a random number 'rnd' to test. */ @@ -363,7 +364,7 @@ int bn_probable_prime_dh(BIGNUM *rnd, int bits, if ((t1 = BN_CTX_get(ctx)) == NULL) goto err; - if (!BN_priv_rand(rnd, bits, BN_RAND_TOP_ONE, BN_RAND_BOTTOM_ODD)) + if (!BN_rand(rnd, bits, BN_RAND_TOP_ONE, BN_RAND_BOTTOM_ODD)) goto err; /* we need ((rnd-rem) % add) == 0 */ @@ -419,7 +420,7 @@ static int probable_prime_dh_safe(BIGNUM *p, int bits, const BIGNUM *padd, if (!BN_rshift1(qadd, padd)) goto err; - if (!BN_priv_rand(q, bits, BN_RAND_TOP_ONE, BN_RAND_BOTTOM_ODD)) + if (!BN_rand(q, bits, BN_RAND_TOP_ONE, BN_RAND_BOTTOM_ODD)) goto err; /* we need ((rnd-rem) % add) == 0 */ diff --git a/crypto/bn/bn_rand.c b/crypto/bn/bn_rand.c index 604b6bf..c0d1a32 100644 --- a/crypto/bn/bn_rand.c +++ b/crypto/bn/bn_rand.c @@ -239,7 +239,7 @@ int BN_generate_dsa_nonce(BIGNUM *out, const BIGNUM *range, memset(private_bytes + todo, 0, sizeof(private_bytes) - todo); for (done = 0; done < num_k_bytes;) { - if (RAND_bytes(random_bytes, sizeof(random_bytes)) != 1) + if (RAND_priv_bytes(random_bytes, sizeof(random_bytes)) != 1) goto err; SHA512_Init(&sha); SHA512_Update(&sha, &done, sizeof(done)); diff --git a/crypto/bn/bn_sqrt.c b/crypto/bn/bn_sqrt.c index 37cdaf8..be8bd12 100644 --- a/crypto/bn/bn_sqrt.c +++ b/crypto/bn/bn_sqrt.c @@ -179,7 +179,7 @@ BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) if (!BN_set_word(y, i)) goto end; } else { - if (!BN_rand(y, BN_num_bits(p), 0, 0)) + if (!BN_priv_rand(y, BN_num_bits(p), 0, 0)) goto end; if (BN_ucmp(y, p) >= 0) { if (!(p->neg ? BN_add : BN_sub) (y, y, p)) diff --git a/crypto/des/rand_key.c b/crypto/des/rand_key.c index 09d7e4c..b49ce6f 100644 --- a/crypto/des/rand_key.c +++ b/crypto/des/rand_key.c @@ -13,7 +13,7 @@ int DES_random_key(DES_cblock *ret) { do { - if (RAND_bytes((unsigned char *)ret, sizeof(DES_cblock)) != 1) + if (RAND_priv_bytes((unsigned char *)ret, sizeof(DES_cblock)) != 1) return 0; } while (DES_is_weak_key(ret)); DES_set_odd_parity(ret); diff --git a/crypto/evp/e_des.c b/crypto/evp/e_des.c index 9b2facf..3b88626 100644 --- a/crypto/evp/e_des.c +++ b/crypto/evp/e_des.c @@ -229,7 +229,7 @@ static int des_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr) switch (type) { case EVP_CTRL_RAND_KEY: - if (RAND_bytes(ptr, 8) <= 0) + if (RAND_priv_bytes(ptr, 8) <= 0) return 0; DES_set_odd_parity((DES_cblock *)ptr); return 1; diff --git a/crypto/evp/e_des3.c b/crypto/evp/e_des3.c index da77936..7a2c12d 100644 --- a/crypto/evp/e_des3.c +++ b/crypto/evp/e_des3.c @@ -283,7 +283,7 @@ static int des3_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr) switch (type) { case EVP_CTRL_RAND_KEY: - if (RAND_bytes(ptr, EVP_CIPHER_CTX_key_length(ctx)) <= 0) + if (RAND_priv_bytes(ptr, EVP_CIPHER_CTX_key_length(ctx)) <= 0) return 0; DES_set_odd_parity(deskey); if (EVP_CIPHER_CTX_key_length(ctx) >= 16) diff --git a/crypto/evp/evp_enc.c b/crypto/evp/evp_enc.c index 0297d2e..3863341 100644 --- a/crypto/evp/evp_enc.c +++ b/crypto/evp/evp_enc.c @@ -602,7 +602,7 @@ int EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key) { if (ctx->cipher->flags & EVP_CIPH_RAND_KEY) return EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_RAND_KEY, 0, key); - if (RAND_bytes(key, ctx->key_len) <= 0) + if (RAND_priv_bytes(key, ctx->key_len) <= 0) return 0; return 1; } diff --git a/crypto/rand/randfile.c b/crypto/rand/randfile.c index 99a3f14..7cac8e9 100644 --- a/crypto/rand/randfile.c +++ b/crypto/rand/randfile.c @@ -166,7 +166,7 @@ int RAND_write_file(const char *file) #endif /* Collect enough random data. */ - if (RAND_bytes(buf, (int)sizeof(buf)) != 1) + if (RAND_priv_bytes(buf, (int)sizeof(buf)) != 1) return -1; #if defined(O_CREAT) && !defined(OPENSSL_NO_POSIX_IO) && \ diff --git a/crypto/srp/srp_vfy.c b/crypto/srp/srp_vfy.c index 56ae94b..b85033b 100644 --- a/crypto/srp/srp_vfy.c +++ b/crypto/srp/srp_vfy.c @@ -422,7 +422,7 @@ SRP_user_pwd *SRP_VBASE_get1_by_user(SRP_VBASE *vb, char *username) if (!SRP_user_pwd_set_ids(user, username, NULL)) goto err; - if (RAND_bytes(digv, SHA_DIGEST_LENGTH) <= 0) + if (RAND_priv_bytes(digv, SHA_DIGEST_LENGTH) <= 0) goto err; ctxt = EVP_MD_CTX_new(); if (ctxt == NULL diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 9d4c4d4..1509423 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -3047,13 +3047,13 @@ SSL_CTX *SSL_CTX_new(const SSL_METHOD *meth) /* Setup RFC5077 ticket keys */ if ((RAND_bytes(ret->ext.tick_key_name, sizeof(ret->ext.tick_key_name)) <= 0) - || (RAND_bytes(ret->ext.secure->tick_hmac_key, + || (RAND_priv_bytes(ret->ext.secure->tick_hmac_key, sizeof(ret->ext.secure->tick_hmac_key)) <= 0) - || (RAND_bytes(ret->ext.secure->tick_aes_key, + || (RAND_priv_bytes(ret->ext.secure->tick_aes_key, sizeof(ret->ext.secure->tick_aes_key)) <= 0)) ret->options |= SSL_OP_NO_TICKET; - if (RAND_bytes(ret->ext.cookie_hmac_key, + if (RAND_priv_bytes(ret->ext.cookie_hmac_key, sizeof(ret->ext.cookie_hmac_key)) <= 0) goto err; diff --git a/ssl/statem/statem_srvr.c b/ssl/statem/statem_srvr.c index 876b6a7..60e0bc7 100644 --- a/ssl/statem/statem_srvr.c +++ b/ssl/statem/statem_srvr.c @@ -2936,7 +2936,7 @@ static int tls_process_cke_rsa(SSL *s, PACKET *pkt) * fails. See https://tools.ietf.org/html/rfc5246#section-7.4.7.1 */ - if (RAND_bytes(rand_premaster_secret, + if (RAND_priv_bytes(rand_premaster_secret, sizeof(rand_premaster_secret)) <= 0) { SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_TLS_PROCESS_CKE_RSA, ERR_R_INTERNAL_ERROR); diff --git a/ssl/tls_srp.c b/ssl/tls_srp.c index 87614cb..f94e46b 100644 --- a/ssl/tls_srp.c +++ b/ssl/tls_srp.c @@ -157,7 +157,7 @@ int SSL_srp_server_param_with_username(SSL *s, int *ad) (s->srp_ctx.s == NULL) || (s->srp_ctx.v == NULL)) return SSL3_AL_FATAL; - if (RAND_bytes(b, sizeof(b)) <= 0) + if (RAND_priv_bytes(b, sizeof(b)) <= 0) return SSL3_AL_FATAL; s->srp_ctx.b = BN_bin2bn(b, sizeof(b), NULL); OPENSSL_cleanse(b, sizeof(b)); @@ -369,7 +369,7 @@ int SRP_Calc_A_param(SSL *s) { unsigned char rnd[SSL_MAX_MASTER_KEY_LENGTH]; - if (RAND_bytes(rnd, sizeof(rnd)) <= 0) + if (RAND_priv_bytes(rnd, sizeof(rnd)) <= 0) return 0; s->srp_ctx.a = BN_bin2bn(rnd, sizeof(rnd), s->srp_ctx.a); OPENSSL_cleanse(rnd, sizeof(rnd)); From no-reply at appveyor.com Tue Apr 3 01:03:50 2018 From: no-reply at appveyor.com (AppVeyor) Date: Tue, 03 Apr 2018 01:03:50 +0000 Subject: [openssl-commits] Build failed: openssl master.16960 Message-ID: <20180403010350.1.6A3E7A2F8E67689C@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Tue Apr 3 01:50:01 2018 From: no-reply at appveyor.com (AppVeyor) Date: Tue, 03 Apr 2018 01:50:01 +0000 Subject: [openssl-commits] Build completed: openssl master.16961 Message-ID: <20180403015001.1.4BEBE18AFC73D883@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Tue Apr 3 10:48:45 2018 From: no-reply at appveyor.com (AppVeyor) Date: Tue, 03 Apr 2018 10:48:45 +0000 Subject: [openssl-commits] Build failed: openssl master.16964 Message-ID: <20180403104845.1.C069FB884C026622@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Tue Apr 3 11:22:34 2018 From: no-reply at appveyor.com (AppVeyor) Date: Tue, 03 Apr 2018 11:22:34 +0000 Subject: [openssl-commits] Build failed: openssl master.16965 Message-ID: <20180403112234.1.B036D23F310B2510@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Tue Apr 3 12:59:52 2018 From: no-reply at appveyor.com (AppVeyor) Date: Tue, 03 Apr 2018 12:59:52 +0000 Subject: [openssl-commits] Build completed: openssl master.16966 Message-ID: <20180403125952.1.436947687833092E@appveyor.com> An HTML attachment was scrubbed... URL: From matt at openssl.org Tue Apr 3 13:03:57 2018 From: matt at openssl.org (Matt Caswell) Date: Tue, 03 Apr 2018 13:03:57 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1522760637.235317.27785.nullmailer@dev.openssl.org> The branch master has been updated via c4d3c19b4c17ed5d9da790dd330409ce11e6a499 (commit) from 4cffafe96786558f66e1900ac462f9ccba921132 (commit) - Log ----------------------------------------------------------------- commit c4d3c19b4c17ed5d9da790dd330409ce11e6a499 Author: Matt Caswell Date: Tue Apr 3 13:57:12 2018 +0100 Update copyright year Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5851) ----------------------------------------------------------------------- Summary of changes: crypto/asn1/tasn_dec.c | 2 +- crypto/asn1/tasn_enc.c | 2 +- crypto/bio/bf_nbio.c | 2 +- crypto/bio/bss_conn.c | 2 +- crypto/bn/bn_blind.c | 2 +- crypto/bn/bn_prime.c | 2 +- crypto/bn/bn_recp.c | 2 +- crypto/bn/bn_sqrt.c | 2 +- crypto/buffer/buffer.c | 2 +- crypto/comp/comp_lib.c | 2 +- crypto/des/rand_key.c | 2 +- crypto/dh/dh_meth.c | 2 +- crypto/dsa/dsa_meth.c | 2 +- crypto/ec/ecdh_ossl.c | 2 +- crypto/evp/e_des.c | 2 +- crypto/evp/e_des3.c | 2 +- crypto/evp/pbe_scrypt.c | 2 +- crypto/include/internal/dso_conf.h.in | 2 +- crypto/kdf/scrypt.c | 2 +- crypto/o_fopen.c | 2 +- crypto/o_time.c | 2 +- crypto/pariscid.pl | 2 +- crypto/rand/randfile.c | 2 +- crypto/rsa/rsa_meth.c | 2 +- crypto/txt_db/txt_db.c | 2 +- crypto/x509/x509_lu.c | 2 +- doc/man1/ecparam.pod | 2 +- doc/man3/BIO_s_accept.pod | 2 +- doc/man3/BIO_s_connect.pod | 2 +- doc/man3/DH_meth_new.pod | 2 +- doc/man3/DSA_meth_new.pod | 2 +- doc/man3/EVP_PKEY_meth_new.pod | 2 +- doc/man3/EVP_SignInit.pod | 2 +- doc/man3/EVP_VerifyInit.pod | 2 +- doc/man3/RSA_meth_new.pod | 2 +- doc/man3/SSL_get_error.pod | 2 +- doc/man3/SSL_shutdown.pod | 2 +- fuzz/test-corpus.c | 2 +- test/drbg_cavs_data.c | 2 +- test/drbg_cavs_data.h | 2 +- test/drbg_cavs_test.c | 2 +- test/recipes/05-test_rand.t | 2 +- test/recipes/80-test_cipherlist.t | 2 +- test/recipes/99-test_fuzz.t | 2 +- test/test_test.c | 2 +- util/mkrc.pl | 2 +- 46 files changed, 46 insertions(+), 46 deletions(-) diff --git a/crypto/asn1/tasn_dec.c b/crypto/asn1/tasn_dec.c index 9cdee2d..c2a521e 100644 --- a/crypto/asn1/tasn_dec.c +++ b/crypto/asn1/tasn_dec.c @@ -1,5 +1,5 @@ /* - * Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/asn1/tasn_enc.c b/crypto/asn1/tasn_enc.c index 8b562ba..3b723a1 100644 --- a/crypto/asn1/tasn_enc.c +++ b/crypto/asn1/tasn_enc.c @@ -1,5 +1,5 @@ /* - * Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/bio/bf_nbio.c b/crypto/bio/bf_nbio.c index 1acb717..d7972bf 100644 --- a/crypto/bio/bf_nbio.c +++ b/crypto/bio/bf_nbio.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/bio/bss_conn.c b/crypto/bio/bss_conn.c index cc245ab..c87b431 100644 --- a/crypto/bio/bss_conn.c +++ b/crypto/bio/bss_conn.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/bn/bn_blind.c b/crypto/bn/bn_blind.c index 1ee902c..420c1ee 100644 --- a/crypto/bn/bn_blind.c +++ b/crypto/bn/bn_blind.c @@ -1,5 +1,5 @@ /* - * Copyright 1998-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1998-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/bn/bn_prime.c b/crypto/bn/bn_prime.c index 4e79086..03ccde9 100644 --- a/crypto/bn/bn_prime.c +++ b/crypto/bn/bn_prime.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/bn/bn_recp.c b/crypto/bn/bn_recp.c index 8eb500b..130debd 100644 --- a/crypto/bn/bn_recp.c +++ b/crypto/bn/bn_recp.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/bn/bn_sqrt.c b/crypto/bn/bn_sqrt.c index be8bd12..b97d8ca 100644 --- a/crypto/bn/bn_sqrt.c +++ b/crypto/bn/bn_sqrt.c @@ -1,5 +1,5 @@ /* - * Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/buffer/buffer.c b/crypto/buffer/buffer.c index 48618a4..72258ab 100644 --- a/crypto/buffer/buffer.c +++ b/crypto/buffer/buffer.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/comp/comp_lib.c b/crypto/comp/comp_lib.c index c199bb3..e509f59 100644 --- a/crypto/comp/comp_lib.c +++ b/crypto/comp/comp_lib.c @@ -1,5 +1,5 @@ /* - * Copyright 1998-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1998-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/des/rand_key.c b/crypto/des/rand_key.c index b49ce6f..fe8aefe 100644 --- a/crypto/des/rand_key.c +++ b/crypto/des/rand_key.c @@ -1,5 +1,5 @@ /* - * Copyright 1998-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1998-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/dh/dh_meth.c b/crypto/dh/dh_meth.c index c5e16c4..59c4d7e 100644 --- a/crypto/dh/dh_meth.c +++ b/crypto/dh/dh_meth.c @@ -1,5 +1,5 @@ /* - * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/dsa/dsa_meth.c b/crypto/dsa/dsa_meth.c index fccad77..ff4fae4 100644 --- a/crypto/dsa/dsa_meth.c +++ b/crypto/dsa/dsa_meth.c @@ -1,5 +1,5 @@ /* - * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/ec/ecdh_ossl.c b/crypto/ec/ecdh_ossl.c index 7167af0..1c5db22 100644 --- a/crypto/ec/ecdh_ossl.c +++ b/crypto/ec/ecdh_ossl.c @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2002-2018 The OpenSSL Project Authors. All Rights Reserved. * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved * * Licensed under the OpenSSL license (the "License"). You may not use diff --git a/crypto/evp/e_des.c b/crypto/evp/e_des.c index 3b88626..c13fb3e 100644 --- a/crypto/evp/e_des.c +++ b/crypto/evp/e_des.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/evp/e_des3.c b/crypto/evp/e_des3.c index 7a2c12d..6b492ce 100644 --- a/crypto/evp/e_des3.c +++ b/crypto/evp/e_des3.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/evp/pbe_scrypt.c b/crypto/evp/pbe_scrypt.c index 02f5895..57da82f 100644 --- a/crypto/evp/pbe_scrypt.c +++ b/crypto/evp/pbe_scrypt.c @@ -1,5 +1,5 @@ /* - * Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/include/internal/dso_conf.h.in b/crypto/include/internal/dso_conf.h.in index ded87ca..d6e9d1b 100644 --- a/crypto/include/internal/dso_conf.h.in +++ b/crypto/include/internal/dso_conf.h.in @@ -1,6 +1,6 @@ {- join("\n",map { "/* $_ */" } @autowarntext) -} /* - * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/kdf/scrypt.c b/crypto/kdf/scrypt.c index 0a5e3c5..61fd390 100644 --- a/crypto/kdf/scrypt.c +++ b/crypto/kdf/scrypt.c @@ -1,5 +1,5 @@ /* - * Copyright 2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/o_fopen.c b/crypto/o_fopen.c index 1b4028c..9066279 100644 --- a/crypto/o_fopen.c +++ b/crypto/o_fopen.c @@ -1,5 +1,5 @@ /* - * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/o_time.c b/crypto/o_time.c index 30b8155..6d764f5 100644 --- a/crypto/o_time.c +++ b/crypto/o_time.c @@ -1,5 +1,5 @@ /* - * Copyright 2001-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2001-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/pariscid.pl b/crypto/pariscid.pl index 3e26f8e..3d4a5f8 100644 --- a/crypto/pariscid.pl +++ b/crypto/pariscid.pl @@ -1,5 +1,5 @@ #! /usr/bin/env perl -# Copyright 2009-2016 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 2009-2018 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy diff --git a/crypto/rand/randfile.c b/crypto/rand/randfile.c index 7cac8e9..3a62b88 100644 --- a/crypto/rand/randfile.c +++ b/crypto/rand/randfile.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/rsa/rsa_meth.c b/crypto/rsa/rsa_meth.c index 2a30389..f5880a7 100644 --- a/crypto/rsa/rsa_meth.c +++ b/crypto/rsa/rsa_meth.c @@ -1,5 +1,5 @@ /* - * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/txt_db/txt_db.c b/crypto/txt_db/txt_db.c index a00560d..c4e1782 100644 --- a/crypto/txt_db/txt_db.c +++ b/crypto/txt_db/txt_db.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/x509/x509_lu.c b/crypto/x509/x509_lu.c index 7b33eba..a7da7d2 100644 --- a/crypto/x509/x509_lu.c +++ b/crypto/x509/x509_lu.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/doc/man1/ecparam.pod b/doc/man1/ecparam.pod index 6788c9f..0633f8c 100644 --- a/doc/man1/ecparam.pod +++ b/doc/man1/ecparam.pod @@ -182,7 +182,7 @@ L, L =head1 COPYRIGHT -Copyright 2003-2017 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2003-2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/doc/man3/BIO_s_accept.pod b/doc/man3/BIO_s_accept.pod index 695b7e6..45b864e 100644 --- a/doc/man3/BIO_s_accept.pod +++ b/doc/man3/BIO_s_accept.pod @@ -224,7 +224,7 @@ down each and finally closes both down. =head1 COPYRIGHT -Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/doc/man3/BIO_s_connect.pod b/doc/man3/BIO_s_connect.pod index e67f622..d5cc553 100644 --- a/doc/man3/BIO_s_connect.pod +++ b/doc/man3/BIO_s_connect.pod @@ -203,7 +203,7 @@ Use BIO_set_conn_address() and BIO_get_conn_address() instead. =head1 COPYRIGHT -Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/doc/man3/DH_meth_new.pod b/doc/man3/DH_meth_new.pod index 90aa145..63aa651 100644 --- a/doc/man3/DH_meth_new.pod +++ b/doc/man3/DH_meth_new.pod @@ -157,7 +157,7 @@ The functions described here were added in OpenSSL 1.1.0. =head1 COPYRIGHT -Copyright 2016-2017 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/doc/man3/DSA_meth_new.pod b/doc/man3/DSA_meth_new.pod index 4e2aed8..faf86ef 100644 --- a/doc/man3/DSA_meth_new.pod +++ b/doc/man3/DSA_meth_new.pod @@ -205,7 +205,7 @@ The functions described here were added in OpenSSL 1.1.0. =head1 COPYRIGHT -Copyright 2016-2017 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/doc/man3/EVP_PKEY_meth_new.pod b/doc/man3/EVP_PKEY_meth_new.pod index 9db169f..ddc99d2 100644 --- a/doc/man3/EVP_PKEY_meth_new.pod +++ b/doc/man3/EVP_PKEY_meth_new.pod @@ -397,7 +397,7 @@ arguments. =head1 COPYRIGHT -Copyright 2017 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/doc/man3/EVP_SignInit.pod b/doc/man3/EVP_SignInit.pod index c171b4c..d3fe79c 100644 --- a/doc/man3/EVP_SignInit.pod +++ b/doc/man3/EVP_SignInit.pod @@ -102,7 +102,7 @@ L, L =head1 COPYRIGHT -Copyright 2000-2017 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/doc/man3/EVP_VerifyInit.pod b/doc/man3/EVP_VerifyInit.pod index f0d734c..faabc71 100644 --- a/doc/man3/EVP_VerifyInit.pod +++ b/doc/man3/EVP_VerifyInit.pod @@ -85,7 +85,7 @@ L, L =head1 COPYRIGHT -Copyright 2000-2017 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/doc/man3/RSA_meth_new.pod b/doc/man3/RSA_meth_new.pod index 839baac..69ba9df 100644 --- a/doc/man3/RSA_meth_new.pod +++ b/doc/man3/RSA_meth_new.pod @@ -252,7 +252,7 @@ Other functions described here were added in OpenSSL 1.1.0. =head1 COPYRIGHT -Copyright 2016-2017 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/doc/man3/SSL_get_error.pod b/doc/man3/SSL_get_error.pod index 688f772..f1050b0 100644 --- a/doc/man3/SSL_get_error.pod +++ b/doc/man3/SSL_get_error.pod @@ -140,7 +140,7 @@ SSL_ERROR_WANT_CLIENT_HELLO_CB was added in OpenSSL 1.1.1. =head1 COPYRIGHT -Copyright 2000-2017 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/doc/man3/SSL_shutdown.pod b/doc/man3/SSL_shutdown.pod index 5d467c8..453853d 100644 --- a/doc/man3/SSL_shutdown.pod +++ b/doc/man3/SSL_shutdown.pod @@ -141,7 +141,7 @@ L, L =head1 COPYRIGHT -Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/fuzz/test-corpus.c b/fuzz/test-corpus.c index 95ffcf2..86be533 100644 --- a/fuzz/test-corpus.c +++ b/fuzz/test-corpus.c @@ -1,5 +1,5 @@ /* - * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL licenses, (the "License"); * you may not use this file except in compliance with the License. diff --git a/test/drbg_cavs_data.c b/test/drbg_cavs_data.c index 07f36b8..6f676ab 100644 --- a/test/drbg_cavs_data.c +++ b/test/drbg_cavs_data.c @@ -1,5 +1,5 @@ /* - * Copyright 2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/test/drbg_cavs_data.h b/test/drbg_cavs_data.h index 3ad97ab..d673375 100644 --- a/test/drbg_cavs_data.h +++ b/test/drbg_cavs_data.h @@ -1,5 +1,5 @@ /* - * Copyright 2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/test/drbg_cavs_test.c b/test/drbg_cavs_test.c index 782ab51..413f5bf 100644 --- a/test/drbg_cavs_test.c +++ b/test/drbg_cavs_test.c @@ -1,5 +1,5 @@ /* - * Copyright 2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/test/recipes/05-test_rand.t b/test/recipes/05-test_rand.t index 2e083e4..3ae2540 100644 --- a/test/recipes/05-test_rand.t +++ b/test/recipes/05-test_rand.t @@ -1,5 +1,5 @@ #! /usr/bin/env perl -# Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy diff --git a/test/recipes/80-test_cipherlist.t b/test/recipes/80-test_cipherlist.t index 6e869c8..5c1b1d4 100644 --- a/test/recipes/80-test_cipherlist.t +++ b/test/recipes/80-test_cipherlist.t @@ -1,6 +1,6 @@ #! /usr/bin/perl # -# Copyright 2016-2016 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy diff --git a/test/recipes/99-test_fuzz.t b/test/recipes/99-test_fuzz.t index 2c45fec..99970e3 100644 --- a/test/recipes/99-test_fuzz.t +++ b/test/recipes/99-test_fuzz.t @@ -1,5 +1,5 @@ #!/usr/bin/env perl -# Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy diff --git a/test/test_test.c b/test/test_test.c index 76b61f8..18b61c6 100644 --- a/test/test_test.c +++ b/test/test_test.c @@ -1,5 +1,5 @@ /* - * Copyright 2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved. * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. * * Licensed under the OpenSSL license (the "License"). You may not use diff --git a/util/mkrc.pl b/util/mkrc.pl index 08b0af1..a221d51 100755 --- a/util/mkrc.pl +++ b/util/mkrc.pl @@ -1,5 +1,5 @@ #! /usr/bin/env perl -# Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 2006-2018 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy From matt at openssl.org Tue Apr 3 13:11:22 2018 From: matt at openssl.org (Matt Caswell) Date: Tue, 03 Apr 2018 13:11:22 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1522761082.724959.4879.nullmailer@dev.openssl.org> The branch master has been updated via ba50543550c363e18bd6a7a1f3a757c50b0480a0 (commit) from c4d3c19b4c17ed5d9da790dd330409ce11e6a499 (commit) - Log ----------------------------------------------------------------- commit ba50543550c363e18bd6a7a1f3a757c50b0480a0 Author: Matt Caswell Date: Tue Apr 3 14:07:02 2018 +0100 Fix CHANGES Fix the last release version number in CHANGES Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5852) ----------------------------------------------------------------------- Summary of changes: CHANGES | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 4eaed6f..0c1e898 100644 --- a/CHANGES +++ b/CHANGES @@ -7,7 +7,7 @@ https://github.com/openssl/openssl/commits/ and pick the appropriate release branch. - Changes between 1.1.0g and 1.1.1 [xx XXX xxxx] + Changes between 1.1.0h and 1.1.1 [xx XXX xxxx] *) Added new public header file and documentation for the RAND_DRBG API. See manual page RAND_DRBG(7) for an overview. From levitte at openssl.org Tue Apr 3 13:21:52 2018 From: levitte at openssl.org (Richard Levitte) Date: Tue, 03 Apr 2018 13:21:52 +0000 Subject: [openssl-commits] [tools] master update Message-ID: <1522761712.450208.18897.nullmailer@dev.openssl.org> The branch master has been updated via 6c9eac0cab97aa1e4d98721ef3e68452f1839c5e (commit) from fbf4b00f0993c7922ceb639f281a501169464f75 (commit) - Log ----------------------------------------------------------------- commit 6c9eac0cab97aa1e4d98721ef3e68452f1839c5e Author: Richard Levitte Date: Tue Apr 3 15:21:41 2018 +0200 release-tools/release-check.pl: handle versions like "1.1.1-pre4-dev" too ----------------------------------------------------------------------- Summary of changes: release-tools/release-check.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release-tools/release-check.pl b/release-tools/release-check.pl index 2eac1e3..fe16e42 100644 --- a/release-tools/release-check.pl +++ b/release-tools/release-check.pl @@ -112,7 +112,7 @@ sub openssl_check_version_h { check_str( "opensslv.h: HEX version", $hexversion, $1, \$ok ); $hex_done = 1; } elsif (/OPENSSL_VERSION_TEXT\s+\"OpenSSL\s - ([^-\s]+(?!-fips)(?:-[^-\s]*)?) # version without -fips + ([^-\s]+(?!-fips)(?:-[^-\s]*)*) # version without -fips \s+ (\([[:alpha:]]+\)\s+)? # Possible lable (.*)\" # The rest (date) From matt at openssl.org Tue Apr 3 13:34:15 2018 From: matt at openssl.org (Matt Caswell) Date: Tue, 03 Apr 2018 13:34:15 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1522762455.897486.2183.nullmailer@dev.openssl.org> The branch master has been updated via f4b076e6e683d36ebeb496f15c06020e0b9bdccd (commit) via facdcba99b4f7c1bcd209c9ecec9a9c595c064f5 (commit) from ba50543550c363e18bd6a7a1f3a757c50b0480a0 (commit) - Log ----------------------------------------------------------------- commit f4b076e6e683d36ebeb496f15c06020e0b9bdccd Author: Matt Caswell Date: Tue Apr 3 14:26:16 2018 +0100 Prepare for 1.1.1-pre5-dev Reviewed-by: Richard Levitte commit facdcba99b4f7c1bcd209c9ecec9a9c595c064f5 Author: Matt Caswell Date: Tue Apr 3 14:24:18 2018 +0100 Prepare for 1.1.1-pre4 release Reviewed-by: Richard Levitte ----------------------------------------------------------------------- Summary of changes: README | 2 +- include/openssl/opensslv.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README b/README index b24d318..694411d 100644 --- a/README +++ b/README @@ -1,5 +1,5 @@ - OpenSSL 1.1.1-pre4-dev + OpenSSL 1.1.1-pre5-dev Copyright (c) 1998-2018 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson diff --git a/include/openssl/opensslv.h b/include/openssl/opensslv.h index c3bd6af..06c8b7c 100644 --- a/include/openssl/opensslv.h +++ b/include/openssl/opensslv.h @@ -39,8 +39,8 @@ extern "C" { * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for * major minor fix final patch/beta) */ -# define OPENSSL_VERSION_NUMBER 0x10101004L -# define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1-pre4-dev xx XXX xxxx" +# define OPENSSL_VERSION_NUMBER 0x10101005L +# define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1-pre5-dev xx XXX xxxx" #define OPENSSL_MAKE_VERSION(maj,min,fix,patch) ((0x10000000L)+((maj&0xff)<<20)+((min&0xff)<<12)+((fix&0xff)<<4)+patch) From matt at openssl.org Tue Apr 3 13:34:33 2018 From: matt at openssl.org (Matt Caswell) Date: Tue, 03 Apr 2018 13:34:33 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_1-pre4 create Message-ID: <1522762473.559839.3264.nullmailer@dev.openssl.org> The annotated tag OpenSSL_1_1_1-pre4 has been created at 79350c3b776dea39907b4b9d1f6f0d4c3df8fcfe (tag) tagging facdcba99b4f7c1bcd209c9ecec9a9c595c064f5 (commit) replaces OpenSSL_1_1_1-pre3 tagged by Matt Caswell on Tue Apr 3 14:24:18 2018 +0100 - Log ----------------------------------------------------------------- OpenSSL 1.1.1-pre4 release tag -----BEGIN PGP SIGNATURE----- iQEuBAABCAAYBQJaw4CCERxtYXR0QG9wZW5zc2wub3JnAAoJENnE0m0OYESRXPsH /2pUko4j1FpsvRiJteRVUh1ijLhGox0nGHMUjv59ZVLUhasucfXqRlPZMR414q8T 9aeapnmr0bipmpht7InrLZpr0wSYUwqN8xVJ60o++idYnNo6lmeTO30T3M7UEYw5 UFwCpfS95/Y19Lu6OachMQwuCVHzWo++xHpaje7x+BufpOsZKvNLl+Bd+znuVw6L uijvZIEBSNKePH13ea1iv1vv8+GR49LkxPhWk+pn/GxBJuyrArEy7Sygnt0k3RfV 8WFbTdnkB+loWVAoIRBATjS2gvFTU4IF6ichCfcR1upsKVom1+foKVJmmknp3wbO zIyFwrtpSTiYnJ7ov/VHZLM= =KXvc -----END PGP SIGNATURE----- Alexandre Perrin (1): Documentation typo fix in EVP_EncryptInit.pod Andy Polyakov (17): o_fopen.c,rand/randfile.c: compensate for e_os.h omission. o_fopen.c: compensate for e_os.h omission. bio/bss_log.c: on DJGPP syslog facility is part of sockets library. curve448/field.h: relax alignment, as it doesn't work universally. man3/OPENSSL_ia32cap.pod: update assembler version requirements. Remove presumably temporary left-over file. openssl/rand.h: fix formatting. include/openssl/rand.h: omit intermediate typedef. Configurations/10-main.conf: correct AIX targets. Configurations/windows-makefile.tmpl: refine clean targets. Configurations/README: mention Libs.private in ex_libs description. pariscid.pl: fix nasty typo in CRYPTO_memcmp. test/test_test.c: add CRYPTO_memcmp regression test. Configure: make LIST command work with dynamic 15-android.conf. rand/randfile.c: permit non-regular files in RAND_load_file. Configure: harmonize syntax. Configurations/10-main.conf: fix VC-noCE-common template. Benjamin Kaduk (2): Do not cache sessions with zero sid_ctx_length when SSL_VERIFY_PEER Document RAND_DRBG fork-safety locking model Bernd Edlinger (8): Cleanup the s_time command. Handle partial messages in TLSProxy Fix ecparam -genkey with point compression or DER outform Fix dsaparam -genkey with DER outform Previously this x509 command line was working, restore that Fix a possible crash in BN_from_montgomery_word Fix a gcc-8 warning -Wcast-function-type Remove -Wmisleading-indentation from gcc devteam warning options because this one is enabled by default anyways Daniel Bevenius (2): Fix minor typo in comment in Configure Remove import/use of File::Spec::Function David Benjamin (1): Document EC_POINT_get_affine_coordinates_*. Dr. Matthias St. Pierre (1): Add documentation for the RAND_DRBG API Eric Covener (1): aix compat fixes for ocsp.c FdaSilvaYY (2): Unify s_client/s_server srtp profiles option handling EVP,KDF: Add more error code along some return 0 in ... methods : - EVP_PBE_scrypt - EVP_PKEY_meth_add0 - EVP_PKEY_meth_new - EVP_PKEY_CTX_dup Illya Gerasymchuk (1): fix typo in x509 documentation Jack Bates (1): Convert _meth_get_ functions to const getters Johannes Bauer (1): Make pkeyutl a bit more user-friendly Konstantin Shemyak (1): doc/man1/x509.pod: corrected "S/MIME signing" requirements Kurt Roeckx (4): DRBG: Use the EVP layer to do AES encryption Update documentation on how to close a connection Make sure we use a nonce when a nonce is required Use the private RNG for data that is not public Matt Caswell (22): Prepare for 1.1.1-pre4-dev Fix the OCSP responder mode Reduce the verbosity of test_store Check for alerts while waiting for a dry event Don't wait for dry at the end of a handshake The default conv_form is uncompressed Limit ASN.1 constructed types recursive definition depth Add fuzz corpora file that found the ASN.1 stack depth issue Update CHANGES and NEWS for the new release Don't write out a bad OID Assert that alpn_selected is NULL before we assign it Remove some code for a contributor that we cannot find Temporarily disable some tests that hang Revert "Temporarily disable some tests that hang" Tolerate a Certificate using a non-supported group on server side Remove some code Update trace code to know about GOST ciphersuites GOST MAC algorithms don't support EVP_PKEY_new_raw_private_key() Revert commit 4a56d9a2 Update copyright year Fix CHANGES Prepare for 1.1.1-pre4 release Matthias Kraft (1): Add dladdr() for AIX Miroslav Suk (1): o_time.c: use gmtime_s with MSVC ts/ts_rsp_sign.c: change to OPENSSL_gmtime. Patrick Steuer (6): aes ctr_drbg: add cavs tests s390x assembly pack: add KM code path for aes-ecb s390x assembly pack: add KMO code path for aes-ofb s390x assembly pack: add KMF code path for aes-cfb/cfb8 crypto/evp/e_aes.c: add size_t casts to increase readability crypto/e_aes.c: use S390X_AES_FC macro Pauli (2): Remove mention of link between message digests and public key algorithms. Don't call strsignal, just print the signal number. The strsignal call is not supported by some machines, so avoid its use. Peter Wu (1): Fix stack-use-after-scope Philippe Antoine (3): Fixes integer underflow with SSL_trace support Adds multiple checks to avoid buffer over reads statem/statem_clnt.c: omit redundant check in tls_construct_client_hello. Rich Salz (5): Fix resource files Remove QNX support Allow NULL for some _free routines. Rewrite the X509->alert mapping code Remove some code Richard Levitte (11): Configurations/unix-Makefile.tmpl: fix inconsistencies with resource files Move the handling of dso_scheme to dso_conf.h Include "internal/dso_conf.h" where needed and appropriate test/shlibloadtest.c: fix various errors test/shlibloadtest.c: make some variables block local Revert "util/dofile.pl: only quote stuff that actually needs quoting" Faster fuzz test: teach the fuzz test programs to handle directories .travis.yml: with fast fuzz testing, there is no point avoiding it Fix setbuf use for VMS C Refuse to run test_cipherlist unless shared library matches build Windows builds: remove over-quotation of LIBZ macro Vitezslav Cizek (3): Update the BIO_s_connect documentation after the BIO refactoring. Document BIO_{get,set}_conn_ip_family macros. BIO_s_accept.pod: add documentation for the new macros ----------------------------------------------------------------------- From matt at openssl.org Tue Apr 3 13:34:58 2018 From: matt at openssl.org (Matt Caswell) Date: Tue, 03 Apr 2018 13:34:58 +0000 Subject: [openssl-commits] [web] master update Message-ID: <1522762498.124129.4590.nullmailer@dev.openssl.org> The branch master has been updated via 1a509e9e5395e713e42d4e5f334aec68cf43d146 (commit) from a345bc8dd66b5dac2ddc915fe57ba2fafeb3b62a (commit) - Log ----------------------------------------------------------------- commit 1a509e9e5395e713e42d4e5f334aec68cf43d146 Author: Matt Caswell Date: Tue Apr 3 14:30:42 2018 +0100 Update newsflash for new release ----------------------------------------------------------------------- Summary of changes: news/newsflash.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/news/newsflash.txt b/news/newsflash.txt index c48a7e4..fe25c29 100644 --- a/news/newsflash.txt +++ b/news/newsflash.txt @@ -4,6 +4,7 @@ # Format is two fields, colon-separated; the first line is the column # headings. URL paths must all be absolute. Date: Item +03-Apr-2018: Beta 2 of OpenSSL 1.1.1 is now available: please download and test it 27-Mar-2018: Security Advisory: several security fixes 27-Mar-2018: OpenSSL 1.1.0h is now available, including bug and security fixes 27-Mar-2018: OpenSSL 1.0.2o is now available, including bug and security fixes From levitte at openssl.org Tue Apr 3 13:43:16 2018 From: levitte at openssl.org (Richard Levitte) Date: Tue, 03 Apr 2018 13:43:16 +0000 Subject: [openssl-commits] [web] master update Message-ID: <1522762996.960385.14522.nullmailer@dev.openssl.org> The branch master has been updated via f0dd77fca46f3d630d5a47d3bb93e8d50c66f7df (commit) via 4fc0fbf43218d56c669b1b426687e8797c3dfaa1 (commit) from 1a509e9e5395e713e42d4e5f334aec68cf43d146 (commit) - Log ----------------------------------------------------------------- commit f0dd77fca46f3d630d5a47d3bb93e8d50c66f7df Author: Richard Levitte Date: Tue Apr 3 15:42:54 2018 +0200 bin/mk-latest: Allow for 1.1.1 URLs commit 4fc0fbf43218d56c669b1b426687e8797c3dfaa1 Author: Richard Levitte Date: Tue Apr 3 15:42:14 2018 +0200 source/.htaccess: I forgot it's autogenerated ----------------------------------------------------------------------- Summary of changes: bin/mk-latest | 4 +++- source/.htaccess | 3 --- 2 files changed, 3 insertions(+), 4 deletions(-) delete mode 100644 source/.htaccess diff --git a/bin/mk-latest b/bin/mk-latest index 122d950..2307837 100755 --- a/bin/mk-latest +++ b/bin/mk-latest @@ -41,7 +41,7 @@ print <<\EOF; # Old distro's are in subdirs. RewriteCond %{REQUEST_FILENAME} !-f -RewriteRule ^(openssl-0\.9\.8.*) old/0.9.x/$1 [L] +RewriteRule ^(openssl-0\.9\.\d.*) old/0.9.x/$1 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^openssl-(1\.0\.0.*) old/1.0.0/openssl-$1 [L] RewriteCond %{REQUEST_FILENAME} !-f @@ -51,6 +51,8 @@ RewriteRule ^openssl-(1\.0\.2.*) old/1.0.2/openssl-$1 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^openssl-(1\.1\.0.*) old/1.1.0/openssl-$1 [L] RewriteCond %{REQUEST_FILENAME} !-f +RewriteRule ^openssl-(1\.1\.1.*) old/1.1.1/openssl-$1 [L] +RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^openssl-(fips.*) old/fips/openssl-$1 [L] diff --git a/source/.htaccess b/source/.htaccess deleted file mode 100644 index 1bbeac9..0000000 --- a/source/.htaccess +++ /dev/null @@ -1,3 +0,0 @@ -RewriteEngine on -RewriteCond %{REQUEST_FILENAME} !-f -RewriteRule ^(openssl-(\d+\.\d+\.\d+).*\.tar\.gz) /source/old/$2/$1 [L,R=301,NC] From bernd.edlinger at hotmail.de Tue Apr 3 14:03:42 2018 From: bernd.edlinger at hotmail.de (bernd.edlinger at hotmail.de) Date: Tue, 03 Apr 2018 14:03:42 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1522764222.516573.11268.nullmailer@dev.openssl.org> The branch master has been updated via 1518c55a796b058eff01f3cbf177f4b726c01d7c (commit) via 21db0e1afdcf17a189ebe49af3506551b108a2f2 (commit) via 16e1eea6a67c85c9d786f3c4448182b1aca101b8 (commit) via 18ada952d1dcea8dfc5008df9f317b3eb47c13fa (commit) via b998745a4596c05f673ed8acdcaedcb4c5e208ad (commit) via 752837e0664e990b5edf6f0b69e1b4612efadce0 (commit) via 4f090f76a412a0f69f85621468bd445ea6a65af6 (commit) from f4b076e6e683d36ebeb496f15c06020e0b9bdccd (commit) - Log ----------------------------------------------------------------- commit 1518c55a796b058eff01f3cbf177f4b726c01d7c Author: Bernd Edlinger Date: Mon Apr 2 10:54:52 2018 +0200 Change the "offset too large" message to more generic wording Reviewed-by: Rich Salz Reviewed-by: Matthias St. Pierre (Merged from https://github.com/openssl/openssl/pull/5826) commit 21db0e1afdcf17a189ebe49af3506551b108a2f2 Author: Bernd Edlinger Date: Mon Apr 2 10:35:29 2018 +0200 Remove an unnecessary cast in the param to BUF_MEM_grow Reviewed-by: Rich Salz Reviewed-by: Matthias St. Pierre (Merged from https://github.com/openssl/openssl/pull/5826) commit 16e1eea6a67c85c9d786f3c4448182b1aca101b8 Author: Bernd Edlinger Date: Mon Apr 2 09:13:49 2018 +0200 Fix range checks with -offset and -length in asn1parse Reviewed-by: Rich Salz Reviewed-by: Matthias St. Pierre (Merged from https://github.com/openssl/openssl/pull/5826) commit 18ada952d1dcea8dfc5008df9f317b3eb47c13fa Author: Bernd Edlinger Date: Sun Apr 1 11:02:39 2018 +0200 Use strtol instead of atoi in asn1parse Reviewed-by: Rich Salz Reviewed-by: Matthias St. Pierre (Merged from https://github.com/openssl/openssl/pull/5826) commit b998745a4596c05f673ed8acdcaedcb4c5e208ad Author: Bernd Edlinger Date: Sun Apr 1 00:46:49 2018 +0200 Improve diagnostics for invalid arguments in asn1parse -strparse Reviewed-by: Rich Salz Reviewed-by: Matthias St. Pierre (Merged from https://github.com/openssl/openssl/pull/5826) commit 752837e0664e990b5edf6f0b69e1b4612efadce0 Author: Bernd Edlinger Date: Sat Mar 31 21:09:32 2018 +0200 Fix a crash in the asn1parse command Thanks to Sem Voigtl?nder for reporting this issue. Reviewed-by: Rich Salz Reviewed-by: Matthias St. Pierre (Merged from https://github.com/openssl/openssl/pull/5826) commit 4f090f76a412a0f69f85621468bd445ea6a65af6 Author: Bernd Edlinger Date: Mon Apr 2 17:20:04 2018 +0200 Use gnu_printf format attribute to minimise MinGW warnings Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5839) ----------------------------------------------------------------------- Summary of changes: apps/asn1pars.c | 20 ++++++++++---------- include/openssl/bio.h | 22 ++++++++++++++-------- 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/apps/asn1pars.c b/apps/asn1pars.c index a391e0a..62c70b9 100644 --- a/apps/asn1pars.c +++ b/apps/asn1pars.c @@ -39,7 +39,7 @@ const OPTIONS asn1parse_options[] = { {"dump", OPT_DUMP, 0, "unknown data in hex form"}, {"dlimit", OPT_DLIMIT, 'p', "dump the first arg bytes of unknown data in hex form"}, - {"strparse", OPT_STRPARSE, 's', + {"strparse", OPT_STRPARSE, 'p', "offset; a series of these can be used to 'dig'"}, {OPT_MORE_STR, 0, 0, "into multiple ASN1 blob wrappings"}, {"genstr", OPT_GENSTR, 's', "string to generate ASN1 structure from"}, @@ -113,13 +113,13 @@ int asn1parse_main(int argc, char **argv) offset = strtol(opt_arg(), NULL, 0); break; case OPT_LENGTH: - length = atoi(opt_arg()); + length = strtol(opt_arg(), NULL, 0); break; case OPT_DUMP: dump = -1; break; case OPT_DLIMIT: - dump = atoi(opt_arg()); + dump = strtol(opt_arg(), NULL, 0); break; case OPT_STRPARSE: sk_OPENSSL_STRING_push(osk, opt_arg()); @@ -205,7 +205,7 @@ int asn1parse_main(int argc, char **argv) num = 0; for (;;) { - if (!BUF_MEM_grow(buf, (int)num + BUFSIZ)) + if (!BUF_MEM_grow(buf, num + BUFSIZ)) goto end; i = BIO_read(in, &(buf->data[num]), BUFSIZ); if (i <= 0) @@ -225,9 +225,9 @@ int asn1parse_main(int argc, char **argv) for (i = 0; i < sk_OPENSSL_STRING_num(osk); i++) { ASN1_TYPE *atmp; int typ; - j = atoi(sk_OPENSSL_STRING_value(osk, i)); - if (j == 0) { - BIO_printf(bio_err, "'%s' is an invalid number\n", + j = strtol(sk_OPENSSL_STRING_value(osk, i), NULL, 0); + if (j <= 0 || j >= tmplen) { + BIO_printf(bio_err, "'%s' is out of range\n", sk_OPENSSL_STRING_value(osk, i)); continue; } @@ -258,14 +258,14 @@ int asn1parse_main(int argc, char **argv) num = tmplen; } - if (offset >= num) { - BIO_printf(bio_err, "Error: offset too large\n"); + if (offset < 0 || offset >= num) { + BIO_printf(bio_err, "Error: offset out of range\n"); goto end; } num -= offset; - if ((length == 0) || ((long)length > num)) + if (length == 0 || length > (unsigned int)num) length = (unsigned int)num; if (derout != NULL) { if (BIO_write(derout, str + offset, length) != (int)length) { diff --git a/include/openssl/bio.h b/include/openssl/bio.h index 364ff16..2888b42 100644 --- a/include/openssl/bio.h +++ b/include/openssl/bio.h @@ -735,7 +735,7 @@ void BIO_copy_next_retry(BIO *b); * long BIO_ghbn_ctrl(int cmd,int iarg,char *parg); */ -# define __bio_h__attr__(x) +# define ossl_bio__attr__(x) # if defined(__GNUC__) && defined(__STDC_VERSION__) \ && !defined(__APPLE__) /* @@ -743,19 +743,25 @@ void BIO_copy_next_retry(BIO *b); * we can't use __attribute__ with pre C99 dialects. */ # if __STDC_VERSION__ >= 199901L -# undef __bio_h__attr__ -# define __bio_h__attr__ __attribute__ +# undef ossl_bio__attr__ +# define ossl_bio__attr__ __attribute__ +# if __GNUC__*10 + __GNUC_MINOR__ >= 44 +# define ossl_bio__printf__ __gnu_printf__ +# else +# define ossl_bio__printf__ __printf__ +# endif # endif # endif int BIO_printf(BIO *bio, const char *format, ...) -__bio_h__attr__((__format__(__printf__, 2, 3))); +ossl_bio__attr__((__format__(ossl_bio__printf__, 2, 3))); int BIO_vprintf(BIO *bio, const char *format, va_list args) -__bio_h__attr__((__format__(__printf__, 2, 0))); +ossl_bio__attr__((__format__(ossl_bio__printf__, 2, 0))); int BIO_snprintf(char *buf, size_t n, const char *format, ...) -__bio_h__attr__((__format__(__printf__, 3, 4))); +ossl_bio__attr__((__format__(ossl_bio__printf__, 3, 4))); int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args) -__bio_h__attr__((__format__(__printf__, 3, 0))); -# undef __bio_h__attr__ +ossl_bio__attr__((__format__(ossl_bio__printf__, 3, 0))); +# undef ossl_bio__attr__ +# undef ossl_bio__printf__ BIO_METHOD *BIO_meth_new(int type, const char *name); From bernd.edlinger at hotmail.de Tue Apr 3 14:05:36 2018 From: bernd.edlinger at hotmail.de (bernd.edlinger at hotmail.de) Date: Tue, 03 Apr 2018 14:05:36 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1522764336.375566.14392.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via ac62a25e2ef8569542a69ac4fb04c59d899581bc (commit) from 45ae18b38401a027f231f1408e71b13ff3111021 (commit) - Log ----------------------------------------------------------------- commit ac62a25e2ef8569542a69ac4fb04c59d899581bc Author: Bernd Edlinger Date: Sat Mar 31 21:09:32 2018 +0200 Fix a crash in the asn1parse command Thanks to Sem Voigtl?nder for reporting this issue. Reviewed-by: Rich Salz Reviewed-by: Matthias St. Pierre (Merged from https://github.com/openssl/openssl/pull/5826) (cherry picked from commit 752837e0664e990b5edf6f0b69e1b4612efadce0) ----------------------------------------------------------------------- Summary of changes: apps/asn1pars.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/asn1pars.c b/apps/asn1pars.c index 1ac261c..39b9f8b 100644 --- a/apps/asn1pars.c +++ b/apps/asn1pars.c @@ -212,7 +212,7 @@ int asn1parse_main(int argc, char **argv) ASN1_TYPE *atmp; int typ; j = atoi(sk_OPENSSL_STRING_value(osk, i)); - if (j == 0) { + if (j <= 0 || j >= tmplen) { BIO_printf(bio_err, "'%s' is an invalid number\n", sk_OPENSSL_STRING_value(osk, i)); continue; From bernd.edlinger at hotmail.de Tue Apr 3 14:06:05 2018 From: bernd.edlinger at hotmail.de (bernd.edlinger at hotmail.de) Date: Tue, 03 Apr 2018 14:06:05 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_0_2-stable update Message-ID: <1522764365.680188.15590.nullmailer@dev.openssl.org> The branch OpenSSL_1_0_2-stable has been updated via 477e40b48c5a2d5f9ba597cea2f2e2eb77e9347a (commit) from 6a285edd520f9508efb76f30aff9812ce7115fa8 (commit) - Log ----------------------------------------------------------------- commit 477e40b48c5a2d5f9ba597cea2f2e2eb77e9347a Author: Bernd Edlinger Date: Sat Mar 31 21:09:32 2018 +0200 Fix a crash in the asn1parse command Thanks to Sem Voigtl?nder for reporting this issue. Reviewed-by: Rich Salz Reviewed-by: Matthias St. Pierre (Merged from https://github.com/openssl/openssl/pull/5826) (cherry picked from commit 752837e0664e990b5edf6f0b69e1b4612efadce0) ----------------------------------------------------------------------- Summary of changes: apps/asn1pars.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/asn1pars.c b/apps/asn1pars.c index 0a6b990..55ecd7c 100644 --- a/apps/asn1pars.c +++ b/apps/asn1pars.c @@ -295,7 +295,7 @@ int MAIN(int argc, char **argv) ASN1_TYPE *atmp; int typ; j = atoi(sk_OPENSSL_STRING_value(osk, i)); - if (j == 0) { + if (j <= 0 || j >= tmplen) { BIO_printf(bio_err, "'%s' is an invalid number\n", sk_OPENSSL_STRING_value(osk, i)); continue; From bernd.edlinger at hotmail.de Tue Apr 3 14:07:09 2018 From: bernd.edlinger at hotmail.de (bernd.edlinger at hotmail.de) Date: Tue, 03 Apr 2018 14:07:09 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1522764429.432516.17584.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via 47ed1f8161c9888bff10ac26b90845cdff859661 (commit) from ac62a25e2ef8569542a69ac4fb04c59d899581bc (commit) - Log ----------------------------------------------------------------- commit 47ed1f8161c9888bff10ac26b90845cdff859661 Author: Bernd Edlinger Date: Sun Apr 1 00:46:49 2018 +0200 Improve diagnostics for invalid arguments in asn1parse -strparse Reviewed-by: Rich Salz Reviewed-by: Matthias St. Pierre (Merged from https://github.com/openssl/openssl/pull/5826) (cherry picked from commit b998745a4596c05f673ed8acdcaedcb4c5e208ad) ----------------------------------------------------------------------- Summary of changes: apps/asn1pars.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/asn1pars.c b/apps/asn1pars.c index 39b9f8b..dcd132f 100644 --- a/apps/asn1pars.c +++ b/apps/asn1pars.c @@ -41,7 +41,7 @@ OPTIONS asn1parse_options[] = { {"dump", OPT_DUMP, 0, "unknown data in hex form"}, {"dlimit", OPT_DLIMIT, 'p', "dump the first arg bytes of unknown data in hex form"}, - {"strparse", OPT_STRPARSE, 's', + {"strparse", OPT_STRPARSE, 'p', "offset; a series of these can be used to 'dig'"}, {OPT_MORE_STR, 0, 0, "into multiple ASN1 blob wrappings"}, {"genstr", OPT_GENSTR, 's', "string to generate ASN1 structure from"}, @@ -213,7 +213,7 @@ int asn1parse_main(int argc, char **argv) int typ; j = atoi(sk_OPENSSL_STRING_value(osk, i)); if (j <= 0 || j >= tmplen) { - BIO_printf(bio_err, "'%s' is an invalid number\n", + BIO_printf(bio_err, "'%s' is out of range\n", sk_OPENSSL_STRING_value(osk, i)); continue; } From bernd.edlinger at hotmail.de Tue Apr 3 14:08:04 2018 From: bernd.edlinger at hotmail.de (bernd.edlinger at hotmail.de) Date: Tue, 03 Apr 2018 14:08:04 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1522764484.189328.19425.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via e12e3549b79602cdfa888baa23907a8c1e704bd6 (commit) from 47ed1f8161c9888bff10ac26b90845cdff859661 (commit) - Log ----------------------------------------------------------------- commit e12e3549b79602cdfa888baa23907a8c1e704bd6 Author: Bernd Edlinger Date: Sun Apr 1 11:02:39 2018 +0200 Use strtol instead of atoi in asn1parse Reviewed-by: Rich Salz Reviewed-by: Matthias St. Pierre (Merged from https://github.com/openssl/openssl/pull/5826) (cherry picked from commit 18ada952d1dcea8dfc5008df9f317b3eb47c13fa) ----------------------------------------------------------------------- Summary of changes: apps/asn1pars.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/asn1pars.c b/apps/asn1pars.c index dcd132f..34f987d 100644 --- a/apps/asn1pars.c +++ b/apps/asn1pars.c @@ -113,13 +113,13 @@ int asn1parse_main(int argc, char **argv) offset = strtol(opt_arg(), NULL, 0); break; case OPT_LENGTH: - length = atoi(opt_arg()); + length = strtol(opt_arg(), NULL, 0); break; case OPT_DUMP: dump = -1; break; case OPT_DLIMIT: - dump = atoi(opt_arg()); + dump = strtol(opt_arg(), NULL, 0); break; case OPT_STRPARSE: sk_OPENSSL_STRING_push(osk, opt_arg()); @@ -211,7 +211,7 @@ int asn1parse_main(int argc, char **argv) for (i = 0; i < sk_OPENSSL_STRING_num(osk); i++) { ASN1_TYPE *atmp; int typ; - j = atoi(sk_OPENSSL_STRING_value(osk, i)); + j = strtol(sk_OPENSSL_STRING_value(osk, i), NULL, 0); if (j <= 0 || j >= tmplen) { BIO_printf(bio_err, "'%s' is out of range\n", sk_OPENSSL_STRING_value(osk, i)); From bernd.edlinger at hotmail.de Tue Apr 3 14:08:34 2018 From: bernd.edlinger at hotmail.de (bernd.edlinger at hotmail.de) Date: Tue, 03 Apr 2018 14:08:34 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1522764514.412785.20817.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via faddc62b3e657aeb90f4a47e46aeba633964306a (commit) from e12e3549b79602cdfa888baa23907a8c1e704bd6 (commit) - Log ----------------------------------------------------------------- commit faddc62b3e657aeb90f4a47e46aeba633964306a Author: Bernd Edlinger Date: Mon Apr 2 09:13:49 2018 +0200 Fix range checks with -offset and -length in asn1parse Reviewed-by: Rich Salz Reviewed-by: Matthias St. Pierre (Merged from https://github.com/openssl/openssl/pull/5826) (cherry picked from commit 16e1eea6a67c85c9d786f3c4448182b1aca101b8) ----------------------------------------------------------------------- Summary of changes: apps/asn1pars.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/asn1pars.c b/apps/asn1pars.c index 34f987d..3b80b77 100644 --- a/apps/asn1pars.c +++ b/apps/asn1pars.c @@ -244,14 +244,14 @@ int asn1parse_main(int argc, char **argv) num = tmplen; } - if (offset >= num) { + if (offset < 0 || offset >= num) { BIO_printf(bio_err, "Error: offset too large\n"); goto end; } num -= offset; - if ((length == 0) || ((long)length > num)) + if (length == 0 || length > (unsigned int)num) length = (unsigned int)num; if (derout) { if (BIO_write(derout, str + offset, length) != (int)length) { From bernd.edlinger at hotmail.de Tue Apr 3 14:08:51 2018 From: bernd.edlinger at hotmail.de (bernd.edlinger at hotmail.de) Date: Tue, 03 Apr 2018 14:08:51 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_0_2-stable update Message-ID: <1522764531.232249.21921.nullmailer@dev.openssl.org> The branch OpenSSL_1_0_2-stable has been updated via 82ff31d3e78413677023ac04a4a5ff94f2371a24 (commit) from 477e40b48c5a2d5f9ba597cea2f2e2eb77e9347a (commit) - Log ----------------------------------------------------------------- commit 82ff31d3e78413677023ac04a4a5ff94f2371a24 Author: Bernd Edlinger Date: Mon Apr 2 09:13:49 2018 +0200 Fix range checks with -offset and -length in asn1parse Reviewed-by: Rich Salz Reviewed-by: Matthias St. Pierre (Merged from https://github.com/openssl/openssl/pull/5826) (cherry picked from commit 16e1eea6a67c85c9d786f3c4448182b1aca101b8) ----------------------------------------------------------------------- Summary of changes: apps/asn1pars.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/asn1pars.c b/apps/asn1pars.c index 55ecd7c..6e7ed28 100644 --- a/apps/asn1pars.c +++ b/apps/asn1pars.c @@ -327,14 +327,14 @@ int MAIN(int argc, char **argv) num = tmplen; } - if (offset >= num) { + if (offset < 0 || offset >= num) { BIO_printf(bio_err, "Error: offset too large\n"); goto end; } num -= offset; - if ((length == 0) || ((long)length > num)) + if (length == 0 || length > (unsigned int)num) length = (unsigned int)num; if (derout) { if (BIO_write(derout, str + offset, length) != (int)length) { From bernd.edlinger at hotmail.de Tue Apr 3 14:09:26 2018 From: bernd.edlinger at hotmail.de (bernd.edlinger at hotmail.de) Date: Tue, 03 Apr 2018 14:09:26 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1522764566.563120.23494.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via 16df8dfe62e2fc4c8dd40a42b5abe280a63b7608 (commit) from faddc62b3e657aeb90f4a47e46aeba633964306a (commit) - Log ----------------------------------------------------------------- commit 16df8dfe62e2fc4c8dd40a42b5abe280a63b7608 Author: Bernd Edlinger Date: Mon Apr 2 10:35:29 2018 +0200 Remove an unnecessary cast in the param to BUF_MEM_grow Reviewed-by: Rich Salz Reviewed-by: Matthias St. Pierre (Merged from https://github.com/openssl/openssl/pull/5826) (cherry picked from commit 21db0e1afdcf17a189ebe49af3506551b108a2f2) ----------------------------------------------------------------------- Summary of changes: apps/asn1pars.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/asn1pars.c b/apps/asn1pars.c index 3b80b77..ed60ad1 100644 --- a/apps/asn1pars.c +++ b/apps/asn1pars.c @@ -191,7 +191,7 @@ int asn1parse_main(int argc, char **argv) num = 0; for (;;) { - if (!BUF_MEM_grow(buf, (int)num + BUFSIZ)) + if (!BUF_MEM_grow(buf, num + BUFSIZ)) goto end; i = BIO_read(in, &(buf->data[num]), BUFSIZ); if (i <= 0) From bernd.edlinger at hotmail.de Tue Apr 3 14:11:22 2018 From: bernd.edlinger at hotmail.de (bernd.edlinger at hotmail.de) Date: Tue, 03 Apr 2018 14:11:22 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1522764682.418246.26685.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via b854bb40364e96eac6239e07ad41292cd4de5a70 (commit) from 16df8dfe62e2fc4c8dd40a42b5abe280a63b7608 (commit) - Log ----------------------------------------------------------------- commit b854bb40364e96eac6239e07ad41292cd4de5a70 Author: Bernd Edlinger Date: Mon Apr 2 10:54:52 2018 +0200 Change the "offset too large" message to more generic wording Reviewed-by: Rich Salz Reviewed-by: Matthias St. Pierre (Merged from https://github.com/openssl/openssl/pull/5826) (cherry picked from commit 1518c55a796b058eff01f3cbf177f4b726c01d7c) ----------------------------------------------------------------------- Summary of changes: apps/asn1pars.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/asn1pars.c b/apps/asn1pars.c index ed60ad1..44cf42e 100644 --- a/apps/asn1pars.c +++ b/apps/asn1pars.c @@ -245,7 +245,7 @@ int asn1parse_main(int argc, char **argv) } if (offset < 0 || offset >= num) { - BIO_printf(bio_err, "Error: offset too large\n"); + BIO_printf(bio_err, "Error: offset out of range\n"); goto end; } From bernd.edlinger at hotmail.de Tue Apr 3 14:11:36 2018 From: bernd.edlinger at hotmail.de (bernd.edlinger at hotmail.de) Date: Tue, 03 Apr 2018 14:11:36 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_0_2-stable update Message-ID: <1522764696.745348.27751.nullmailer@dev.openssl.org> The branch OpenSSL_1_0_2-stable has been updated via a3dbbe47f09336484c8c874a0b1838266b51a8e8 (commit) from 82ff31d3e78413677023ac04a4a5ff94f2371a24 (commit) - Log ----------------------------------------------------------------- commit a3dbbe47f09336484c8c874a0b1838266b51a8e8 Author: Bernd Edlinger Date: Mon Apr 2 10:54:52 2018 +0200 Change the "offset too large" message to more generic wording Reviewed-by: Rich Salz Reviewed-by: Matthias St. Pierre (Merged from https://github.com/openssl/openssl/pull/5826) (cherry picked from commit 1518c55a796b058eff01f3cbf177f4b726c01d7c) ----------------------------------------------------------------------- Summary of changes: apps/asn1pars.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/asn1pars.c b/apps/asn1pars.c index 6e7ed28..5b0def7 100644 --- a/apps/asn1pars.c +++ b/apps/asn1pars.c @@ -328,7 +328,7 @@ int MAIN(int argc, char **argv) } if (offset < 0 || offset >= num) { - BIO_printf(bio_err, "Error: offset too large\n"); + BIO_printf(bio_err, "Error: offset out of range\n"); goto end; } From matt at openssl.org Tue Apr 3 14:52:53 2018 From: matt at openssl.org (Matt Caswell) Date: Tue, 03 Apr 2018 14:52:53 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1522767173.829053.12524.nullmailer@dev.openssl.org> The branch master has been updated via bcc6371443ebc0f104379b0a1068cfca0191b909 (commit) from 1518c55a796b058eff01f3cbf177f4b726c01d7c (commit) - Log ----------------------------------------------------------------- commit bcc6371443ebc0f104379b0a1068cfca0191b909 Author: Matt Caswell Date: Thu Mar 29 09:17:11 2018 +0100 Fix a text canonicalisation bug in CMS Where a CMS detached signature is used with text content the text goes through a canonicalisation process first prior to signing or verifying a signature. This process strips trailing space at the end of lines, converts line terminators to CRLF and removes additional trailing line terminators at the end of a file. A bug in the canonicalisation process meant that some characters, such as form-feed, were incorrectly treated as whitespace and removed. This is contrary to the specification (RFC5485). This fix could mean that detached text data signed with an earlier version of OpenSSL 1.1.0 may fail to verify using the fixed version, or text data signed with a fixed OpenSSL may fail to verify with an earlier version of OpenSSL 1.1.0. A workaround is to only verify the canonicalised text data and use the "-binary" flag (for the "cms" command line application) or set the SMIME_BINARY/PKCS7_BINARY/CMS_BINARY flags (if using CMS_verify()). Reviewed-by: Tim Hudson Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5790) ----------------------------------------------------------------------- Summary of changes: CHANGES | 22 +++++++++++++++++++++- crypto/asn1/asn_mime.c | 8 +++++--- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index 0c1e898..b4d0329 100644 --- a/CHANGES +++ b/CHANGES @@ -294,7 +294,27 @@ issues, has been replaced to always returns NULL. [Rich Salz] - Changes between 1.1.0g and 1.1.0h [xx XXX xxxx] + + Changes between 1.1.0h and 1.1.0i [xx XXX xxxx] + + *) Fixed a text canonicalisation bug in CMS + + Where a CMS detached signature is used with text content the text goes + through a canonicalisation process first prior to signing or verifying a + signature. This process strips trailing space at the end of lines, converts + line terminators to CRLF and removes additional trailing line terminators + at the end of a file. A bug in the canonicalisation process meant that + some characters, such as form-feed, were incorrectly treated as whitespace + and removed. This is contrary to the specification (RFC5485). This fix + could mean that detached text data signed with an earlier version of + OpenSSL 1.1.0 may fail to verify using the fixed version, or text data + signed with a fixed OpenSSL may fail to verify with an earlier version of + OpenSSL 1.1.0. A workaround is to only verify the canonicalised text data + and use the "-binary" flag (for the "cms" command line application) or set + the SMIME_BINARY/PKCS7_BINARY/CMS_BINARY flags (if using CMS_verify()). + [Matt Caswell] + + Changes between 1.1.0g and 1.1.0h [27 Mar 2018] *) Constructed ASN.1 types with a recursive definition could exceed the stack diff --git a/crypto/asn1/asn_mime.c b/crypto/asn1/asn_mime.c index 7f4db6a..aa92a8e 100644 --- a/crypto/asn1/asn_mime.c +++ b/crypto/asn1/asn_mime.c @@ -953,12 +953,14 @@ static int strip_eol(char *linebuf, int *plen, int flags) for (p = linebuf + len - 1; len > 0; len--, p--) { c = *p; - if (c == '\n') + if (c == '\n') { is_eol = 1; - else if (is_eol && flags & SMIME_ASCIICRLF && c < 33) + } else if (is_eol && flags & SMIME_ASCIICRLF && c == 32) { + /* Strip trailing space on a line; 32 == ASCII for ' ' */ continue; - else if (c != '\r') + } else if (c != '\r') { break; + } } *plen = len; return is_eol; From matt at openssl.org Tue Apr 3 14:57:24 2018 From: matt at openssl.org (Matt Caswell) Date: Tue, 03 Apr 2018 14:57:24 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1522767444.260660.18705.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via afa2a54bb99e4260100a6abdb72f83f97824f2e7 (commit) from b854bb40364e96eac6239e07ad41292cd4de5a70 (commit) - Log ----------------------------------------------------------------- commit afa2a54bb99e4260100a6abdb72f83f97824f2e7 Author: Matt Caswell Date: Thu Mar 29 09:17:11 2018 +0100 Fix a text canonicalisation bug in CMS Where a CMS detached signature is used with text content the text goes through a canonicalisation process first prior to signing or verifying a signature. This process strips trailing space at the end of lines, converts line terminators to CRLF and removes additional trailing line terminators at the end of a file. A bug in the canonicalisation process meant that some characters, such as form-feed, were incorrectly treated as whitespace and removed. This is contrary to the specification (RFC5485). This fix could mean that detached text data signed with an earlier version of OpenSSL 1.1.0 may fail to verify using the fixed version, or text data signed with a fixed OpenSSL may fail to verify with an earlier version of OpenSSL 1.1.0. A workaround is to only verify the canonicalised text data and use the "-binary" flag (for the "cms" command line application) or set the SMIME_BINARY/PKCS7_BINARY/CMS_BINARY flags (if using CMS_verify()). Reviewed-by: Tim Hudson Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5791) ----------------------------------------------------------------------- Summary of changes: CHANGES | 17 ++++++++++++++++- crypto/asn1/asn_mime.c | 8 +++++--- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index e15a289..7199f3d 100644 --- a/CHANGES +++ b/CHANGES @@ -9,7 +9,22 @@ Changes between 1.1.0h and 1.1.0i [xx XXX xxxx] - *) + *) Fixed a text canonicalisation bug in CMS + + Where a CMS detached signature is used with text content the text goes + through a canonicalisation process first prior to signing or verifying a + signature. This process strips trailing space at the end of lines, converts + line terminators to CRLF and removes additional trailing line terminators + at the end of a file. A bug in the canonicalisation process meant that + some characters, such as form-feed, were incorrectly treated as whitespace + and removed. This is contrary to the specification (RFC5485). This fix + could mean that detached text data signed with an earlier version of + OpenSSL 1.1.0 may fail to verify using the fixed version, or text data + signed with a fixed OpenSSL may fail to verify with an earlier version of + OpenSSL 1.1.0. A workaround is to only verify the canonicalised text data + and use the "-binary" flag (for the "cms" command line application) or set + the SMIME_BINARY/PKCS7_BINARY/CMS_BINARY flags (if using CMS_verify()). + [Matt Caswell] Changes between 1.1.0g and 1.1.0h [27 Mar 2018] diff --git a/crypto/asn1/asn_mime.c b/crypto/asn1/asn_mime.c index 84475e9..da0085f 100644 --- a/crypto/asn1/asn_mime.c +++ b/crypto/asn1/asn_mime.c @@ -969,12 +969,14 @@ static int strip_eol(char *linebuf, int *plen, int flags) p = linebuf + len - 1; for (p = linebuf + len - 1; len > 0; len--, p--) { c = *p; - if (c == '\n') + if (c == '\n') { is_eol = 1; - else if (is_eol && flags & SMIME_ASCIICRLF && c < 33) + } else if (is_eol && flags & SMIME_ASCIICRLF && c == 32) { + /* Strip trailing space on a line; 32 == ASCII for ' ' */ continue; - else if (c != '\r') + } else if (c != '\r') { break; + } } *plen = len; return is_eol; From matt at openssl.org Tue Apr 3 15:18:07 2018 From: matt at openssl.org (Matt Caswell) Date: Tue, 03 Apr 2018 15:18:07 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1522768687.606560.11149.nullmailer@dev.openssl.org> The branch master has been updated via 29f484d00d732ea4c19a7fd3dc0440045653e79e (commit) from bcc6371443ebc0f104379b0a1068cfca0191b909 (commit) - Log ----------------------------------------------------------------- commit 29f484d00d732ea4c19a7fd3dc0440045653e79e Author: Matt Caswell Date: Thu Mar 29 10:45:42 2018 +0100 Fix some errors in the mem leaks docs Reviewed-by: Bernd Edlinger Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5794) ----------------------------------------------------------------------- Summary of changes: doc/man3/OPENSSL_malloc.pod | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/man3/OPENSSL_malloc.pod b/doc/man3/OPENSSL_malloc.pod index 2d48ae2..b746016 100644 --- a/doc/man3/OPENSSL_malloc.pod +++ b/doc/man3/OPENSSL_malloc.pod @@ -78,10 +78,10 @@ OPENSSL_MALLOC_FD int CRYPTO_mem_debug_push(const char *info, const char *file, int line); int CRYPTO_mem_debug_pop(void); - void CRYPTO_mem_leaks(BIO *b); - void CRYPTO_mem_leaks_fp(FILE *fp); - void CRYPTO_mem_leaks_cb(int (*cb)(const char *str, size_t len, void *u), - void *u); + int CRYPTO_mem_leaks(BIO *b); + int CRYPTO_mem_leaks_fp(FILE *fp); + int CRYPTO_mem_leaks_cb(int (*cb)(const char *str, size_t len, void *u), + void *u); =head1 DESCRIPTION @@ -216,8 +216,8 @@ OPENSSL_malloc_init(), OPENSSL_free(), OPENSSL_clear_free() CRYPTO_free(), CRYPTO_clear_free() and CRYPTO_get_mem_functions() return no value. -CRYPTO_mem_leaks() and CRYPTO_mem_leaks_fp() return 1 if there -are no leaks, 0 if there are leaks and -1 if an error occurred. +CRYPTO_mem_leaks(), CRYPTO_mem_leaks_fp() and CRYPTO_mem_leaks_cb() return 1 if +there are no leaks, 0 if there are leaks and -1 if an error occurred. OPENSSL_malloc(), OPENSSL_zalloc(), OPENSSL_realloc(), OPENSSL_clear_realloc(), From matt at openssl.org Tue Apr 3 15:19:27 2018 From: matt at openssl.org (Matt Caswell) Date: Tue, 03 Apr 2018 15:19:27 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1522768767.385478.13725.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via c255668c61e6b4800aa9c6e293a12942eccf511b (commit) from afa2a54bb99e4260100a6abdb72f83f97824f2e7 (commit) - Log ----------------------------------------------------------------- commit c255668c61e6b4800aa9c6e293a12942eccf511b Author: Matt Caswell Date: Thu Mar 29 10:45:42 2018 +0100 Fix some errors in the mem leaks docs Reviewed-by: Bernd Edlinger (Merged from https://github.com/openssl/openssl/pull/5795) ----------------------------------------------------------------------- Summary of changes: doc/crypto/OPENSSL_malloc.pod | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/crypto/OPENSSL_malloc.pod b/doc/crypto/OPENSSL_malloc.pod index 2104f43..7bc3168 100644 --- a/doc/crypto/OPENSSL_malloc.pod +++ b/doc/crypto/OPENSSL_malloc.pod @@ -68,8 +68,8 @@ CRYPTO_mem_leaks, CRYPTO_mem_leaks_fp - Memory allocation functions int CRYPTO_mem_debug_push(const char *info, const char *file, int line); int CRYPTO_mem_debug_pop(void); - void CRYPTO_mem_leaks(BIO *b); - void CRYPTO_mem_leaks_fp(FILE *fp); + int CRYPTO_mem_leaks(BIO *b); + int CRYPTO_mem_leaks_fp(FILE *fp); =head1 DESCRIPTION From rsalz at openssl.org Tue Apr 3 15:50:49 2018 From: rsalz at openssl.org (Rich Salz) Date: Tue, 03 Apr 2018 15:50:49 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1522770649.035317.21187.nullmailer@dev.openssl.org> The branch master has been updated via cdb10bae3f773401e039c55965eb177a6f3fc160 (commit) from 29f484d00d732ea4c19a7fd3dc0440045653e79e (commit) - Log ----------------------------------------------------------------- commit cdb10bae3f773401e039c55965eb177a6f3fc160 Author: Rich Salz Date: Tue Apr 3 11:31:16 2018 -0400 Set error code on alloc failures Almost all *alloc failures now set an error code. Reviewed-by: Matthias St. Pierre (Merged from https://github.com/openssl/openssl/pull/5842) ----------------------------------------------------------------------- Summary of changes: crypto/asn1/a_object.c | 5 ++-- crypto/asn1/a_strex.c | 5 ++-- crypto/asn1/a_strnid.c | 5 ++-- crypto/asn1/asn1_err.c | 14 +++++++++++ crypto/asn1/asn_moid.c | 5 ++-- crypto/asn1/bio_asn1.c | 5 ++-- crypto/asn1/bio_ndef.c | 10 +++++--- crypto/asn1/tasn_enc.c | 6 +++-- crypto/asn1/tasn_new.c | 5 ++-- crypto/asn1/tasn_utl.c | 5 ++-- crypto/asn1/x_int64.c | 10 +++++--- crypto/async/async_err.c | 4 ++- crypto/async/async_wait.c | 5 ++-- crypto/bio/b_addr.c | 5 ++-- crypto/bio/b_print.c | 5 ++-- crypto/bio/bf_lbuf.c | 6 +++-- crypto/bio/bio_err.c | 4 +++ crypto/bio/bss_dgram.c | 5 ++-- crypto/bn/bn_ctx.c | 14 ++++++++--- crypto/bn/bn_err.c | 4 ++- crypto/cms/cms_enc.c | 5 ++-- crypto/cms/cms_err.c | 5 +++- crypto/cms/cms_pwri.c | 5 ++-- crypto/conf/conf_err.c | 1 + crypto/conf/conf_mod.c | 5 ++-- crypto/cpt_err.c | 4 ++- crypto/dh/dh_err.c | 3 ++- crypto/dh/dh_pmeth.c | 5 ++-- crypto/ec/ec_err.c | 5 ++++ crypto/ec/ec_key.c | 6 +++-- crypto/ec/ec_lib.c | 5 ++-- crypto/ec/ec_oct.c | 6 +++-- crypto/ec/ec_pmeth.c | 10 +++++--- crypto/ec/ec_print.c | 6 +++-- crypto/engine/eng_err.c | 5 +++- crypto/engine/eng_lib.c | 8 ++++-- crypto/engine/eng_openssl.c | 5 ++-- crypto/err/err.c | 10 +++++--- crypto/err/openssl.txt | 59 ++++++++++++++++++++++++++++++++++++++++++++ crypto/evp/bio_b64.c | 5 ++-- crypto/evp/bio_enc.c | 5 ++-- crypto/evp/bio_ok.c | 5 ++-- crypto/evp/e_aes.c | 20 +++++++++------ crypto/evp/e_aria.c | 10 +++++--- crypto/evp/evp_err.c | 6 +++++ crypto/init.c | 5 ++-- crypto/kdf/hkdf.c | 5 ++-- crypto/kdf/kdf_err.c | 3 +++ crypto/kdf/tls1_prf.c | 10 +++++--- crypto/o_fopen.c | 5 ++-- crypto/objects/obj_err.c | 3 ++- crypto/objects/obj_xref.c | 6 +++-- crypto/pem/pem_err.c | 3 ++- crypto/pem/pvkfmt.c | 5 ++-- crypto/rsa/rsa_err.c | 5 +++- crypto/rsa/rsa_mp.c | 6 +++-- crypto/rsa/rsa_pmeth.c | 5 ++-- crypto/srp/srp_vfy.c | 8 ++++-- crypto/stack/stack.c | 5 ++-- crypto/ui/ui_err.c | 3 ++- crypto/ui/ui_lib.c | 5 ++-- include/openssl/asn1err.h | 12 +++++++++ include/openssl/asyncerr.h | 1 + include/openssl/bioerr.h | 4 +++ include/openssl/bnerr.h | 2 ++ include/openssl/cmserr.h | 2 ++ include/openssl/conferr.h | 1 + include/openssl/cryptoerr.h | 2 ++ include/openssl/dherr.h | 1 + include/openssl/ecerr.h | 5 ++++ include/openssl/engineerr.h | 2 ++ include/openssl/evperr.h | 6 +++++ include/openssl/kdferr.h | 3 +++ include/openssl/objectserr.h | 1 + include/openssl/pemerr.h | 1 + include/openssl/rsaerr.h | 2 ++ include/openssl/sslerr.h | 12 +++++++++ include/openssl/uierr.h | 1 + ssl/packet.c | 11 ++++++--- ssl/pqueue.c | 10 +++++--- ssl/ssl_ciph.c | 5 ++-- ssl/ssl_err.c | 19 ++++++++++++++ ssl/ssl_lib.c | 6 +++-- ssl/statem/statem_dtls.c | 10 +++++--- ssl/t1_lib.c | 26 +++++++++++-------- 85 files changed, 420 insertions(+), 143 deletions(-) diff --git a/crypto/asn1/a_object.c b/crypto/asn1/a_object.c index b5e90a5..2d3877b 100644 --- a/crypto/asn1/a_object.c +++ b/crypto/asn1/a_object.c @@ -180,9 +180,10 @@ int i2a_ASN1_OBJECT(BIO *bp, const ASN1_OBJECT *a) return BIO_write(bp, "NULL", 4); i = i2t_ASN1_OBJECT(buf, sizeof(buf), a); if (i > (int)(sizeof(buf) - 1)) { - p = OPENSSL_malloc(i + 1); - if (p == NULL) + if ((p = OPENSSL_malloc(i + 1)) == NULL) { + ASN1err(ASN1_F_I2A_ASN1_OBJECT, ERR_R_MALLOC_FAILURE); return -1; + } i2t_ASN1_OBJECT(p, i + 1, a); } if (i <= 0) { diff --git a/crypto/asn1/a_strex.c b/crypto/asn1/a_strex.c index b91266b..7539553 100644 --- a/crypto/asn1/a_strex.c +++ b/crypto/asn1/a_strex.c @@ -259,9 +259,10 @@ static int do_dump(unsigned long lflags, char_io *io_ch, void *arg, t.type = str->type; t.value.ptr = (char *)str; der_len = i2d_ASN1_TYPE(&t, NULL); - der_buf = OPENSSL_malloc(der_len); - if (der_buf == NULL) + if ((der_buf = OPENSSL_malloc(der_len)) == NULL) { + ASN1err(ASN1_F_DO_DUMP, ERR_R_MALLOC_FAILURE); return -1; + } p = der_buf; i2d_ASN1_TYPE(&t, &p); outlen = do_hex_dump(io_ch, arg, der_buf, der_len); diff --git a/crypto/asn1/a_strnid.c b/crypto/asn1/a_strnid.c index a7d6b0e..948fc1f 100644 --- a/crypto/asn1/a_strnid.c +++ b/crypto/asn1/a_strnid.c @@ -156,9 +156,10 @@ static ASN1_STRING_TABLE *stable_get(int nid) tmp = ASN1_STRING_TABLE_get(nid); if (tmp != NULL && tmp->flags & STABLE_FLAGS_MALLOC) return tmp; - rv = OPENSSL_zalloc(sizeof(*rv)); - if (rv == NULL) + if ((rv = OPENSSL_zalloc(sizeof(*rv))) == NULL) { + ASN1err(ASN1_F_STABLE_GET, ERR_R_MALLOC_FAILURE); return NULL; + } if (!sk_ASN1_STRING_TABLE_push(stable, rv)) { OPENSSL_free(rv); return NULL; diff --git a/crypto/asn1/asn1_err.c b/crypto/asn1/asn1_err.c index de92adc..751d441 100644 --- a/crypto/asn1/asn1_err.c +++ b/crypto/asn1/asn1_err.c @@ -18,6 +18,7 @@ static const ERR_STRING_DATA ASN1_str_functs[] = { {ERR_PACK(ERR_LIB_ASN1, ASN1_F_A2I_ASN1_INTEGER, 0), "a2i_ASN1_INTEGER"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_A2I_ASN1_STRING, 0), "a2i_ASN1_STRING"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_APPEND_EXP, 0), "append_exp"}, + {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_BIO_INIT, 0), "asn1_bio_init"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_BIT_STRING_SET_BIT, 0), "ASN1_BIT_STRING_set_bit"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_CB, 0), "asn1_cb"}, @@ -31,6 +32,7 @@ static const ERR_STRING_DATA ASN1_str_functs[] = { {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_DO_ADB, 0), "asn1_do_adb"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_DO_LOCK, 0), "asn1_do_lock"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_DUP, 0), "ASN1_dup"}, + {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_ENC_SAVE, 0), "asn1_enc_save"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_EX_C2I, 0), "asn1_ex_c2i"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_FIND_END, 0), "asn1_find_end"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_GENERALIZEDTIME_ADJ, 0), @@ -47,6 +49,8 @@ static const ERR_STRING_DATA ASN1_str_functs[] = { "asn1_item_embed_d2i"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_ITEM_EMBED_NEW, 0), "asn1_item_embed_new"}, + {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_ITEM_FLAGS_I2D, 0), + "asn1_item_flags_i2d"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_ITEM_I2D_BIO, 0), "ASN1_item_i2d_bio"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_ITEM_I2D_FP, 0), "ASN1_item_i2d_fp"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_ITEM_PACK, 0), "ASN1_item_pack"}, @@ -60,6 +64,8 @@ static const ERR_STRING_DATA ASN1_str_functs[] = { {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_OBJECT_NEW, 0), "ASN1_OBJECT_new"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_OUTPUT_DATA, 0), "asn1_output_data"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_PCTX_NEW, 0), "ASN1_PCTX_new"}, + {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_PRIMITIVE_NEW, 0), + "asn1_primitive_new"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_SCTX_NEW, 0), "ASN1_SCTX_new"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_SIGN, 0), "ASN1_sign"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_STR2TYPE, 0), "asn1_str2type"}, @@ -103,7 +109,10 @@ static const ERR_STRING_DATA ASN1_str_functs[] = { "d2i_AutoPrivateKey"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_D2I_PRIVATEKEY, 0), "d2i_PrivateKey"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_D2I_PUBLICKEY, 0), "d2i_PublicKey"}, + {ERR_PACK(ERR_LIB_ASN1, ASN1_F_DO_CREATE, 0), "do_create"}, + {ERR_PACK(ERR_LIB_ASN1, ASN1_F_DO_DUMP, 0), "do_dump"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_DO_TCREATE, 0), "do_tcreate"}, + {ERR_PACK(ERR_LIB_ASN1, ASN1_F_I2A_ASN1_OBJECT, 0), "i2a_ASN1_OBJECT"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_I2D_ASN1_BIO_STREAM, 0), "i2d_ASN1_bio_stream"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_I2D_DSA_PUBKEY, 0), "i2d_DSA_PUBKEY"}, @@ -112,6 +121,8 @@ static const ERR_STRING_DATA ASN1_str_functs[] = { {ERR_PACK(ERR_LIB_ASN1, ASN1_F_I2D_PUBLICKEY, 0), "i2d_PublicKey"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_I2D_RSA_PUBKEY, 0), "i2d_RSA_PUBKEY"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_LONG_C2I, 0), "long_c2i"}, + {ERR_PACK(ERR_LIB_ASN1, ASN1_F_NDEF_PREFIX, 0), "ndef_prefix"}, + {ERR_PACK(ERR_LIB_ASN1, ASN1_F_NDEF_SUFFIX, 0), "ndef_suffix"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_OID_MODULE_INIT, 0), "oid_module_init"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_PARSE_TAGGING, 0), "parse_tagging"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_PKCS5_PBE2_SET_IV, 0), "PKCS5_pbe2_set_iv"}, @@ -124,9 +135,12 @@ static const ERR_STRING_DATA ASN1_str_functs[] = { {ERR_PACK(ERR_LIB_ASN1, ASN1_F_PKCS5_SCRYPT_SET, 0), "pkcs5_scrypt_set"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_SMIME_READ_ASN1, 0), "SMIME_read_ASN1"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_SMIME_TEXT, 0), "SMIME_text"}, + {ERR_PACK(ERR_LIB_ASN1, ASN1_F_STABLE_GET, 0), "stable_get"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_STBL_MODULE_INIT, 0), "stbl_module_init"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_UINT32_C2I, 0), "uint32_c2i"}, + {ERR_PACK(ERR_LIB_ASN1, ASN1_F_UINT32_NEW, 0), "uint32_new"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_UINT64_C2I, 0), "uint64_c2i"}, + {ERR_PACK(ERR_LIB_ASN1, ASN1_F_UINT64_NEW, 0), "uint64_new"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_X509_CRL_ADD0_REVOKED, 0), "X509_CRL_add0_revoked"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_X509_INFO_NEW, 0), "X509_INFO_new"}, diff --git a/crypto/asn1/asn_moid.c b/crypto/asn1/asn_moid.c index ed8517c..e1bf1a1 100644 --- a/crypto/asn1/asn_moid.c +++ b/crypto/asn1/asn_moid.c @@ -92,9 +92,10 @@ static int do_create(const char *value, const char *name) p--; } p++; - lntmp = OPENSSL_malloc((p - ln) + 1); - if (lntmp == NULL) + if ((lntmp = OPENSSL_malloc((p - ln) + 1)) == NULL) { + ASN1err(ASN1_F_DO_CREATE, ERR_R_MALLOC_FAILURE); return 0; + } memcpy(lntmp, ln, p - ln); lntmp[p - ln] = 0; oid = OBJ_nid2obj(nid); diff --git a/crypto/asn1/bio_asn1.c b/crypto/asn1/bio_asn1.c index 3c7c122..b88b2e5 100644 --- a/crypto/asn1/bio_asn1.c +++ b/crypto/asn1/bio_asn1.c @@ -116,9 +116,10 @@ static int asn1_bio_new(BIO *b) static int asn1_bio_init(BIO_ASN1_BUF_CTX *ctx, int size) { - ctx->buf = OPENSSL_malloc(size); - if (ctx->buf == NULL) + if ((ctx->buf = OPENSSL_malloc(size)) == NULL) { + ASN1err(ASN1_F_ASN1_BIO_INIT, ERR_R_MALLOC_FAILURE); return 0; + } ctx->bufsize = size; ctx->asn1_class = V_ASN1_UNIVERSAL; ctx->asn1_tag = V_ASN1_OCTET_STRING; diff --git a/crypto/asn1/bio_ndef.c b/crypto/asn1/bio_ndef.c index 0f206b2..686b6f7 100644 --- a/crypto/asn1/bio_ndef.c +++ b/crypto/asn1/bio_ndef.c @@ -113,9 +113,10 @@ static int ndef_prefix(BIO *b, unsigned char **pbuf, int *plen, void *parg) ndef_aux = *(NDEF_SUPPORT **)parg; derlen = ASN1_item_ndef_i2d(ndef_aux->val, NULL, ndef_aux->it); - p = OPENSSL_malloc(derlen); - if (p == NULL) + if ((p = OPENSSL_malloc(derlen)) == NULL) { + ASN1err(ASN1_F_NDEF_PREFIX, ERR_R_MALLOC_FAILURE); return 0; + } ndef_aux->derbuf = p; *pbuf = p; @@ -182,9 +183,10 @@ static int ndef_suffix(BIO *b, unsigned char **pbuf, int *plen, void *parg) return 0; derlen = ASN1_item_ndef_i2d(ndef_aux->val, NULL, ndef_aux->it); - p = OPENSSL_malloc(derlen); - if (p == NULL) + if ((p = OPENSSL_malloc(derlen)) == NULL) { + ASN1err(ASN1_F_NDEF_SUFFIX, ERR_R_MALLOC_FAILURE); return 0; + } ndef_aux->derbuf = p; *pbuf = p; diff --git a/crypto/asn1/tasn_enc.c b/crypto/asn1/tasn_enc.c index 3b723a1..30be314 100644 --- a/crypto/asn1/tasn_enc.c +++ b/crypto/asn1/tasn_enc.c @@ -57,12 +57,14 @@ static int asn1_item_flags_i2d(ASN1_VALUE *val, unsigned char **out, if (out && !*out) { unsigned char *p, *buf; int len; + len = ASN1_item_ex_i2d(&val, NULL, it, -1, flags); if (len <= 0) return len; - buf = OPENSSL_malloc(len); - if (buf == NULL) + if ((buf = OPENSSL_malloc(len)) == NULL) { + ASN1err(ASN1_F_ASN1_ITEM_FLAGS_I2D, ERR_R_MALLOC_FAILURE); return -1; + } p = buf; ASN1_item_ex_i2d(&val, &p, it, -1, flags); *out = buf; diff --git a/crypto/asn1/tasn_new.c b/crypto/asn1/tasn_new.c index 11c8040..ed66fb0 100644 --- a/crypto/asn1/tasn_new.c +++ b/crypto/asn1/tasn_new.c @@ -299,9 +299,10 @@ static int asn1_primitive_new(ASN1_VALUE **pval, const ASN1_ITEM *it, return 1; case V_ASN1_ANY: - typ = OPENSSL_malloc(sizeof(*typ)); - if (typ == NULL) + if ((typ = OPENSSL_malloc(sizeof(*typ))) == NULL) { + ASN1err(ASN1_F_ASN1_PRIMITIVE_NEW, ERR_R_MALLOC_FAILURE); return 0; + } typ->value.ptr = NULL; typ->type = -1; *pval = (ASN1_VALUE *)typ; diff --git a/crypto/asn1/tasn_utl.c b/crypto/asn1/tasn_utl.c index cf434aa..11e3a34 100644 --- a/crypto/asn1/tasn_utl.c +++ b/crypto/asn1/tasn_utl.c @@ -133,9 +133,10 @@ int asn1_enc_save(ASN1_VALUE **pval, const unsigned char *in, int inlen, return 1; OPENSSL_free(enc->enc); - enc->enc = OPENSSL_malloc(inlen); - if (enc->enc == NULL) + if ((enc->enc = OPENSSL_malloc(inlen)) == NULL) { + ASN1err(ASN1_F_ASN1_ENC_SAVE, ERR_R_MALLOC_FAILURE); return 0; + } memcpy(enc->enc, in, inlen); enc->len = inlen; enc->modified = 0; diff --git a/crypto/asn1/x_int64.c b/crypto/asn1/x_int64.c index 714e2f7..d9a91be 100644 --- a/crypto/asn1/x_int64.c +++ b/crypto/asn1/x_int64.c @@ -28,9 +28,10 @@ static int uint64_new(ASN1_VALUE **pval, const ASN1_ITEM *it) { - *pval = (ASN1_VALUE *)OPENSSL_zalloc(sizeof(uint64_t)); - if (*pval == NULL) + if ((*pval = (ASN1_VALUE *)OPENSSL_zalloc(sizeof(uint64_t))) == NULL) { + ASN1err(ASN1_F_UINT64_NEW, ERR_R_MALLOC_FAILURE); return 0; + } return 1; } @@ -110,9 +111,10 @@ static int uint64_print(BIO *out, ASN1_VALUE **pval, const ASN1_ITEM *it, static int uint32_new(ASN1_VALUE **pval, const ASN1_ITEM *it) { - *pval = (ASN1_VALUE *)OPENSSL_zalloc(sizeof(uint32_t)); - if (*pval == NULL) + if ((*pval = (ASN1_VALUE *)OPENSSL_zalloc(sizeof(uint32_t))) == NULL) { + ASN1err(ASN1_F_UINT32_NEW, ERR_R_MALLOC_FAILURE); return 0; + } return 1; } diff --git a/crypto/async/async_err.c b/crypto/async/async_err.c index d2d1011..fd5527a 100644 --- a/crypto/async/async_err.c +++ b/crypto/async/async_err.c @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -21,6 +21,8 @@ static const ERR_STRING_DATA ASYNC_str_functs[] = { {ERR_PACK(ERR_LIB_ASYNC, ASYNC_F_ASYNC_PAUSE_JOB, 0), "ASYNC_pause_job"}, {ERR_PACK(ERR_LIB_ASYNC, ASYNC_F_ASYNC_START_FUNC, 0), "async_start_func"}, {ERR_PACK(ERR_LIB_ASYNC, ASYNC_F_ASYNC_START_JOB, 0), "ASYNC_start_job"}, + {ERR_PACK(ERR_LIB_ASYNC, ASYNC_F_ASYNC_WAIT_CTX_SET_WAIT_FD, 0), + "ASYNC_WAIT_CTX_set_wait_fd"}, {0, NULL} }; diff --git a/crypto/async/async_wait.c b/crypto/async/async_wait.c index d6d4695..788c7cd 100644 --- a/crypto/async/async_wait.c +++ b/crypto/async/async_wait.c @@ -47,9 +47,10 @@ int ASYNC_WAIT_CTX_set_wait_fd(ASYNC_WAIT_CTX *ctx, const void *key, { struct fd_lookup_st *fdlookup; - fdlookup = OPENSSL_zalloc(sizeof(*fdlookup)); - if (fdlookup == NULL) + if ((fdlookup = OPENSSL_zalloc(sizeof(*fdlookup))) == NULL) { + ASYNCerr(ASYNC_F_ASYNC_WAIT_CTX_SET_WAIT_FD, ERR_R_MALLOC_FAILURE); return 0; + } fdlookup->key = key; fdlookup->fd = fd; diff --git a/crypto/bio/b_addr.c b/crypto/bio/b_addr.c index ca9a710..a2ef944 100644 --- a/crypto/bio/b_addr.c +++ b/crypto/bio/b_addr.c @@ -565,9 +565,10 @@ static int addrinfo_wrap(int family, int socktype, unsigned short port, BIO_ADDRINFO **bai) { - *bai = OPENSSL_zalloc(sizeof(**bai)); - if (*bai == NULL) + if ((*bai = OPENSSL_zalloc(sizeof(**bai))) == NULL) { + BIOerr(BIO_F_ADDRINFO_WRAP, ERR_R_MALLOC_FAILURE); return 0; + } (*bai)->bai_family = family; (*bai)->bai_socktype = socktype; diff --git a/crypto/bio/b_print.c b/crypto/bio/b_print.c index 1ef8547..03ee45a 100644 --- a/crypto/bio/b_print.c +++ b/crypto/bio/b_print.c @@ -819,9 +819,10 @@ doapr_outch(char **sbuffer, *maxlen += BUFFER_INC; if (*buffer == NULL) { - *buffer = OPENSSL_malloc(*maxlen); - if (*buffer == NULL) + if ((*buffer = OPENSSL_malloc(*maxlen)) == NULL) { + BIOerr(BIO_F_DOAPR_OUTCH, ERR_R_MALLOC_FAILURE); return 0; + } if (*currlen > 0) { if (!ossl_assert(*sbuffer != NULL)) return 0; diff --git a/crypto/bio/bf_lbuf.c b/crypto/bio/bf_lbuf.c index 2dac3d7..194c7b8 100644 --- a/crypto/bio/bf_lbuf.c +++ b/crypto/bio/bf_lbuf.c @@ -59,11 +59,13 @@ static int linebuffer_new(BIO *bi) { BIO_LINEBUFFER_CTX *ctx; - ctx = OPENSSL_malloc(sizeof(*ctx)); - if (ctx == NULL) + if ((ctx = OPENSSL_malloc(sizeof(*ctx))) == NULL) { + BIOerr(BIO_F_LINEBUFFER_NEW, ERR_R_MALLOC_FAILURE); return 0; + } ctx->obuf = OPENSSL_malloc(DEFAULT_LINEBUFFER_SIZE); if (ctx->obuf == NULL) { + BIOerr(BIO_F_LINEBUFFER_NEW, ERR_R_MALLOC_FAILURE); OPENSSL_free(ctx); return 0; } diff --git a/crypto/bio/bio_err.c b/crypto/bio/bio_err.c index 594013d..2a4e478 100644 --- a/crypto/bio/bio_err.c +++ b/crypto/bio/bio_err.c @@ -15,6 +15,7 @@ static const ERR_STRING_DATA BIO_str_functs[] = { {ERR_PACK(ERR_LIB_BIO, BIO_F_ACPT_STATE, 0), "acpt_state"}, + {ERR_PACK(ERR_LIB_BIO, BIO_F_ADDRINFO_WRAP, 0), "addrinfo_wrap"}, {ERR_PACK(ERR_LIB_BIO, BIO_F_ADDR_STRINGS, 0), "addr_strings"}, {ERR_PACK(ERR_LIB_BIO, BIO_F_BIO_ACCEPT, 0), "BIO_accept"}, {ERR_PACK(ERR_LIB_BIO, BIO_F_BIO_ACCEPT_EX, 0), "BIO_accept_ex"}, @@ -55,11 +56,14 @@ static const ERR_STRING_DATA BIO_str_functs[] = { {ERR_PACK(ERR_LIB_BIO, BIO_F_BUFFER_CTRL, 0), "buffer_ctrl"}, {ERR_PACK(ERR_LIB_BIO, BIO_F_CONN_CTRL, 0), "conn_ctrl"}, {ERR_PACK(ERR_LIB_BIO, BIO_F_CONN_STATE, 0), "conn_state"}, + {ERR_PACK(ERR_LIB_BIO, BIO_F_DGRAM_SCTP_NEW, 0), "dgram_sctp_new"}, {ERR_PACK(ERR_LIB_BIO, BIO_F_DGRAM_SCTP_READ, 0), "dgram_sctp_read"}, {ERR_PACK(ERR_LIB_BIO, BIO_F_DGRAM_SCTP_WRITE, 0), "dgram_sctp_write"}, + {ERR_PACK(ERR_LIB_BIO, BIO_F_DOAPR_OUTCH, 0), "doapr_outch"}, {ERR_PACK(ERR_LIB_BIO, BIO_F_FILE_CTRL, 0), "file_ctrl"}, {ERR_PACK(ERR_LIB_BIO, BIO_F_FILE_READ, 0), "file_read"}, {ERR_PACK(ERR_LIB_BIO, BIO_F_LINEBUFFER_CTRL, 0), "linebuffer_ctrl"}, + {ERR_PACK(ERR_LIB_BIO, BIO_F_LINEBUFFER_NEW, 0), "linebuffer_new"}, {ERR_PACK(ERR_LIB_BIO, BIO_F_MEM_WRITE, 0), "mem_write"}, {ERR_PACK(ERR_LIB_BIO, BIO_F_SSL_NEW, 0), "SSL_new"}, {0, NULL} diff --git a/crypto/bio/bss_dgram.c b/crypto/bio/bss_dgram.c index 90b250e..424109c 100644 --- a/crypto/bio/bss_dgram.c +++ b/crypto/bio/bss_dgram.c @@ -955,9 +955,10 @@ static int dgram_sctp_new(BIO *bi) bi->init = 0; bi->num = 0; - data = OPENSSL_zalloc(sizeof(*data)); - if (data == NULL) + if ((data = OPENSSL_zalloc(sizeof(*data))) == NULL) { + BIOerr(BIO_F_DGRAM_SCTP_NEW, ERR_R_MALLOC_FAILURE); return 0; + } # ifdef SCTP_PR_SCTP_NONE data->prinfo.pr_policy = SCTP_PR_SCTP_NONE; # endif diff --git a/crypto/bn/bn_ctx.c b/crypto/bn/bn_ctx.c index 68c0468..703e4b7 100644 --- a/crypto/bn/bn_ctx.c +++ b/crypto/bn/bn_ctx.c @@ -255,9 +255,12 @@ static int BN_STACK_push(BN_STACK *st, unsigned int idx) /* Need to expand */ unsigned int newsize = st->size ? (st->size * 3 / 2) : BN_CTX_START_FRAMES; - unsigned int *newitems = OPENSSL_malloc(sizeof(*newitems) * newsize); - if (newitems == NULL) + unsigned int *newitems; + + if ((newitems = OPENSSL_malloc(sizeof(*newitems) * newsize)) == NULL) { + BNerr(BN_F_BN_STACK_PUSH, ERR_R_MALLOC_FAILURE); return 0; + } if (st->depth) memcpy(newitems, st->indexes, sizeof(*newitems) * st->depth); OPENSSL_free(st->indexes); @@ -306,9 +309,12 @@ static BIGNUM *BN_POOL_get(BN_POOL *p, int flag) /* Full; allocate a new pool item and link it in. */ if (p->used == p->size) { - BN_POOL_ITEM *item = OPENSSL_malloc(sizeof(*item)); - if (item == NULL) + BN_POOL_ITEM *item; + + if ((item = OPENSSL_malloc(sizeof(*item))) == NULL) { + BNerr(BN_F_BN_POOL_GET, ERR_R_MALLOC_FAILURE); return NULL; + } for (loop = 0, bn = item->vals; loop++ < BN_CTX_POOL_SIZE; bn++) { bn_init(bn); if ((flag & BN_FLG_SECURE) != 0) diff --git a/crypto/bn/bn_err.c b/crypto/bn/bn_err.c index e281747..e6bfbf6 100644 --- a/crypto/bn/bn_err.c +++ b/crypto/bn/bn_err.c @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -64,10 +64,12 @@ static const ERR_STRING_DATA BN_str_functs[] = { {ERR_PACK(ERR_LIB_BN, BN_F_BN_MOD_SQRT, 0), "BN_mod_sqrt"}, {ERR_PACK(ERR_LIB_BN, BN_F_BN_MPI2BN, 0), "BN_mpi2bn"}, {ERR_PACK(ERR_LIB_BN, BN_F_BN_NEW, 0), "BN_new"}, + {ERR_PACK(ERR_LIB_BN, BN_F_BN_POOL_GET, 0), "BN_POOL_get"}, {ERR_PACK(ERR_LIB_BN, BN_F_BN_RAND, 0), "BN_rand"}, {ERR_PACK(ERR_LIB_BN, BN_F_BN_RAND_RANGE, 0), "BN_rand_range"}, {ERR_PACK(ERR_LIB_BN, BN_F_BN_RSHIFT, 0), "BN_rshift"}, {ERR_PACK(ERR_LIB_BN, BN_F_BN_SET_WORDS, 0), "bn_set_words"}, + {ERR_PACK(ERR_LIB_BN, BN_F_BN_STACK_PUSH, 0), "BN_STACK_push"}, {ERR_PACK(ERR_LIB_BN, BN_F_BN_USUB, 0), "BN_usub"}, {0, NULL} }; diff --git a/crypto/cms/cms_enc.c b/crypto/cms/cms_enc.c index ed91342..853e2f1 100644 --- a/crypto/cms/cms_enc.c +++ b/crypto/cms/cms_enc.c @@ -168,9 +168,10 @@ int cms_EncryptedContent_init(CMS_EncryptedContentInfo *ec, { ec->cipher = cipher; if (key) { - ec->key = OPENSSL_malloc(keylen); - if (ec->key == NULL) + if ((ec->key = OPENSSL_malloc(keylen)) == NULL) { + CMSerr(CMS_F_CMS_ENCRYPTEDCONTENT_INIT, ERR_R_MALLOC_FAILURE); return 0; + } memcpy(ec->key, key, keylen); } ec->keylen = keylen; diff --git a/crypto/cms/cms_err.c b/crypto/cms/cms_err.c index 43a48b6..4432b47 100644 --- a/crypto/cms/cms_err.c +++ b/crypto/cms/cms_err.c @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -54,6 +54,8 @@ static const ERR_STRING_DATA CMS_str_functs[] = { {ERR_PACK(ERR_LIB_CMS, CMS_F_CMS_DIGEST_VERIFY, 0), "CMS_digest_verify"}, {ERR_PACK(ERR_LIB_CMS, CMS_F_CMS_ENCODE_RECEIPT, 0), "cms_encode_Receipt"}, {ERR_PACK(ERR_LIB_CMS, CMS_F_CMS_ENCRYPT, 0), "CMS_encrypt"}, + {ERR_PACK(ERR_LIB_CMS, CMS_F_CMS_ENCRYPTEDCONTENT_INIT, 0), + "cms_EncryptedContent_init"}, {ERR_PACK(ERR_LIB_CMS, CMS_F_CMS_ENCRYPTEDCONTENT_INIT_BIO, 0), "cms_EncryptedContent_init_bio"}, {ERR_PACK(ERR_LIB_CMS, CMS_F_CMS_ENCRYPTEDDATA_DECRYPT, 0), @@ -147,6 +149,7 @@ static const ERR_STRING_DATA CMS_str_functs[] = { {ERR_PACK(ERR_LIB_CMS, CMS_F_CMS_STREAM, 0), "CMS_stream"}, {ERR_PACK(ERR_LIB_CMS, CMS_F_CMS_UNCOMPRESS, 0), "CMS_uncompress"}, {ERR_PACK(ERR_LIB_CMS, CMS_F_CMS_VERIFY, 0), "CMS_verify"}, + {ERR_PACK(ERR_LIB_CMS, CMS_F_KEK_UNWRAP_KEY, 0), "kek_unwrap_key"}, {0, NULL} }; diff --git a/crypto/cms/cms_pwri.c b/crypto/cms/cms_pwri.c index 0571bb8..28f2a1c 100644 --- a/crypto/cms/cms_pwri.c +++ b/crypto/cms/cms_pwri.c @@ -188,9 +188,10 @@ static int kek_unwrap_key(unsigned char *out, size_t *outlen, /* Invalid size */ return 0; } - tmp = OPENSSL_malloc(inlen); - if (tmp == NULL) + if ((tmp = OPENSSL_malloc(inlen)) == NULL) { + CMSerr(CMS_F_KEK_UNWRAP_KEY, ERR_R_MALLOC_FAILURE); return 0; + } /* setup IV by decrypting last two blocks */ if (!EVP_DecryptUpdate(ctx, tmp + inlen - 2 * blocklen, &outl, in + inlen - 2 * blocklen, blocklen * 2) diff --git a/crypto/conf/conf_err.c b/crypto/conf/conf_err.c index dd20a1a..ebef728 100644 --- a/crypto/conf/conf_err.c +++ b/crypto/conf/conf_err.c @@ -21,6 +21,7 @@ static const ERR_STRING_DATA CONF_str_functs[] = { {ERR_PACK(ERR_LIB_CONF, CONF_F_DEF_LOAD, 0), "def_load"}, {ERR_PACK(ERR_LIB_CONF, CONF_F_DEF_LOAD_BIO, 0), "def_load_bio"}, {ERR_PACK(ERR_LIB_CONF, CONF_F_GET_NEXT_FILE, 0), "get_next_file"}, + {ERR_PACK(ERR_LIB_CONF, CONF_F_MODULE_ADD, 0), "module_add"}, {ERR_PACK(ERR_LIB_CONF, CONF_F_MODULE_INIT, 0), "module_init"}, {ERR_PACK(ERR_LIB_CONF, CONF_F_MODULE_LOAD_DSO, 0), "module_load_dso"}, {ERR_PACK(ERR_LIB_CONF, CONF_F_MODULE_RUN, 0), "module_run"}, diff --git a/crypto/conf/conf_mod.c b/crypto/conf/conf_mod.c index 7622d8e..99f0fcc 100644 --- a/crypto/conf/conf_mod.c +++ b/crypto/conf/conf_mod.c @@ -232,9 +232,10 @@ static CONF_MODULE *module_add(DSO *dso, const char *name, supported_modules = sk_CONF_MODULE_new_null(); if (supported_modules == NULL) return NULL; - tmod = OPENSSL_zalloc(sizeof(*tmod)); - if (tmod == NULL) + if ((tmod = OPENSSL_zalloc(sizeof(*tmod))) == NULL) { + CONFerr(CONF_F_MODULE_ADD, ERR_R_MALLOC_FAILURE); return NULL; + } tmod->dso = dso; tmod->name = OPENSSL_strdup(name); diff --git a/crypto/cpt_err.c b/crypto/cpt_err.c index d4d2878..43426ec 100644 --- a/crypto/cpt_err.c +++ b/crypto/cpt_err.c @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -27,8 +27,10 @@ static const ERR_STRING_DATA CRYPTO_str_functs[] = { "CRYPTO_set_ex_data"}, {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_FIPS_MODE_SET, 0), "FIPS_mode_set"}, {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_GET_AND_LOCK, 0), "get_and_lock"}, + {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_OPENSSL_ATEXIT, 0), "OPENSSL_atexit"}, {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_OPENSSL_BUF2HEXSTR, 0), "OPENSSL_buf2hexstr"}, + {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_OPENSSL_FOPEN, 0), "openssl_fopen"}, {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_OPENSSL_HEXSTR2BUF, 0), "OPENSSL_hexstr2buf"}, {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_OPENSSL_INIT_CRYPTO, 0), diff --git a/crypto/dh/dh_err.c b/crypto/dh/dh_err.c index bbedab5..7285587 100644 --- a/crypto/dh/dh_err.c +++ b/crypto/dh/dh_err.c @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -41,6 +41,7 @@ static const ERR_STRING_DATA DH_str_functs[] = { {ERR_PACK(ERR_LIB_DH, DH_F_GENERATE_KEY, 0), "generate_key"}, {ERR_PACK(ERR_LIB_DH, DH_F_PKEY_DH_CTRL_STR, 0), "pkey_dh_ctrl_str"}, {ERR_PACK(ERR_LIB_DH, DH_F_PKEY_DH_DERIVE, 0), "pkey_dh_derive"}, + {ERR_PACK(ERR_LIB_DH, DH_F_PKEY_DH_INIT, 0), "pkey_dh_init"}, {ERR_PACK(ERR_LIB_DH, DH_F_PKEY_DH_KEYGEN, 0), "pkey_dh_keygen"}, {0, NULL} }; diff --git a/crypto/dh/dh_pmeth.c b/crypto/dh/dh_pmeth.c index bd8b8cc..7137196 100644 --- a/crypto/dh/dh_pmeth.c +++ b/crypto/dh/dh_pmeth.c @@ -50,9 +50,10 @@ static int pkey_dh_init(EVP_PKEY_CTX *ctx) { DH_PKEY_CTX *dctx; - dctx = OPENSSL_zalloc(sizeof(*dctx)); - if (dctx == NULL) + if ((dctx = OPENSSL_zalloc(sizeof(*dctx))) == NULL) { + DHerr(DH_F_PKEY_DH_INIT, ERR_R_MALLOC_FAILURE); return 0; + } dctx->prime_len = 1024; dctx->subprime_len = -1; dctx->generator = 2; diff --git a/crypto/ec/ec_err.c b/crypto/ec/ec_err.c index fe90c01..475f4e1 100644 --- a/crypto/ec/ec_err.c +++ b/crypto/ec/ec_err.c @@ -174,6 +174,7 @@ static const ERR_STRING_DATA EC_str_functs[] = { {ERR_PACK(ERR_LIB_EC, EC_F_EC_KEY_OCT2PRIV, 0), "EC_KEY_oct2priv"}, {ERR_PACK(ERR_LIB_EC, EC_F_EC_KEY_PRINT, 0), "EC_KEY_print"}, {ERR_PACK(ERR_LIB_EC, EC_F_EC_KEY_PRINT_FP, 0), "EC_KEY_print_fp"}, + {ERR_PACK(ERR_LIB_EC, EC_F_EC_KEY_PRIV2BUF, 0), "EC_KEY_priv2buf"}, {ERR_PACK(ERR_LIB_EC, EC_F_EC_KEY_PRIV2OCT, 0), "EC_KEY_priv2oct"}, {ERR_PACK(ERR_LIB_EC, EC_F_EC_KEY_SET_PUBLIC_KEY_AFFINE_COORDINATES, 0), "EC_KEY_set_public_key_affine_coordinates"}, @@ -188,6 +189,7 @@ static const ERR_STRING_DATA EC_str_functs[] = { {ERR_PACK(ERR_LIB_EC, EC_F_EC_POINTS_MAKE_AFFINE, 0), "EC_POINTs_make_affine"}, {ERR_PACK(ERR_LIB_EC, EC_F_EC_POINT_ADD, 0), "EC_POINT_add"}, + {ERR_PACK(ERR_LIB_EC, EC_F_EC_POINT_BN2POINT, 0), "EC_POINT_bn2point"}, {ERR_PACK(ERR_LIB_EC, EC_F_EC_POINT_CMP, 0), "EC_POINT_cmp"}, {ERR_PACK(ERR_LIB_EC, EC_F_EC_POINT_COPY, 0), "EC_POINT_copy"}, {ERR_PACK(ERR_LIB_EC, EC_F_EC_POINT_DBL, 0), "EC_POINT_dbl"}, @@ -206,6 +208,7 @@ static const ERR_STRING_DATA EC_str_functs[] = { "EC_POINT_make_affine"}, {ERR_PACK(ERR_LIB_EC, EC_F_EC_POINT_NEW, 0), "EC_POINT_new"}, {ERR_PACK(ERR_LIB_EC, EC_F_EC_POINT_OCT2POINT, 0), "EC_POINT_oct2point"}, + {ERR_PACK(ERR_LIB_EC, EC_F_EC_POINT_POINT2BUF, 0), "EC_POINT_point2buf"}, {ERR_PACK(ERR_LIB_EC, EC_F_EC_POINT_POINT2OCT, 0), "EC_POINT_point2oct"}, {ERR_PACK(ERR_LIB_EC, EC_F_EC_POINT_SET_AFFINE_COORDINATES_GF2M, 0), "EC_POINT_set_affine_coordinates_GF2m"}, @@ -250,6 +253,8 @@ static const ERR_STRING_DATA EC_str_functs[] = { {ERR_PACK(ERR_LIB_EC, EC_F_PKEY_EC_CTRL, 0), "pkey_ec_ctrl"}, {ERR_PACK(ERR_LIB_EC, EC_F_PKEY_EC_CTRL_STR, 0), "pkey_ec_ctrl_str"}, {ERR_PACK(ERR_LIB_EC, EC_F_PKEY_EC_DERIVE, 0), "pkey_ec_derive"}, + {ERR_PACK(ERR_LIB_EC, EC_F_PKEY_EC_INIT, 0), "pkey_ec_init"}, + {ERR_PACK(ERR_LIB_EC, EC_F_PKEY_EC_KDF_DERIVE, 0), "pkey_ec_kdf_derive"}, {ERR_PACK(ERR_LIB_EC, EC_F_PKEY_EC_KEYGEN, 0), "pkey_ec_keygen"}, {ERR_PACK(ERR_LIB_EC, EC_F_PKEY_EC_PARAMGEN, 0), "pkey_ec_paramgen"}, {ERR_PACK(ERR_LIB_EC, EC_F_PKEY_EC_SIGN, 0), "pkey_ec_sign"}, diff --git a/crypto/ec/ec_key.c b/crypto/ec/ec_key.c index 3874553..1352cbe 100644 --- a/crypto/ec/ec_key.c +++ b/crypto/ec/ec_key.c @@ -613,12 +613,14 @@ size_t EC_KEY_priv2buf(const EC_KEY *eckey, unsigned char **pbuf) { size_t len; unsigned char *buf; + len = EC_KEY_priv2oct(eckey, NULL, 0); if (len == 0) return 0; - buf = OPENSSL_malloc(len); - if (buf == NULL) + if ((buf = OPENSSL_malloc(len)) == NULL) { + ECerr(EC_F_EC_KEY_PRIV2BUF, ERR_R_MALLOC_FAILURE); return 0; + } len = EC_KEY_priv2oct(eckey, buf, len); if (len == 0) { OPENSSL_free(buf); diff --git a/crypto/ec/ec_lib.c b/crypto/ec/ec_lib.c index d98ffae..1d7e633 100644 --- a/crypto/ec/ec_lib.c +++ b/crypto/ec/ec_lib.c @@ -213,9 +213,10 @@ int EC_GROUP_copy(EC_GROUP *dest, const EC_GROUP *src) if (src->seed) { OPENSSL_free(dest->seed); - dest->seed = OPENSSL_malloc(src->seed_len); - if (dest->seed == NULL) + if ((dest->seed = OPENSSL_malloc(src->seed_len)) == NULL) { + ECerr(EC_F_EC_GROUP_COPY, ERR_R_MALLOC_FAILURE); return 0; + } if (!memcpy(dest->seed, src->seed, src->seed_len)) return 0; dest->seed_len = src->seed_len; diff --git a/crypto/ec/ec_oct.c b/crypto/ec/ec_oct.c index 4a3e54a..32a88fb 100644 --- a/crypto/ec/ec_oct.c +++ b/crypto/ec/ec_oct.c @@ -144,12 +144,14 @@ size_t EC_POINT_point2buf(const EC_GROUP *group, const EC_POINT *point, { size_t len; unsigned char *buf; + len = EC_POINT_point2oct(group, point, form, NULL, 0, NULL); if (len == 0) return 0; - buf = OPENSSL_malloc(len); - if (buf == NULL) + if ((buf = OPENSSL_malloc(len)) == NULL) { + ECerr(EC_F_EC_POINT_POINT2BUF, ERR_R_MALLOC_FAILURE); return 0; + } len = EC_POINT_point2oct(group, point, form, buf, len, ctx); if (len == 0) { OPENSSL_free(buf); diff --git a/crypto/ec/ec_pmeth.c b/crypto/ec/ec_pmeth.c index f1e519e..5be2923 100644 --- a/crypto/ec/ec_pmeth.c +++ b/crypto/ec/ec_pmeth.c @@ -46,9 +46,10 @@ static int pkey_ec_init(EVP_PKEY_CTX *ctx) { EC_PKEY_CTX *dctx; - dctx = OPENSSL_zalloc(sizeof(*dctx)); - if (dctx == NULL) + if ((dctx = OPENSSL_zalloc(sizeof(*dctx))) == NULL) { + ECerr(EC_F_PKEY_EC_INIT, ERR_R_MALLOC_FAILURE); return 0; + } dctx->cofactor_mode = -1; dctx->kdf_type = EVP_PKEY_ECDH_KDF_NONE; @@ -297,9 +298,10 @@ static int pkey_ec_kdf_derive(EVP_PKEY_CTX *ctx, return 0; if (!pkey_ec_derive(ctx, NULL, &ktmplen)) return 0; - ktmp = OPENSSL_malloc(ktmplen); - if (ktmp == NULL) + if ((ktmp = OPENSSL_malloc(ktmplen)) == NULL) { + ECerr(EC_F_PKEY_EC_KDF_DERIVE, ERR_R_MALLOC_FAILURE); return 0; + } if (!pkey_ec_derive(ctx, ktmp, &ktmplen)) goto err; /* Do KDF stuff */ diff --git a/crypto/ec/ec_print.c b/crypto/ec/ec_print.c index 1afa2ce..3cd6b6b 100644 --- a/crypto/ec/ec_print.c +++ b/crypto/ec/ec_print.c @@ -8,6 +8,7 @@ */ #include +#include #include "ec_lcl.h" BIGNUM *EC_POINT_point2bn(const EC_GROUP *group, @@ -39,9 +40,10 @@ EC_POINT *EC_POINT_bn2point(const EC_GROUP *group, if ((buf_len = BN_num_bytes(bn)) == 0) return NULL; - buf = OPENSSL_malloc(buf_len); - if (buf == NULL) + if ((buf = OPENSSL_malloc(buf_len)) == NULL) { + ECerr(EC_F_EC_POINT_BN2POINT, ERR_R_MALLOC_FAILURE); return NULL; + } if (!BN_bn2bin(bn, buf)) { OPENSSL_free(buf); diff --git a/crypto/engine/eng_err.c b/crypto/engine/eng_err.c index 5f24e99..bd1aefa 100644 --- a/crypto/engine/eng_err.c +++ b/crypto/engine/eng_err.c @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -66,11 +66,14 @@ static const ERR_STRING_DATA ENGINE_str_functs[] = { {ERR_PACK(ERR_LIB_ENGINE, ENGINE_F_ENGINE_UNLOCKED_FINISH, 0), "engine_unlocked_finish"}, {ERR_PACK(ERR_LIB_ENGINE, ENGINE_F_ENGINE_UP_REF, 0), "ENGINE_up_ref"}, + {ERR_PACK(ERR_LIB_ENGINE, ENGINE_F_INT_CLEANUP_ITEM, 0), + "int_cleanup_item"}, {ERR_PACK(ERR_LIB_ENGINE, ENGINE_F_INT_CTRL_HELPER, 0), "int_ctrl_helper"}, {ERR_PACK(ERR_LIB_ENGINE, ENGINE_F_INT_ENGINE_CONFIGURE, 0), "int_engine_configure"}, {ERR_PACK(ERR_LIB_ENGINE, ENGINE_F_INT_ENGINE_MODULE_INIT, 0), "int_engine_module_init"}, + {ERR_PACK(ERR_LIB_ENGINE, ENGINE_F_OSSL_HMAC_INIT, 0), "ossl_hmac_init"}, {0, NULL} }; diff --git a/crypto/engine/eng_lib.c b/crypto/engine/eng_lib.c index 48d86b9..f5031d3 100644 --- a/crypto/engine/eng_lib.c +++ b/crypto/engine/eng_lib.c @@ -126,9 +126,12 @@ static int int_cleanup_check(int create) static ENGINE_CLEANUP_ITEM *int_cleanup_item(ENGINE_CLEANUP_CB *cb) { - ENGINE_CLEANUP_ITEM *item = OPENSSL_malloc(sizeof(*item)); - if (item == NULL) + ENGINE_CLEANUP_ITEM *item; + + if ((item = OPENSSL_malloc(sizeof(*item))) == NULL) { + ENGINEerr(ENGINE_F_INT_CLEANUP_ITEM, ERR_R_MALLOC_FAILURE); return NULL; + } item->cb = cb; return item; } @@ -136,6 +139,7 @@ static ENGINE_CLEANUP_ITEM *int_cleanup_item(ENGINE_CLEANUP_CB *cb) void engine_cleanup_add_first(ENGINE_CLEANUP_CB *cb) { ENGINE_CLEANUP_ITEM *item; + if (!int_cleanup_check(1)) return; item = int_cleanup_item(cb); diff --git a/crypto/engine/eng_openssl.c b/crypto/engine/eng_openssl.c index 02885f4..2a1dc93 100644 --- a/crypto/engine/eng_openssl.c +++ b/crypto/engine/eng_openssl.c @@ -431,9 +431,10 @@ static int ossl_hmac_init(EVP_PKEY_CTX *ctx) { OSSL_HMAC_PKEY_CTX *hctx; - hctx = OPENSSL_zalloc(sizeof(*hctx)); - if (hctx == NULL) + if ((hctx = OPENSSL_zalloc(sizeof(*hctx))) == NULL) { + ENGINEerr(ENGINE_F_OSSL_HMAC_INIT, ERR_R_MALLOC_FAILURE); return 0; + } hctx->ktmp.type = V_ASN1_OCTET_STRING; hctx->ctx = HMAC_CTX_new(); if (hctx->ctx == NULL) { diff --git a/crypto/err/err.c b/crypto/err/err.c index 4c5f354..1fb71e7 100644 --- a/crypto/err/err.c +++ b/crypto/err/err.c @@ -678,9 +678,10 @@ ERR_STATE *ERR_get_state(void) state = CRYPTO_THREAD_get_local(&err_thread_local); if (state == NULL) { - state = OPENSSL_zalloc(sizeof(*state)); - if (state == NULL) + if ((state = OPENSSL_zalloc(sizeof(*state))) == NULL) { + /* ERRerr(ERR_F_ERR_GET_STATE, ERR_R_MALLOC_FAILURE); */ return NULL; + } if (!ossl_init_thread_start(OPENSSL_INIT_THREAD_ERR_STATE) || !CRYPTO_THREAD_set_local(&err_thread_local, state)) { @@ -739,9 +740,10 @@ void ERR_add_error_vdata(int num, va_list args) char *str, *p, *a; s = 80; - str = OPENSSL_malloc(s + 1); - if (str == NULL) + if ((str = OPENSSL_malloc(s + 1)) == NULL) { + /* ERRerr(ERR_F_ERR_ADD_ERROR_VDATA, ERR_R_MALLOC_FAILURE); */ return; + } str[0] = '\0'; n = 0; diff --git a/crypto/err/openssl.txt b/crypto/err/openssl.txt index f160438..3acecfb 100644 --- a/crypto/err/openssl.txt +++ b/crypto/err/openssl.txt @@ -10,6 +10,7 @@ ASN1_F_A2D_ASN1_OBJECT:100:a2d_ASN1_OBJECT ASN1_F_A2I_ASN1_INTEGER:102:a2i_ASN1_INTEGER ASN1_F_A2I_ASN1_STRING:103:a2i_ASN1_STRING ASN1_F_APPEND_EXP:176:append_exp +ASN1_F_ASN1_BIO_INIT:113:asn1_bio_init ASN1_F_ASN1_BIT_STRING_SET_BIT:183:ASN1_BIT_STRING_set_bit ASN1_F_ASN1_CB:177:asn1_cb ASN1_F_ASN1_CHECK_TLEN:104:asn1_check_tlen @@ -21,6 +22,7 @@ ASN1_F_ASN1_DIGEST:184:ASN1_digest ASN1_F_ASN1_DO_ADB:110:asn1_do_adb ASN1_F_ASN1_DO_LOCK:233:asn1_do_lock ASN1_F_ASN1_DUP:111:ASN1_dup +ASN1_F_ASN1_ENC_SAVE:115:asn1_enc_save ASN1_F_ASN1_EX_C2I:204:asn1_ex_c2i ASN1_F_ASN1_FIND_END:190:asn1_find_end ASN1_F_ASN1_GENERALIZEDTIME_ADJ:216:ASN1_GENERALIZEDTIME_adj @@ -34,6 +36,7 @@ ASN1_F_ASN1_ITEM_D2I_FP:206:ASN1_item_d2i_fp ASN1_F_ASN1_ITEM_DUP:191:ASN1_item_dup ASN1_F_ASN1_ITEM_EMBED_D2I:120:asn1_item_embed_d2i ASN1_F_ASN1_ITEM_EMBED_NEW:121:asn1_item_embed_new +ASN1_F_ASN1_ITEM_FLAGS_I2D:118:asn1_item_flags_i2d ASN1_F_ASN1_ITEM_I2D_BIO:192:ASN1_item_i2d_bio ASN1_F_ASN1_ITEM_I2D_FP:193:ASN1_item_i2d_fp ASN1_F_ASN1_ITEM_PACK:198:ASN1_item_pack @@ -45,6 +48,7 @@ ASN1_F_ASN1_MBSTRING_NCOPY:122:ASN1_mbstring_ncopy ASN1_F_ASN1_OBJECT_NEW:123:ASN1_OBJECT_new ASN1_F_ASN1_OUTPUT_DATA:214:asn1_output_data ASN1_F_ASN1_PCTX_NEW:205:ASN1_PCTX_new +ASN1_F_ASN1_PRIMITIVE_NEW:119:asn1_primitive_new ASN1_F_ASN1_SCTX_NEW:221:ASN1_SCTX_new ASN1_F_ASN1_SIGN:128:ASN1_sign ASN1_F_ASN1_STR2TYPE:179:asn1_str2type @@ -78,7 +82,10 @@ ASN1_F_D2I_ASN1_UINTEGER:150:d2i_ASN1_UINTEGER ASN1_F_D2I_AUTOPRIVATEKEY:207:d2i_AutoPrivateKey ASN1_F_D2I_PRIVATEKEY:154:d2i_PrivateKey ASN1_F_D2I_PUBLICKEY:155:d2i_PublicKey +ASN1_F_DO_CREATE:124:do_create +ASN1_F_DO_DUMP:125:do_dump ASN1_F_DO_TCREATE:222:do_tcreate +ASN1_F_I2A_ASN1_OBJECT:126:i2a_ASN1_OBJECT ASN1_F_I2D_ASN1_BIO_STREAM:211:i2d_ASN1_bio_stream ASN1_F_I2D_DSA_PUBKEY:161:i2d_DSA_PUBKEY ASN1_F_I2D_EC_PUBKEY:181:i2d_EC_PUBKEY @@ -86,6 +93,8 @@ ASN1_F_I2D_PRIVATEKEY:163:i2d_PrivateKey ASN1_F_I2D_PUBLICKEY:164:i2d_PublicKey ASN1_F_I2D_RSA_PUBKEY:165:i2d_RSA_PUBKEY ASN1_F_LONG_C2I:166:long_c2i +ASN1_F_NDEF_PREFIX:127:ndef_prefix +ASN1_F_NDEF_SUFFIX:136:ndef_suffix ASN1_F_OID_MODULE_INIT:174:oid_module_init ASN1_F_PARSE_TAGGING:182:parse_tagging ASN1_F_PKCS5_PBE2_SET_IV:167:PKCS5_pbe2_set_iv @@ -96,9 +105,12 @@ ASN1_F_PKCS5_PBKDF2_SET:219:PKCS5_pbkdf2_set ASN1_F_PKCS5_SCRYPT_SET:232:pkcs5_scrypt_set ASN1_F_SMIME_READ_ASN1:212:SMIME_read_ASN1 ASN1_F_SMIME_TEXT:213:SMIME_text +ASN1_F_STABLE_GET:138:stable_get ASN1_F_STBL_MODULE_INIT:223:stbl_module_init ASN1_F_UINT32_C2I:105:uint32_c2i +ASN1_F_UINT32_NEW:139:uint32_new ASN1_F_UINT64_C2I:112:uint64_c2i +ASN1_F_UINT64_NEW:141:uint64_new ASN1_F_X509_CRL_ADD0_REVOKED:169:X509_CRL_add0_revoked ASN1_F_X509_INFO_NEW:170:X509_INFO_new ASN1_F_X509_NAME_ENCODE:203:x509_name_encode @@ -111,7 +123,9 @@ ASYNC_F_ASYNC_JOB_NEW:102:async_job_new ASYNC_F_ASYNC_PAUSE_JOB:103:ASYNC_pause_job ASYNC_F_ASYNC_START_FUNC:104:async_start_func ASYNC_F_ASYNC_START_JOB:105:ASYNC_start_job +ASYNC_F_ASYNC_WAIT_CTX_SET_WAIT_FD:106:ASYNC_WAIT_CTX_set_wait_fd BIO_F_ACPT_STATE:100:acpt_state +BIO_F_ADDRINFO_WRAP:148:addrinfo_wrap BIO_F_ADDR_STRINGS:134:addr_strings BIO_F_BIO_ACCEPT:101:BIO_accept BIO_F_BIO_ACCEPT_EX:137:BIO_accept_ex @@ -152,11 +166,14 @@ BIO_F_BIO_WRITE_INTERN:128:bio_write_intern BIO_F_BUFFER_CTRL:114:buffer_ctrl BIO_F_CONN_CTRL:127:conn_ctrl BIO_F_CONN_STATE:115:conn_state +BIO_F_DGRAM_SCTP_NEW:149:dgram_sctp_new BIO_F_DGRAM_SCTP_READ:132:dgram_sctp_read BIO_F_DGRAM_SCTP_WRITE:133:dgram_sctp_write +BIO_F_DOAPR_OUTCH:150:doapr_outch BIO_F_FILE_CTRL:116:file_ctrl BIO_F_FILE_READ:130:file_read BIO_F_LINEBUFFER_CTRL:129:linebuffer_ctrl +BIO_F_LINEBUFFER_NEW:151:linebuffer_new BIO_F_MEM_WRITE:117:mem_write BIO_F_SSL_NEW:118:SSL_new BN_F_BNRAND:127:bnrand @@ -199,10 +216,12 @@ BN_F_BN_MOD_LSHIFT_QUICK:119:BN_mod_lshift_quick BN_F_BN_MOD_SQRT:121:BN_mod_sqrt BN_F_BN_MPI2BN:112:BN_mpi2bn BN_F_BN_NEW:113:BN_new +BN_F_BN_POOL_GET:147:BN_POOL_get BN_F_BN_RAND:114:BN_rand BN_F_BN_RAND_RANGE:122:BN_rand_range BN_F_BN_RSHIFT:146:BN_rshift BN_F_BN_SET_WORDS:144:bn_set_words +BN_F_BN_STACK_PUSH:148:BN_STACK_push BN_F_BN_USUB:115:BN_usub BUF_F_BUF_MEM_GROW:100:BUF_MEM_grow BUF_F_BUF_MEM_GROW_CLEAN:105:BUF_MEM_grow_clean @@ -233,6 +252,7 @@ CMS_F_CMS_DIGESTEDDATA_DO_FINAL:117:cms_DigestedData_do_final CMS_F_CMS_DIGEST_VERIFY:118:CMS_digest_verify CMS_F_CMS_ENCODE_RECEIPT:161:cms_encode_Receipt CMS_F_CMS_ENCRYPT:119:CMS_encrypt +CMS_F_CMS_ENCRYPTEDCONTENT_INIT:179:cms_EncryptedContent_init CMS_F_CMS_ENCRYPTEDCONTENT_INIT_BIO:120:cms_EncryptedContent_init_bio CMS_F_CMS_ENCRYPTEDDATA_DECRYPT:121:CMS_EncryptedData_decrypt CMS_F_CMS_ENCRYPTEDDATA_ENCRYPT:122:CMS_EncryptedData_encrypt @@ -289,6 +309,7 @@ CMS_F_CMS_SIGN_RECEIPT:163:CMS_sign_receipt CMS_F_CMS_STREAM:155:CMS_stream CMS_F_CMS_UNCOMPRESS:156:CMS_uncompress CMS_F_CMS_VERIFY:157:CMS_verify +CMS_F_KEK_UNWRAP_KEY:180:kek_unwrap_key COMP_F_BIO_ZLIB_FLUSH:99:bio_zlib_flush COMP_F_BIO_ZLIB_NEW:100:bio_zlib_new COMP_F_BIO_ZLIB_READ:101:bio_zlib_read @@ -300,6 +321,7 @@ CONF_F_CONF_PARSE_LIST:119:CONF_parse_list CONF_F_DEF_LOAD:120:def_load CONF_F_DEF_LOAD_BIO:121:def_load_bio CONF_F_GET_NEXT_FILE:107:get_next_file +CONF_F_MODULE_ADD:122:module_add CONF_F_MODULE_INIT:115:module_init CONF_F_MODULE_LOAD_DSO:117:module_load_dso CONF_F_MODULE_RUN:118:module_run @@ -322,7 +344,9 @@ CRYPTO_F_CRYPTO_NEW_EX_DATA:112:CRYPTO_new_ex_data CRYPTO_F_CRYPTO_SET_EX_DATA:102:CRYPTO_set_ex_data CRYPTO_F_FIPS_MODE_SET:109:FIPS_mode_set CRYPTO_F_GET_AND_LOCK:113:get_and_lock +CRYPTO_F_OPENSSL_ATEXIT:114:OPENSSL_atexit CRYPTO_F_OPENSSL_BUF2HEXSTR:117:OPENSSL_buf2hexstr +CRYPTO_F_OPENSSL_FOPEN:119:openssl_fopen CRYPTO_F_OPENSSL_HEXSTR2BUF:118:OPENSSL_hexstr2buf CRYPTO_F_OPENSSL_INIT_CRYPTO:116:OPENSSL_init_crypto CT_F_CTLOG_NEW:117:CTLOG_new @@ -376,6 +400,7 @@ DH_F_DO_DH_PRINT:100:do_dh_print DH_F_GENERATE_KEY:103:generate_key DH_F_PKEY_DH_CTRL_STR:120:pkey_dh_ctrl_str DH_F_PKEY_DH_DERIVE:112:pkey_dh_derive +DH_F_PKEY_DH_INIT:125:pkey_dh_init DH_F_PKEY_DH_KEYGEN:113:pkey_dh_keygen DSA_F_DSAPARAMS_PRINT:100:DSAparams_print DSA_F_DSAPARAMS_PRINT_FP:101:DSAparams_print_fp @@ -544,6 +569,7 @@ EC_F_EC_KEY_NEW_METHOD:245:EC_KEY_new_method EC_F_EC_KEY_OCT2PRIV:255:EC_KEY_oct2priv EC_F_EC_KEY_PRINT:180:EC_KEY_print EC_F_EC_KEY_PRINT_FP:181:EC_KEY_print_fp +EC_F_EC_KEY_PRIV2BUF:279:EC_KEY_priv2buf EC_F_EC_KEY_PRIV2OCT:256:EC_KEY_priv2oct EC_F_EC_KEY_SET_PUBLIC_KEY_AFFINE_COORDINATES:229:\ EC_KEY_set_public_key_affine_coordinates @@ -554,6 +580,7 @@ EC_F_EC_PKEY_CHECK:273:ec_pkey_check EC_F_EC_PKEY_PARAM_CHECK:274:ec_pkey_param_check EC_F_EC_POINTS_MAKE_AFFINE:136:EC_POINTs_make_affine EC_F_EC_POINT_ADD:112:EC_POINT_add +EC_F_EC_POINT_BN2POINT:280:EC_POINT_bn2point EC_F_EC_POINT_CMP:113:EC_POINT_cmp EC_F_EC_POINT_COPY:114:EC_POINT_copy EC_F_EC_POINT_DBL:115:EC_POINT_dbl @@ -568,6 +595,7 @@ EC_F_EC_POINT_IS_ON_CURVE:119:EC_POINT_is_on_curve EC_F_EC_POINT_MAKE_AFFINE:120:EC_POINT_make_affine EC_F_EC_POINT_NEW:121:EC_POINT_new EC_F_EC_POINT_OCT2POINT:122:EC_POINT_oct2point +EC_F_EC_POINT_POINT2BUF:281:EC_POINT_point2buf EC_F_EC_POINT_POINT2OCT:123:EC_POINT_point2oct EC_F_EC_POINT_SET_AFFINE_COORDINATES_GF2M:185:\ EC_POINT_set_affine_coordinates_GF2m @@ -602,6 +630,8 @@ EC_F_PKEY_ECX_DERIVE:269:pkey_ecx_derive EC_F_PKEY_EC_CTRL:197:pkey_ec_ctrl EC_F_PKEY_EC_CTRL_STR:198:pkey_ec_ctrl_str EC_F_PKEY_EC_DERIVE:217:pkey_ec_derive +EC_F_PKEY_EC_INIT:282:pkey_ec_init +EC_F_PKEY_EC_KDF_DERIVE:283:pkey_ec_kdf_derive EC_F_PKEY_EC_KEYGEN:199:pkey_ec_keygen EC_F_PKEY_EC_PARAMGEN:219:pkey_ec_paramgen EC_F_PKEY_EC_SIGN:218:pkey_ec_sign @@ -641,23 +671,29 @@ ENGINE_F_ENGINE_SET_NAME:130:ENGINE_set_name ENGINE_F_ENGINE_TABLE_REGISTER:184:engine_table_register ENGINE_F_ENGINE_UNLOCKED_FINISH:191:engine_unlocked_finish ENGINE_F_ENGINE_UP_REF:190:ENGINE_up_ref +ENGINE_F_INT_CLEANUP_ITEM:199:int_cleanup_item ENGINE_F_INT_CTRL_HELPER:172:int_ctrl_helper ENGINE_F_INT_ENGINE_CONFIGURE:188:int_engine_configure ENGINE_F_INT_ENGINE_MODULE_INIT:187:int_engine_module_init +ENGINE_F_OSSL_HMAC_INIT:200:ossl_hmac_init EVP_F_AESNI_INIT_KEY:165:aesni_init_key +EVP_F_AES_GCM_CTRL:196:aes_gcm_ctrl EVP_F_AES_INIT_KEY:133:aes_init_key EVP_F_AES_OCB_CIPHER:169:aes_ocb_cipher EVP_F_AES_T4_INIT_KEY:178:aes_t4_init_key EVP_F_AES_WRAP_CIPHER:170:aes_wrap_cipher EVP_F_ALG_MODULE_INIT:177:alg_module_init EVP_F_ARIA_CCM_INIT_KEY:175:aria_ccm_init_key +EVP_F_ARIA_GCM_CTRL:197:aria_gcm_ctrl EVP_F_ARIA_GCM_INIT_KEY:176:aria_gcm_init_key EVP_F_ARIA_INIT_KEY:185:aria_init_key +EVP_F_B64_NEW:198:b64_new EVP_F_CAMELLIA_INIT_KEY:159:camellia_init_key EVP_F_CHACHA20_POLY1305_CTRL:182:chacha20_poly1305_ctrl EVP_F_CMLL_T4_INIT_KEY:179:cmll_t4_init_key EVP_F_DES_EDE3_WRAP_CIPHER:171:des_ede3_wrap_cipher EVP_F_DO_SIGVER_INIT:161:do_sigver_init +EVP_F_ENC_NEW:199:enc_new EVP_F_EVP_CIPHERINIT_EX:123:EVP_CipherInit_ex EVP_F_EVP_CIPHER_CTX_COPY:163:EVP_CIPHER_CTX_copy EVP_F_EVP_CIPHER_CTX_CTRL:124:EVP_CIPHER_CTX_ctrl @@ -722,6 +758,7 @@ EVP_F_EVP_PKEY_VERIFY_RECOVER_INIT:145:EVP_PKEY_verify_recover_init EVP_F_EVP_SIGNFINAL:107:EVP_SignFinal EVP_F_EVP_VERIFYFINAL:108:EVP_VerifyFinal EVP_F_INT_CTX_NEW:157:int_ctx_new +EVP_F_OK_NEW:200:ok_new EVP_F_PKCS5_PBE_KEYIVGEN:117:PKCS5_PBE_keyivgen EVP_F_PKCS5_V2_PBE_KEYIVGEN:118:PKCS5_v2_PBE_keyivgen EVP_F_PKCS5_V2_PBKDF2_KEYIVGEN:164:PKCS5_v2_PBKDF2_keyivgen @@ -729,9 +766,11 @@ EVP_F_PKCS5_V2_SCRYPT_KEYIVGEN:180:PKCS5_v2_scrypt_keyivgen EVP_F_PKEY_SET_TYPE:158:pkey_set_type EVP_F_RC2_MAGIC_TO_METH:109:rc2_magic_to_meth EVP_F_RC5_CTRL:125:rc5_ctrl +EVP_F_S390X_AES_GCM_CTRL:201:s390x_aes_gcm_ctrl EVP_F_UPDATE:173:update KDF_F_PKEY_HKDF_CTRL_STR:103:pkey_hkdf_ctrl_str KDF_F_PKEY_HKDF_DERIVE:102:pkey_hkdf_derive +KDF_F_PKEY_HKDF_INIT:108:pkey_hkdf_init KDF_F_PKEY_SCRYPT_CTRL_STR:104:pkey_scrypt_ctrl_str KDF_F_PKEY_SCRYPT_CTRL_UINT64:105:pkey_scrypt_ctrl_uint64 KDF_F_PKEY_SCRYPT_DERIVE:109:pkey_scrypt_derive @@ -739,7 +778,10 @@ KDF_F_PKEY_SCRYPT_INIT:106:pkey_scrypt_init KDF_F_PKEY_SCRYPT_SET_MEMBUF:107:pkey_scrypt_set_membuf KDF_F_PKEY_TLS1_PRF_CTRL_STR:100:pkey_tls1_prf_ctrl_str KDF_F_PKEY_TLS1_PRF_DERIVE:101:pkey_tls1_prf_derive +KDF_F_PKEY_TLS1_PRF_INIT:110:pkey_tls1_prf_init +KDF_F_TLS1_PRF_ALG:111:tls1_prf_alg OBJ_F_OBJ_ADD_OBJECT:105:OBJ_add_object +OBJ_F_OBJ_ADD_SIGID:107:OBJ_add_sigid OBJ_F_OBJ_CREATE:100:OBJ_create OBJ_F_OBJ_DUP:101:OBJ_dup OBJ_F_OBJ_NAME_NEW_INDEX:106:OBJ_NAME_new_index @@ -816,6 +858,7 @@ PEM_F_D2I_PKCS8PRIVATEKEY_FP:121:d2i_PKCS8PrivateKey_fp PEM_F_DO_B2I:132:do_b2i PEM_F_DO_B2I_BIO:133:do_b2i_bio PEM_F_DO_BLOB_HEADER:134:do_blob_header +PEM_F_DO_I2B:146:do_i2b PEM_F_DO_PK8PKEY:126:do_pk8pkey PEM_F_DO_PK8PKEY_FP:125:do_pk8pkey_fp PEM_F_DO_PVK_BODY:135:do_PVK_body @@ -950,6 +993,7 @@ RSA_F_RSA_METH_DUP:161:RSA_meth_dup RSA_F_RSA_METH_NEW:162:RSA_meth_new RSA_F_RSA_METH_SET1_NAME:163:RSA_meth_set1_name RSA_F_RSA_MGF1_TO_MD:157:* +RSA_F_RSA_MULTIP_INFO_NEW:166:rsa_multip_info_new RSA_F_RSA_NEW_METHOD:106:RSA_new_method RSA_F_RSA_NULL:124:* RSA_F_RSA_NULL_PRIVATE_DECRYPT:132:* @@ -990,6 +1034,7 @@ RSA_F_RSA_SIGN_ASN1_OCTET_STRING:118:RSA_sign_ASN1_OCTET_STRING RSA_F_RSA_VERIFY:119:RSA_verify RSA_F_RSA_VERIFY_ASN1_OCTET_STRING:120:RSA_verify_ASN1_OCTET_STRING RSA_F_RSA_VERIFY_PKCS1_PSS_MGF1:126:RSA_verify_PKCS1_PSS_mgf1 +RSA_F_SETUP_TBUF:167:setup_tbuf SM2_F_PKEY_SM2_CTRL:274:pkey_sm2_ctrl SM2_F_PKEY_SM2_CTRL_STR:275:pkey_sm2_ctrl_str SM2_F_PKEY_SM2_KEYGEN:276:pkey_sm2_keygen @@ -1017,6 +1062,7 @@ SSL_F_DO_SSL3_WRITE:104:do_ssl3_write SSL_F_DTLS1_BUFFER_RECORD:247:dtls1_buffer_record SSL_F_DTLS1_CHECK_TIMEOUT_NUM:318:dtls1_check_timeout_num SSL_F_DTLS1_HEARTBEAT:305:* +SSL_F_DTLS1_HM_FRAGMENT_NEW:623:dtls1_hm_fragment_new SSL_F_DTLS1_PREPROCESS_FRAGMENT:288:dtls1_preprocess_fragment SSL_F_DTLS1_PROCESS_BUFFERED_RECORDS:424:dtls1_process_buffered_records SSL_F_DTLS1_PROCESS_RECORD:257:dtls1_process_record @@ -1066,6 +1112,8 @@ SSL_F_OSSL_STATEM_SERVER_READ_TRANSITION:418:ossl_statem_server_read_transition SSL_F_OSSL_STATEM_SERVER_WRITE_TRANSITION:604:\ ossl_statem_server_write_transition SSL_F_PARSE_CA_NAMES:541:parse_ca_names +SSL_F_PITEM_NEW:624:pitem_new +SSL_F_PQUEUE_NEW:625:pqueue_new SSL_F_PROCESS_KEY_SHARE_EXT:439:* SSL_F_READ_STATE_MACHINE:352:read_state_machine SSL_F_SET_CLIENT_CIPHERSUITE:540:set_client_ciphersuite @@ -1118,10 +1166,13 @@ SSL_F_SSL_CHECK_SERVERHELLO_TLSEXT:280:* SSL_F_SSL_CHECK_SRP_EXT_CLIENTHELLO:606:ssl_check_srp_ext_ClientHello SSL_F_SSL_CHECK_SRVR_ECC_CERT_AND_ALG:279:ssl_check_srvr_ecc_cert_and_alg SSL_F_SSL_CHOOSE_CLIENT_VERSION:607:ssl_choose_client_version +SSL_F_SSL_CIPHER_DESCRIPTION:626:SSL_CIPHER_description SSL_F_SSL_CIPHER_LIST_TO_BYTES:425:ssl_cipher_list_to_bytes SSL_F_SSL_CIPHER_PROCESS_RULESTR:230:ssl_cipher_process_rulestr SSL_F_SSL_CIPHER_STRENGTH_SORT:231:ssl_cipher_strength_sort SSL_F_SSL_CLEAR:164:SSL_clear +SSL_F_SSL_CLIENT_HELLO_GET1_EXTENSIONS_PRESENT:627:\ + SSL_client_hello_get1_extensions_present SSL_F_SSL_COMP_ADD_COMPRESSION_METHOD:165:SSL_COMP_add_compression_method SSL_F_SSL_CONF_CMD:334:SSL_CONF_cmd SSL_F_SSL_CREATE_CIPHER_LIST:166:ssl_create_cipher_list @@ -1250,8 +1301,13 @@ SSL_F_TLS1_ENC:401:tls1_enc SSL_F_TLS1_EXPORT_KEYING_MATERIAL:314:tls1_export_keying_material SSL_F_TLS1_GET_CURVELIST:338:tls1_get_curvelist SSL_F_TLS1_PRF:284:tls1_PRF +SSL_F_TLS1_SAVE_U16:628:tls1_save_u16 SSL_F_TLS1_SETUP_KEY_BLOCK:211:tls1_setup_key_block +SSL_F_TLS1_SET_GROUPS:629:tls1_set_groups +SSL_F_TLS1_SET_RAW_SIGALGS:630:tls1_set_raw_sigalgs SSL_F_TLS1_SET_SERVER_SIGALGS:335:tls1_set_server_sigalgs +SSL_F_TLS1_SET_SHARED_SIGALGS:631:tls1_set_shared_sigalgs +SSL_F_TLS1_SET_SIGALGS:632:tls1_set_sigalgs SSL_F_TLS_CHOOSE_SIGALG:513:tls_choose_sigalg SSL_F_TLS_CLIENT_KEY_EXCHANGE_POST_WORK:354:tls_client_key_exchange_post_work SSL_F_TLS_COLLECT_EXTENSIONS:435:tls_collect_extensions @@ -1423,6 +1479,8 @@ SSL_F_TLS_PSK_DO_BINDER:506:tls_psk_do_binder SSL_F_TLS_SCAN_CLIENTHELLO_TLSEXT:450:* SSL_F_TLS_SETUP_HANDSHAKE:508:tls_setup_handshake SSL_F_USE_CERTIFICATE_CHAIN_FILE:220:use_certificate_chain_file +SSL_F_WPACKET_INTERN_INIT_LEN:633:wpacket_intern_init_len +SSL_F_WPACKET_START_SUB_PACKET_LEN__:634:WPACKET_start_sub_packet_len__ SSL_F_WRITE_STATE_MACHINE:586:write_state_machine TS_F_DEF_SERIAL_CB:110:def_serial_cb TS_F_DEF_TIME_CB:111:def_time_cb @@ -1487,6 +1545,7 @@ UI_F_GENERAL_ALLOCATE_BOOLEAN:108:general_allocate_boolean UI_F_GENERAL_ALLOCATE_PROMPT:109:general_allocate_prompt UI_F_NOECHO_CONSOLE:117:noecho_console UI_F_OPEN_CONSOLE:114:open_console +UI_F_UI_CONSTRUCT_PROMPT:121:UI_construct_prompt UI_F_UI_CREATE_METHOD:112:UI_create_method UI_F_UI_CTRL:111:UI_ctrl UI_F_UI_DUP_ERROR_STRING:101:UI_dup_error_string diff --git a/crypto/evp/bio_b64.c b/crypto/evp/bio_b64.c index 737758b..9f891f7 100644 --- a/crypto/evp/bio_b64.c +++ b/crypto/evp/bio_b64.c @@ -70,9 +70,10 @@ static int b64_new(BIO *bi) { BIO_B64_CTX *ctx; - ctx = OPENSSL_zalloc(sizeof(*ctx)); - if (ctx == NULL) + if ((ctx = OPENSSL_zalloc(sizeof(*ctx))) == NULL) { + EVPerr(EVP_F_B64_NEW, ERR_R_MALLOC_FAILURE); return 0; + } ctx->cont = 1; ctx->start = 1; diff --git a/crypto/evp/bio_enc.c b/crypto/evp/bio_enc.c index 30f09e6..d48c826 100644 --- a/crypto/evp/bio_enc.c +++ b/crypto/evp/bio_enc.c @@ -65,9 +65,10 @@ static int enc_new(BIO *bi) { BIO_ENC_CTX *ctx; - ctx = OPENSSL_zalloc(sizeof(*ctx)); - if (ctx == NULL) + if ((ctx = OPENSSL_zalloc(sizeof(*ctx))) == NULL) { + EVPerr(EVP_F_ENC_NEW, ERR_R_MALLOC_FAILURE); return 0; + } ctx->cipher = EVP_CIPHER_CTX_new(); if (ctx->cipher == NULL) { diff --git a/crypto/evp/bio_ok.c b/crypto/evp/bio_ok.c index 5871e63..05fc1a2 100644 --- a/crypto/evp/bio_ok.c +++ b/crypto/evp/bio_ok.c @@ -133,9 +133,10 @@ static int ok_new(BIO *bi) { BIO_OK_CTX *ctx; - ctx = OPENSSL_zalloc(sizeof(*ctx)); - if (ctx == NULL) + if ((ctx = OPENSSL_zalloc(sizeof(*ctx))) == NULL) { + EVPerr(EVP_F_OK_NEW, ERR_R_MALLOC_FAILURE); return 0; + } ctx->cont = 1; ctx->sigio = 1; diff --git a/crypto/evp/e_aes.c b/crypto/evp/e_aes.c index a914a6e..951fc8f 100644 --- a/crypto/evp/e_aes.c +++ b/crypto/evp/e_aes.c @@ -1586,9 +1586,10 @@ static int s390x_aes_gcm_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr) if (gctx->iv != iv) OPENSSL_free(gctx->iv); - gctx->iv = OPENSSL_malloc(len); - if (gctx->iv == NULL) + if ((gctx->iv = OPENSSL_malloc(len)) == NULL) { + EVPerr(EVP_F_S390X_AES_GCM_CTRL, ERR_R_MALLOC_FAILURE); return 0; + } } /* Add padding. */ memset(gctx->iv + arg, 0, len - arg - 8); @@ -1704,9 +1705,10 @@ static int s390x_aes_gcm_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr) } else { len = S390X_gcm_ivpadlen(gctx->ivlen); - gctx_out->iv = OPENSSL_malloc(len); - if (gctx_out->iv == NULL) + if ((gctx_out->iv = OPENSSL_malloc(len)) == NULL) { + EVPerr(EVP_F_S390X_AES_GCM_CTRL, ERR_R_MALLOC_FAILURE); return 0; + } memcpy(gctx_out->iv, gctx->iv, len); } @@ -2826,9 +2828,10 @@ static int aes_gcm_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr) if ((arg > EVP_MAX_IV_LENGTH) && (arg > gctx->ivlen)) { if (gctx->iv != EVP_CIPHER_CTX_iv_noconst(c)) OPENSSL_free(gctx->iv); - gctx->iv = OPENSSL_malloc(arg); - if (gctx->iv == NULL) + if ((gctx->iv = OPENSSL_malloc(arg)) == NULL) { + EVPerr(EVP_F_AES_GCM_CTRL, ERR_R_MALLOC_FAILURE); return 0; + } } gctx->ivlen = arg; return 1; @@ -2930,9 +2933,10 @@ static int aes_gcm_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr) if (gctx->iv == EVP_CIPHER_CTX_iv_noconst(c)) gctx_out->iv = EVP_CIPHER_CTX_iv_noconst(out); else { - gctx_out->iv = OPENSSL_malloc(gctx->ivlen); - if (gctx_out->iv == NULL) + if ((gctx_out->iv = OPENSSL_malloc(gctx->ivlen)) == NULL) { + EVPerr(EVP_F_AES_GCM_CTRL, ERR_R_MALLOC_FAILURE); return 0; + } memcpy(gctx_out->iv, gctx->iv, gctx->ivlen); } return 1; diff --git a/crypto/evp/e_aria.c b/crypto/evp/e_aria.c index 6ec41c3..81c8a7e 100644 --- a/crypto/evp/e_aria.c +++ b/crypto/evp/e_aria.c @@ -266,9 +266,10 @@ static int aria_gcm_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr) if ((arg > EVP_MAX_IV_LENGTH) && (arg > gctx->ivlen)) { if (gctx->iv != EVP_CIPHER_CTX_iv_noconst(c)) OPENSSL_free(gctx->iv); - gctx->iv = OPENSSL_malloc(arg); - if (gctx->iv == NULL) + if ((gctx->iv = OPENSSL_malloc(arg)) == NULL) { + EVPerr(EVP_F_ARIA_GCM_CTRL, ERR_R_MALLOC_FAILURE); return 0; + } } gctx->ivlen = arg; return 1; @@ -370,9 +371,10 @@ static int aria_gcm_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr) if (gctx->iv == EVP_CIPHER_CTX_iv_noconst(c)) gctx_out->iv = EVP_CIPHER_CTX_iv_noconst(out); else { - gctx_out->iv = OPENSSL_malloc(gctx->ivlen); - if (gctx_out->iv == NULL) + if ((gctx_out->iv = OPENSSL_malloc(gctx->ivlen)) == NULL) { + EVPerr(EVP_F_ARIA_GCM_CTRL, ERR_R_MALLOC_FAILURE); return 0; + } memcpy(gctx_out->iv, gctx->iv, gctx->ivlen); } return 1; diff --git a/crypto/evp/evp_err.c b/crypto/evp/evp_err.c index 5809783..01ed97e 100644 --- a/crypto/evp/evp_err.c +++ b/crypto/evp/evp_err.c @@ -15,14 +15,17 @@ static const ERR_STRING_DATA EVP_str_functs[] = { {ERR_PACK(ERR_LIB_EVP, EVP_F_AESNI_INIT_KEY, 0), "aesni_init_key"}, + {ERR_PACK(ERR_LIB_EVP, EVP_F_AES_GCM_CTRL, 0), "aes_gcm_ctrl"}, {ERR_PACK(ERR_LIB_EVP, EVP_F_AES_INIT_KEY, 0), "aes_init_key"}, {ERR_PACK(ERR_LIB_EVP, EVP_F_AES_OCB_CIPHER, 0), "aes_ocb_cipher"}, {ERR_PACK(ERR_LIB_EVP, EVP_F_AES_T4_INIT_KEY, 0), "aes_t4_init_key"}, {ERR_PACK(ERR_LIB_EVP, EVP_F_AES_WRAP_CIPHER, 0), "aes_wrap_cipher"}, {ERR_PACK(ERR_LIB_EVP, EVP_F_ALG_MODULE_INIT, 0), "alg_module_init"}, {ERR_PACK(ERR_LIB_EVP, EVP_F_ARIA_CCM_INIT_KEY, 0), "aria_ccm_init_key"}, + {ERR_PACK(ERR_LIB_EVP, EVP_F_ARIA_GCM_CTRL, 0), "aria_gcm_ctrl"}, {ERR_PACK(ERR_LIB_EVP, EVP_F_ARIA_GCM_INIT_KEY, 0), "aria_gcm_init_key"}, {ERR_PACK(ERR_LIB_EVP, EVP_F_ARIA_INIT_KEY, 0), "aria_init_key"}, + {ERR_PACK(ERR_LIB_EVP, EVP_F_B64_NEW, 0), "b64_new"}, {ERR_PACK(ERR_LIB_EVP, EVP_F_CAMELLIA_INIT_KEY, 0), "camellia_init_key"}, {ERR_PACK(ERR_LIB_EVP, EVP_F_CHACHA20_POLY1305_CTRL, 0), "chacha20_poly1305_ctrl"}, @@ -30,6 +33,7 @@ static const ERR_STRING_DATA EVP_str_functs[] = { {ERR_PACK(ERR_LIB_EVP, EVP_F_DES_EDE3_WRAP_CIPHER, 0), "des_ede3_wrap_cipher"}, {ERR_PACK(ERR_LIB_EVP, EVP_F_DO_SIGVER_INIT, 0), "do_sigver_init"}, + {ERR_PACK(ERR_LIB_EVP, EVP_F_ENC_NEW, 0), "enc_new"}, {ERR_PACK(ERR_LIB_EVP, EVP_F_EVP_CIPHERINIT_EX, 0), "EVP_CipherInit_ex"}, {ERR_PACK(ERR_LIB_EVP, EVP_F_EVP_CIPHER_CTX_COPY, 0), "EVP_CIPHER_CTX_copy"}, @@ -122,6 +126,7 @@ static const ERR_STRING_DATA EVP_str_functs[] = { {ERR_PACK(ERR_LIB_EVP, EVP_F_EVP_SIGNFINAL, 0), "EVP_SignFinal"}, {ERR_PACK(ERR_LIB_EVP, EVP_F_EVP_VERIFYFINAL, 0), "EVP_VerifyFinal"}, {ERR_PACK(ERR_LIB_EVP, EVP_F_INT_CTX_NEW, 0), "int_ctx_new"}, + {ERR_PACK(ERR_LIB_EVP, EVP_F_OK_NEW, 0), "ok_new"}, {ERR_PACK(ERR_LIB_EVP, EVP_F_PKCS5_PBE_KEYIVGEN, 0), "PKCS5_PBE_keyivgen"}, {ERR_PACK(ERR_LIB_EVP, EVP_F_PKCS5_V2_PBE_KEYIVGEN, 0), "PKCS5_v2_PBE_keyivgen"}, @@ -132,6 +137,7 @@ static const ERR_STRING_DATA EVP_str_functs[] = { {ERR_PACK(ERR_LIB_EVP, EVP_F_PKEY_SET_TYPE, 0), "pkey_set_type"}, {ERR_PACK(ERR_LIB_EVP, EVP_F_RC2_MAGIC_TO_METH, 0), "rc2_magic_to_meth"}, {ERR_PACK(ERR_LIB_EVP, EVP_F_RC5_CTRL, 0), "rc5_ctrl"}, + {ERR_PACK(ERR_LIB_EVP, EVP_F_S390X_AES_GCM_CTRL, 0), "s390x_aes_gcm_ctrl"}, {ERR_PACK(ERR_LIB_EVP, EVP_F_UPDATE, 0), "update"}, {0, NULL} }; diff --git a/crypto/init.c b/crypto/init.c index a0bad56..37b7a7c 100644 --- a/crypto/init.c +++ b/crypto/init.c @@ -708,9 +708,10 @@ int OPENSSL_atexit(void (*handler)(void)) } #endif - newhand = OPENSSL_malloc(sizeof(*newhand)); - if (newhand == NULL) + if ((newhand = OPENSSL_malloc(sizeof(*newhand))) == NULL) { + CRYPTOerr(CRYPTO_F_OPENSSL_ATEXIT, ERR_R_MALLOC_FAILURE); return 0; + } newhand->handler = handler; newhand->next = stop_handlers; diff --git a/crypto/kdf/hkdf.c b/crypto/kdf/hkdf.c index 63c3523..16514a8 100644 --- a/crypto/kdf/hkdf.c +++ b/crypto/kdf/hkdf.c @@ -48,9 +48,10 @@ static int pkey_hkdf_init(EVP_PKEY_CTX *ctx) { HKDF_PKEY_CTX *kctx; - kctx = OPENSSL_zalloc(sizeof(*kctx)); - if (kctx == NULL) + if ((kctx = OPENSSL_zalloc(sizeof(*kctx))) == NULL) { + KDFerr(KDF_F_PKEY_HKDF_INIT, ERR_R_MALLOC_FAILURE); return 0; + } ctx->data = kctx; diff --git a/crypto/kdf/kdf_err.c b/crypto/kdf/kdf_err.c index 52ebd03..1627c0a 100644 --- a/crypto/kdf/kdf_err.c +++ b/crypto/kdf/kdf_err.c @@ -16,6 +16,7 @@ static const ERR_STRING_DATA KDF_str_functs[] = { {ERR_PACK(ERR_LIB_KDF, KDF_F_PKEY_HKDF_CTRL_STR, 0), "pkey_hkdf_ctrl_str"}, {ERR_PACK(ERR_LIB_KDF, KDF_F_PKEY_HKDF_DERIVE, 0), "pkey_hkdf_derive"}, + {ERR_PACK(ERR_LIB_KDF, KDF_F_PKEY_HKDF_INIT, 0), "pkey_hkdf_init"}, {ERR_PACK(ERR_LIB_KDF, KDF_F_PKEY_SCRYPT_CTRL_STR, 0), "pkey_scrypt_ctrl_str"}, {ERR_PACK(ERR_LIB_KDF, KDF_F_PKEY_SCRYPT_CTRL_UINT64, 0), @@ -28,6 +29,8 @@ static const ERR_STRING_DATA KDF_str_functs[] = { "pkey_tls1_prf_ctrl_str"}, {ERR_PACK(ERR_LIB_KDF, KDF_F_PKEY_TLS1_PRF_DERIVE, 0), "pkey_tls1_prf_derive"}, + {ERR_PACK(ERR_LIB_KDF, KDF_F_PKEY_TLS1_PRF_INIT, 0), "pkey_tls1_prf_init"}, + {ERR_PACK(ERR_LIB_KDF, KDF_F_TLS1_PRF_ALG, 0), "tls1_prf_alg"}, {0, NULL} }; diff --git a/crypto/kdf/tls1_prf.c b/crypto/kdf/tls1_prf.c index f5b2334..49f7ecc 100644 --- a/crypto/kdf/tls1_prf.c +++ b/crypto/kdf/tls1_prf.c @@ -37,9 +37,10 @@ static int pkey_tls1_prf_init(EVP_PKEY_CTX *ctx) { TLS1_PRF_PKEY_CTX *kctx; - kctx = OPENSSL_zalloc(sizeof(*kctx)); - if (kctx == NULL) + if ((kctx = OPENSSL_zalloc(sizeof(*kctx))) == NULL) { + KDFerr(KDF_F_PKEY_TLS1_PRF_INIT, ERR_R_MALLOC_FAILURE); return 0; + } ctx->data = kctx; return 1; @@ -256,9 +257,10 @@ static int tls1_prf_alg(const EVP_MD *md, seed, seed_len, out, olen)) return 0; - tmp = OPENSSL_malloc(olen); - if (tmp == NULL) + if ((tmp = OPENSSL_malloc(olen)) == NULL) { + KDFerr(KDF_F_TLS1_PRF_ALG, ERR_R_MALLOC_FAILURE); return 0; + } if (!tls1_prf_P_hash(EVP_sha1(), sec + slen/2, slen/2 + (slen & 1), seed, seed_len, tmp, olen)) { OPENSSL_clear_free(tmp, olen); diff --git a/crypto/o_fopen.c b/crypto/o_fopen.c index 9066279..1090a06 100644 --- a/crypto/o_fopen.c +++ b/crypto/o_fopen.c @@ -71,9 +71,10 @@ FILE *openssl_fopen(const char *filename, const char *mode) char *iterator; char lastchar; - newname = OPENSSL_malloc(strlen(filename) + 1); - if (newname == NULL) + if ((newname = OPENSSL_malloc(strlen(filename) + 1)) == NULL) { + CRYPTOerr(CRYPTO_F_OPENSSL_FOPEN, ERR_R_MALLOC_FAILURE); return NULL; + } for (iterator = newname, lastchar = '\0'; *filename; filename++, iterator++) { diff --git a/crypto/objects/obj_err.c b/crypto/objects/obj_err.c index ef36313..9b4779a 100644 --- a/crypto/objects/obj_err.c +++ b/crypto/objects/obj_err.c @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -15,6 +15,7 @@ static const ERR_STRING_DATA OBJ_str_functs[] = { {ERR_PACK(ERR_LIB_OBJ, OBJ_F_OBJ_ADD_OBJECT, 0), "OBJ_add_object"}, + {ERR_PACK(ERR_LIB_OBJ, OBJ_F_OBJ_ADD_SIGID, 0), "OBJ_add_sigid"}, {ERR_PACK(ERR_LIB_OBJ, OBJ_F_OBJ_CREATE, 0), "OBJ_create"}, {ERR_PACK(ERR_LIB_OBJ, OBJ_F_OBJ_DUP, 0), "OBJ_dup"}, {ERR_PACK(ERR_LIB_OBJ, OBJ_F_OBJ_NAME_NEW_INDEX, 0), "OBJ_NAME_new_index"}, diff --git a/crypto/objects/obj_xref.c b/crypto/objects/obj_xref.c index 05a5c86..166bf36 100644 --- a/crypto/objects/obj_xref.c +++ b/crypto/objects/obj_xref.c @@ -10,6 +10,7 @@ #include #include "obj_xref.h" #include "internal/nelem.h" +#include static STACK_OF(nid_triple) *sig_app, *sigx_app; @@ -103,9 +104,10 @@ int OBJ_add_sigid(int signid, int dig_id, int pkey_id) sigx_app = sk_nid_triple_new(sigx_cmp); if (sigx_app == NULL) return 0; - ntr = OPENSSL_malloc(sizeof(*ntr)); - if (ntr == NULL) + if ((ntr = OPENSSL_malloc(sizeof(*ntr))) == NULL) { + OBJerr(OBJ_F_OBJ_ADD_SIGID, ERR_R_MALLOC_FAILURE); return 0; + } ntr->sign_id = signid; ntr->hash_id = dig_id; ntr->pkey_id = pkey_id; diff --git a/crypto/pem/pem_err.c b/crypto/pem/pem_err.c index c4c09e4..f642030 100644 --- a/crypto/pem/pem_err.c +++ b/crypto/pem/pem_err.c @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -26,6 +26,7 @@ static const ERR_STRING_DATA PEM_str_functs[] = { {ERR_PACK(ERR_LIB_PEM, PEM_F_DO_B2I, 0), "do_b2i"}, {ERR_PACK(ERR_LIB_PEM, PEM_F_DO_B2I_BIO, 0), "do_b2i_bio"}, {ERR_PACK(ERR_LIB_PEM, PEM_F_DO_BLOB_HEADER, 0), "do_blob_header"}, + {ERR_PACK(ERR_LIB_PEM, PEM_F_DO_I2B, 0), "do_i2b"}, {ERR_PACK(ERR_LIB_PEM, PEM_F_DO_PK8PKEY, 0), "do_pk8pkey"}, {ERR_PACK(ERR_LIB_PEM, PEM_F_DO_PK8PKEY_FP, 0), "do_pk8pkey_fp"}, {ERR_PACK(ERR_LIB_PEM, PEM_F_DO_PVK_BODY, 0), "do_PVK_body"}, diff --git a/crypto/pem/pvkfmt.c b/crypto/pem/pvkfmt.c index d0a4239..72ae5ab 100644 --- a/crypto/pem/pvkfmt.c +++ b/crypto/pem/pvkfmt.c @@ -444,9 +444,10 @@ static int do_i2b(unsigned char **out, EVP_PKEY *pk, int ispub) if (*out) p = *out; else { - p = OPENSSL_malloc(outlen); - if (p == NULL) + if ((p = OPENSSL_malloc(outlen)) == NULL) { + PEMerr(PEM_F_DO_I2B, ERR_R_MALLOC_FAILURE); return -1; + } *out = p; noinc = 1; } diff --git a/crypto/rsa/rsa_err.c b/crypto/rsa/rsa_err.c index f7d29e1..62fd9e0 100644 --- a/crypto/rsa/rsa_err.c +++ b/crypto/rsa/rsa_err.c @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -37,6 +37,8 @@ static const ERR_STRING_DATA RSA_str_functs[] = { {ERR_PACK(ERR_LIB_RSA, RSA_F_RSA_METH_NEW, 0), "RSA_meth_new"}, {ERR_PACK(ERR_LIB_RSA, RSA_F_RSA_METH_SET1_NAME, 0), "RSA_meth_set1_name"}, {ERR_PACK(ERR_LIB_RSA, RSA_F_RSA_MGF1_TO_MD, 0), ""}, + {ERR_PACK(ERR_LIB_RSA, RSA_F_RSA_MULTIP_INFO_NEW, 0), + "rsa_multip_info_new"}, {ERR_PACK(ERR_LIB_RSA, RSA_F_RSA_NEW_METHOD, 0), "RSA_new_method"}, {ERR_PACK(ERR_LIB_RSA, RSA_F_RSA_NULL, 0), ""}, {ERR_PACK(ERR_LIB_RSA, RSA_F_RSA_NULL_PRIVATE_DECRYPT, 0), ""}, @@ -100,6 +102,7 @@ static const ERR_STRING_DATA RSA_str_functs[] = { "RSA_verify_ASN1_OCTET_STRING"}, {ERR_PACK(ERR_LIB_RSA, RSA_F_RSA_VERIFY_PKCS1_PSS_MGF1, 0), "RSA_verify_PKCS1_PSS_mgf1"}, + {ERR_PACK(ERR_LIB_RSA, RSA_F_SETUP_TBUF, 0), "setup_tbuf"}, {0, NULL} }; diff --git a/crypto/rsa/rsa_mp.c b/crypto/rsa/rsa_mp.c index b8727fa..e7e8108 100644 --- a/crypto/rsa/rsa_mp.c +++ b/crypto/rsa/rsa_mp.c @@ -9,6 +9,7 @@ */ #include +#include #include "rsa_locl.h" void rsa_multip_info_free_ex(RSA_PRIME_INFO *pinfo) @@ -32,9 +33,10 @@ RSA_PRIME_INFO *rsa_multip_info_new(void) RSA_PRIME_INFO *pinfo; /* create a RSA_PRIME_INFO structure */ - pinfo = OPENSSL_zalloc(sizeof(RSA_PRIME_INFO)); - if (pinfo == NULL) + if ((pinfo = OPENSSL_zalloc(sizeof(RSA_PRIME_INFO))) == NULL) { + RSAerr(RSA_F_RSA_MULTIP_INFO_NEW, ERR_R_MALLOC_FAILURE); return NULL; + } if ((pinfo->r = BN_secure_new()) == NULL) goto err; if ((pinfo->d = BN_secure_new()) == NULL) diff --git a/crypto/rsa/rsa_pmeth.c b/crypto/rsa/rsa_pmeth.c index e11ed1f..1d305a6 100644 --- a/crypto/rsa/rsa_pmeth.c +++ b/crypto/rsa/rsa_pmeth.c @@ -101,9 +101,10 @@ static int setup_tbuf(RSA_PKEY_CTX *ctx, EVP_PKEY_CTX *pk) { if (ctx->tbuf != NULL) return 1; - ctx->tbuf = OPENSSL_malloc(EVP_PKEY_size(pk->pkey)); - if (ctx->tbuf == NULL) + if ((ctx->tbuf = OPENSSL_malloc(EVP_PKEY_size(pk->pkey))) == NULL) { + RSAerr(RSA_F_SETUP_TBUF, ERR_R_MALLOC_FAILURE); return 0; + } return 1; } diff --git a/crypto/srp/srp_vfy.c b/crypto/srp/srp_vfy.c index b85033b..38d1a0f 100644 --- a/crypto/srp/srp_vfy.c +++ b/crypto/srp/srp_vfy.c @@ -19,6 +19,7 @@ # include # include # include +# include # define SRP_RANDOM_SALT_LEN 20 # define MAX_LEN 2500 @@ -58,9 +59,12 @@ void SRP_user_pwd_free(SRP_user_pwd *user_pwd) static SRP_user_pwd *SRP_user_pwd_new(void) { - SRP_user_pwd *ret = OPENSSL_malloc(sizeof(*ret)); - if (ret == NULL) + SRP_user_pwd *ret; + + if ((ret = OPENSSL_malloc(sizeof(*ret))) == NULL) { + /* SRPerr(SRP_F_SRP_USER_PWD_NEW, ERR_R_MALLOC_FAILURE); */ return NULL; + } ret->N = NULL; ret->g = NULL; ret->s = NULL; diff --git a/crypto/stack/stack.c b/crypto/stack/stack.c index fc755e3..97c3e87 100644 --- a/crypto/stack/stack.c +++ b/crypto/stack/stack.c @@ -173,9 +173,10 @@ static int sk_reserve(OPENSSL_STACK *st, int n, int exact) * At this point, |st->num_alloc| and |st->num| are 0; * so |num_alloc| value is |n| or |min_nodes| if greater than |n|. */ - st->data = OPENSSL_zalloc(sizeof(void *) * num_alloc); - if (st->data == NULL) + if ((st->data = OPENSSL_zalloc(sizeof(void *) * num_alloc)) == NULL) { + /* STACKerr(STACK_F_SK_RESERVE, ERR_R_MALLOC_FAILURE); */ return 0; + } st->num_alloc = num_alloc; return 1; } diff --git a/crypto/ui/ui_err.c b/crypto/ui/ui_err.c index e69163c..b806872 100644 --- a/crypto/ui/ui_err.c +++ b/crypto/ui/ui_err.c @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -22,6 +22,7 @@ static const ERR_STRING_DATA UI_str_functs[] = { "general_allocate_prompt"}, {ERR_PACK(ERR_LIB_UI, UI_F_NOECHO_CONSOLE, 0), "noecho_console"}, {ERR_PACK(ERR_LIB_UI, UI_F_OPEN_CONSOLE, 0), "open_console"}, + {ERR_PACK(ERR_LIB_UI, UI_F_UI_CONSTRUCT_PROMPT, 0), "UI_construct_prompt"}, {ERR_PACK(ERR_LIB_UI, UI_F_UI_CREATE_METHOD, 0), "UI_create_method"}, {ERR_PACK(ERR_LIB_UI, UI_F_UI_CTRL, 0), "UI_ctrl"}, {ERR_PACK(ERR_LIB_UI, UI_F_UI_DUP_ERROR_STRING, 0), "UI_dup_error_string"}, diff --git a/crypto/ui/ui_lib.c b/crypto/ui/ui_lib.c index 9851987..533dc07 100644 --- a/crypto/ui/ui_lib.c +++ b/crypto/ui/ui_lib.c @@ -374,9 +374,10 @@ char *UI_construct_prompt(UI *ui, const char *object_desc, len += sizeof(prompt2) - 1 + strlen(object_name); len += sizeof(prompt3) - 1; - prompt = OPENSSL_malloc(len + 1); - if (prompt == NULL) + if ((prompt = OPENSSL_malloc(len + 1)) == NULL) { + UIerr(UI_F_UI_CONSTRUCT_PROMPT, ERR_R_MALLOC_FAILURE); return NULL; + } OPENSSL_strlcpy(prompt, prompt1, len + 1); OPENSSL_strlcat(prompt, object_desc, len + 1); if (object_name != NULL) { diff --git a/include/openssl/asn1err.h b/include/openssl/asn1err.h index a53bc4a..9697898 100644 --- a/include/openssl/asn1err.h +++ b/include/openssl/asn1err.h @@ -23,6 +23,7 @@ int ERR_load_ASN1_strings(void); # define ASN1_F_A2I_ASN1_INTEGER 102 # define ASN1_F_A2I_ASN1_STRING 103 # define ASN1_F_APPEND_EXP 176 +# define ASN1_F_ASN1_BIO_INIT 113 # define ASN1_F_ASN1_BIT_STRING_SET_BIT 183 # define ASN1_F_ASN1_CB 177 # define ASN1_F_ASN1_CHECK_TLEN 104 @@ -34,6 +35,7 @@ int ERR_load_ASN1_strings(void); # define ASN1_F_ASN1_DO_ADB 110 # define ASN1_F_ASN1_DO_LOCK 233 # define ASN1_F_ASN1_DUP 111 +# define ASN1_F_ASN1_ENC_SAVE 115 # define ASN1_F_ASN1_EX_C2I 204 # define ASN1_F_ASN1_FIND_END 190 # define ASN1_F_ASN1_GENERALIZEDTIME_ADJ 216 @@ -47,6 +49,7 @@ int ERR_load_ASN1_strings(void); # define ASN1_F_ASN1_ITEM_DUP 191 # define ASN1_F_ASN1_ITEM_EMBED_D2I 120 # define ASN1_F_ASN1_ITEM_EMBED_NEW 121 +# define ASN1_F_ASN1_ITEM_FLAGS_I2D 118 # define ASN1_F_ASN1_ITEM_I2D_BIO 192 # define ASN1_F_ASN1_ITEM_I2D_FP 193 # define ASN1_F_ASN1_ITEM_PACK 198 @@ -58,6 +61,7 @@ int ERR_load_ASN1_strings(void); # define ASN1_F_ASN1_OBJECT_NEW 123 # define ASN1_F_ASN1_OUTPUT_DATA 214 # define ASN1_F_ASN1_PCTX_NEW 205 +# define ASN1_F_ASN1_PRIMITIVE_NEW 119 # define ASN1_F_ASN1_SCTX_NEW 221 # define ASN1_F_ASN1_SIGN 128 # define ASN1_F_ASN1_STR2TYPE 179 @@ -91,7 +95,10 @@ int ERR_load_ASN1_strings(void); # define ASN1_F_D2I_AUTOPRIVATEKEY 207 # define ASN1_F_D2I_PRIVATEKEY 154 # define ASN1_F_D2I_PUBLICKEY 155 +# define ASN1_F_DO_CREATE 124 +# define ASN1_F_DO_DUMP 125 # define ASN1_F_DO_TCREATE 222 +# define ASN1_F_I2A_ASN1_OBJECT 126 # define ASN1_F_I2D_ASN1_BIO_STREAM 211 # define ASN1_F_I2D_DSA_PUBKEY 161 # define ASN1_F_I2D_EC_PUBKEY 181 @@ -99,6 +106,8 @@ int ERR_load_ASN1_strings(void); # define ASN1_F_I2D_PUBLICKEY 164 # define ASN1_F_I2D_RSA_PUBKEY 165 # define ASN1_F_LONG_C2I 166 +# define ASN1_F_NDEF_PREFIX 127 +# define ASN1_F_NDEF_SUFFIX 136 # define ASN1_F_OID_MODULE_INIT 174 # define ASN1_F_PARSE_TAGGING 182 # define ASN1_F_PKCS5_PBE2_SET_IV 167 @@ -109,9 +118,12 @@ int ERR_load_ASN1_strings(void); # define ASN1_F_PKCS5_SCRYPT_SET 232 # define ASN1_F_SMIME_READ_ASN1 212 # define ASN1_F_SMIME_TEXT 213 +# define ASN1_F_STABLE_GET 138 # define ASN1_F_STBL_MODULE_INIT 223 # define ASN1_F_UINT32_C2I 105 +# define ASN1_F_UINT32_NEW 139 # define ASN1_F_UINT64_C2I 112 +# define ASN1_F_UINT64_NEW 141 # define ASN1_F_X509_CRL_ADD0_REVOKED 169 # define ASN1_F_X509_INFO_NEW 170 # define ASN1_F_X509_NAME_ENCODE 203 diff --git a/include/openssl/asyncerr.h b/include/openssl/asyncerr.h index 5fcddaf..5497ba7 100644 --- a/include/openssl/asyncerr.h +++ b/include/openssl/asyncerr.h @@ -25,6 +25,7 @@ int ERR_load_ASYNC_strings(void); # define ASYNC_F_ASYNC_PAUSE_JOB 103 # define ASYNC_F_ASYNC_START_FUNC 104 # define ASYNC_F_ASYNC_START_JOB 105 +# define ASYNC_F_ASYNC_WAIT_CTX_SET_WAIT_FD 106 /* * ASYNC reason codes. diff --git a/include/openssl/bioerr.h b/include/openssl/bioerr.h index 4931c1d..de70388 100644 --- a/include/openssl/bioerr.h +++ b/include/openssl/bioerr.h @@ -20,6 +20,7 @@ int ERR_load_BIO_strings(void); * BIO function codes. */ # define BIO_F_ACPT_STATE 100 +# define BIO_F_ADDRINFO_WRAP 148 # define BIO_F_ADDR_STRINGS 134 # define BIO_F_BIO_ACCEPT 101 # define BIO_F_BIO_ACCEPT_EX 137 @@ -60,11 +61,14 @@ int ERR_load_BIO_strings(void); # define BIO_F_BUFFER_CTRL 114 # define BIO_F_CONN_CTRL 127 # define BIO_F_CONN_STATE 115 +# define BIO_F_DGRAM_SCTP_NEW 149 # define BIO_F_DGRAM_SCTP_READ 132 # define BIO_F_DGRAM_SCTP_WRITE 133 +# define BIO_F_DOAPR_OUTCH 150 # define BIO_F_FILE_CTRL 116 # define BIO_F_FILE_READ 130 # define BIO_F_LINEBUFFER_CTRL 129 +# define BIO_F_LINEBUFFER_NEW 151 # define BIO_F_MEM_WRITE 117 # define BIO_F_SSL_NEW 118 diff --git a/include/openssl/bnerr.h b/include/openssl/bnerr.h index c9a21c7..297b8c5 100644 --- a/include/openssl/bnerr.h +++ b/include/openssl/bnerr.h @@ -59,10 +59,12 @@ int ERR_load_BN_strings(void); # define BN_F_BN_MOD_SQRT 121 # define BN_F_BN_MPI2BN 112 # define BN_F_BN_NEW 113 +# define BN_F_BN_POOL_GET 147 # define BN_F_BN_RAND 114 # define BN_F_BN_RAND_RANGE 122 # define BN_F_BN_RSHIFT 146 # define BN_F_BN_SET_WORDS 144 +# define BN_F_BN_STACK_PUSH 148 # define BN_F_BN_USUB 115 /* diff --git a/include/openssl/cmserr.h b/include/openssl/cmserr.h index 7b9daed..3f8ae26 100644 --- a/include/openssl/cmserr.h +++ b/include/openssl/cmserr.h @@ -49,6 +49,7 @@ int ERR_load_CMS_strings(void); # define CMS_F_CMS_DIGEST_VERIFY 118 # define CMS_F_CMS_ENCODE_RECEIPT 161 # define CMS_F_CMS_ENCRYPT 119 +# define CMS_F_CMS_ENCRYPTEDCONTENT_INIT 179 # define CMS_F_CMS_ENCRYPTEDCONTENT_INIT_BIO 120 # define CMS_F_CMS_ENCRYPTEDDATA_DECRYPT 121 # define CMS_F_CMS_ENCRYPTEDDATA_ENCRYPT 122 @@ -103,6 +104,7 @@ int ERR_load_CMS_strings(void); # define CMS_F_CMS_STREAM 155 # define CMS_F_CMS_UNCOMPRESS 156 # define CMS_F_CMS_VERIFY 157 +# define CMS_F_KEK_UNWRAP_KEY 180 /* * CMS reason codes. diff --git a/include/openssl/conferr.h b/include/openssl/conferr.h index d2d0c7b..56071e3 100644 --- a/include/openssl/conferr.h +++ b/include/openssl/conferr.h @@ -26,6 +26,7 @@ int ERR_load_CONF_strings(void); # define CONF_F_DEF_LOAD 120 # define CONF_F_DEF_LOAD_BIO 121 # define CONF_F_GET_NEXT_FILE 107 +# define CONF_F_MODULE_ADD 122 # define CONF_F_MODULE_INIT 115 # define CONF_F_MODULE_LOAD_DSO 117 # define CONF_F_MODULE_RUN 118 diff --git a/include/openssl/cryptoerr.h b/include/openssl/cryptoerr.h index 12684ea..63f3f0f 100644 --- a/include/openssl/cryptoerr.h +++ b/include/openssl/cryptoerr.h @@ -27,7 +27,9 @@ int ERR_load_CRYPTO_strings(void); # define CRYPTO_F_CRYPTO_SET_EX_DATA 102 # define CRYPTO_F_FIPS_MODE_SET 109 # define CRYPTO_F_GET_AND_LOCK 113 +# define CRYPTO_F_OPENSSL_ATEXIT 114 # define CRYPTO_F_OPENSSL_BUF2HEXSTR 117 +# define CRYPTO_F_OPENSSL_FOPEN 119 # define CRYPTO_F_OPENSSL_HEXSTR2BUF 118 # define CRYPTO_F_OPENSSL_INIT_CRYPTO 116 diff --git a/include/openssl/dherr.h b/include/openssl/dherr.h index 0a071b6..81e73f7 100644 --- a/include/openssl/dherr.h +++ b/include/openssl/dherr.h @@ -47,6 +47,7 @@ int ERR_load_DH_strings(void); # define DH_F_GENERATE_KEY 103 # define DH_F_PKEY_DH_CTRL_STR 120 # define DH_F_PKEY_DH_DERIVE 112 +# define DH_F_PKEY_DH_INIT 125 # define DH_F_PKEY_DH_KEYGEN 113 /* diff --git a/include/openssl/ecerr.h b/include/openssl/ecerr.h index dbaa8d1..2bd4ee9 100644 --- a/include/openssl/ecerr.h +++ b/include/openssl/ecerr.h @@ -122,6 +122,7 @@ int ERR_load_EC_strings(void); # define EC_F_EC_KEY_OCT2PRIV 255 # define EC_F_EC_KEY_PRINT 180 # define EC_F_EC_KEY_PRINT_FP 181 +# define EC_F_EC_KEY_PRIV2BUF 279 # define EC_F_EC_KEY_PRIV2OCT 256 # define EC_F_EC_KEY_SET_PUBLIC_KEY_AFFINE_COORDINATES 229 # define EC_F_EC_KEY_SIMPLE_CHECK_KEY 258 @@ -131,6 +132,7 @@ int ERR_load_EC_strings(void); # define EC_F_EC_PKEY_PARAM_CHECK 274 # define EC_F_EC_POINTS_MAKE_AFFINE 136 # define EC_F_EC_POINT_ADD 112 +# define EC_F_EC_POINT_BN2POINT 280 # define EC_F_EC_POINT_CMP 113 # define EC_F_EC_POINT_COPY 114 # define EC_F_EC_POINT_DBL 115 @@ -143,6 +145,7 @@ int ERR_load_EC_strings(void); # define EC_F_EC_POINT_MAKE_AFFINE 120 # define EC_F_EC_POINT_NEW 121 # define EC_F_EC_POINT_OCT2POINT 122 +# define EC_F_EC_POINT_POINT2BUF 281 # define EC_F_EC_POINT_POINT2OCT 123 # define EC_F_EC_POINT_SET_AFFINE_COORDINATES_GF2M 185 # define EC_F_EC_POINT_SET_AFFINE_COORDINATES_GFP 124 @@ -173,6 +176,8 @@ int ERR_load_EC_strings(void); # define EC_F_PKEY_EC_CTRL 197 # define EC_F_PKEY_EC_CTRL_STR 198 # define EC_F_PKEY_EC_DERIVE 217 +# define EC_F_PKEY_EC_INIT 282 +# define EC_F_PKEY_EC_KDF_DERIVE 283 # define EC_F_PKEY_EC_KEYGEN 199 # define EC_F_PKEY_EC_PARAMGEN 219 # define EC_F_PKEY_EC_SIGN 218 diff --git a/include/openssl/engineerr.h b/include/openssl/engineerr.h index 64efc2f..b4c036b 100644 --- a/include/openssl/engineerr.h +++ b/include/openssl/engineerr.h @@ -58,9 +58,11 @@ int ERR_load_ENGINE_strings(void); # define ENGINE_F_ENGINE_TABLE_REGISTER 184 # define ENGINE_F_ENGINE_UNLOCKED_FINISH 191 # define ENGINE_F_ENGINE_UP_REF 190 +# define ENGINE_F_INT_CLEANUP_ITEM 199 # define ENGINE_F_INT_CTRL_HELPER 172 # define ENGINE_F_INT_ENGINE_CONFIGURE 188 # define ENGINE_F_INT_ENGINE_MODULE_INIT 187 +# define ENGINE_F_OSSL_HMAC_INIT 200 /* * ENGINE reason codes. diff --git a/include/openssl/evperr.h b/include/openssl/evperr.h index 09b7d7b..84f2951 100644 --- a/include/openssl/evperr.h +++ b/include/openssl/evperr.h @@ -20,19 +20,23 @@ int ERR_load_EVP_strings(void); * EVP function codes. */ # define EVP_F_AESNI_INIT_KEY 165 +# define EVP_F_AES_GCM_CTRL 196 # define EVP_F_AES_INIT_KEY 133 # define EVP_F_AES_OCB_CIPHER 169 # define EVP_F_AES_T4_INIT_KEY 178 # define EVP_F_AES_WRAP_CIPHER 170 # define EVP_F_ALG_MODULE_INIT 177 # define EVP_F_ARIA_CCM_INIT_KEY 175 +# define EVP_F_ARIA_GCM_CTRL 197 # define EVP_F_ARIA_GCM_INIT_KEY 176 # define EVP_F_ARIA_INIT_KEY 185 +# define EVP_F_B64_NEW 198 # define EVP_F_CAMELLIA_INIT_KEY 159 # define EVP_F_CHACHA20_POLY1305_CTRL 182 # define EVP_F_CMLL_T4_INIT_KEY 179 # define EVP_F_DES_EDE3_WRAP_CIPHER 171 # define EVP_F_DO_SIGVER_INIT 161 +# define EVP_F_ENC_NEW 199 # define EVP_F_EVP_CIPHERINIT_EX 123 # define EVP_F_EVP_CIPHER_CTX_COPY 163 # define EVP_F_EVP_CIPHER_CTX_CTRL 124 @@ -97,6 +101,7 @@ int ERR_load_EVP_strings(void); # define EVP_F_EVP_SIGNFINAL 107 # define EVP_F_EVP_VERIFYFINAL 108 # define EVP_F_INT_CTX_NEW 157 +# define EVP_F_OK_NEW 200 # define EVP_F_PKCS5_PBE_KEYIVGEN 117 # define EVP_F_PKCS5_V2_PBE_KEYIVGEN 118 # define EVP_F_PKCS5_V2_PBKDF2_KEYIVGEN 164 @@ -104,6 +109,7 @@ int ERR_load_EVP_strings(void); # define EVP_F_PKEY_SET_TYPE 158 # define EVP_F_RC2_MAGIC_TO_METH 109 # define EVP_F_RC5_CTRL 125 +# define EVP_F_S390X_AES_GCM_CTRL 201 # define EVP_F_UPDATE 173 /* diff --git a/include/openssl/kdferr.h b/include/openssl/kdferr.h index 5a03b5c..6437c27 100644 --- a/include/openssl/kdferr.h +++ b/include/openssl/kdferr.h @@ -21,6 +21,7 @@ int ERR_load_KDF_strings(void); */ # define KDF_F_PKEY_HKDF_CTRL_STR 103 # define KDF_F_PKEY_HKDF_DERIVE 102 +# define KDF_F_PKEY_HKDF_INIT 108 # define KDF_F_PKEY_SCRYPT_CTRL_STR 104 # define KDF_F_PKEY_SCRYPT_CTRL_UINT64 105 # define KDF_F_PKEY_SCRYPT_DERIVE 109 @@ -28,6 +29,8 @@ int ERR_load_KDF_strings(void); # define KDF_F_PKEY_SCRYPT_SET_MEMBUF 107 # define KDF_F_PKEY_TLS1_PRF_CTRL_STR 100 # define KDF_F_PKEY_TLS1_PRF_DERIVE 101 +# define KDF_F_PKEY_TLS1_PRF_INIT 110 +# define KDF_F_TLS1_PRF_ALG 111 /* * KDF reason codes. diff --git a/include/openssl/objectserr.h b/include/openssl/objectserr.h index 4f3156e..e965791 100644 --- a/include/openssl/objectserr.h +++ b/include/openssl/objectserr.h @@ -20,6 +20,7 @@ int ERR_load_OBJ_strings(void); * OBJ function codes. */ # define OBJ_F_OBJ_ADD_OBJECT 105 +# define OBJ_F_OBJ_ADD_SIGID 107 # define OBJ_F_OBJ_CREATE 100 # define OBJ_F_OBJ_DUP 101 # define OBJ_F_OBJ_NAME_NEW_INDEX 106 diff --git a/include/openssl/pemerr.h b/include/openssl/pemerr.h index d0b8a9c..cd61b82 100644 --- a/include/openssl/pemerr.h +++ b/include/openssl/pemerr.h @@ -29,6 +29,7 @@ int ERR_load_PEM_strings(void); # define PEM_F_DO_B2I 132 # define PEM_F_DO_B2I_BIO 133 # define PEM_F_DO_BLOB_HEADER 134 +# define PEM_F_DO_I2B 146 # define PEM_F_DO_PK8PKEY 126 # define PEM_F_DO_PK8PKEY_FP 125 # define PEM_F_DO_PVK_BODY 135 diff --git a/include/openssl/rsaerr.h b/include/openssl/rsaerr.h index c1b826a..d5bc01c 100644 --- a/include/openssl/rsaerr.h +++ b/include/openssl/rsaerr.h @@ -40,6 +40,7 @@ int ERR_load_RSA_strings(void); # define RSA_F_RSA_METH_NEW 162 # define RSA_F_RSA_METH_SET1_NAME 163 # define RSA_F_RSA_MGF1_TO_MD 157 +# define RSA_F_RSA_MULTIP_INFO_NEW 166 # define RSA_F_RSA_NEW_METHOD 106 # define RSA_F_RSA_NULL 124 # define RSA_F_RSA_NULL_PRIVATE_DECRYPT 132 @@ -80,6 +81,7 @@ int ERR_load_RSA_strings(void); # define RSA_F_RSA_VERIFY 119 # define RSA_F_RSA_VERIFY_ASN1_OCTET_STRING 120 # define RSA_F_RSA_VERIFY_PKCS1_PSS_MGF1 126 +# define RSA_F_SETUP_TBUF 167 /* * RSA reason codes. diff --git a/include/openssl/sslerr.h b/include/openssl/sslerr.h index 0f390a8..5c6718f 100644 --- a/include/openssl/sslerr.h +++ b/include/openssl/sslerr.h @@ -41,6 +41,7 @@ int ERR_load_SSL_strings(void); # define SSL_F_DTLS1_BUFFER_RECORD 247 # define SSL_F_DTLS1_CHECK_TIMEOUT_NUM 318 # define SSL_F_DTLS1_HEARTBEAT 305 +# define SSL_F_DTLS1_HM_FRAGMENT_NEW 623 # define SSL_F_DTLS1_PREPROCESS_FRAGMENT 288 # define SSL_F_DTLS1_PROCESS_BUFFERED_RECORDS 424 # define SSL_F_DTLS1_PROCESS_RECORD 257 @@ -83,6 +84,8 @@ int ERR_load_SSL_strings(void); # define SSL_F_OSSL_STATEM_SERVER_READ_TRANSITION 418 # define SSL_F_OSSL_STATEM_SERVER_WRITE_TRANSITION 604 # define SSL_F_PARSE_CA_NAMES 541 +# define SSL_F_PITEM_NEW 624 +# define SSL_F_PQUEUE_NEW 625 # define SSL_F_PROCESS_KEY_SHARE_EXT 439 # define SSL_F_READ_STATE_MACHINE 352 # define SSL_F_SET_CLIENT_CIPHERSUITE 540 @@ -134,10 +137,12 @@ int ERR_load_SSL_strings(void); # define SSL_F_SSL_CHECK_SRP_EXT_CLIENTHELLO 606 # define SSL_F_SSL_CHECK_SRVR_ECC_CERT_AND_ALG 279 # define SSL_F_SSL_CHOOSE_CLIENT_VERSION 607 +# define SSL_F_SSL_CIPHER_DESCRIPTION 626 # define SSL_F_SSL_CIPHER_LIST_TO_BYTES 425 # define SSL_F_SSL_CIPHER_PROCESS_RULESTR 230 # define SSL_F_SSL_CIPHER_STRENGTH_SORT 231 # define SSL_F_SSL_CLEAR 164 +# define SSL_F_SSL_CLIENT_HELLO_GET1_EXTENSIONS_PRESENT 627 # define SSL_F_SSL_COMP_ADD_COMPRESSION_METHOD 165 # define SSL_F_SSL_CONF_CMD 334 # define SSL_F_SSL_CREATE_CIPHER_LIST 166 @@ -263,8 +268,13 @@ int ERR_load_SSL_strings(void); # define SSL_F_TLS1_EXPORT_KEYING_MATERIAL 314 # define SSL_F_TLS1_GET_CURVELIST 338 # define SSL_F_TLS1_PRF 284 +# define SSL_F_TLS1_SAVE_U16 628 # define SSL_F_TLS1_SETUP_KEY_BLOCK 211 +# define SSL_F_TLS1_SET_GROUPS 629 +# define SSL_F_TLS1_SET_RAW_SIGALGS 630 # define SSL_F_TLS1_SET_SERVER_SIGALGS 335 +# define SSL_F_TLS1_SET_SHARED_SIGALGS 631 +# define SSL_F_TLS1_SET_SIGALGS 632 # define SSL_F_TLS_CHOOSE_SIGALG 513 # define SSL_F_TLS_CLIENT_KEY_EXCHANGE_POST_WORK 354 # define SSL_F_TLS_COLLECT_EXTENSIONS 435 @@ -428,6 +438,8 @@ int ERR_load_SSL_strings(void); # define SSL_F_TLS_SCAN_CLIENTHELLO_TLSEXT 450 # define SSL_F_TLS_SETUP_HANDSHAKE 508 # define SSL_F_USE_CERTIFICATE_CHAIN_FILE 220 +# define SSL_F_WPACKET_INTERN_INIT_LEN 633 +# define SSL_F_WPACKET_START_SUB_PACKET_LEN__ 634 # define SSL_F_WRITE_STATE_MACHINE 586 /* diff --git a/include/openssl/uierr.h b/include/openssl/uierr.h index 3e4b297..72fd9a9 100644 --- a/include/openssl/uierr.h +++ b/include/openssl/uierr.h @@ -25,6 +25,7 @@ int ERR_load_UI_strings(void); # define UI_F_GENERAL_ALLOCATE_PROMPT 109 # define UI_F_NOECHO_CONSOLE 117 # define UI_F_OPEN_CONSOLE 114 +# define UI_F_UI_CONSTRUCT_PROMPT 121 # define UI_F_UI_CREATE_METHOD 112 # define UI_F_UI_CTRL 111 # define UI_F_UI_DUP_ERROR_STRING 101 diff --git a/ssl/packet.c b/ssl/packet.c index 7a4414a..1819800 100644 --- a/ssl/packet.c +++ b/ssl/packet.c @@ -9,6 +9,7 @@ #include "internal/cryptlib.h" #include "packet_locl.h" +#include #define DEFAULT_BUF_SIZE 256 @@ -93,9 +94,10 @@ static int wpacket_intern_init_len(WPACKET *pkt, size_t lenbytes) pkt->curr = 0; pkt->written = 0; - pkt->subs = OPENSSL_zalloc(sizeof(*pkt->subs)); - if (pkt->subs == NULL) + if ((pkt->subs = OPENSSL_zalloc(sizeof(*pkt->subs))) == NULL) { + SSLerr(SSL_F_WPACKET_INTERN_INIT_LEN, ERR_R_MALLOC_FAILURE); return 0; + } if (lenbytes == 0) return 1; @@ -276,9 +278,10 @@ int WPACKET_start_sub_packet_len__(WPACKET *pkt, size_t lenbytes) if (!ossl_assert(pkt->subs != NULL)) return 0; - sub = OPENSSL_zalloc(sizeof(*sub)); - if (sub == NULL) + if ((sub = OPENSSL_zalloc(sizeof(*sub))) == NULL) { + SSLerr(SSL_F_WPACKET_START_SUB_PACKET_LEN__, ERR_R_MALLOC_FAILURE); return 0; + } sub->parent = pkt->subs; pkt->subs = sub; diff --git a/ssl/pqueue.c b/ssl/pqueue.c index ee64eb3..3787d26 100644 --- a/ssl/pqueue.c +++ b/ssl/pqueue.c @@ -18,14 +18,15 @@ struct pqueue_st { pitem *pitem_new(unsigned char *prio64be, void *data) { pitem *item = OPENSSL_malloc(sizeof(*item)); - if (item == NULL) + + if (item == NULL) { + SSLerr(SSL_F_PITEM_NEW, ERR_R_MALLOC_FAILURE); return NULL; + } memcpy(item->priority, prio64be, sizeof(item->priority)); - item->data = data; item->next = NULL; - return item; } @@ -38,6 +39,9 @@ pqueue *pqueue_new() { pqueue *pq = OPENSSL_zalloc(sizeof(*pq)); + if (pq == NULL) + SSLerr(SSL_F_PQUEUE_NEW, ERR_R_MALLOC_FAILURE); + return pq; } diff --git a/ssl/ssl_ciph.c b/ssl/ssl_ciph.c index 49e16fc..be728df 100644 --- a/ssl/ssl_ciph.c +++ b/ssl/ssl_ciph.c @@ -1523,9 +1523,10 @@ char *SSL_CIPHER_description(const SSL_CIPHER *cipher, char *buf, int len) if (buf == NULL) { len = 128; - buf = OPENSSL_malloc(len); - if (buf == NULL) + if ((buf = OPENSSL_malloc(len)) == NULL) { + SSLerr(SSL_F_SSL_CIPHER_DESCRIPTION, ERR_R_MALLOC_FAILURE); return NULL; + } } else if (len < 128) { return NULL; } diff --git a/ssl/ssl_err.c b/ssl/ssl_err.c index 64580bb..0a86a7e 100644 --- a/ssl/ssl_err.c +++ b/ssl/ssl_err.c @@ -43,6 +43,8 @@ static const ERR_STRING_DATA SSL_str_functs[] = { {ERR_PACK(ERR_LIB_SSL, SSL_F_DTLS1_CHECK_TIMEOUT_NUM, 0), "dtls1_check_timeout_num"}, {ERR_PACK(ERR_LIB_SSL, SSL_F_DTLS1_HEARTBEAT, 0), ""}, + {ERR_PACK(ERR_LIB_SSL, SSL_F_DTLS1_HM_FRAGMENT_NEW, 0), + "dtls1_hm_fragment_new"}, {ERR_PACK(ERR_LIB_SSL, SSL_F_DTLS1_PREPROCESS_FRAGMENT, 0), "dtls1_preprocess_fragment"}, {ERR_PACK(ERR_LIB_SSL, SSL_F_DTLS1_PROCESS_BUFFERED_RECORDS, 0), @@ -109,6 +111,8 @@ static const ERR_STRING_DATA SSL_str_functs[] = { {ERR_PACK(ERR_LIB_SSL, SSL_F_OSSL_STATEM_SERVER_WRITE_TRANSITION, 0), "ossl_statem_server_write_transition"}, {ERR_PACK(ERR_LIB_SSL, SSL_F_PARSE_CA_NAMES, 0), "parse_ca_names"}, + {ERR_PACK(ERR_LIB_SSL, SSL_F_PITEM_NEW, 0), "pitem_new"}, + {ERR_PACK(ERR_LIB_SSL, SSL_F_PQUEUE_NEW, 0), "pqueue_new"}, {ERR_PACK(ERR_LIB_SSL, SSL_F_PROCESS_KEY_SHARE_EXT, 0), ""}, {ERR_PACK(ERR_LIB_SSL, SSL_F_READ_STATE_MACHINE, 0), "read_state_machine"}, {ERR_PACK(ERR_LIB_SSL, SSL_F_SET_CLIENT_CIPHERSUITE, 0), @@ -188,6 +192,8 @@ static const ERR_STRING_DATA SSL_str_functs[] = { "ssl_check_srvr_ecc_cert_and_alg"}, {ERR_PACK(ERR_LIB_SSL, SSL_F_SSL_CHOOSE_CLIENT_VERSION, 0), "ssl_choose_client_version"}, + {ERR_PACK(ERR_LIB_SSL, SSL_F_SSL_CIPHER_DESCRIPTION, 0), + "SSL_CIPHER_description"}, {ERR_PACK(ERR_LIB_SSL, SSL_F_SSL_CIPHER_LIST_TO_BYTES, 0), "ssl_cipher_list_to_bytes"}, {ERR_PACK(ERR_LIB_SSL, SSL_F_SSL_CIPHER_PROCESS_RULESTR, 0), @@ -195,6 +201,8 @@ static const ERR_STRING_DATA SSL_str_functs[] = { {ERR_PACK(ERR_LIB_SSL, SSL_F_SSL_CIPHER_STRENGTH_SORT, 0), "ssl_cipher_strength_sort"}, {ERR_PACK(ERR_LIB_SSL, SSL_F_SSL_CLEAR, 0), "SSL_clear"}, + {ERR_PACK(ERR_LIB_SSL, SSL_F_SSL_CLIENT_HELLO_GET1_EXTENSIONS_PRESENT, 0), + "SSL_client_hello_get1_extensions_present"}, {ERR_PACK(ERR_LIB_SSL, SSL_F_SSL_COMP_ADD_COMPRESSION_METHOD, 0), "SSL_COMP_add_compression_method"}, {ERR_PACK(ERR_LIB_SSL, SSL_F_SSL_CONF_CMD, 0), "SSL_CONF_cmd"}, @@ -388,10 +396,17 @@ static const ERR_STRING_DATA SSL_str_functs[] = { "tls1_export_keying_material"}, {ERR_PACK(ERR_LIB_SSL, SSL_F_TLS1_GET_CURVELIST, 0), "tls1_get_curvelist"}, {ERR_PACK(ERR_LIB_SSL, SSL_F_TLS1_PRF, 0), "tls1_PRF"}, + {ERR_PACK(ERR_LIB_SSL, SSL_F_TLS1_SAVE_U16, 0), "tls1_save_u16"}, {ERR_PACK(ERR_LIB_SSL, SSL_F_TLS1_SETUP_KEY_BLOCK, 0), "tls1_setup_key_block"}, + {ERR_PACK(ERR_LIB_SSL, SSL_F_TLS1_SET_GROUPS, 0), "tls1_set_groups"}, + {ERR_PACK(ERR_LIB_SSL, SSL_F_TLS1_SET_RAW_SIGALGS, 0), + "tls1_set_raw_sigalgs"}, {ERR_PACK(ERR_LIB_SSL, SSL_F_TLS1_SET_SERVER_SIGALGS, 0), "tls1_set_server_sigalgs"}, + {ERR_PACK(ERR_LIB_SSL, SSL_F_TLS1_SET_SHARED_SIGALGS, 0), + "tls1_set_shared_sigalgs"}, + {ERR_PACK(ERR_LIB_SSL, SSL_F_TLS1_SET_SIGALGS, 0), "tls1_set_sigalgs"}, {ERR_PACK(ERR_LIB_SSL, SSL_F_TLS_CHOOSE_SIGALG, 0), "tls_choose_sigalg"}, {ERR_PACK(ERR_LIB_SSL, SSL_F_TLS_CLIENT_KEY_EXCHANGE_POST_WORK, 0), "tls_client_key_exchange_post_work"}, @@ -693,6 +708,10 @@ static const ERR_STRING_DATA SSL_str_functs[] = { "tls_setup_handshake"}, {ERR_PACK(ERR_LIB_SSL, SSL_F_USE_CERTIFICATE_CHAIN_FILE, 0), "use_certificate_chain_file"}, + {ERR_PACK(ERR_LIB_SSL, SSL_F_WPACKET_INTERN_INIT_LEN, 0), + "wpacket_intern_init_len"}, + {ERR_PACK(ERR_LIB_SSL, SSL_F_WPACKET_START_SUB_PACKET_LEN__, 0), + "WPACKET_start_sub_packet_len__"}, {ERR_PACK(ERR_LIB_SSL, SSL_F_WRITE_STATE_MACHINE, 0), "write_state_machine"}, {0, NULL} diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 1509423..ae15730 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -5048,9 +5048,11 @@ int SSL_client_hello_get1_extensions_present(SSL *s, int **out, size_t *outlen) if (ext->present) num++; } - present = OPENSSL_malloc(sizeof(*present) * num); - if (present == NULL) + if ((present = OPENSSL_malloc(sizeof(*present) * num)) == NULL) { + SSLerr(SSL_F_SSL_CLIENT_HELLO_GET1_EXTENSIONS_PRESENT, + ERR_R_MALLOC_FAILURE); return 0; + } for (i = 0; i < s->clienthello->pre_proc_exts_len; i++) { ext = s->clienthello->pre_proc_exts + i; if (ext->present) { diff --git a/ssl/statem/statem_dtls.c b/ssl/statem/statem_dtls.c index b5e62a2..75ff525 100644 --- a/ssl/statem/statem_dtls.c +++ b/ssl/statem/statem_dtls.c @@ -59,13 +59,14 @@ static hm_fragment *dtls1_hm_fragment_new(size_t frag_len, int reassembly) unsigned char *buf = NULL; unsigned char *bitmask = NULL; - frag = OPENSSL_malloc(sizeof(*frag)); - if (frag == NULL) + if ((frag = OPENSSL_malloc(sizeof(*frag))) == NULL) { + SSLerr(SSL_F_DTLS1_HM_FRAGMENT_NEW, ERR_R_MALLOC_FAILURE); return NULL; + } if (frag_len) { - buf = OPENSSL_malloc(frag_len); - if (buf == NULL) { + if ((buf = OPENSSL_malloc(frag_len)) == NULL) { + SSLerr(SSL_F_DTLS1_HM_FRAGMENT_NEW, ERR_R_MALLOC_FAILURE); OPENSSL_free(frag); return NULL; } @@ -78,6 +79,7 @@ static hm_fragment *dtls1_hm_fragment_new(size_t frag_len, int reassembly) if (reassembly) { bitmask = OPENSSL_zalloc(RSMBLY_BITMASK_SIZE(frag_len)); if (bitmask == NULL) { + SSLerr(SSL_F_DTLS1_HM_FRAGMENT_NEW, ERR_R_MALLOC_FAILURE); OPENSSL_free(buf); OPENSSL_free(frag); return NULL; diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index cf5f783..b698e2b 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -342,9 +342,11 @@ int tls1_set_groups(uint16_t **pext, size_t *pextlen, * ids < 32 */ unsigned long dup_list = 0; - glist = OPENSSL_malloc(ngroups * sizeof(*glist)); - if (glist == NULL) + + if ((glist = OPENSSL_malloc(ngroups * sizeof(*glist))) == NULL) { + SSLerr(SSL_F_TLS1_SET_GROUPS, ERR_R_MALLOC_FAILURE); return 0; + } for (i = 0; i < ngroups; i++) { unsigned long idmask; uint16_t id; @@ -1600,9 +1602,10 @@ static int tls1_set_shared_sigalgs(SSL *s) } nmatch = tls12_shared_sigalgs(s, NULL, pref, preflen, allow, allowlen); if (nmatch) { - salgs = OPENSSL_malloc(nmatch * sizeof(*salgs)); - if (salgs == NULL) + if ((salgs = OPENSSL_malloc(nmatch * sizeof(*salgs))) == NULL) { + SSLerr(SSL_F_TLS1_SET_SHARED_SIGALGS, ERR_R_MALLOC_FAILURE); return 0; + } nmatch = tls12_shared_sigalgs(s, salgs, pref, preflen, allow, allowlen); } else { salgs = NULL; @@ -1626,9 +1629,10 @@ int tls1_save_u16(PACKET *pkt, uint16_t **pdest, size_t *pdestlen) size >>= 1; - buf = OPENSSL_malloc(size * sizeof(*buf)); - if (buf == NULL) + if ((buf = OPENSSL_malloc(size * sizeof(*buf))) == NULL) { + SSLerr(SSL_F_TLS1_SAVE_U16, ERR_R_MALLOC_FAILURE); return 0; + } for (i = 0; i < size && PACKET_get_net_2(pkt, &stmp); i++) buf[i] = stmp; @@ -1856,9 +1860,10 @@ int tls1_set_raw_sigalgs(CERT *c, const uint16_t *psigs, size_t salglen, { uint16_t *sigalgs; - sigalgs = OPENSSL_malloc(salglen * sizeof(*sigalgs)); - if (sigalgs == NULL) + if ((sigalgs = OPENSSL_malloc(salglen * sizeof(*sigalgs))) == NULL) { + SSLerr(SSL_F_TLS1_SET_RAW_SIGALGS, ERR_R_MALLOC_FAILURE); return 0; + } memcpy(sigalgs, psigs, salglen * sizeof(*sigalgs)); if (client) { @@ -1881,9 +1886,10 @@ int tls1_set_sigalgs(CERT *c, const int *psig_nids, size_t salglen, int client) if (salglen & 1) return 0; - sigalgs = OPENSSL_malloc((salglen / 2) * sizeof(*sigalgs)); - if (sigalgs == NULL) + if ((sigalgs = OPENSSL_malloc((salglen / 2) * sizeof(*sigalgs))) == NULL) { + SSLerr(SSL_F_TLS1_SET_SIGALGS, ERR_R_MALLOC_FAILURE); return 0; + } for (i = 0, sptr = sigalgs; i < salglen; i += 2) { size_t j; const SIGALG_LOOKUP *curr; From levitte at openssl.org Tue Apr 3 16:24:56 2018 From: levitte at openssl.org (Richard Levitte) Date: Tue, 03 Apr 2018 16:24:56 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1522772696.496318.29411.nullmailer@dev.openssl.org> The branch master has been updated via fc1d73bb0c4f2977c999031debc7946c9b29fc8b (commit) from cdb10bae3f773401e039c55965eb177a6f3fc160 (commit) - Log ----------------------------------------------------------------- commit fc1d73bb0c4f2977c999031debc7946c9b29fc8b Author: Richard Levitte Date: Tue Apr 3 16:33:55 2018 +0200 VMS: stricter acquisition of entropy for the pool Fail harshly (in debug builds) when rand_pool_acquire_entropy isn't delivering the required amount of entropy. In release builds, this produces an error with details. We also take the opportunity to modernise the types used. Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5857) ----------------------------------------------------------------------- Summary of changes: crypto/err/openssl.txt | 2 ++ crypto/rand/rand_err.c | 4 +++ crypto/rand/rand_vms.c | 65 ++++++++++++++++++++++++++++++++++------------- include/openssl/randerr.h | 2 ++ 4 files changed, 55 insertions(+), 18 deletions(-) diff --git a/crypto/err/openssl.txt b/crypto/err/openssl.txt index 3acecfb..0f15dd8 100644 --- a/crypto/err/openssl.txt +++ b/crypto/err/openssl.txt @@ -966,6 +966,7 @@ RAND_F_RAND_DRBG_SET:104:RAND_DRBG_set RAND_F_RAND_DRBG_SET_DEFAULTS:121:RAND_DRBG_set_defaults RAND_F_RAND_DRBG_UNINSTANTIATE:118:RAND_DRBG_uninstantiate RAND_F_RAND_LOAD_FILE:111:RAND_load_file +RAND_F_RAND_POOL_ACQUIRE_ENTROPY:122:rand_pool_acquire_entropy RAND_F_RAND_POOL_ADD:103:rand_pool_add RAND_F_RAND_POOL_ADD_BEGIN:113:rand_pool_add_begin RAND_F_RAND_POOL_ADD_END:114:rand_pool_add_end @@ -2384,6 +2385,7 @@ RAND_R_PREDICTION_RESISTANCE_NOT_SUPPORTED:133:\ prediction resistance not supported RAND_R_PRNG_NOT_SEEDED:100:PRNG not seeded RAND_R_RANDOM_POOL_OVERFLOW:125:random pool overflow +RAND_R_RANDOM_POOL_UNDERFLOW:134:random pool underflow RAND_R_REQUEST_TOO_LARGE_FOR_DRBG:117:request too large for drbg RAND_R_RESEED_ERROR:118:reseed error RAND_R_SELFTEST_FAILURE:119:selftest failure diff --git a/crypto/rand/rand_err.c b/crypto/rand/rand_err.c index 0cd34ac..4286bf4 100644 --- a/crypto/rand/rand_err.c +++ b/crypto/rand/rand_err.c @@ -36,6 +36,8 @@ static const ERR_STRING_DATA RAND_str_functs[] = { {ERR_PACK(ERR_LIB_RAND, RAND_F_RAND_DRBG_UNINSTANTIATE, 0), "RAND_DRBG_uninstantiate"}, {ERR_PACK(ERR_LIB_RAND, RAND_F_RAND_LOAD_FILE, 0), "RAND_load_file"}, + {ERR_PACK(ERR_LIB_RAND, RAND_F_RAND_POOL_ACQUIRE_ENTROPY, 0), + "rand_pool_acquire_entropy"}, {ERR_PACK(ERR_LIB_RAND, RAND_F_RAND_POOL_ADD, 0), "rand_pool_add"}, {ERR_PACK(ERR_LIB_RAND, RAND_F_RAND_POOL_ADD_BEGIN, 0), "rand_pool_add_begin"}, @@ -99,6 +101,8 @@ static const ERR_STRING_DATA RAND_str_reasons[] = { {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_PRNG_NOT_SEEDED), "PRNG not seeded"}, {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_RANDOM_POOL_OVERFLOW), "random pool overflow"}, + {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_RANDOM_POOL_UNDERFLOW), + "random pool underflow"}, {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_REQUEST_TOO_LARGE_FOR_DRBG), "request too large for drbg"}, {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_RESEED_ERROR), "reseed error"}, diff --git a/crypto/rand/rand_vms.c b/crypto/rand/rand_vms.c index a7181d5..7edec9e 100644 --- a/crypto/rand/rand_vms.c +++ b/crypto/rand/rand_vms.c @@ -10,6 +10,7 @@ #include "e_os.h" #if defined(OPENSSL_SYS_VMS) +# include "internal/cryptlib.h" # include # include "internal/rand_int.h" # include "rand_lcl.h" @@ -55,25 +56,34 @@ static struct items_data_st { {0, 0} }; +/* + * We assume there we get about 4 bits of entropy per byte from the items + * above, with a bit of scrambling added rand_pool_acquire_entropy() + */ +#define ENTROPY_BITS_PER_BYTE 4 + size_t rand_pool_acquire_entropy(RAND_POOL *pool) { /* determine the number of items in the JPI array */ struct items_data_st item_entry; - int item_entry_count = OSSL_NELEM(items_data); - /* Create the JPI itemlist array to hold item_data content */ + size_t item_entry_count = OSSL_NELEM(items_data); + /* Create the 32-bit JPI itemlist array to hold item_data content */ struct { - short length, code; - int *buffer; - int *retlen; + uint16_t length, code; + uint32_t *buffer; + uint32_t *retlen; } item[item_entry_count], *pitem; struct items_data_st *pitems_data; - int data_buffer[(item_entry_count * 2) + 4]; /* 8 bytes per entry max */ - int iosb[2]; - int sys_time[2]; - int *ptr; - int i, j ; - int tmp_length = 0; - int total_length = 0; + /* 8 bytes (two longs) per entry max */ + uint32_t data_buffer[(item_entry_count * 2) + 4]; + uint32_t iosb[2]; + uint32_t sys_time[2]; + uint32_t *ptr; + size_t i, j ; + size_t tmp_length = 0; + size_t total_length = 0; + size_t bytes_needed = rand_pool_bytes_needed(pool, ENTROPY_BITS_PER_BYTE); + size_t bytes_remaining = rand_pool_bytes_remaining(pool); /* Setup itemlist for GETJPI */ pitems_data = items_data; @@ -113,14 +123,33 @@ size_t rand_pool_acquire_entropy(RAND_POOL *pool) total_length += (tmp_length - 1); + /* Change the total length to number of bytes */ + total_length *= 4; + /* - * Size of seed is total_length*4 bytes (64bytes). The original assumption - * was that it contains 4 bits of entropy per byte. This makes a total - * amount of total_length*16 bits (256bits). + * If we can't feed the requirements from the caller, we're in deep trouble. */ - return rand_pool_add(pool, - (PTR_T)data_buffer, total_length * 4, - total_length * 16); + if (!ossl_assert(total_length >= bytes_needed)) { + char neededstr[20]; + char availablestr[20]; + + BIO_snprintf(neededstr, sizeof(neededstr), "%zu", bytes_needed); + BIO_snprintf(availablestr, sizeof(availablestr), "%zu", total_length); + RANDerr(RAND_F_RAND_POOL_ACQUIRE_ENTROPY, + RAND_R_RANDOM_POOL_UNDERFLOW); + ERR_add_error_data(4, "Needed: ", neededstr, ", Available: ", + availablestr); + return 0; + } + + /* + * Try not to overfeed the pool + */ + if (total_length > bytes_remaining) + total_length = bytes_remaining; + + return rand_pool_add(pool, (PTR_T)data_buffer, total_length, + total_length * ENTROPY_BITS_PER_BYTE); } #endif diff --git a/include/openssl/randerr.h b/include/openssl/randerr.h index 4746ad6..415ca2f 100644 --- a/include/openssl/randerr.h +++ b/include/openssl/randerr.h @@ -35,6 +35,7 @@ int ERR_load_RAND_strings(void); # define RAND_F_RAND_DRBG_SET_DEFAULTS 121 # define RAND_F_RAND_DRBG_UNINSTANTIATE 118 # define RAND_F_RAND_LOAD_FILE 111 +# define RAND_F_RAND_POOL_ACQUIRE_ENTROPY 122 # define RAND_F_RAND_POOL_ADD 103 # define RAND_F_RAND_POOL_ADD_BEGIN 113 # define RAND_F_RAND_POOL_ADD_END 114 @@ -74,6 +75,7 @@ int ERR_load_RAND_strings(void); # define RAND_R_PREDICTION_RESISTANCE_NOT_SUPPORTED 133 # define RAND_R_PRNG_NOT_SEEDED 100 # define RAND_R_RANDOM_POOL_OVERFLOW 125 +# define RAND_R_RANDOM_POOL_UNDERFLOW 134 # define RAND_R_REQUEST_TOO_LARGE_FOR_DRBG 117 # define RAND_R_RESEED_ERROR 118 # define RAND_R_SELFTEST_FAILURE 119 From levitte at openssl.org Tue Apr 3 16:40:55 2018 From: levitte at openssl.org (Richard Levitte) Date: Tue, 03 Apr 2018 16:40:55 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1522773655.658870.16201.nullmailer@dev.openssl.org> The branch master has been updated via b2b4dfcca6cf2230107a711f7af1cd8ee3f74229 (commit) from fc1d73bb0c4f2977c999031debc7946c9b29fc8b (commit) - Log ----------------------------------------------------------------- commit b2b4dfcca6cf2230107a711f7af1cd8ee3f74229 Author: Pecio Date: Mon Mar 19 09:34:35 2018 +0100 Enabled OneCore Conf for Console Apps (removed nonUniversal API) Reviewed-by: Rich Salz Reviewed-by: Andy Polyakov Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5625) ----------------------------------------------------------------------- Summary of changes: Configurations/50-win-onecore.conf | 22 +++++++++++++------ crypto/cryptlib.c | 45 ++++++++++++++++++++++++++++++++------ 2 files changed, 53 insertions(+), 14 deletions(-) diff --git a/Configurations/50-win-onecore.conf b/Configurations/50-win-onecore.conf index 1207621..c71d364 100644 --- a/Configurations/50-win-onecore.conf +++ b/Configurations/50-win-onecore.conf @@ -4,7 +4,11 @@ # Mobile[?] Windows editions. It's a set up "umbrella" libraries that # export subset of Win32 API that are common to all Windows 10 devices. # -# TODO: drop onecore_downlevel.lib. +# OneCore Configuration temporarly dedicated for console applications +# due to disabled event logging, which is incompatible with one core. +# Error messages are provided via standard error only. +# TODO: extend error handling to use ETW based eventing +# (Or rework whole error messaging) my %targets = ( "VC-WIN32-ONECORE" => { @@ -13,12 +17,14 @@ my %targets = ( # hidden reference to kernel32.lib, but we don't actually want # it in "onecore" build. lflags => add("/NODEFAULTLIB:kernel32.lib"), - ex_libs => "onecore.lib onecore_downlevel.lib", + defines => add("OPENSSL_SYS_WIN_CORE"), + ex_libs => "onecore.lib", }, "VC-WIN64A-ONECORE" => { inherit_from => [ "VC-WIN64A" ], lflags => add("/NODEFAULTLIB:kernel32.lib"), - ex_libs => "onecore.lib onecore_downlevel.lib", + defines => add("OPENSSL_SYS_WIN_CORE"), + ex_libs => "onecore.lib", }, # Windows on ARM targets. ARM compilers are additional components in @@ -39,18 +45,20 @@ my %targets = ( "VC-WIN32-ARM" => { inherit_from => [ "VC-noCE-common" ], - defines => add("_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE"), + defines => add("_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE", + "OPENSSL_SYS_WIN_CORE"), bn_ops => "BN_LLONG RC4_CHAR EXPORT_VAR_AS_FN", lflags => add("/NODEFAULTLIB:kernel32.lib"), - ex_libs => "onecore.lib onecore_downlevel.lib", + ex_libs => "onecore.lib", multilib => "-arm", }, "VC-WIN64-ARM" => { inherit_from => [ "VC-noCE-common" ], - defines => add("_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE"), + defines => add("_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE", + "OPENSSL_SYS_WIN_CORE"), bn_ops => "SIXTY_FOUR_BIT RC4_CHAR EXPORT_VAR_AS_FN", lflags => add("/NODEFAULTLIB:kernel32.lib"), - ex_libs => "onecore.lib onecore_downlevel.lib", + ex_libs => "onecore.lib", multilib => "-arm64", }, ); diff --git a/crypto/cryptlib.c b/crypto/cryptlib.c index a4d96d8..0470597 100644 --- a/crypto/cryptlib.c +++ b/crypto/cryptlib.c @@ -120,6 +120,14 @@ void OPENSSL_cpuid_setup(void) # endif # if defined(_WIN32_WINNT) && _WIN32_WINNT>=0x0333 +# ifdef OPENSSL_SYS_WIN_CORE + +int OPENSSL_isservice(void) +{ + /* OneCore API cannot interact with GUI */ + return 1; +} +# else int OPENSSL_isservice(void) { HWINSTA h; @@ -160,7 +168,7 @@ int OPENSSL_isservice(void) len++, len &= ~1; /* paranoia */ name[len / sizeof(WCHAR)] = L'\0'; /* paranoia */ -# if 1 +# if 1 /* * This doesn't cover "interactive" services [working with real * WinSta0's] nor programs started non-interactively by Task Scheduler @@ -168,14 +176,15 @@ int OPENSSL_isservice(void) */ if (wcsstr(name, L"Service-0x")) return 1; -# else +# else /* This covers all non-interactive programs such as services. */ if (!wcsstr(name, L"WinSta0")) return 1; -# endif +# endif else return 0; } +# endif # else int OPENSSL_isservice(void) { @@ -272,6 +281,24 @@ void OPENSSL_showfatal(const char *fmta, ...) va_end(ap); # if defined(_WIN32_WINNT) && _WIN32_WINNT>=0x0333 +# ifdef OPENSSL_SYS_WIN_CORE + /* ONECORE is always NONGUI and NT >= 0x0601 */ + + /* + * TODO: (For non GUI and no std error cases) + * Add event logging feature here. + */ + +# if !defined(NDEBUG) + /* + * We are in a situation where we tried to report a critical + * error and this failed for some reason. As a last resort, + * in debug builds, send output to the debugger or any other + * tool like DebugView which can monitor the output. + */ + OutputDebugString(buf); +# endif +# else /* this -------------v--- guards NT-specific calls */ if (check_winnt() && OPENSSL_isservice() > 0) { HANDLE hEventLog = RegisterEventSource(NULL, _T("OpenSSL")); @@ -281,7 +308,7 @@ void OPENSSL_showfatal(const char *fmta, ...) if (!ReportEvent(hEventLog, EVENTLOG_ERROR_TYPE, 0, 0, NULL, 1, 0, &pmsg, NULL)) { -#if defined(DEBUG) +# if !defined(NDEBUG) /* * We are in a situation where we tried to report a critical * error and this failed for some reason. As a last resort, @@ -289,14 +316,18 @@ void OPENSSL_showfatal(const char *fmta, ...) * tool like DebugView which can monitor the output. */ OutputDebugString(pmsg); -#endif +# endif } (void)DeregisterEventSource(hEventLog); } - } else -# endif + } else { MessageBox(NULL, buf, _T("OpenSSL: FATAL"), MB_OK | MB_ICONERROR); + } +# endif +# else + MessageBox(NULL, buf, _T("OpenSSL: FATAL"), MB_OK | MB_ICONERROR); +# endif } #else void OPENSSL_showfatal(const char *fmta, ...) From no-reply at appveyor.com Tue Apr 3 18:11:48 2018 From: no-reply at appveyor.com (AppVeyor) Date: Tue, 03 Apr 2018 18:11:48 +0000 Subject: [openssl-commits] Build failed: openssl master.16998 Message-ID: <20180403181148.1.E7833C2761E98DC5@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Tue Apr 3 19:04:41 2018 From: no-reply at appveyor.com (AppVeyor) Date: Tue, 03 Apr 2018 19:04:41 +0000 Subject: [openssl-commits] Build completed: openssl master.16999 Message-ID: <20180403190441.1.AA86593DD553C897@appveyor.com> An HTML attachment was scrubbed... URL: From davidben at google.com Tue Apr 3 20:10:11 2018 From: davidben at google.com (davidben at google.com) Date: Tue, 03 Apr 2018 20:10:11 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1522786211.066053.4759.nullmailer@dev.openssl.org> The branch master has been updated via dc55e4f70f401c5869410d6a0c068c18c3fd53ec (commit) from b2b4dfcca6cf2230107a711f7af1cd8ee3f74229 (commit) - Log ----------------------------------------------------------------- commit dc55e4f70f401c5869410d6a0c068c18c3fd53ec Author: David Benjamin Date: Wed Mar 28 12:21:45 2018 -0400 Fix a bug in ecp_nistp224.c. felem_neg does not produce an output within the tight bounds suitable for felem_contract. This affects build configurations which set enable-ec_nistp_64_gcc_128. point_double and point_add, in the non-z*_is_zero cases, tolerate and fix up the wider bounds, so this only affects point_add calls where the other point is infinity. Thus it only affects the final addition in arbitrary-point multiplication, giving the wrong y-coordinate. This is a no-op for ECDH and ECDSA, which only use the x-coordinate of arbitrary-point operations. Note: ecp_nistp521.c has the same issue in that the documented preconditions are violated by the test case. I have not addressed this in this PR. ecp_nistp521.c does not immediately produce the wrong answer; felem_contract there appears to be a bit more tolerant than its documented preconditions. However, I haven't checked the point_add property above holds. ecp_nistp521.c should either get this same fix, to be conservative, or have the bounds analysis and comments reworked for the wider bounds. Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5779) ----------------------------------------------------------------------- Summary of changes: crypto/ec/ecp_nistp224.c | 28 ++++++++++++---------------- test/ectest.c | 9 +++++++++ 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/crypto/ec/ecp_nistp224.c b/crypto/ec/ecp_nistp224.c index 4ece15c..346f84d 100644 --- a/crypto/ec/ecp_nistp224.c +++ b/crypto/ec/ecp_nistp224.c @@ -395,22 +395,6 @@ static void felem_sum(felem out, const felem in) out[3] += in[3]; } -/* Get negative value: out = -in */ -/* Assumes in[i] < 2^57 */ -static void felem_neg(felem out, const felem in) -{ - static const limb two58p2 = (((limb) 1) << 58) + (((limb) 1) << 2); - static const limb two58m2 = (((limb) 1) << 58) - (((limb) 1) << 2); - static const limb two58m42m2 = (((limb) 1) << 58) - - (((limb) 1) << 42) - (((limb) 1) << 2); - - /* Set to 0 mod 2^224-2^96+1 to ensure out > in */ - out[0] = two58p2 - in[0]; - out[1] = two58m42m2 - in[1]; - out[2] = two58m2 - in[2]; - out[3] = two58m2 - in[3]; -} - /* Subtract field elements: out -= in */ /* Assumes in[i] < 2^57 */ static void felem_diff(felem out, const felem in) @@ -680,6 +664,18 @@ static void felem_contract(felem out, const felem in) } /* + * Get negative value: out = -in + * Requires in[i] < 2^63, + * ensures out[0] < 2^56, out[1] < 2^56, out[2] < 2^56, out[3] <= 2^56 + 2^16 + */ +static void felem_neg(felem out, const felem in) +{ + widefelem tmp = {0}; + felem_diff_128_64(tmp, in); + felem_reduce(out, tmp); +} + +/* * Zero-check: returns 1 if input is 0, and 0 otherwise. We know that field * elements are reduced to in < 2^225, so we only need to check three cases: * 0, 2^224 - 2^96 + 1, and 2^225 - 2^97 + 2 diff --git a/test/ectest.c b/test/ectest.c index 66d84a7..1c31cce 100644 --- a/test/ectest.c +++ b/test/ectest.c @@ -1377,6 +1377,15 @@ static int nistp_single_test(int idx) if (!TEST_int_eq(0, EC_POINT_cmp(NISTP, Q, Q_CHECK, ctx))) goto err; + /* regression test for felem_neg bug */ + if (!TEST_true(BN_set_word(m, 32)) + || !TEST_true(BN_set_word(n, 31)) + || !TEST_true(EC_POINT_copy(P, G)) + || !TEST_true(EC_POINT_invert(NISTP, P, ctx)) + || !TEST_true(EC_POINT_mul(NISTP, Q, m, P, n, ctx)) + || !TEST_int_eq(0, EC_POINT_cmp(NISTP, Q, G, ctx))) + goto err; + r = group_order_tests(NISTP); err: EC_GROUP_free(NISTP); From no-reply at appveyor.com Tue Apr 3 22:22:34 2018 From: no-reply at appveyor.com (AppVeyor) Date: Tue, 03 Apr 2018 22:22:34 +0000 Subject: [openssl-commits] Build failed: openssl master.17004 Message-ID: <20180403222234.1.D8AE4AD9F9344D86@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Tue Apr 3 22:55:49 2018 From: no-reply at appveyor.com (AppVeyor) Date: Tue, 03 Apr 2018 22:55:49 +0000 Subject: [openssl-commits] Build completed: openssl OpenSSL_1_1_0-stable.17005 Message-ID: <20180403225549.1.8BD2941C2756EBDD@appveyor.com> An HTML attachment was scrubbed... URL: From levitte at openssl.org Wed Apr 4 09:15:00 2018 From: levitte at openssl.org (Richard Levitte) Date: Wed, 04 Apr 2018 09:15:00 +0000 Subject: [openssl-commits] [web] master update Message-ID: <1522833300.972452.19688.nullmailer@dev.openssl.org> The branch master has been updated via a2e614d7f5554b477dedd0066709df3cd3e14990 (commit) from f0dd77fca46f3d630d5a47d3bb93e8d50c66f7df (commit) - Log ----------------------------------------------------------------- commit a2e614d7f5554b477dedd0066709df3cd3e14990 Author: Richard Levitte Date: Wed Apr 4 11:14:44 2018 +0200 Generalise the rewrites of older tarballs We enumerated every series when we could as simply handle them all with one simple regexp. ----------------------------------------------------------------------- Summary of changes: bin/mk-latest | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/bin/mk-latest b/bin/mk-latest index 2307837..8c2d3a7 100755 --- a/bin/mk-latest +++ b/bin/mk-latest @@ -43,15 +43,7 @@ print <<\EOF; RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(openssl-0\.9\.\d.*) old/0.9.x/$1 [L] RewriteCond %{REQUEST_FILENAME} !-f -RewriteRule ^openssl-(1\.0\.0.*) old/1.0.0/openssl-$1 [L] -RewriteCond %{REQUEST_FILENAME} !-f -RewriteRule ^openssl-(1\.0\.1.*) old/1.0.1/openssl-$1 [L] -RewriteCond %{REQUEST_FILENAME} !-f -RewriteRule ^openssl-(1\.0\.2.*) old/1.0.2/openssl-$1 [L] -RewriteCond %{REQUEST_FILENAME} !-f -RewriteRule ^openssl-(1\.1\.0.*) old/1.1.0/openssl-$1 [L] -RewriteCond %{REQUEST_FILENAME} !-f -RewriteRule ^openssl-(1\.1\.1.*) old/1.1.1/openssl-$1 [L] +RewriteRule ^(openssl-(\d+\.\d+\.\d+).*) old/$2/$1 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^openssl-(fips.*) old/fips/openssl-$1 [L] From bernd.edlinger at hotmail.de Wed Apr 4 12:47:15 2018 From: bernd.edlinger at hotmail.de (bernd.edlinger at hotmail.de) Date: Wed, 04 Apr 2018 12:47:15 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1522846035.413265.1399.nullmailer@dev.openssl.org> The branch master has been updated via 284f4f6b70998b2b46dc74c3003c82cb1db0e742 (commit) from dc55e4f70f401c5869410d6a0c068c18c3fd53ec (commit) - Log ----------------------------------------------------------------- commit 284f4f6b70998b2b46dc74c3003c82cb1db0e742 Author: Bernd Edlinger Date: Wed Apr 4 14:45:49 2018 +0200 Don't use getenv for critical functions when run as setuid/setgid Reviewed-by: Richard Levitte Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/5856) ----------------------------------------------------------------------- Summary of changes: CHANGES | 4 ++++ crypto/conf/conf_mod.c | 8 +++++--- crypto/engine/eng_list.c | 3 ++- doc/man3/ENGINE_add.pod | 1 + doc/man3/OPENSSL_config.pod | 11 +++++++++++ doc/man5/config.pod | 16 ++++++++++++++++ 6 files changed, 39 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index b4d0329..40b5823 100644 --- a/CHANGES +++ b/CHANGES @@ -9,6 +9,10 @@ Changes between 1.1.0h and 1.1.1 [xx XXX xxxx] + *) Don't use OPENSSL_ENGINES and OPENSSL_CONF environment values + in libcrypto when run as setuid/setgid. + [Bernd Edlinger] + *) Added new public header file and documentation for the RAND_DRBG API. See manual page RAND_DRBG(7) for an overview. [Matthias St. Pierre] diff --git a/crypto/conf/conf_mod.c b/crypto/conf/conf_mod.c index 99f0fcc..4a848b8 100644 --- a/crypto/conf/conf_mod.c +++ b/crypto/conf/conf_mod.c @@ -480,9 +480,11 @@ char *CONF_get1_default_config_file(void) char *file, *sep = ""; int len; - file = getenv("OPENSSL_CONF"); - if (file) - return OPENSSL_strdup(file); + if (!OPENSSL_issetugid()) { + file = getenv("OPENSSL_CONF"); + if (file) + return OPENSSL_strdup(file); + } len = strlen(X509_get_default_cert_area()); #ifndef OPENSSL_SYS_VMS diff --git a/crypto/engine/eng_list.c b/crypto/engine/eng_list.c index bfd91e2..4bc7ea1 100644 --- a/crypto/engine/eng_list.c +++ b/crypto/engine/eng_list.c @@ -317,7 +317,8 @@ ENGINE *ENGINE_by_id(const char *id) * Prevent infinite recursion if we're looking for the dynamic engine. */ if (strcmp(id, "dynamic")) { - if ((load_dir = getenv("OPENSSL_ENGINES")) == NULL) + if (OPENSSL_issetugid() + || (load_dir = getenv("OPENSSL_ENGINES")) == NULL) load_dir = ENGINESDIR; iterator = ENGINE_by_id("dynamic"); if (!iterator || !ENGINE_ctrl_cmd_string(iterator, "ID", id, 0) || diff --git a/doc/man3/ENGINE_add.pod b/doc/man3/ENGINE_add.pod index b009949..a2fc299 100644 --- a/doc/man3/ENGINE_add.pod +++ b/doc/man3/ENGINE_add.pod @@ -568,6 +568,7 @@ extension). =item B The path to the engines directory. +Ignored in set-user-ID and set-group-ID programs. =back diff --git a/doc/man3/OPENSSL_config.pod b/doc/man3/OPENSSL_config.pod index e70fcd5..ac686e6 100644 --- a/doc/man3/OPENSSL_config.pod +++ b/doc/man3/OPENSSL_config.pod @@ -48,6 +48,17 @@ application calls OPENSSL_config() it doesn't need to know or care about ENGINE control operations because they can be performed by editing a configuration file. +=head1 ENVIRONMENT + +=over 4 + +=item B + +The path to the config file. +Ignored in set-user-ID and set-group-ID programs. + +=back + =head1 RETURN VALUES Neither OPENSSL_config() nor OPENSSL_no_config() return a value. diff --git a/doc/man5/config.pod b/doc/man5/config.pod index ef8e10e..09d72be 100644 --- a/doc/man5/config.pod +++ b/doc/man5/config.pod @@ -384,6 +384,22 @@ will output: showing that the OID "newoid1" has been added as "1.2.3.4.1". +=head1 ENVIRONMENT + +=over 4 + +=item B + +The path to the config file. +Ignored in set-user-ID and set-group-ID programs. + +=item B + +The path to the engines directory. +Ignored in set-user-ID and set-group-ID programs. + +=back + =head1 BUGS Currently there is no way to include characters using the octal B<\nnn> From bernd.edlinger at hotmail.de Wed Apr 4 12:51:38 2018 From: bernd.edlinger at hotmail.de (bernd.edlinger at hotmail.de) Date: Wed, 04 Apr 2018 12:51:38 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1522846298.401040.7124.nullmailer@dev.openssl.org> The branch master has been updated via 6b49b30811f4afa0340342af9400b8d0357b5291 (commit) from 284f4f6b70998b2b46dc74c3003c82cb1db0e742 (commit) - Log ----------------------------------------------------------------- commit 6b49b30811f4afa0340342af9400b8d0357b5291 Author: Bernd Edlinger Date: Tue Apr 3 23:47:10 2018 +0200 Prevent a possible recursion in ERR_get_state and fix the problem that was pointed out in commit aef84bb4efbddfd95d042f3f5f1d362ed7d4faeb differently. Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5863) ----------------------------------------------------------------------- Summary of changes: crypto/err/err.c | 18 ++++++++---------- crypto/init.c | 12 +----------- 2 files changed, 9 insertions(+), 21 deletions(-) diff --git a/crypto/err/err.c b/crypto/err/err.c index 1fb71e7..f55655c 100644 --- a/crypto/err/err.c +++ b/crypto/err/err.c @@ -667,25 +667,23 @@ ERR_STATE *ERR_get_state(void) if (!RUN_ONCE(&err_init, err_do_init)) return NULL; - /* - * If base OPENSSL_init_crypto() hasn't been called yet, be sure to call - * it now to avoid state to be doubly allocated and thereby leak memory. - * Needed on any platform that doesn't define OPENSSL_USE_NODELETE. - */ - if (!OPENSSL_init_crypto(0, NULL)) - return NULL; - state = CRYPTO_THREAD_get_local(&err_thread_local); + if (state == (ERR_STATE*)-1) + return NULL; if (state == NULL) { + if (!CRYPTO_THREAD_set_local(&err_thread_local, (ERR_STATE*)-1)) + return NULL; + if ((state = OPENSSL_zalloc(sizeof(*state))) == NULL) { - /* ERRerr(ERR_F_ERR_GET_STATE, ERR_R_MALLOC_FAILURE); */ + CRYPTO_THREAD_set_local(&err_thread_local, NULL); return NULL; } if (!ossl_init_thread_start(OPENSSL_INIT_THREAD_ERR_STATE) - || !CRYPTO_THREAD_set_local(&err_thread_local, state)) { + || !CRYPTO_THREAD_set_local(&err_thread_local, state)) { ERR_STATE_free(state); + CRYPTO_THREAD_set_local(&err_thread_local, NULL); return NULL; } diff --git a/crypto/init.c b/crypto/init.c index 37b7a7c..c79c32c 100644 --- a/crypto/init.c +++ b/crypto/init.c @@ -540,18 +540,8 @@ void OPENSSL_cleanup(void) */ int OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings) { - static int stoperrset = 0; - if (stopped) { - if (!stoperrset) { - /* - * We only ever set this once to avoid getting into an infinite - * loop where the error system keeps trying to init and fails so - * sets an error etc - */ - stoperrset = 1; - CRYPTOerr(CRYPTO_F_OPENSSL_INIT_CRYPTO, ERR_R_INIT_FAIL); - } + CRYPTOerr(CRYPTO_F_OPENSSL_INIT_CRYPTO, ERR_R_INIT_FAIL); return 0; } From bernd.edlinger at hotmail.de Wed Apr 4 12:56:06 2018 From: bernd.edlinger at hotmail.de (bernd.edlinger at hotmail.de) Date: Wed, 04 Apr 2018 12:56:06 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1522846566.331819.12805.nullmailer@dev.openssl.org> The branch master has been updated via d8fa9324d25b07efd45761a0fee6b0f89c18924b (commit) from 6b49b30811f4afa0340342af9400b8d0357b5291 (commit) - Log ----------------------------------------------------------------- commit d8fa9324d25b07efd45761a0fee6b0f89c18924b Author: cedral Date: Wed Apr 4 14:54:47 2018 +0200 Visual Studio 2017 debug build warning error on 32 bit build Reviewed-by: Rich Salz Reviewed-by: Bernd Edlinger (Merged from https://github.com/openssl/openssl/pull/5799) ----------------------------------------------------------------------- Summary of changes: ssl/t1_trce.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ssl/t1_trce.c b/ssl/t1_trce.c index d3f67f5..394df98 100644 --- a/ssl/t1_trce.c +++ b/ssl/t1_trce.c @@ -1504,7 +1504,8 @@ void SSL_trace(int write_p, int version, int content_type, int hvers; /* avoid overlapping with length at the end of buffer */ - if (msglen < (SSL_IS_DTLS(ssl) ? 13 : 5)) { + if (msglen < (size_t)(SSL_IS_DTLS(ssl) ? + DTLS1_RT_HEADER_LENGTH : SSL3_RT_HEADER_LENGTH)) { BIO_puts(bio, write_p ? "Sent" : "Received"); ssl_print_hex(bio, 0, " too short message", msg, msglen); break; From levitte at openssl.org Wed Apr 4 14:44:59 2018 From: levitte at openssl.org (Richard Levitte) Date: Wed, 04 Apr 2018 14:44:59 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1522853099.291011.706.nullmailer@dev.openssl.org> The branch master has been updated via d3f9268aa58507eb2d25fd0b49f54efdc098f4e6 (commit) from d8fa9324d25b07efd45761a0fee6b0f89c18924b (commit) - Log ----------------------------------------------------------------- commit d3f9268aa58507eb2d25fd0b49f54efdc098f4e6 Author: Richard Levitte Date: Wed Apr 4 15:23:30 2018 +0200 Don't use CPP in Configurations/unix-Makefile.tmpl We started using $(CPP) instead of $(CC) -E, with the assumption that CPP would be predefined. This is, however, not always true, and rather depends on the 'make' implementation. Furthermore, on platforms where CPP=cpp or something else other than '$(CC) -E', there's a risk that it won't understand machine specific flags that we pass to it. So it turns out that trying to use $(CPP) was a mistake, and we therefore revert that use back to using $(CC) -E directly. Fixes #5867 Note: this affects config targets that use Alpha, ARM, IA64, MIPS, s390x or SPARC assembler modules. Reviewed-by: Andy Polyakov (Merged from https://github.com/openssl/openssl/pull/5872) ----------------------------------------------------------------------- Summary of changes: Configurations/unix-Makefile.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl index cc66abe..caf2783 100644 --- a/Configurations/unix-Makefile.tmpl +++ b/Configurations/unix-Makefile.tmpl @@ -954,7 +954,7 @@ EOF } return <<"EOF"; $args{src}: $args{generator}->[0] $deps - \$(CPP) $incs $cppflags $args{generator}->[0] | \\ + \$(CC) $incs $cppflags -E $args{generator}->[0] | \\ \$(PERL) -ne '/^#(line)?\\s*[0-9]+/ or print' > \$@ EOF } @@ -1012,7 +1012,7 @@ EOF $recipe .= <<"EOF"; $obj$objext: $deps ( trap "rm -f \$@.*" INT 0; \\ - \$(CPP) $incs $cmdflags $srcs | \\ + \$(CC) $incs $cmdflags -E $srcs | \\ \$(PERL) -ne '/^#(line)?\\s*[0-9]+/ or print' > \$@.s && \\ $cmd $cmdflags -c -o \$\@ \$@.s ) EOF From levitte at openssl.org Wed Apr 4 14:45:55 2018 From: levitte at openssl.org (Richard Levitte) Date: Wed, 04 Apr 2018 14:45:55 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1522853155.208286.2072.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via 6ddcf90fae372da897bdf84d0949618bbdb4abab (commit) from c255668c61e6b4800aa9c6e293a12942eccf511b (commit) - Log ----------------------------------------------------------------- commit 6ddcf90fae372da897bdf84d0949618bbdb4abab Author: Richard Levitte Date: Wed Apr 4 15:28:19 2018 +0200 Don't use CPP in Configurations/unix-Makefile.tmpl We started using $(CPP) instead of $(CC) -E, with the assumption that CPP would be predefined. This is, however, not always true, and rather depends on the 'make' implementation. Furthermore, on platforms where CPP=cpp or something else other than '$(CC) -E', there's a risk that it won't understand machine specific flags that we pass to it. So it turns out that trying to use $(CPP) was a mistake, and we therefore revert that use back to using $(CC) -E directly. Fixes #5867 Note: this affects config targets that use Alpha, ARM, IA64, MIPS, s390x or SPARC assembler modules. Reviewed-by: Andy Polyakov (Merged from https://github.com/openssl/openssl/pull/5871) ----------------------------------------------------------------------- Summary of changes: Configurations/unix-Makefile.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl index 40cf2c3..1bfaa97 100644 --- a/Configurations/unix-Makefile.tmpl +++ b/Configurations/unix-Makefile.tmpl @@ -848,7 +848,7 @@ EOF $recipe .= <<"EOF"; $obj$objext: $deps ( trap "rm -f \$@.*" INT 0; \\ - \$(CPP) $incs \$(CFLAGS) $ecflags $srcs | \\ + \$(CC) $incs \$(CFLAGS) $ecflags -E $srcs | \\ \$(PERL) -ne '/^#(line)?\\s*[0-9]+/ or print' > \$@.s && \\ \$(CC) \$(CFLAGS) $ecflags -c -o \$\@ \$@.s ) EOF From no-reply at appveyor.com Wed Apr 4 15:00:08 2018 From: no-reply at appveyor.com (AppVeyor) Date: Wed, 04 Apr 2018 15:00:08 +0000 Subject: [openssl-commits] Build failed: openssl master.17021 Message-ID: <20180404150008.1.E1E5B028D85AC337@appveyor.com> An HTML attachment was scrubbed... URL: From matt at openssl.org Wed Apr 4 15:21:20 2018 From: matt at openssl.org (Matt Caswell) Date: Wed, 04 Apr 2018 15:21:20 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1522855280.245881.29788.nullmailer@dev.openssl.org> The branch master has been updated via a53b5be6a056e998fb119dbf035d1df68083a951 (commit) via 034cb87b6c7758986b40692d1d5abdd2a7ba826e (commit) from d3f9268aa58507eb2d25fd0b49f54efdc098f4e6 (commit) - Log ----------------------------------------------------------------- commit a53b5be6a056e998fb119dbf035d1df68083a951 Author: Matt Caswell Date: Tue Apr 3 15:31:38 2018 +0100 Fix configuration of TLSv1.3 ciphersuites Configuration of TLSv1.3 ciphersuites wasn't working in some cases. Fixes #5740 Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5855) commit 034cb87b6c7758986b40692d1d5abdd2a7ba826e Author: Matt Caswell Date: Tue Apr 3 12:31:53 2018 +0100 Add some tests for configuring the TLSv1.3 ciphersuites Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5855) ----------------------------------------------------------------------- Summary of changes: ssl/ssl_ciph.c | 136 +++++++++++++++++++++++++++++++++++++++++++++++--- ssl/ssl_lib.c | 93 ---------------------------------- ssl/ssl_locl.h | 1 + test/sslapitest.c | 82 ++++++++++++++++++++++++++++++ test/sslcorrupttest.c | 6 +-- 5 files changed, 213 insertions(+), 105 deletions(-) diff --git a/ssl/ssl_ciph.c b/ssl/ssl_ciph.c index be728df..9011e42 100644 --- a/ssl/ssl_ciph.c +++ b/ssl/ssl_ciph.c @@ -15,6 +15,7 @@ #include #include #include +#include #include "internal/nelem.h" #include "ssl_locl.h" #include "internal/thread_once.h" @@ -1274,6 +1275,131 @@ static int check_suiteb_cipher_list(const SSL_METHOD *meth, CERT *c, } #endif +static int ciphersuite_cb(const char *elem, int len, void *arg) +{ + STACK_OF(SSL_CIPHER) *ciphersuites = (STACK_OF(SSL_CIPHER) *)arg; + const SSL_CIPHER *cipher; + /* Arbitrary sized temp buffer for the cipher name. Should be big enough */ + char name[80]; + + if (len > (int)(sizeof(name) - 1)) { + SSLerr(SSL_F_CIPHERSUITE_CB, SSL_R_NO_CIPHER_MATCH); + return 0; + } + + memcpy(name, elem, len); + name[len] = '\0'; + + cipher = ssl3_get_cipher_by_std_name(name); + if (cipher == NULL) { + SSLerr(SSL_F_CIPHERSUITE_CB, SSL_R_NO_CIPHER_MATCH); + return 0; + } + + if (!sk_SSL_CIPHER_push(ciphersuites, cipher)) { + SSLerr(SSL_F_CIPHERSUITE_CB, ERR_R_INTERNAL_ERROR); + return 0; + } + + return 1; +} + +int set_ciphersuites(STACK_OF(SSL_CIPHER) **currciphers, const char *str) +{ + STACK_OF(SSL_CIPHER) *newciphers = sk_SSL_CIPHER_new_null(); + + if (newciphers == NULL) + return 0; + + /* Parse the list. We explicitly allow an empty list */ + if (*str != '\0' + && !CONF_parse_list(str, ':', 1, ciphersuite_cb, newciphers)) { + sk_SSL_CIPHER_free(newciphers); + return 0; + } + sk_SSL_CIPHER_free(*currciphers); + *currciphers = newciphers; + + return 1; +} + +static int update_cipher_list_by_id(STACK_OF(SSL_CIPHER) **cipher_list_by_id, + STACK_OF(SSL_CIPHER) *cipherstack) +{ + STACK_OF(SSL_CIPHER) *tmp_cipher_list = sk_SSL_CIPHER_dup(cipherstack); + + if (tmp_cipher_list == NULL) { + return 0; + } + + sk_SSL_CIPHER_free(*cipher_list_by_id); + *cipher_list_by_id = tmp_cipher_list; + + (void)sk_SSL_CIPHER_set_cmp_func(*cipher_list_by_id, ssl_cipher_ptr_id_cmp); + sk_SSL_CIPHER_sort(*cipher_list_by_id); + + return 1; +} + +static int update_cipher_list(STACK_OF(SSL_CIPHER) **cipher_list, + STACK_OF(SSL_CIPHER) **cipher_list_by_id, + STACK_OF(SSL_CIPHER) *tls13_ciphersuites) +{ + int i; + STACK_OF(SSL_CIPHER) *tmp_cipher_list = sk_SSL_CIPHER_dup(*cipher_list); + + if (tmp_cipher_list == NULL) + return 0; + + /* + * Delete any existing TLSv1.3 ciphersuites. These are always first in the + * list. + */ + while (sk_SSL_CIPHER_num(tmp_cipher_list) > 0 + && sk_SSL_CIPHER_value(tmp_cipher_list, 0)->min_tls + == TLS1_3_VERSION) + sk_SSL_CIPHER_delete(tmp_cipher_list, 0); + + /* Insert the new TLSv1.3 ciphersuites */ + for (i = 0; i < sk_SSL_CIPHER_num(tls13_ciphersuites); i++) + sk_SSL_CIPHER_insert(tmp_cipher_list, + sk_SSL_CIPHER_value(tls13_ciphersuites, i), i); + + if (!update_cipher_list_by_id(cipher_list_by_id, tmp_cipher_list)) + return 0; + + sk_SSL_CIPHER_free(*cipher_list); + *cipher_list = tmp_cipher_list; + + return 1; +} + +int SSL_CTX_set_ciphersuites(SSL_CTX *ctx, const char *str) +{ + int ret = set_ciphersuites(&(ctx->tls13_ciphersuites), str); + + if (ret && ctx->cipher_list != NULL) { + /* We already have a cipher_list, so we need to update it */ + return update_cipher_list(&ctx->cipher_list, &ctx->cipher_list_by_id, + ctx->tls13_ciphersuites); + } + + return ret; +} + +int SSL_set_ciphersuites(SSL *s, const char *str) +{ + int ret = set_ciphersuites(&(s->tls13_ciphersuites), str); + + if (ret && s->cipher_list != NULL) { + /* We already have a cipher_list, so we need to update it */ + return update_cipher_list(&s->cipher_list, &s->cipher_list_by_id, + s->tls13_ciphersuites); + } + + return ret; +} + STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method, STACK_OF(SSL_CIPHER) *tls13_ciphersuites, STACK_OF(SSL_CIPHER) **cipher_list, @@ -1283,7 +1409,7 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method, { int ok, num_of_ciphers, num_of_alias_max, num_of_group_aliases, i; uint32_t disabled_mkey, disabled_auth, disabled_enc, disabled_mac; - STACK_OF(SSL_CIPHER) *cipherstack, *tmp_cipher_list; + STACK_OF(SSL_CIPHER) *cipherstack; const char *rule_p; CIPHER_ORDER *co_list = NULL, *head = NULL, *tail = NULL, *curr; const SSL_CIPHER **ca_list = NULL; @@ -1498,19 +1624,13 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method, } OPENSSL_free(co_list); /* Not needed any longer */ - tmp_cipher_list = sk_SSL_CIPHER_dup(cipherstack); - if (tmp_cipher_list == NULL) { + if (!update_cipher_list_by_id(cipher_list_by_id, cipherstack)) { sk_SSL_CIPHER_free(cipherstack); return NULL; } sk_SSL_CIPHER_free(*cipher_list); *cipher_list = cipherstack; - if (*cipher_list_by_id != NULL) - sk_SSL_CIPHER_free(*cipher_list_by_id); - *cipher_list_by_id = tmp_cipher_list; - (void)sk_SSL_CIPHER_set_cmp_func(*cipher_list_by_id, ssl_cipher_ptr_id_cmp); - sk_SSL_CIPHER_sort(*cipher_list_by_id); return cipherstack; } diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index ae15730..b1d78dc 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -2549,99 +2549,6 @@ int SSL_set_cipher_list(SSL *s, const char *str) return 1; } -static int ciphersuite_cb(const char *elem, int len, void *arg) -{ - STACK_OF(SSL_CIPHER) *ciphersuites = (STACK_OF(SSL_CIPHER) *)arg; - const SSL_CIPHER *cipher; - /* Arbitrary sized temp buffer for the cipher name. Should be big enough */ - char name[80]; - - if (len > (int)(sizeof(name) - 1)) { - SSLerr(SSL_F_CIPHERSUITE_CB, SSL_R_NO_CIPHER_MATCH); - return 0; - } - - memcpy(name, elem, len); - name[len] = '\0'; - - cipher = ssl3_get_cipher_by_std_name(name); - if (cipher == NULL) { - SSLerr(SSL_F_CIPHERSUITE_CB, SSL_R_NO_CIPHER_MATCH); - return 0; - } - - if (!sk_SSL_CIPHER_push(ciphersuites, cipher)) { - SSLerr(SSL_F_CIPHERSUITE_CB, ERR_R_INTERNAL_ERROR); - return 0; - } - - return 1; -} - -static int set_ciphersuites(STACK_OF(SSL_CIPHER) **currciphers, const char *str) -{ - STACK_OF(SSL_CIPHER) *newciphers = sk_SSL_CIPHER_new_null(); - - if (newciphers == NULL) - return 0; - - /* Parse the list. We explicitly allow an empty list */ - if (*str != '\0' - && !CONF_parse_list(str, ':', 1, ciphersuite_cb, newciphers)) { - sk_SSL_CIPHER_free(newciphers); - return 0; - } - sk_SSL_CIPHER_free(*currciphers); - *currciphers = newciphers; - - return 1; -} - -static int update_cipher_list(STACK_OF(SSL_CIPHER) *cipher_list, - STACK_OF(SSL_CIPHER) *tls13_ciphersuites) -{ - int i; - - /* - * Delete any existing TLSv1.3 ciphersuites. These are always first in the - * list. - */ - while (sk_SSL_CIPHER_num(cipher_list) > 0 - && sk_SSL_CIPHER_value(cipher_list, 0)->min_tls == TLS1_3_VERSION) - sk_SSL_CIPHER_delete(cipher_list, 0); - - /* Insert the new TLSv1.3 ciphersuites */ - for (i = 0; i < sk_SSL_CIPHER_num(tls13_ciphersuites); i++) - sk_SSL_CIPHER_insert(cipher_list, - sk_SSL_CIPHER_value(tls13_ciphersuites, i), i); - - return 1; -} - -int SSL_CTX_set_ciphersuites(SSL_CTX *ctx, const char *str) -{ - int ret = set_ciphersuites(&(ctx->tls13_ciphersuites), str); - - if (ret && ctx->cipher_list != NULL) { - /* We already have a cipher_list, so we need to update it */ - return update_cipher_list(ctx->cipher_list, ctx->tls13_ciphersuites); - } - - return ret; -} - -int SSL_set_ciphersuites(SSL *s, const char *str) -{ - int ret = set_ciphersuites(&(s->tls13_ciphersuites), str); - - if (ret && s->cipher_list != NULL) { - /* We already have a cipher_list, so we need to update it */ - return update_cipher_list(s->cipher_list, s->tls13_ciphersuites); - } - - return ret; -} - char *SSL_get_shared_ciphers(const SSL *s, char *buf, int len) { char *p; diff --git a/ssl/ssl_locl.h b/ssl/ssl_locl.h index a9ef6c3..b1d6e40 100644 --- a/ssl/ssl_locl.h +++ b/ssl/ssl_locl.h @@ -2210,6 +2210,7 @@ __owur int ssl_cipher_id_cmp(const SSL_CIPHER *a, const SSL_CIPHER *b); DECLARE_OBJ_BSEARCH_GLOBAL_CMP_FN(SSL_CIPHER, SSL_CIPHER, ssl_cipher_id); __owur int ssl_cipher_ptr_id_cmp(const SSL_CIPHER *const *ap, const SSL_CIPHER *const *bp); +__owur int set_ciphersuites(STACK_OF(SSL_CIPHER) **currciphers, const char *str); __owur STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method, STACK_OF(SSL_CIPHER) *tls13_ciphersuites, STACK_OF(SSL_CIPHER) **cipher_list, diff --git a/test/sslapitest.c b/test/sslapitest.c index 3dcf735..876be31 100644 --- a/test/sslapitest.c +++ b/test/sslapitest.c @@ -2439,6 +2439,87 @@ static int test_early_data_tls1_2(int idx) } # endif /* OPENSSL_NO_TLS1_2 */ +/* + * Test configuring the TLSv1.3 ciphersuites + * + * Test 0: Set a default ciphersuite in the SSL_CTX (no explicit cipher_list) + * Test 1: Set a non-default ciphersuite in the SSL_CTX (no explicit cipher_list) + * Test 2: Set a default ciphersuite in the SSL (no explicit cipher_list) + * Test 3: Set a non-default ciphersuite in the SSL (no explicit cipher_list) + * Test 4: Set a default ciphersuite in the SSL_CTX (SSL_CTX cipher_list) + * Test 5: Set a non-default ciphersuite in the SSL_CTX (SSL_CTX cipher_list) + * Test 6: Set a default ciphersuite in the SSL (SSL_CTX cipher_list) + * Test 7: Set a non-default ciphersuite in the SSL (SSL_CTX cipher_list) + * Test 8: Set a default ciphersuite in the SSL (SSL cipher_list) + * Test 9: Set a non-default ciphersuite in the SSL (SSL cipher_list) + */ +static int test_set_ciphersuite(int idx) +{ + SSL_CTX *cctx = NULL, *sctx = NULL; + SSL *clientssl = NULL, *serverssl = NULL; + int testresult = 0; + + if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), TLS_client_method(), + TLS1_VERSION, TLS_MAX_VERSION, + &sctx, &cctx, cert, privkey)) + || !TEST_true(SSL_CTX_set_ciphersuites(sctx, + "TLS_AES_128_GCM_SHA256:TLS_AES_128_CCM_SHA256"))) + goto end; + + if (idx >=4 && idx <= 7) { + /* SSL_CTX explicit cipher list */ + if (!TEST_true(SSL_CTX_set_cipher_list(cctx, "AES256-GCM-SHA384"))) + goto end; + } + + if (idx == 0 || idx == 4) { + /* Default ciphersuite */ + if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, + "TLS_AES_128_GCM_SHA256"))) + goto end; + } else if (idx == 1 || idx == 5) { + /* Non default ciphersuite */ + if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, + "TLS_AES_128_CCM_SHA256"))) + goto end; + } + + if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, + &clientssl, NULL, NULL))) + goto end; + + if (idx == 8 || idx == 9) { + /* SSL explicit cipher list */ + if (!TEST_true(SSL_set_cipher_list(clientssl, "AES256-GCM-SHA384"))) + goto end; + } + + if (idx == 2 || idx == 6 || idx == 8) { + /* Default ciphersuite */ + if (!TEST_true(SSL_set_ciphersuites(clientssl, + "TLS_AES_128_GCM_SHA256"))) + goto end; + } else if (idx == 3 || idx == 7 || idx == 9) { + /* Non default ciphersuite */ + if (!TEST_true(SSL_set_ciphersuites(clientssl, + "TLS_AES_128_CCM_SHA256"))) + goto end; + } + + if (!TEST_true(create_ssl_connection(serverssl, clientssl, SSL_ERROR_NONE))) + goto end; + + testresult = 1; + + end: + SSL_free(serverssl); + SSL_free(clientssl); + SSL_CTX_free(sctx); + SSL_CTX_free(cctx); + + return testresult; +} + static int test_ciphersuite_change(void) { SSL_CTX *cctx = NULL, *sctx = NULL; @@ -3770,6 +3851,7 @@ int setup_tests(void) # endif #endif #ifndef OPENSSL_NO_TLS1_3 + ADD_ALL_TESTS(test_set_ciphersuite, 10); ADD_TEST(test_ciphersuite_change); #ifdef OPENSSL_NO_PSK ADD_ALL_TESTS(test_tls13_psk, 1); diff --git a/test/sslcorrupttest.c b/test/sslcorrupttest.c index 0219559..30d3d3d 100644 --- a/test/sslcorrupttest.c +++ b/test/sslcorrupttest.c @@ -198,11 +198,9 @@ static int test_ssl_corrupt(int testidx) &sctx, &cctx, cert, privkey))) return 0; - if (!TEST_true(SSL_CTX_set_cipher_list(cctx, cipher_list[testidx]))) - goto end; - - if (!TEST_ptr(ciphers = SSL_CTX_get_ciphers(cctx)) + if (!TEST_true(SSL_CTX_set_cipher_list(cctx, cipher_list[testidx])) || !TEST_true(SSL_CTX_set_ciphersuites(cctx, "")) + || !TEST_ptr(ciphers = SSL_CTX_get_ciphers(cctx)) || !TEST_int_eq(sk_SSL_CIPHER_num(ciphers), 1) || !TEST_ptr(currcipher = sk_SSL_CIPHER_value(ciphers, 0))) goto end; From matt at openssl.org Wed Apr 4 16:04:22 2018 From: matt at openssl.org (Matt Caswell) Date: Wed, 04 Apr 2018 16:04:22 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1522857862.766048.30649.nullmailer@dev.openssl.org> The branch master has been updated via dbcfd9025f86e997f6246d51e4700a0560ce3977 (commit) from a53b5be6a056e998fb119dbf035d1df68083a951 (commit) - Log ----------------------------------------------------------------- commit dbcfd9025f86e997f6246d51e4700a0560ce3977 Author: Matt Caswell Date: Wed Apr 4 16:54:33 2018 +0100 Add test/versions to gitignore Reviewed-by: Richard Levitte Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5875) ----------------------------------------------------------------------- Summary of changes: .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 7496b0e..d618cd6 100644 --- a/.gitignore +++ b/.gitignore @@ -57,6 +57,7 @@ Makefile /test/ssltest_old /test/x509aux /test/v3ext +/test/versions /test/ossl_shim/ossl_shim # Certain files that get created by tests on the fly From bernd.edlinger at hotmail.de Wed Apr 4 17:13:08 2018 From: bernd.edlinger at hotmail.de (bernd.edlinger at hotmail.de) Date: Wed, 04 Apr 2018 17:13:08 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1522861988.391369.4888.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via bd90e98e149532aac345080905603f98af3d3350 (commit) from 6ddcf90fae372da897bdf84d0949618bbdb4abab (commit) - Log ----------------------------------------------------------------- commit bd90e98e149532aac345080905603f98af3d3350 Author: cedral Date: Wed Apr 4 19:12:23 2018 +0200 fix build error in 32 bit debug build Reviewed-by: Rich Salz Reviewed-by: Bernd Edlinger (Merged from https://github.com/openssl/openssl/pull/5861) ----------------------------------------------------------------------- Summary of changes: ssl/t1_trce.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ssl/t1_trce.c b/ssl/t1_trce.c index e5b4085..3df3f54 100644 --- a/ssl/t1_trce.c +++ b/ssl/t1_trce.c @@ -1278,11 +1278,12 @@ void SSL_trace(int write_p, int version, int content_type, int hvers; /* avoid overlapping with length at the end of buffer */ - if (msglen < (SSL_IS_DTLS(ssl) ? 13 : 5)) { - BIO_puts(bio, write_p ? "Sent" : "Received"); - ssl_print_hex(bio, 0, " too short message", msg, msglen); - break; - } + if (msglen < (size_t)(SSL_IS_DTLS(ssl) ? + DTLS1_RT_HEADER_LENGTH : SSL3_RT_HEADER_LENGTH)) { + BIO_puts(bio, write_p ? "Sent" : "Received"); + ssl_print_hex(bio, 0, " too short message", msg, msglen); + break; + } hvers = msg[1] << 8 | msg[2]; BIO_puts(bio, write_p ? "Sent" : "Received"); BIO_printf(bio, " Record\nHeader:\n Version = %s (0x%x)\n", From levitte at openssl.org Wed Apr 4 18:15:01 2018 From: levitte at openssl.org (Richard Levitte) Date: Wed, 04 Apr 2018 18:15:01 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1522865701.619666.12206.nullmailer@dev.openssl.org> The branch master has been updated via 8e2bec9b8aaba602af6fda2523a15238aa49aade (commit) from dbcfd9025f86e997f6246d51e4700a0560ce3977 (commit) - Log ----------------------------------------------------------------- commit 8e2bec9b8aaba602af6fda2523a15238aa49aade Author: Richard Levitte Date: Wed Apr 4 18:31:50 2018 +0200 Remove ambiguity in rand_pool_add[_end] return value When these two functions returned zero, it could mean: 1. that an error occured. In their case, the error is an overflow of the pool, i.e. the correct response from the caller would be to stop trying to fill the pool. 2. that there isn't enought entropy acquired yet, i.e. the correct response from the caller would be to try and add more entropy to the pool. Because of this ambiguity, the returned zero turns out to be useless. This change makes the returned value more consistent. 1 means the addition of new entropy was successful, 0 means it wasn't. To know if the pool has been filled enough, the caller will have to call some other function, such as rand_pool_entropy_available(). Fixes #5846 Reviewed-by: Matthias St. Pierre (Merged from https://github.com/openssl/openssl/pull/5876) ----------------------------------------------------------------------- Summary of changes: crypto/rand/rand_lib.c | 42 ++++++++++++++++++------------------------ crypto/rand/rand_unix.c | 9 ++++++--- crypto/rand/rand_vms.c | 5 +++-- crypto/rand/rand_win.c | 9 ++++++--- 4 files changed, 33 insertions(+), 32 deletions(-) diff --git a/crypto/rand/rand_lib.c b/crypto/rand/rand_lib.c index 143dfb0..3589e75 100644 --- a/crypto/rand/rand_lib.c +++ b/crypto/rand/rand_lib.c @@ -130,26 +130,20 @@ size_t rand_acquire_entropy_from_cpu(RAND_POOL *pool) buffer = rand_pool_add_begin(pool, bytes_needed); if (buffer != NULL) { - - /* If RDSEED is available, use that. */ + /* Whichever comes first, use RDSEED, RDRAND or nothing */ if ((OPENSSL_ia32cap_P[2] & (1 << 18)) != 0) { if (OPENSSL_ia32_rdseed_bytes(buffer, bytes_needed) - == bytes_needed) - return rand_pool_add_end(pool, - bytes_needed, - 8 * bytes_needed); - } - - /* Second choice is RDRAND. */ - if ((OPENSSL_ia32cap_P[1] & (1 << (62 - 32))) != 0) { + == bytes_needed) { + rand_pool_add_end(pool, bytes_needed, 8 * bytes_needed); + } + } else if ((OPENSSL_ia32cap_P[1] & (1 << (62 - 32))) != 0) { if (OPENSSL_ia32_rdrand_bytes(buffer, bytes_needed) - == bytes_needed) - return rand_pool_add_end(pool, - bytes_needed, - 8 * bytes_needed); + == bytes_needed) { + rand_pool_add_end(pool, bytes_needed, 8 * bytes_needed); + } + } else { + rand_pool_add_end(pool, 0, 0); } - - return rand_pool_add_end(pool, 0, 0); } } @@ -222,7 +216,8 @@ size_t rand_drbg_get_entropy(RAND_DRBG *drbg, bytes = bytes_needed; rand_drbg_unlock(drbg->parent); - entropy_available = rand_pool_add_end(pool, bytes, 8 * bytes); + rand_pool_add_end(pool, bytes, 8 * bytes); + entropy_available = rand_pool_entropy_available(pool); } } else { @@ -631,11 +626,10 @@ size_t rand_pool_bytes_remaining(RAND_POOL *pool) * random input which contains at least |entropy| bits of * randomness. * - * Return available amount of entropy after this operation. - * (see rand_pool_entropy_available(pool)) + * Returns 1 if the added amount is adequate, otherwise 0 */ -size_t rand_pool_add(RAND_POOL *pool, - const unsigned char *buffer, size_t len, size_t entropy) +int rand_pool_add(RAND_POOL *pool, + const unsigned char *buffer, size_t len, size_t entropy) { if (len > pool->max_len - pool->len) { RANDerr(RAND_F_RAND_POOL_ADD, RAND_R_ENTROPY_INPUT_TOO_LONG); @@ -648,7 +642,7 @@ size_t rand_pool_add(RAND_POOL *pool, pool->entropy += entropy; } - return rand_pool_entropy_available(pool); + return 1; } /* @@ -685,7 +679,7 @@ unsigned char *rand_pool_add_begin(RAND_POOL *pool, size_t len) * to the buffer which contain at least |entropy| bits of randomness. * It is allowed to add less bytes than originally reserved. */ -size_t rand_pool_add_end(RAND_POOL *pool, size_t len, size_t entropy) +int rand_pool_add_end(RAND_POOL *pool, size_t len, size_t entropy) { if (len > pool->max_len - pool->len) { RANDerr(RAND_F_RAND_POOL_ADD_END, RAND_R_RANDOM_POOL_OVERFLOW); @@ -697,7 +691,7 @@ size_t rand_pool_add_end(RAND_POOL *pool, size_t len, size_t entropy) pool->entropy += entropy; } - return rand_pool_entropy_available(pool); + return 1; } int RAND_set_rand_method(const RAND_METHOD *meth) diff --git a/crypto/rand/rand_unix.c b/crypto/rand/rand_unix.c index b86f94a..0f9407f 100644 --- a/crypto/rand/rand_unix.c +++ b/crypto/rand/rand_unix.c @@ -174,7 +174,8 @@ size_t rand_pool_acquire_entropy(RAND_POOL *pool) if (getrandom(buffer, bytes_needed, 0) == (int)bytes_needed) bytes = bytes_needed; - entropy_available = rand_pool_add_end(pool, bytes, 8 * bytes); + rand_pool_add_end(pool, bytes, 8 * bytes); + entropy_available = rand_pool_entropy_available(pool); } if (entropy_available > 0) return entropy_available; @@ -203,7 +204,8 @@ size_t rand_pool_acquire_entropy(RAND_POOL *pool) if (fread(buffer, 1, bytes_needed, fp) == bytes_needed) bytes = bytes_needed; - entropy_available = rand_pool_add_end(pool, bytes, 8 * bytes); + rand_pool_add_end(pool, bytes, 8 * bytes); + entropy_available = rand_pool_entropy_available(pool); } fclose(fp); if (entropy_available > 0) @@ -241,7 +243,8 @@ size_t rand_pool_acquire_entropy(RAND_POOL *pool) if (num == (int)bytes_needed) bytes = bytes_needed; - entropy_available = rand_pool_add_end(pool, bytes, 8 * bytes); + rand_pool_add_end(pool, bytes, 8 * bytes); + entropy_available = rand_pool_entropy_available(pool); } if (entropy_available > 0) return entropy_available; diff --git a/crypto/rand/rand_vms.c b/crypto/rand/rand_vms.c index 7edec9e..1507c6f 100644 --- a/crypto/rand/rand_vms.c +++ b/crypto/rand/rand_vms.c @@ -148,8 +148,9 @@ size_t rand_pool_acquire_entropy(RAND_POOL *pool) if (total_length > bytes_remaining) total_length = bytes_remaining; - return rand_pool_add(pool, (PTR_T)data_buffer, total_length, - total_length * ENTROPY_BITS_PER_BYTE); + rand_pool_add(pool, (PTR_T)data_buffer, total_length, + total_length * ENTROPY_BITS_PER_BYTE); + return rand_pool_entropy_available(pool); } #endif diff --git a/crypto/rand/rand_win.c b/crypto/rand/rand_win.c index 7f34188..ad5e3d1 100644 --- a/crypto/rand/rand_win.c +++ b/crypto/rand/rand_win.c @@ -70,7 +70,8 @@ size_t rand_pool_acquire_entropy(RAND_POOL *pool) BCRYPT_USE_SYSTEM_PREFERRED_RNG) == STATUS_SUCCESS) bytes = bytes_needed; - entropy_available = rand_pool_add_end(pool, bytes, 8 * bytes); + rand_pool_add_end(pool, bytes, 8 * bytes); + entropy_available = rand_pool_entropy_available(pool); } if (entropy_available > 0) return entropy_available; @@ -88,7 +89,8 @@ size_t rand_pool_acquire_entropy(RAND_POOL *pool) CryptReleaseContext(hProvider, 0); } - entropy_available = rand_pool_add_end(pool, bytes, 8 * bytes); + rand_pool_add_end(pool, bytes, 8 * bytes); + entropy_available = rand_pool_entropy_available(pool); } if (entropy_available > 0) return entropy_available; @@ -106,7 +108,8 @@ size_t rand_pool_acquire_entropy(RAND_POOL *pool) CryptReleaseContext(hProvider, 0); } - entropy_available = rand_pool_add_end(pool, bytes, 8 * bytes); + rand_pool_add_end(pool, bytes, 8 * bytes); + entropy_available = rand_pool_entropy_available(pool); } if (entropy_available > 0) return entropy_available; From appro at openssl.org Wed Apr 4 18:24:50 2018 From: appro at openssl.org (Andy Polyakov) Date: Wed, 04 Apr 2018 18:24:50 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1522866290.076825.14195.nullmailer@dev.openssl.org> The branch master has been updated via 6228b1dae265bbe6c46457d82b2d14d672af5f46 (commit) via 5540eb7040839b0075a2b7651b6a95264d025e15 (commit) from 8e2bec9b8aaba602af6fda2523a15238aa49aade (commit) - Log ----------------------------------------------------------------- commit 6228b1dae265bbe6c46457d82b2d14d672af5f46 Author: Andy Polyakov Date: Mon Apr 2 23:26:25 2018 +0200 TLSProxy/Proxy.pm: switch to dynamic ports and overhaul. By asking for port 0, you get a free port dynamically assigned by OS. TLSProxy::Proxy now asks for 0 and asks s_server to do the same. The s_server's port is reported in "ACCEPT" line, which TLSProxy::Proxy parses and uses. Because the server port is now a random affair in TLSProxy::Proxy, it's no longer possible to change it with the method 'server_port', and it has become an accessor only. For the sake of orthogonality, so has the method 'server_addr'. Remove all fork calls on Windows, as fork is not to be trusted there. This naturally minimized amount of fork calls on POSIX systems, to 1. Sink s_server's output to 'perl -ne print' which ensures that output is written strictly in lines. This keeps TAP parser happy. Improve synchronization in -naccept +n cases by establishing next connection to s_server *after* s_client finishes instead of before it starts. Improve error handling and clean up some methods. Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5843) commit 5540eb7040839b0075a2b7651b6a95264d025e15 Author: Richard Levitte Date: Fri Mar 30 21:13:25 2018 +0200 openssl s_server: print the accepting address and socket The line saying ACCEPT is extended with a space followed by the the address and port combination on which s_server accepts connections. The address is written in such a way that s_client should be able to accepts as argument for the '-connect' option. Reviewed-by: Andy Polyakov (Merged from https://github.com/openssl/openssl/pull/5843) ----------------------------------------------------------------------- Summary of changes: apps/s_apps.h | 5 +- apps/s_server.c | 9 +- apps/s_socket.c | 30 ++++- util/perl/TLSProxy/Proxy.pm | 318 +++++++++++++++++++++++++------------------- 4 files changed, 211 insertions(+), 151 deletions(-) diff --git a/apps/s_apps.h b/apps/s_apps.h index 2454161..0a3bc96 100644 --- a/apps/s_apps.h +++ b/apps/s_apps.h @@ -22,9 +22,8 @@ typedef int (*do_server_cb)(int s, int stype, int prot, unsigned char *context); int do_server(int *accept_sock, const char *host, const char *port, - int family, int type, int protocol, - do_server_cb cb, - unsigned char *context, int naccept); + int family, int type, int protocol, do_server_cb cb, + unsigned char *context, int naccept, BIO *bio_s_out); #ifdef HEADER_X509_H int verify_callback(int ok, X509_STORE_CTX *ctx); #endif diff --git a/apps/s_server.c b/apps/s_server.c index 9b5106d..be1564a 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -2095,8 +2095,6 @@ int s_server_main(int argc, char *argv[]) if (max_early_data >= 0) SSL_CTX_set_max_early_data(ctx, max_early_data); - BIO_printf(bio_s_out, "ACCEPT\n"); - (void)BIO_flush(bio_s_out); if (rev) server_cb = rev_body; else if (www) @@ -2109,7 +2107,7 @@ int s_server_main(int argc, char *argv[]) unlink(host); #endif do_server(&accept_socket, host, port, socket_family, socket_type, protocol, - server_cb, context, naccept); + server_cb, context, naccept, bio_s_out); print_stats(bio_s_out, ctx); ret = 0; end: @@ -2673,9 +2671,6 @@ static int sv_body(int s, int stype, int prot, unsigned char *context) } BIO_printf(bio_s_out, "CONNECTION CLOSED\n"); OPENSSL_clear_free(buf, bufsize); - if (ret >= 0) - BIO_printf(bio_s_out, "ACCEPT\n"); - (void)BIO_flush(bio_s_out); return ret; } @@ -3284,8 +3279,6 @@ static int www_body(int s, int stype, int prot, unsigned char *context) SSL_set_shutdown(con, SSL_SENT_SHUTDOWN | SSL_RECEIVED_SHUTDOWN); err: - if (ret >= 0) - BIO_printf(bio_s_out, "ACCEPT\n"); OPENSSL_free(buf); BIO_free_all(io); return ret; diff --git a/apps/s_socket.c b/apps/s_socket.c index 4b82011..e3cfda9 100644 --- a/apps/s_socket.c +++ b/apps/s_socket.c @@ -204,7 +204,7 @@ out: */ int do_server(int *accept_sock, const char *host, const char *port, int family, int type, int protocol, do_server_cb cb, - unsigned char *context, int naccept) + unsigned char *context, int naccept, BIO *bio_s_out) { int asock = 0; int sock; @@ -283,6 +283,34 @@ int do_server(int *accept_sock, const char *host, const char *port, BIO_ADDRINFO_free(res); res = NULL; + { + union BIO_sock_info_u info; + char *hostname = NULL; + char *service = NULL; + int success = 0; + + if ((info.addr = BIO_ADDR_new()) != NULL + && BIO_sock_info(asock, BIO_SOCK_INFO_ADDRESS, &info) + && (hostname = BIO_ADDR_hostname_string(info.addr, 1)) != NULL + && (service = BIO_ADDR_service_string(info.addr, 1)) != NULL + && BIO_printf(bio_s_out, + strchr(hostname, ':') == NULL + ? /* IPv4 */ "ACCEPT %s:%s\n" + : /* IPv6 */ "ACCEPT [%s]:%s\n", + hostname, service) > 0) + success = 1; + + (void)BIO_flush(bio_s_out); + OPENSSL_free(hostname); + OPENSSL_free(service); + BIO_ADDR_free(info.addr); + if (!success) { + BIO_closesocket(asock); + ERR_print_errors(bio_err); + goto end; + } + } + if (accept_sock != NULL) *accept_sock = asock; for (;;) { diff --git a/util/perl/TLSProxy/Proxy.pm b/util/perl/TLSProxy/Proxy.pm index 0b90159..c20b556 100644 --- a/util/perl/TLSProxy/Proxy.pm +++ b/util/perl/TLSProxy/Proxy.pm @@ -22,7 +22,6 @@ use TLSProxy::Certificate; use TLSProxy::CertificateVerify; use TLSProxy::ServerKeyExchange; use TLSProxy::NewSessionTicket; -use Time::HiRes qw/usleep/; my $have_IPv6 = 0; my $IP_factory; @@ -41,19 +40,19 @@ sub new my $self = { #Public read/write proxy_addr => "localhost", - proxy_port => 4453, server_addr => "localhost", - server_port => 4443, filter => $filter, serverflags => "", clientflags => "", serverconnects => 1, - serverpid => 0, - clientpid => 0, reneg => 0, sessionfile => undef, #Public read + proxy_port => 0, + server_port => 0, + serverpid => 0, + clientpid => 0, execute => $execute, cert => $cert, debug => $debug, @@ -110,18 +109,17 @@ sub new $proxaddr =~ s/[\[\]]//g; # Remove [ and ] my @proxyargs = ( LocalHost => $proxaddr, - LocalPort => $self->{proxy_port}, + LocalPort => 0, Proto => "tcp", Listen => SOMAXCONN, ); - push @proxyargs, ReuseAddr => 1 - unless $^O eq "MSWin32"; $self->{proxy_sock} = $IP_factory->(@proxyargs); if ($self->{proxy_sock}) { + $self->{proxy_port} = $self->{proxy_sock}->sockport(); print "Proxy started on port ".$self->{proxy_port}."\n"; } else { - warn "Failed creating proxy socket (".$proxaddr.",".$self->{proxy_port}."): $!\n"; + warn "Failed creating proxy socket (".$proxaddr.",0): $!\n"; } return bless $self, $class; @@ -184,6 +182,19 @@ sub clientrestart $self->clientstart; } +sub connect_to_server +{ + my $self = shift; + my $servaddr = $self->{server_addr}; + + $servaddr =~ s/[\[\]]//g; # Remove [ and ] + + $self->{server_sock} = $IP_factory->(PeerAddr => $servaddr, + PeerPort => $self->{server_port}, + Proto => 'tcp') + or die "unable to connect: $!\n"; +} + sub start { my ($self) = shift; @@ -193,31 +204,84 @@ sub start return 0; } - $pid = fork(); - if ($pid == 0) { - my $execcmd = $self->execute - ." s_server -max_protocol TLSv1.3 -no_comp -rev -engine ossltest -accept " - .($self->server_port) - ." -cert ".$self->cert." -cert2 ".$self->cert - ." -naccept ".$self->serverconnects; - unless ($self->supports_IPv6) { - $execcmd .= " -4"; - } - if ($self->ciphers ne "") { - $execcmd .= " -cipher ".$self->ciphers; - } - if ($self->ciphersuitess ne "") { - $execcmd .= " -ciphersuites ".$self->ciphersuitess; - } - if ($self->serverflags ne "") { - $execcmd .= " ".$self->serverflags; + my $execcmd = $self->execute + ." s_server -max_protocol TLSv1.3 -no_comp -rev -engine ossltest" + ." -accept 0 -cert ".$self->cert." -cert2 ".$self->cert + ." -naccept ".$self->serverconnects; + unless ($self->supports_IPv6) { + $execcmd .= " -4"; + } + if ($self->ciphers ne "") { + $execcmd .= " -cipher ".$self->ciphers; + } + if ($self->ciphersuitess ne "") { + $execcmd .= " -ciphersuites ".$self->ciphersuitess; + } + if ($self->serverflags ne "") { + $execcmd .= " ".$self->serverflags; + } + if ($self->debug) { + print STDERR "Server command: $execcmd\n"; + } + + open(my $savedin, "<&STDIN"); + + # Temporarily replace STDIN so that sink process can inherit it... + $pid = open(STDIN, "$execcmd |") or die "Failed to $execcmd: $!\n"; + $self->{real_serverpid} = $pid; + + # Process the output from s_server until we find the ACCEPT line, which + # tells us what the accepting address and port are. + while (<>) { + print; + s/\R$//; # Better chomp + next unless (/^ACCEPT\s.*:(\d+)$/); + $self->{server_port} = $1; + last; + } + + if ($self->{server_port} == 0) { + # This actually means that s_server exited, because otherwise + # we would still searching for ACCEPT... + die "no ACCEPT detected in '$execcmd' output\n"; + } + + # Just make sure everything else is simply printed [as separate lines]. + # The sub process simply inherits our STD* and will keep consuming + # server's output and printing it as long as there is anything there, + # out of our way. + my $error; + $pid = undef; + if (eval { require Win32::Process; 1; }) { + if (Win32::Process::Create(my $h, $^X, "perl -ne print", 0, 0, ".")) { + $pid = $h->GetProcessID(); + } else { + $error = Win32::FormatMessage(Win32::GetLastError()); } - if ($self->debug) { - print STDERR "Server command: $execcmd\n"; + } else { + if (defined($pid = fork)) { + $pid or exec("$^X -ne print") or exit($!); + } else { + $error = $!; } - exec($execcmd); } - $self->serverpid($pid); + + # Change back to original stdin + open(STDIN, "<&", $savedin); + close($savedin); + + if (!defined($pid)) { + kill(3, $self->{real_serverpid}); + die "Failed to capture s_server's output: $error\n"; + } + + $self->{serverpid} = $pid; + + print STDERR "Server responds on ", + $self->{server_addr}, ":", $self->{server_port}, "\n"; + + # Connect right away... + $self->connect_to_server(); return $self->clientstart; } @@ -225,44 +289,57 @@ sub start sub clientstart { my ($self) = shift; - my $oldstdout; if ($self->execute) { - my $pid = fork(); - if ($pid == 0) { - my $echostr; - if ($self->reneg()) { - $echostr = "R"; - } else { - $echostr = "test"; - } - my $execcmd = "echo ".$echostr." | ".$self->execute - ." s_client -max_protocol TLSv1.3 -engine ossltest -connect " - .($self->proxy_addr).":".($self->proxy_port); - unless ($self->supports_IPv6) { - $execcmd .= " -4"; - } - if ($self->cipherc ne "") { - $execcmd .= " -cipher ".$self->cipherc; - } - if ($self->ciphersuitesc ne "") { - $execcmd .= " -ciphersuites ".$self->ciphersuitesc; - } - if ($self->clientflags ne "") { - $execcmd .= " ".$self->clientflags; - } - if (defined $self->sessionfile) { - $execcmd .= " -ign_eof"; - } - if ($self->debug) { - print STDERR "Client command: $execcmd\n"; - } - exec($execcmd); + my $pid; + my $execcmd = $self->execute + ." s_client -max_protocol TLSv1.3 -engine ossltest -connect " + .($self->proxy_addr).":".($self->proxy_port); + unless ($self->supports_IPv6) { + $execcmd .= " -4"; + } + if ($self->cipherc ne "") { + $execcmd .= " -cipher ".$self->cipherc; + } + if ($self->ciphersuitesc ne "") { + $execcmd .= " -ciphersuites ".$self->ciphersuitesc; + } + if ($self->clientflags ne "") { + $execcmd .= " ".$self->clientflags; + } + if (defined $self->sessionfile) { + $execcmd .= " -ign_eof"; } - $self->clientpid($pid); + if ($self->debug) { + print STDERR "Client command: $execcmd\n"; + } + + open(my $savedout, ">&STDOUT"); + # If we open pipe with new descriptor, attempt to close it, + # explicitly or implicitly, would incur waitpid and effectively + # dead-lock... + if (!($pid = open(STDOUT, "| $execcmd"))) { + my $err = $!; + kill(3, $self->{real_serverpid}); + die "Failed to $execcmd: $err\n"; + } + $self->{clientpid} = $pid; + + # queue [magic] input + print $self->reneg ? "R" : "test"; + + # this closes client's stdin without waiting for its pid + open(STDOUT, ">&", $savedout); + close($savedout); } # Wait for incoming connection from client + my $fdset = IO::Select->new($self->{proxy_sock}); + if (!$fdset->can_read(1)) { + kill(3, $self->{real_serverpid}); + die "s_client didn't try to connect\n"; + } + my $client_sock; if(!($client_sock = $self->{proxy_sock}->accept())) { warn "Failed accepting incoming connection: $!\n"; @@ -271,44 +348,11 @@ sub clientstart print "Connection opened\n"; - # Now connect to the server - my $retry = 50; - my $server_sock; - #We loop over this a few times because sometimes s_server can take a while - #to start up - do { - my $servaddr = $self->server_addr; - $servaddr =~ s/[\[\]]//g; # Remove [ and ] - eval { - $server_sock = $IP_factory->( - PeerAddr => $servaddr, - PeerPort => $self->server_port, - MultiHomed => 1, - Proto => 'tcp' - ); - }; - - $retry--; - #Some buggy IP factories can return a defined server_sock that hasn't - #actually connected, so we check peerport too - if ($@ || !defined($server_sock) || !defined($server_sock->peerport)) { - $server_sock->close() if defined($server_sock); - undef $server_sock; - if ($retry) { - #Sleep for a short while - select(undef, undef, undef, 0.1); - } else { - warn "Failed to start up server (".$servaddr.",".$self->server_port."): $!\n"; - return 0; - } - } - } while (!$server_sock); - - my $sel = IO::Select->new($server_sock, $client_sock); + my $server_sock = $self->{server_sock}; my $indata; - my @handles = ($server_sock, $client_sock); #Wait for either the server socket or the client socket to become readable + $fdset = IO::Select->new($server_sock, $client_sock); my @ready; my $ctr = 0; local $SIG{PIPE} = "IGNORE"; @@ -316,7 +360,7 @@ sub clientstart || (defined $self->sessionfile() && (-s $self->sessionfile()) == 0)) && $ctr < 10) { - if (!(@ready = $sel->can_read(1))) { + if (!(@ready = $fdset->can_read(1))) { $ctr++; next; } @@ -332,39 +376,47 @@ sub clientstart $server_sock->syswrite($indata); $ctr = 0; } else { + kill(3, $self->{real_serverpid}); die "Unexpected handle"; } } } - die "No progress made" if $ctr >= 10; + if ($ctr >= 10) { + kill(3, $self->{real_serverpid}); + die "No progress made"; + } END: print "Connection closed\n"; if($server_sock) { $server_sock->close(); + $self->{server_sock} = undef; } if($client_sock) { #Closing this also kills the child process $client_sock->close(); } - if(!$self->debug) { - select($oldstdout); - } - $self->serverconnects($self->serverconnects - 1); - if ($self->serverconnects == 0) { - die "serverpid is zero\n" if $self->serverpid == 0; - print "Waiting for server process to close: " - .$self->serverpid."\n"; - waitpid( $self->serverpid, 0); + + my $pid; + if (--$self->{serverconnects} == 0) { + $pid = $self->{serverpid}; + die "serverpid is zero\n" if $pid == 0; + print "Waiting for server process to close: $pid...\n"; + # recall that we wait on process that buffers server's output + waitpid($pid, 0); die "exit code $? from server process\n" if $? != 0; } else { - # Give s_server sufficient time to finish what it was doing - usleep(250000); + # It's a bit counter-intuitive spot to make next connection to + # the s_server. Rationale is that established connection works + # as syncronization point, in sense that this way we know that + # s_server is actually done with current session... + $self->connect_to_server(); } - die "clientpid is zero\n" if $self->clientpid == 0; - print "Waiting for client process to close: ".$self->clientpid."\n"; - waitpid($self->clientpid, 0); + $pid = $self->{clientpid}; + die "clientpid is zero\n" if $pid == 0; + print "Waiting for client process to close: $pid...\n"; + waitpid($pid, 0); return 1; } @@ -395,7 +447,7 @@ sub process_packet #list of messages in those records and any partial message my @ret = TLSProxy::Record->get_records($server, $self->flight, $self->{partial}[$server].$packet); $self->{partial}[$server] = $ret[2]; - push @{$self->record_list}, @{$ret[0]}; + push @{$self->{record_list}}, @{$ret[0]}; push @{$self->{message_list}}, @{$ret[1]}; print "\n"; @@ -471,24 +523,28 @@ sub proxy_port my $self = shift; return $self->{proxy_port}; } - -#Read/write accessors sub server_addr { my $self = shift; - if (@_) { - $self->{server_addr} = shift; - } return $self->{server_addr}; } sub server_port { my $self = shift; - if (@_) { - $self->{server_port} = shift; - } return $self->{server_port}; } +sub serverpid +{ + my $self = shift; + return $self->{serverpid}; +} +sub clientpid +{ + my $self = shift; + return $self->{clientpid}; +} + +#Read/write accessors sub filter { my $self = shift; @@ -565,22 +621,6 @@ sub message_list } return $self->{message_list}; } -sub serverpid -{ - my $self = shift; - if (@_) { - $self->{serverpid} = shift; - } - return $self->{serverpid}; -} -sub clientpid -{ - my $self = shift; - if (@_) { - $self->{clientpid} = shift; - } - return $self->{clientpid}; -} sub fill_known_data { From appro at openssl.org Wed Apr 4 18:29:08 2018 From: appro at openssl.org (Andy Polyakov) Date: Wed, 04 Apr 2018 18:29:08 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1522866548.397769.15253.nullmailer@dev.openssl.org> The branch master has been updated via b791355b5c0c474ba1005008e3731a859de0754d (commit) from 6228b1dae265bbe6c46457d82b2d14d672af5f46 (commit) - Log ----------------------------------------------------------------- commit b791355b5c0c474ba1005008e3731a859de0754d Author: Andy Polyakov Date: Sun Apr 1 18:18:46 2018 +0200 rand/randfile.c: fix potential resource leak in RAND_load_file. Found by Coverity. Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5834) ----------------------------------------------------------------------- Summary of changes: crypto/rand/randfile.c | 1 + 1 file changed, 1 insertion(+) diff --git a/crypto/rand/randfile.c b/crypto/rand/randfile.c index 3a62b88..c652ddc 100644 --- a/crypto/rand/randfile.c +++ b/crypto/rand/randfile.c @@ -94,6 +94,7 @@ int RAND_load_file(const char *file, long bytes) if (fstat(fileno(in), &sb) < 0) { RANDerr(RAND_F_RAND_LOAD_FILE, RAND_R_INTERNAL_ERROR); ERR_add_error_data(2, "Filename=", file); + fclose(in); return -1; } From levitte at openssl.org Wed Apr 4 18:47:20 2018 From: levitte at openssl.org (Richard Levitte) Date: Wed, 04 Apr 2018 18:47:20 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1522867640.004700.17811.nullmailer@dev.openssl.org> The branch master has been updated via 4845aeba4c49e1bd65259a5014d7e3ab38657d42 (commit) from b791355b5c0c474ba1005008e3731a859de0754d (commit) - Log ----------------------------------------------------------------- commit 4845aeba4c49e1bd65259a5014d7e3ab38657d42 Author: Richard Levitte Date: Wed Apr 4 20:17:50 2018 +0200 Change rand_pool_add[_end] prototypes to match Reviewed-by: Matthias St. Pierre (Merged from https://github.com/openssl/openssl/pull/5877) ----------------------------------------------------------------------- Summary of changes: crypto/include/internal/rand_int.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crypto/include/internal/rand_int.h b/crypto/include/internal/rand_int.h index e5ae0df..baa9bfe 100644 --- a/crypto/include/internal/rand_int.h +++ b/crypto/include/internal/rand_int.h @@ -59,10 +59,10 @@ size_t rand_pool_entropy_needed(RAND_POOL *pool); size_t rand_pool_bytes_needed(RAND_POOL *pool, unsigned int entropy_per_byte); size_t rand_pool_bytes_remaining(RAND_POOL *pool); -size_t rand_pool_add(RAND_POOL *pool, - const unsigned char *buffer, size_t len, size_t entropy); +int rand_pool_add(RAND_POOL *pool, + const unsigned char *buffer, size_t len, size_t entropy); unsigned char *rand_pool_add_begin(RAND_POOL *pool, size_t len); -size_t rand_pool_add_end(RAND_POOL *pool, size_t len, size_t entropy); +int rand_pool_add_end(RAND_POOL *pool, size_t len, size_t entropy); /* From no-reply at appveyor.com Wed Apr 4 18:49:23 2018 From: no-reply at appveyor.com (AppVeyor) Date: Wed, 04 Apr 2018 18:49:23 +0000 Subject: [openssl-commits] Build failed: openssl master.17033 Message-ID: <20180404184923.1.E962B0EAB1C2F834@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Wed Apr 4 19:23:38 2018 From: no-reply at appveyor.com (AppVeyor) Date: Wed, 04 Apr 2018 19:23:38 +0000 Subject: [openssl-commits] Build completed: openssl OpenSSL_1_1_0-stable.17034 Message-ID: <20180404192338.1.6508426A5D91751F@appveyor.com> An HTML attachment was scrubbed... URL: From matt at openssl.org Thu Apr 5 14:33:29 2018 From: matt at openssl.org (Matt Caswell) Date: Thu, 05 Apr 2018 14:33:29 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1522938809.323258.30087.nullmailer@dev.openssl.org> The branch master has been updated via fdb8113daedbcc01e3effc5b0a1ed97558d700a5 (commit) via d8f031e890d35887047c35b60347ac385b989065 (commit) from 4845aeba4c49e1bd65259a5014d7e3ab38657d42 (commit) - Log ----------------------------------------------------------------- commit fdb8113daedbcc01e3effc5b0a1ed97558d700a5 Author: Matt Caswell Date: Tue Apr 3 10:03:34 2018 +0100 Document the change in the previous commit about loading the config file When libssl is initialised it will attempt to load any config file. This ensures any system_default configuration (as per https://github.com/openssl/openssl/pull/4848) is used. Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5818) commit d8f031e890d35887047c35b60347ac385b989065 Author: Matt Caswell Date: Fri Mar 30 19:19:56 2018 +0100 Move the loading of the ssl_conf module to libcrypto The GOST engine needs to be loaded before we initialise libssl. Otherwise the GOST ciphersuites are not enabled. However the SSL conf module must be loaded before we initialise libcrypto. Otherwise we will fail to read the SSL config from a config file properly. Another problem is that an application may make use of both libcrypto and libssl. If it performs libcrypto stuff first and OPENSSL_init_crypto() is called and loads a config file it will fail if that config file has any libssl stuff in it. This commit separates out the loading of the SSL conf module from the interpretation of its contents. The loading piece doesn't know anything about SSL so this can be moved to libcrypto. The interpretation of what it means remains in libssl. This means we can load the SSL conf data before libssl is there and interpret it when it later becomes available. Fixes #5809 Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5818) ----------------------------------------------------------------------- Summary of changes: CHANGES | 3 + crypto/conf/build.info | 2 +- crypto/conf/conf_err.c | 8 + .../{include/internal/store.h => conf/conf_lcl.h} | 5 +- crypto/conf/conf_mall.c | 2 + crypto/conf/conf_ssl.c | 178 +++++++++++++++++++++ crypto/err/openssl.txt | 5 + doc/man3/OPENSSL_init_crypto.pod | 6 +- .../internal/sha.h => include/internal/sslconf.h | 13 +- include/openssl/conferr.h | 5 + ssl/ssl_init.c | 10 +- ssl/ssl_mcnf.c | 139 ++-------------- util/libcrypto.num | 3 + util/mkdef.pl | 1 + 14 files changed, 239 insertions(+), 141 deletions(-) copy crypto/{include/internal/store.h => conf/conf_lcl.h} (72%) create mode 100644 crypto/conf/conf_ssl.c copy crypto/include/internal/sha.h => include/internal/sslconf.h (50%) diff --git a/CHANGES b/CHANGES index 40b5823..e5f6cb6 100644 --- a/CHANGES +++ b/CHANGES @@ -13,6 +13,9 @@ in libcrypto when run as setuid/setgid. [Bernd Edlinger] + *) Load any config file by default when libssl is used. + [Matt Caswell] + *) Added new public header file and documentation for the RAND_DRBG API. See manual page RAND_DRBG(7) for an overview. [Matthias St. Pierre] diff --git a/crypto/conf/build.info b/crypto/conf/build.info index 4438eb4..ff36799 100644 --- a/crypto/conf/build.info +++ b/crypto/conf/build.info @@ -1,4 +1,4 @@ LIBS=../../libcrypto SOURCE[../../libcrypto]= \ conf_err.c conf_lib.c conf_api.c conf_def.c conf_mod.c \ - conf_mall.c conf_sap.c + conf_mall.c conf_sap.c conf_ssl.c diff --git a/crypto/conf/conf_err.c b/crypto/conf/conf_err.c index ebef728..01f98da 100644 --- a/crypto/conf/conf_err.c +++ b/crypto/conf/conf_err.c @@ -36,6 +36,7 @@ static const ERR_STRING_DATA CONF_str_functs[] = { {ERR_PACK(ERR_LIB_CONF, CONF_F_NCONF_LOAD_FP, 0), "NCONF_load_fp"}, {ERR_PACK(ERR_LIB_CONF, CONF_F_NCONF_NEW, 0), "NCONF_new"}, {ERR_PACK(ERR_LIB_CONF, CONF_F_PROCESS_INCLUDE, 0), "process_include"}, + {ERR_PACK(ERR_LIB_CONF, CONF_F_SSL_MODULE_INIT, 0), "ssl_module_init"}, {ERR_PACK(ERR_LIB_CONF, CONF_F_STR_COPY, 0), "str_copy"}, {0, NULL} }; @@ -61,6 +62,13 @@ static const ERR_STRING_DATA CONF_str_reasons[] = { {ERR_PACK(ERR_LIB_CONF, 0, CONF_R_NO_VALUE), "no value"}, {ERR_PACK(ERR_LIB_CONF, 0, CONF_R_RECURSIVE_DIRECTORY_INCLUDE), "recursive directory include"}, + {ERR_PACK(ERR_LIB_CONF, 0, CONF_R_SSL_COMMAND_SECTION_EMPTY), + "ssl command section empty"}, + {ERR_PACK(ERR_LIB_CONF, 0, CONF_R_SSL_COMMAND_SECTION_NOT_FOUND), + "ssl command section not found"}, + {ERR_PACK(ERR_LIB_CONF, 0, CONF_R_SSL_SECTION_EMPTY), "ssl section empty"}, + {ERR_PACK(ERR_LIB_CONF, 0, CONF_R_SSL_SECTION_NOT_FOUND), + "ssl section not found"}, {ERR_PACK(ERR_LIB_CONF, 0, CONF_R_UNABLE_TO_CREATE_NEW_SECTION), "unable to create new section"}, {ERR_PACK(ERR_LIB_CONF, 0, CONF_R_UNKNOWN_MODULE_NAME), diff --git a/crypto/include/internal/store.h b/crypto/conf/conf_lcl.h similarity index 72% copy from crypto/include/internal/store.h copy to crypto/conf/conf_lcl.h index f5013dc..6e1f7fe 100644 --- a/crypto/include/internal/store.h +++ b/crypto/conf/conf_lcl.h @@ -1,5 +1,5 @@ /* - * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -7,4 +7,5 @@ * https://www.openssl.org/source/license.html */ -void ossl_store_cleanup_int(void); +void conf_add_ssl_module(void); + diff --git a/crypto/conf/conf_mall.c b/crypto/conf/conf_mall.c index 4e7a434..5aab429 100644 --- a/crypto/conf/conf_mall.c +++ b/crypto/conf/conf_mall.c @@ -14,6 +14,7 @@ #include #include #include +#include "conf_lcl.h" /* Load all OpenSSL builtin modules */ @@ -26,4 +27,5 @@ void OPENSSL_load_builtin_modules(void) ENGINE_add_conf_module(); #endif EVP_add_alg_module(); + conf_add_ssl_module(); } diff --git a/crypto/conf/conf_ssl.c b/crypto/conf/conf_ssl.c new file mode 100644 index 0000000..015c46c --- /dev/null +++ b/crypto/conf/conf_ssl.c @@ -0,0 +1,178 @@ +/* + * Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#include +#include +#include +#include +#include "internal/sslconf.h" +#include "conf_lcl.h" + +/* + * SSL library configuration module placeholder. We load it here but defer + * all decisions about its contents to libssl. + */ + +struct ssl_conf_name_st { + /* Name of this set of commands */ + char *name; + /* List of commands */ + SSL_CONF_CMD *cmds; + /* Number of commands */ + size_t cmd_count; +}; + +struct ssl_conf_cmd_st { + /* Command */ + char *cmd; + /* Argument */ + char *arg; +}; + +static struct ssl_conf_name_st *ssl_names; +static size_t ssl_names_count; + +static void ssl_module_free(CONF_IMODULE *md) +{ + size_t i, j; + if (ssl_names == NULL) + return; + for (i = 0; i < ssl_names_count; i++) { + struct ssl_conf_name_st *tname = ssl_names + i; + + OPENSSL_free(tname->name); + for (j = 0; j < tname->cmd_count; j++) { + OPENSSL_free(tname->cmds[j].cmd); + OPENSSL_free(tname->cmds[j].arg); + } + OPENSSL_free(tname->cmds); + } + OPENSSL_free(ssl_names); + ssl_names = NULL; + ssl_names_count = 0; +} + +static int ssl_module_init(CONF_IMODULE *md, const CONF *cnf) +{ + size_t i, j, cnt; + int rv = 0; + const char *ssl_conf_section; + STACK_OF(CONF_VALUE) *cmd_lists; + + ssl_conf_section = CONF_imodule_get_value(md); + cmd_lists = NCONF_get_section(cnf, ssl_conf_section); + if (sk_CONF_VALUE_num(cmd_lists) <= 0) { + if (cmd_lists == NULL) + CONFerr(CONF_F_SSL_MODULE_INIT, CONF_R_SSL_SECTION_NOT_FOUND); + else + CONFerr(CONF_F_SSL_MODULE_INIT, CONF_R_SSL_SECTION_EMPTY); + ERR_add_error_data(2, "section=", ssl_conf_section); + goto err; + } + cnt = sk_CONF_VALUE_num(cmd_lists); + ssl_names = OPENSSL_zalloc(sizeof(*ssl_names) * cnt); + ssl_names_count = cnt; + for (i = 0; i < ssl_names_count; i++) { + struct ssl_conf_name_st *ssl_name = ssl_names + i; + CONF_VALUE *sect = sk_CONF_VALUE_value(cmd_lists, (int)i); + STACK_OF(CONF_VALUE) *cmds = NCONF_get_section(cnf, sect->value); + + if (sk_CONF_VALUE_num(cmds) <= 0) { + if (cmds == NULL) + CONFerr(CONF_F_SSL_MODULE_INIT, + CONF_R_SSL_COMMAND_SECTION_NOT_FOUND); + else + CONFerr(CONF_F_SSL_MODULE_INIT, + CONF_R_SSL_COMMAND_SECTION_EMPTY); + ERR_add_error_data(4, "name=", sect->name, ", value=", sect->value); + goto err; + } + ssl_name->name = OPENSSL_strdup(sect->name); + if (ssl_name->name == NULL) + goto err; + cnt = sk_CONF_VALUE_num(cmds); + ssl_name->cmds = OPENSSL_zalloc(cnt * sizeof(struct ssl_conf_cmd_st)); + if (ssl_name->cmds == NULL) + goto err; + ssl_name->cmd_count = cnt; + for (j = 0; j < cnt; j++) { + const char *name; + CONF_VALUE *cmd_conf = sk_CONF_VALUE_value(cmds, (int)j); + struct ssl_conf_cmd_st *cmd = ssl_name->cmds + j; + + /* Skip any initial dot in name */ + name = strchr(cmd_conf->name, '.'); + if (name != NULL) + name++; + else + name = cmd_conf->name; + cmd->cmd = OPENSSL_strdup(name); + cmd->arg = OPENSSL_strdup(cmd_conf->value); + if (cmd->cmd == NULL || cmd->arg == NULL) + goto err; + } + + } + rv = 1; + err: + if (rv == 0) + ssl_module_free(md); + return rv; +} + +/* + * Returns the set of commands with index |idx| previously searched for via + * conf_ssl_name_find. Also stores the name of the set of commands in |*name| + * and the number of commands in the set in |*cnt|. + */ +const SSL_CONF_CMD *conf_ssl_get(size_t idx, const char **name, size_t *cnt) +{ + *name = ssl_names[idx].name; + *cnt = ssl_names[idx].cmd_count; + return ssl_names[idx].cmds; +} + +/* + * Search for the named set of commands given in |name|. On success return the + * index for the command set in |*idx|. + * Returns 1 on success or 0 on failure. + */ +int conf_ssl_name_find(const char *name, size_t *idx) +{ + size_t i; + const struct ssl_conf_name_st *nm; + + if (name == NULL) + return 0; + for (i = 0, nm = ssl_names; i < ssl_names_count; i++, nm++) { + if (strcmp(nm->name, name) == 0) { + *idx = i; + return 1; + } + } + return 0; +} + +/* + * Given a command set |cmd|, return details on the command at index |idx| which + * must be less than the number of commands in the set (as returned by + * conf_ssl_get). The name of the command will be returned in |*cmdstr| and the + * argument is returned in |*arg|. + */ +void conf_ssl_get_cmd(const SSL_CONF_CMD *cmd, size_t idx, char **cmdstr, + char **arg) +{ + *cmdstr = cmd[idx].cmd; + *arg = cmd[idx].arg; +} + +void conf_add_ssl_module(void) +{ + CONF_module_add("ssl_conf", ssl_module_init, ssl_module_free); +} diff --git a/crypto/err/openssl.txt b/crypto/err/openssl.txt index 0f15dd8..51bd461 100644 --- a/crypto/err/openssl.txt +++ b/crypto/err/openssl.txt @@ -335,6 +335,7 @@ CONF_F_NCONF_LOAD_BIO:110:NCONF_load_bio CONF_F_NCONF_LOAD_FP:114:NCONF_load_fp CONF_F_NCONF_NEW:111:NCONF_new CONF_F_PROCESS_INCLUDE:116:process_include +CONF_F_SSL_MODULE_INIT:122:ssl_module_init CONF_F_STR_COPY:101:str_copy CRYPTO_F_CRYPTO_DUP_EX_DATA:110:CRYPTO_dup_ex_data CRYPTO_F_CRYPTO_FREE_EX_DATA:111:CRYPTO_free_ex_data @@ -1952,6 +1953,10 @@ CONF_R_NO_SECTION:107:no section CONF_R_NO_SUCH_FILE:114:no such file CONF_R_NO_VALUE:108:no value CONF_R_RECURSIVE_DIRECTORY_INCLUDE:111:recursive directory include +CONF_R_SSL_COMMAND_SECTION_EMPTY:117:ssl command section empty +CONF_R_SSL_COMMAND_SECTION_NOT_FOUND:118:ssl command section not found +CONF_R_SSL_SECTION_EMPTY:119:ssl section empty +CONF_R_SSL_SECTION_NOT_FOUND:120:ssl section not found CONF_R_UNABLE_TO_CREATE_NEW_SECTION:103:unable to create new section CONF_R_UNKNOWN_MODULE_NAME:113:unknown module name CONF_R_VARIABLE_EXPANSION_TOO_LONG:116:variable expansion too long diff --git a/doc/man3/OPENSSL_init_crypto.pod b/doc/man3/OPENSSL_init_crypto.pod index ce7497e..c6a1715 100644 --- a/doc/man3/OPENSSL_init_crypto.pod +++ b/doc/man3/OPENSSL_init_crypto.pod @@ -95,8 +95,10 @@ B will be ignored. =item OPENSSL_INIT_LOAD_CONFIG With this option an OpenSSL configuration file will be automatically loaded and -used by calling OPENSSL_config(). This is not a default option. -See the description of OPENSSL_INIT_new(), below. +used by calling OPENSSL_config(). This is not a default option for libcrypto. +From OpenSSL 1.1.1 this is a default option for libssl (see +L for further details about libssl initialisation). See the +description of OPENSSL_INIT_new(), below. =item OPENSSL_INIT_NO_LOAD_CONFIG diff --git a/crypto/include/internal/sha.h b/include/internal/sslconf.h similarity index 50% copy from crypto/include/internal/sha.h copy to include/internal/sslconf.h index 458a75e..d538f86 100644 --- a/crypto/include/internal/sha.h +++ b/include/internal/sslconf.h @@ -1,6 +1,5 @@ /* * Copyright 2018 The OpenSSL Project Authors. All Rights Reserved. - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -8,12 +7,14 @@ * https://www.openssl.org/source/license.html */ -#ifndef HEADER_INTERNAL_SHA_H -# define HEADER_INTERNAL_SHA_H +#ifndef HEADER_SSLCONF_H +# define HEADER_SSLCONF_H -# include +typedef struct ssl_conf_cmd_st SSL_CONF_CMD; -int sha512_224_init(SHA512_CTX *); -int sha512_256_init(SHA512_CTX *); +const SSL_CONF_CMD *conf_ssl_get(size_t idx, const char **name, size_t *cnt); +int conf_ssl_name_find(const char *name, size_t *idx); +void conf_ssl_get_cmd(const SSL_CONF_CMD *cmd, size_t idx, char **cmdstr, + char **arg); #endif diff --git a/include/openssl/conferr.h b/include/openssl/conferr.h index 56071e3..e2317d8 100644 --- a/include/openssl/conferr.h +++ b/include/openssl/conferr.h @@ -40,6 +40,7 @@ int ERR_load_CONF_strings(void); # define CONF_F_NCONF_LOAD_FP 114 # define CONF_F_NCONF_NEW 111 # define CONF_F_PROCESS_INCLUDE 116 +# define CONF_F_SSL_MODULE_INIT 122 # define CONF_F_STR_COPY 101 /* @@ -58,6 +59,10 @@ int ERR_load_CONF_strings(void); # define CONF_R_NO_SUCH_FILE 114 # define CONF_R_NO_VALUE 108 # define CONF_R_RECURSIVE_DIRECTORY_INCLUDE 111 +# define CONF_R_SSL_COMMAND_SECTION_EMPTY 117 +# define CONF_R_SSL_COMMAND_SECTION_NOT_FOUND 118 +# define CONF_R_SSL_SECTION_EMPTY 119 +# define CONF_R_SSL_SECTION_NOT_FOUND 120 # define CONF_R_UNABLE_TO_CREATE_NEW_SECTION 103 # define CONF_R_UNKNOWN_MODULE_NAME 113 # define CONF_R_VARIABLE_EXPANSION_TOO_LONG 116 diff --git a/ssl/ssl_init.c b/ssl/ssl_init.c index 34e6773..bc84aa8 100644 --- a/ssl/ssl_init.c +++ b/ssl/ssl_init.c @@ -106,7 +106,6 @@ DEFINE_RUN_ONCE_STATIC(ossl_init_ssl_base) fprintf(stderr, "OPENSSL_INIT: ossl_init_ssl_base: " "SSL_add_ssl_module()\n"); #endif - SSL_add_ssl_module(); /* * We ignore an error return here. Not much we can do - but not that bad * either. We can still safely continue. @@ -195,11 +194,14 @@ int OPENSSL_init_ssl(uint64_t opts, const OPENSSL_INIT_SETTINGS * settings) return 0; } - if (!RUN_ONCE(&ssl_base, ossl_init_ssl_base)) + if (!OPENSSL_init_crypto(opts + | OPENSSL_INIT_LOAD_CONFIG + | OPENSSL_INIT_ADD_ALL_CIPHERS + | OPENSSL_INIT_ADD_ALL_DIGESTS, + settings)) return 0; - if (!OPENSSL_init_crypto(opts | OPENSSL_INIT_ADD_ALL_CIPHERS - | OPENSSL_INIT_ADD_ALL_DIGESTS, settings)) + if (!RUN_ONCE(&ssl_base, ossl_init_ssl_base)) return 0; if ((opts & OPENSSL_INIT_NO_LOAD_SSL_STRINGS) diff --git a/ssl/ssl_mcnf.c b/ssl/ssl_mcnf.c index 1471a0d..a0e2657 100644 --- a/ssl/ssl_mcnf.c +++ b/ssl/ssl_mcnf.c @@ -11,139 +11,23 @@ #include #include #include "ssl_locl.h" +#include "internal/sslconf.h" /* SSL library configuration module. */ -struct ssl_conf_name { - /* Name of this set of commands */ - char *name; - /* List of commands */ - struct ssl_conf_cmd *cmds; - /* Number of commands */ - size_t cmd_count; -}; - -struct ssl_conf_cmd { - /* Command */ - char *cmd; - /* Argument */ - char *arg; -}; - -static struct ssl_conf_name *ssl_names; -static size_t ssl_names_count; - -static void ssl_module_free(CONF_IMODULE *md) -{ - size_t i, j; - if (ssl_names == NULL) - return; - for (i = 0; i < ssl_names_count; i++) { - struct ssl_conf_name *tname = ssl_names + i; - OPENSSL_free(tname->name); - for (j = 0; j < tname->cmd_count; j++) { - OPENSSL_free(tname->cmds[j].cmd); - OPENSSL_free(tname->cmds[j].arg); - } - OPENSSL_free(tname->cmds); - } - OPENSSL_free(ssl_names); - ssl_names = NULL; - ssl_names_count = 0; -} - -static int ssl_module_init(CONF_IMODULE *md, const CONF *cnf) -{ - size_t i, j, cnt; - int rv = 0; - const char *ssl_conf_section; - STACK_OF(CONF_VALUE) *cmd_lists; - ssl_conf_section = CONF_imodule_get_value(md); - cmd_lists = NCONF_get_section(cnf, ssl_conf_section); - if (sk_CONF_VALUE_num(cmd_lists) <= 0) { - if (cmd_lists == NULL) - SSLerr(SSL_F_SSL_MODULE_INIT, SSL_R_SSL_SECTION_NOT_FOUND); - else - SSLerr(SSL_F_SSL_MODULE_INIT, SSL_R_SSL_SECTION_EMPTY); - ERR_add_error_data(2, "section=", ssl_conf_section); - goto err; - } - cnt = sk_CONF_VALUE_num(cmd_lists); - ssl_names = OPENSSL_zalloc(sizeof(*ssl_names) * cnt); - ssl_names_count = cnt; - for (i = 0; i < ssl_names_count; i++) { - struct ssl_conf_name *ssl_name = ssl_names + i; - CONF_VALUE *sect = sk_CONF_VALUE_value(cmd_lists, (int)i); - STACK_OF(CONF_VALUE) *cmds = NCONF_get_section(cnf, sect->value); - if (sk_CONF_VALUE_num(cmds) <= 0) { - if (cmds == NULL) - SSLerr(SSL_F_SSL_MODULE_INIT, - SSL_R_SSL_COMMAND_SECTION_NOT_FOUND); - else - SSLerr(SSL_F_SSL_MODULE_INIT, SSL_R_SSL_COMMAND_SECTION_EMPTY); - ERR_add_error_data(4, "name=", sect->name, ", value=", sect->value); - goto err; - } - ssl_name->name = BUF_strdup(sect->name); - if (ssl_name->name == NULL) - goto err; - cnt = sk_CONF_VALUE_num(cmds); - ssl_name->cmds = OPENSSL_zalloc(cnt * sizeof(struct ssl_conf_cmd)); - if (ssl_name->cmds == NULL) - goto err; - ssl_name->cmd_count = cnt; - for (j = 0; j < cnt; j++) { - const char *name; - CONF_VALUE *cmd_conf = sk_CONF_VALUE_value(cmds, (int)j); - struct ssl_conf_cmd *cmd = ssl_name->cmds + j; - /* Skip any initial dot in name */ - name = strchr(cmd_conf->name, '.'); - if (name != NULL) - name++; - else - name = cmd_conf->name; - cmd->cmd = BUF_strdup(name); - cmd->arg = BUF_strdup(cmd_conf->value); - if (cmd->cmd == NULL || cmd->arg == NULL) - goto err; - } - - } - rv = 1; - err: - if (rv == 0) - ssl_module_free(md); - return rv; -} - void SSL_add_ssl_module(void) { - CONF_module_add("ssl_conf", ssl_module_init, ssl_module_free); -} - -static const struct ssl_conf_name *ssl_name_find(const char *name) -{ - size_t i; - const struct ssl_conf_name *nm; - - if (name == NULL) - return NULL; - for (i = 0, nm = ssl_names; i < ssl_names_count; i++, nm++) { - if (strcmp(nm->name, name) == 0) - return nm; - } - return NULL; + /* Do nothing. This will be added automatically by libcrypto */ } static int ssl_do_config(SSL *s, SSL_CTX *ctx, const char *name, int system) { SSL_CONF_CTX *cctx = NULL; - size_t i; + size_t i, idx, cmd_count; int rv = 0; unsigned int flags; const SSL_METHOD *meth; - const struct ssl_conf_name *nm; - struct ssl_conf_cmd *cmd; + const SSL_CONF_CMD *cmds; if (s == NULL && ctx == NULL) { SSLerr(SSL_F_SSL_DO_CONFIG, ERR_R_PASSED_NULL_PARAMETER); @@ -152,14 +36,14 @@ static int ssl_do_config(SSL *s, SSL_CTX *ctx, const char *name, int system) if (name == NULL && system) name = "system_default"; - nm = ssl_name_find(name); - if (nm == NULL) { + if (!conf_ssl_name_find(name, &idx)) { if (!system) { SSLerr(SSL_F_SSL_DO_CONFIG, SSL_R_INVALID_CONFIGURATION_NAME); ERR_add_error_data(2, "name=", name); } goto err; } + cmds = conf_ssl_get(idx, &name, &cmd_count); cctx = SSL_CONF_CTX_new(); if (cctx == NULL) goto err; @@ -178,15 +62,18 @@ static int ssl_do_config(SSL *s, SSL_CTX *ctx, const char *name, int system) if (meth->ssl_connect != ssl_undefined_function) flags |= SSL_CONF_FLAG_CLIENT; SSL_CONF_CTX_set_flags(cctx, flags); - for (i = 0, cmd = nm->cmds; i < nm->cmd_count; i++, cmd++) { - rv = SSL_CONF_cmd(cctx, cmd->cmd, cmd->arg); + for (i = 0; i < cmd_count; i++) { + char *cmdstr, *arg; + + conf_ssl_get_cmd(cmds, i, &cmdstr, &arg); + rv = SSL_CONF_cmd(cctx, cmdstr, arg); if (rv <= 0) { if (rv == -2) SSLerr(SSL_F_SSL_DO_CONFIG, SSL_R_UNKNOWN_COMMAND); else SSLerr(SSL_F_SSL_DO_CONFIG, SSL_R_BAD_VALUE); - ERR_add_error_data(6, "section=", name, ", cmd=", cmd->cmd, - ", arg=", cmd->arg); + ERR_add_error_data(6, "section=", name, ", cmd=", cmdstr, + ", arg=", arg); goto err; } } diff --git a/util/libcrypto.num b/util/libcrypto.num index 07d9d27..e87c4b7 100644 --- a/util/libcrypto.num +++ b/util/libcrypto.num @@ -4524,3 +4524,6 @@ SM2_do_verify 4465 1_1_1 EXIST::FUNCTION:SM2 SM2_sign 4466 1_1_1 EXIST::FUNCTION:SM2 ERR_load_SM2_strings 4467 1_1_1 EXIST::FUNCTION:SM2 SM2_plaintext_size 4468 1_1_1 EXIST::FUNCTION:SM2 +conf_ssl_name_find 4469 1_1_0i EXIST::FUNCTION: +conf_ssl_get_cmd 4470 1_1_0i EXIST::FUNCTION: +conf_ssl_get 4471 1_1_0i EXIST::FUNCTION: diff --git a/util/mkdef.pl b/util/mkdef.pl index 7b5e28c..669589c 100755 --- a/util/mkdef.pl +++ b/util/mkdef.pl @@ -241,6 +241,7 @@ my $crypto ="include/internal/dso.h"; $crypto.=" include/internal/o_dir.h"; $crypto.=" include/internal/o_str.h"; $crypto.=" include/internal/err.h"; +$crypto.=" include/internal/sslconf.h"; foreach my $f ( glob(catfile($config{sourcedir},'include/openssl/*.h')) ) { my $fn = "include/openssl/" . lc(basename($f)); $crypto .= " $fn" if !defined $skipthese{$fn}; From matt at openssl.org Thu Apr 5 14:36:54 2018 From: matt at openssl.org (Matt Caswell) Date: Thu, 05 Apr 2018 14:36:54 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1522939014.401570.31783.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via 23dec58b9c2e36311208a90efb3d56818a9ed6fd (commit) from bd90e98e149532aac345080905603f98af3d3350 (commit) - Log ----------------------------------------------------------------- commit 23dec58b9c2e36311208a90efb3d56818a9ed6fd Author: Matt Caswell Date: Fri Mar 30 19:19:56 2018 +0100 Move the loading of the ssl_conf module to libcrypto The GOST engine needs to be loaded before we initialise libssl. Otherwise the GOST ciphersuites are not enabled. However the SSL conf module must be loaded before we initialise libcrypto. Otherwise we will fail to read the SSL config from a config file properly. Another problem is that an application may make use of both libcrypto and libssl. If it performs libcrypto stuff first and OPENSSL_init_crypto() is called and loads a config file it will fail if that config file has any libssl stuff in it. This commit separates out the loading of the SSL conf module from the interpretation of its contents. The loading piece doesn't know anything about SSL so this can be moved to libcrypto. The interpretation of what it means remains in libssl. This means we can load the SSL conf data before libssl is there and interpret it when it later becomes available. Fixes #5809 Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5879) ----------------------------------------------------------------------- Summary of changes: crypto/conf/build.info | 2 +- crypto/conf/conf_err.c | 9 +- include/openssl/ecdh.h => crypto/conf/conf_lcl.h | 5 +- crypto/conf/conf_mall.c | 2 + crypto/conf/conf_ssl.c | 178 +++++++++++++++++++++++ include/internal/sslconf.h | 20 +++ include/openssl/conf.h | 5 + ssl/ssl_init.c | 9 +- ssl/ssl_mcnf.c | 140 ++---------------- util/libcrypto.num | 3 + util/mkdef.pl | 1 + 11 files changed, 242 insertions(+), 132 deletions(-) copy include/openssl/ecdh.h => crypto/conf/conf_lcl.h (72%) create mode 100644 crypto/conf/conf_ssl.c create mode 100644 include/internal/sslconf.h diff --git a/crypto/conf/build.info b/crypto/conf/build.info index 4438eb4..ff36799 100644 --- a/crypto/conf/build.info +++ b/crypto/conf/build.info @@ -1,4 +1,4 @@ LIBS=../../libcrypto SOURCE[../../libcrypto]= \ conf_err.c conf_lib.c conf_api.c conf_def.c conf_mod.c \ - conf_mall.c conf_sap.c + conf_mall.c conf_sap.c conf_ssl.c diff --git a/crypto/conf/conf_err.c b/crypto/conf/conf_err.c index 0863bc4..19f480d 100644 --- a/crypto/conf/conf_err.c +++ b/crypto/conf/conf_err.c @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -37,6 +37,7 @@ static ERR_STRING_DATA CONF_str_functs[] = { {ERR_FUNC(CONF_F_NCONF_LOAD_BIO), "NCONF_load_bio"}, {ERR_FUNC(CONF_F_NCONF_LOAD_FP), "NCONF_load_fp"}, {ERR_FUNC(CONF_F_NCONF_NEW), "NCONF_new"}, + {ERR_FUNC(CONF_F_SSL_MODULE_INIT), "ssl_module_init"}, {ERR_FUNC(CONF_F_STR_COPY), "str_copy"}, {0, NULL} }; @@ -57,6 +58,12 @@ static ERR_STRING_DATA CONF_str_reasons[] = { {ERR_REASON(CONF_R_NO_SECTION), "no section"}, {ERR_REASON(CONF_R_NO_SUCH_FILE), "no such file"}, {ERR_REASON(CONF_R_NO_VALUE), "no value"}, + {ERR_REASON(CONF_R_SSL_COMMAND_SECTION_EMPTY), + "ssl command section empty"}, + {ERR_REASON(CONF_R_SSL_COMMAND_SECTION_NOT_FOUND), + "ssl command section not found"}, + {ERR_REASON(CONF_R_SSL_SECTION_EMPTY), "ssl section empty"}, + {ERR_REASON(CONF_R_SSL_SECTION_NOT_FOUND), "ssl section not found"}, {ERR_REASON(CONF_R_UNABLE_TO_CREATE_NEW_SECTION), "unable to create new section"}, {ERR_REASON(CONF_R_UNKNOWN_MODULE_NAME), "unknown module name"}, diff --git a/include/openssl/ecdh.h b/crypto/conf/conf_lcl.h similarity index 72% copy from include/openssl/ecdh.h copy to crypto/conf/conf_lcl.h index 681f3d5..6e1f7fe 100644 --- a/include/openssl/ecdh.h +++ b/crypto/conf/conf_lcl.h @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -7,4 +7,5 @@ * https://www.openssl.org/source/license.html */ -#include +void conf_add_ssl_module(void); + diff --git a/crypto/conf/conf_mall.c b/crypto/conf/conf_mall.c index 4e7a434..5aab429 100644 --- a/crypto/conf/conf_mall.c +++ b/crypto/conf/conf_mall.c @@ -14,6 +14,7 @@ #include #include #include +#include "conf_lcl.h" /* Load all OpenSSL builtin modules */ @@ -26,4 +27,5 @@ void OPENSSL_load_builtin_modules(void) ENGINE_add_conf_module(); #endif EVP_add_alg_module(); + conf_add_ssl_module(); } diff --git a/crypto/conf/conf_ssl.c b/crypto/conf/conf_ssl.c new file mode 100644 index 0000000..015c46c --- /dev/null +++ b/crypto/conf/conf_ssl.c @@ -0,0 +1,178 @@ +/* + * Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#include +#include +#include +#include +#include "internal/sslconf.h" +#include "conf_lcl.h" + +/* + * SSL library configuration module placeholder. We load it here but defer + * all decisions about its contents to libssl. + */ + +struct ssl_conf_name_st { + /* Name of this set of commands */ + char *name; + /* List of commands */ + SSL_CONF_CMD *cmds; + /* Number of commands */ + size_t cmd_count; +}; + +struct ssl_conf_cmd_st { + /* Command */ + char *cmd; + /* Argument */ + char *arg; +}; + +static struct ssl_conf_name_st *ssl_names; +static size_t ssl_names_count; + +static void ssl_module_free(CONF_IMODULE *md) +{ + size_t i, j; + if (ssl_names == NULL) + return; + for (i = 0; i < ssl_names_count; i++) { + struct ssl_conf_name_st *tname = ssl_names + i; + + OPENSSL_free(tname->name); + for (j = 0; j < tname->cmd_count; j++) { + OPENSSL_free(tname->cmds[j].cmd); + OPENSSL_free(tname->cmds[j].arg); + } + OPENSSL_free(tname->cmds); + } + OPENSSL_free(ssl_names); + ssl_names = NULL; + ssl_names_count = 0; +} + +static int ssl_module_init(CONF_IMODULE *md, const CONF *cnf) +{ + size_t i, j, cnt; + int rv = 0; + const char *ssl_conf_section; + STACK_OF(CONF_VALUE) *cmd_lists; + + ssl_conf_section = CONF_imodule_get_value(md); + cmd_lists = NCONF_get_section(cnf, ssl_conf_section); + if (sk_CONF_VALUE_num(cmd_lists) <= 0) { + if (cmd_lists == NULL) + CONFerr(CONF_F_SSL_MODULE_INIT, CONF_R_SSL_SECTION_NOT_FOUND); + else + CONFerr(CONF_F_SSL_MODULE_INIT, CONF_R_SSL_SECTION_EMPTY); + ERR_add_error_data(2, "section=", ssl_conf_section); + goto err; + } + cnt = sk_CONF_VALUE_num(cmd_lists); + ssl_names = OPENSSL_zalloc(sizeof(*ssl_names) * cnt); + ssl_names_count = cnt; + for (i = 0; i < ssl_names_count; i++) { + struct ssl_conf_name_st *ssl_name = ssl_names + i; + CONF_VALUE *sect = sk_CONF_VALUE_value(cmd_lists, (int)i); + STACK_OF(CONF_VALUE) *cmds = NCONF_get_section(cnf, sect->value); + + if (sk_CONF_VALUE_num(cmds) <= 0) { + if (cmds == NULL) + CONFerr(CONF_F_SSL_MODULE_INIT, + CONF_R_SSL_COMMAND_SECTION_NOT_FOUND); + else + CONFerr(CONF_F_SSL_MODULE_INIT, + CONF_R_SSL_COMMAND_SECTION_EMPTY); + ERR_add_error_data(4, "name=", sect->name, ", value=", sect->value); + goto err; + } + ssl_name->name = OPENSSL_strdup(sect->name); + if (ssl_name->name == NULL) + goto err; + cnt = sk_CONF_VALUE_num(cmds); + ssl_name->cmds = OPENSSL_zalloc(cnt * sizeof(struct ssl_conf_cmd_st)); + if (ssl_name->cmds == NULL) + goto err; + ssl_name->cmd_count = cnt; + for (j = 0; j < cnt; j++) { + const char *name; + CONF_VALUE *cmd_conf = sk_CONF_VALUE_value(cmds, (int)j); + struct ssl_conf_cmd_st *cmd = ssl_name->cmds + j; + + /* Skip any initial dot in name */ + name = strchr(cmd_conf->name, '.'); + if (name != NULL) + name++; + else + name = cmd_conf->name; + cmd->cmd = OPENSSL_strdup(name); + cmd->arg = OPENSSL_strdup(cmd_conf->value); + if (cmd->cmd == NULL || cmd->arg == NULL) + goto err; + } + + } + rv = 1; + err: + if (rv == 0) + ssl_module_free(md); + return rv; +} + +/* + * Returns the set of commands with index |idx| previously searched for via + * conf_ssl_name_find. Also stores the name of the set of commands in |*name| + * and the number of commands in the set in |*cnt|. + */ +const SSL_CONF_CMD *conf_ssl_get(size_t idx, const char **name, size_t *cnt) +{ + *name = ssl_names[idx].name; + *cnt = ssl_names[idx].cmd_count; + return ssl_names[idx].cmds; +} + +/* + * Search for the named set of commands given in |name|. On success return the + * index for the command set in |*idx|. + * Returns 1 on success or 0 on failure. + */ +int conf_ssl_name_find(const char *name, size_t *idx) +{ + size_t i; + const struct ssl_conf_name_st *nm; + + if (name == NULL) + return 0; + for (i = 0, nm = ssl_names; i < ssl_names_count; i++, nm++) { + if (strcmp(nm->name, name) == 0) { + *idx = i; + return 1; + } + } + return 0; +} + +/* + * Given a command set |cmd|, return details on the command at index |idx| which + * must be less than the number of commands in the set (as returned by + * conf_ssl_get). The name of the command will be returned in |*cmdstr| and the + * argument is returned in |*arg|. + */ +void conf_ssl_get_cmd(const SSL_CONF_CMD *cmd, size_t idx, char **cmdstr, + char **arg) +{ + *cmdstr = cmd[idx].cmd; + *arg = cmd[idx].arg; +} + +void conf_add_ssl_module(void) +{ + CONF_module_add("ssl_conf", ssl_module_init, ssl_module_free); +} diff --git a/include/internal/sslconf.h b/include/internal/sslconf.h new file mode 100644 index 0000000..d538f86 --- /dev/null +++ b/include/internal/sslconf.h @@ -0,0 +1,20 @@ +/* + * Copyright 2018 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_SSLCONF_H +# define HEADER_SSLCONF_H + +typedef struct ssl_conf_cmd_st SSL_CONF_CMD; + +const SSL_CONF_CMD *conf_ssl_get(size_t idx, const char **name, size_t *cnt); +int conf_ssl_name_find(const char *name, size_t *idx); +void conf_ssl_get_cmd(const SSL_CONF_CMD *cmd, size_t idx, char **cmdstr, + char **arg); + +#endif diff --git a/include/openssl/conf.h b/include/openssl/conf.h index 980a51b..845abf5 100644 --- a/include/openssl/conf.h +++ b/include/openssl/conf.h @@ -191,6 +191,7 @@ int ERR_load_CONF_strings(void); # define CONF_F_NCONF_LOAD_BIO 110 # define CONF_F_NCONF_LOAD_FP 114 # define CONF_F_NCONF_NEW 111 +# define CONF_F_SSL_MODULE_INIT 122 # define CONF_F_STR_COPY 101 /* Reason codes. */ @@ -206,6 +207,10 @@ int ERR_load_CONF_strings(void); # define CONF_R_NO_SECTION 107 # define CONF_R_NO_SUCH_FILE 114 # define CONF_R_NO_VALUE 108 +# define CONF_R_SSL_COMMAND_SECTION_EMPTY 117 +# define CONF_R_SSL_COMMAND_SECTION_NOT_FOUND 118 +# define CONF_R_SSL_SECTION_EMPTY 119 +# define CONF_R_SSL_SECTION_NOT_FOUND 120 # define CONF_R_UNABLE_TO_CREATE_NEW_SECTION 103 # define CONF_R_UNKNOWN_MODULE_NAME 113 # define CONF_R_VARIABLE_EXPANSION_TOO_LONG 116 diff --git a/ssl/ssl_init.c b/ssl/ssl_init.c index 3e62d48..c91e1c5 100644 --- a/ssl/ssl_init.c +++ b/ssl/ssl_init.c @@ -12,6 +12,7 @@ #include "internal/err.h" #include #include +#include #include #include "ssl_locl.h" #include "internal/thread_once.h" @@ -191,11 +192,13 @@ int OPENSSL_init_ssl(uint64_t opts, const OPENSSL_INIT_SETTINGS * settings) return 0; } - if (!RUN_ONCE(&ssl_base, ossl_init_ssl_base)) + if (!OPENSSL_init_crypto(opts + | OPENSSL_INIT_ADD_ALL_CIPHERS + | OPENSSL_INIT_ADD_ALL_DIGESTS, + settings)) return 0; - if (!OPENSSL_init_crypto(opts | OPENSSL_INIT_ADD_ALL_CIPHERS - | OPENSSL_INIT_ADD_ALL_DIGESTS, settings)) + if (!RUN_ONCE(&ssl_base, ossl_init_ssl_base)) return 0; if ((opts & OPENSSL_INIT_NO_LOAD_SSL_STRINGS) diff --git a/ssl/ssl_mcnf.c b/ssl/ssl_mcnf.c index c2d9dba..20549eb 100644 --- a/ssl/ssl_mcnf.c +++ b/ssl/ssl_mcnf.c @@ -11,148 +11,35 @@ #include #include #include "ssl_locl.h" +#include "internal/sslconf.h" /* SSL library configuration module. */ -struct ssl_conf_name { - /* Name of this set of commands */ - char *name; - /* List of commands */ - struct ssl_conf_cmd *cmds; - /* Number of commands */ - size_t cmd_count; -}; - -struct ssl_conf_cmd { - /* Command */ - char *cmd; - /* Argument */ - char *arg; -}; - -static struct ssl_conf_name *ssl_names; -static size_t ssl_names_count; - -static void ssl_module_free(CONF_IMODULE *md) -{ - size_t i, j; - if (ssl_names == NULL) - return; - for (i = 0; i < ssl_names_count; i++) { - struct ssl_conf_name *tname = ssl_names + i; - OPENSSL_free(tname->name); - for (j = 0; j < tname->cmd_count; j++) { - OPENSSL_free(tname->cmds[j].cmd); - OPENSSL_free(tname->cmds[j].arg); - } - OPENSSL_free(tname->cmds); - } - OPENSSL_free(ssl_names); - ssl_names = NULL; - ssl_names_count = 0; -} - -static int ssl_module_init(CONF_IMODULE *md, const CONF *cnf) -{ - size_t i, j, cnt; - int rv = 0; - const char *ssl_conf_section; - STACK_OF(CONF_VALUE) *cmd_lists; - ssl_conf_section = CONF_imodule_get_value(md); - cmd_lists = NCONF_get_section(cnf, ssl_conf_section); - if (sk_CONF_VALUE_num(cmd_lists) <= 0) { - if (cmd_lists == NULL) - SSLerr(SSL_F_SSL_MODULE_INIT, SSL_R_SSL_SECTION_NOT_FOUND); - else - SSLerr(SSL_F_SSL_MODULE_INIT, SSL_R_SSL_SECTION_EMPTY); - ERR_add_error_data(2, "section=", ssl_conf_section); - goto err; - } - cnt = sk_CONF_VALUE_num(cmd_lists); - ssl_names = OPENSSL_zalloc(sizeof(*ssl_names) * cnt); - ssl_names_count = cnt; - for (i = 0; i < ssl_names_count; i++) { - struct ssl_conf_name *ssl_name = ssl_names + i; - CONF_VALUE *sect = sk_CONF_VALUE_value(cmd_lists, i); - STACK_OF(CONF_VALUE) *cmds = NCONF_get_section(cnf, sect->value); - if (sk_CONF_VALUE_num(cmds) <= 0) { - if (cmds == NULL) - SSLerr(SSL_F_SSL_MODULE_INIT, - SSL_R_SSL_COMMAND_SECTION_NOT_FOUND); - else - SSLerr(SSL_F_SSL_MODULE_INIT, SSL_R_SSL_COMMAND_SECTION_EMPTY); - ERR_add_error_data(4, "name=", sect->name, ", value=", sect->value); - goto err; - } - ssl_name->name = BUF_strdup(sect->name); - if (ssl_name->name == NULL) - goto err; - cnt = sk_CONF_VALUE_num(cmds); - ssl_name->cmds = OPENSSL_zalloc(cnt * sizeof(struct ssl_conf_cmd)); - if (ssl_name->cmds == NULL) - goto err; - ssl_name->cmd_count = cnt; - for (j = 0; j < cnt; j++) { - const char *name; - CONF_VALUE *cmd_conf = sk_CONF_VALUE_value(cmds, j); - struct ssl_conf_cmd *cmd = ssl_name->cmds + j; - /* Skip any initial dot in name */ - name = strchr(cmd_conf->name, '.'); - if (name != NULL) - name++; - else - name = cmd_conf->name; - cmd->cmd = BUF_strdup(name); - cmd->arg = BUF_strdup(cmd_conf->value); - if (cmd->cmd == NULL || cmd->arg == NULL) - goto err; - } - - } - rv = 1; - err: - if (rv == 0) - ssl_module_free(md); - return rv; -} - void SSL_add_ssl_module(void) { - CONF_module_add("ssl_conf", ssl_module_init, ssl_module_free); -} - -static const struct ssl_conf_name *ssl_name_find(const char *name) -{ - size_t i; - const struct ssl_conf_name *nm; - if (name == NULL) - return NULL; - for (i = 0, nm = ssl_names; i < ssl_names_count; i++, nm++) { - if (strcmp(nm->name, name) == 0) - return nm; - } - return NULL; + /* Just load all of the crypto builtin modules. This includes the SSL one */ + OPENSSL_load_builtin_modules(); } static int ssl_do_config(SSL *s, SSL_CTX *ctx, const char *name) { SSL_CONF_CTX *cctx = NULL; - size_t i; + size_t i, idx, cmd_count; int rv = 0; unsigned int flags; const SSL_METHOD *meth; - const struct ssl_conf_name *nm; - struct ssl_conf_cmd *cmd; + const SSL_CONF_CMD *cmds; + if (s == NULL && ctx == NULL) { SSLerr(SSL_F_SSL_DO_CONFIG, ERR_R_PASSED_NULL_PARAMETER); goto err; } - nm = ssl_name_find(name); - if (nm == NULL) { + if (!conf_ssl_name_find(name, &idx)) { SSLerr(SSL_F_SSL_DO_CONFIG, SSL_R_INVALID_CONFIGURATION_NAME); ERR_add_error_data(2, "name=", name); goto err; } + cmds = conf_ssl_get(idx, &name, &cmd_count); cctx = SSL_CONF_CTX_new(); if (cctx == NULL) goto err; @@ -170,15 +57,18 @@ static int ssl_do_config(SSL *s, SSL_CTX *ctx, const char *name) if (meth->ssl_connect != ssl_undefined_function) flags |= SSL_CONF_FLAG_CLIENT; SSL_CONF_CTX_set_flags(cctx, flags); - for (i = 0, cmd = nm->cmds; i < nm->cmd_count; i++, cmd++) { - rv = SSL_CONF_cmd(cctx, cmd->cmd, cmd->arg); + for (i = 0; i < cmd_count; i++) { + char *cmdstr, *arg; + + conf_ssl_get_cmd(cmds, i, &cmdstr, &arg); + rv = SSL_CONF_cmd(cctx, cmdstr, arg); if (rv <= 0) { if (rv == -2) SSLerr(SSL_F_SSL_DO_CONFIG, SSL_R_UNKNOWN_COMMAND); else SSLerr(SSL_F_SSL_DO_CONFIG, SSL_R_BAD_VALUE); - ERR_add_error_data(6, "section=", name, ", cmd=", cmd->cmd, - ", arg=", cmd->arg); + ERR_add_error_data(6, "section=", name, ", cmd=", cmdstr, + ", arg=", arg); goto err; } } diff --git a/util/libcrypto.num b/util/libcrypto.num index 8414d97..461bd8a 100644 --- a/util/libcrypto.num +++ b/util/libcrypto.num @@ -4234,3 +4234,6 @@ CRYPTO_secure_clear_free 4315 1_1_0g EXIST::FUNCTION: EVP_PKEY_set1_engine 4347 1_1_0g EXIST::FUNCTION:ENGINE OCSP_resp_get0_signer 4374 1_1_0h EXIST::FUNCTION:OCSP X509_get0_authority_key_id 4448 1_1_0h EXIST::FUNCTION: +conf_ssl_name_find 4469 1_1_0i EXIST::FUNCTION: +conf_ssl_get_cmd 4470 1_1_0i EXIST::FUNCTION: +conf_ssl_get 4471 1_1_0i EXIST::FUNCTION: diff --git a/util/mkdef.pl b/util/mkdef.pl index 66db26c..eb303e6 100755 --- a/util/mkdef.pl +++ b/util/mkdef.pl @@ -252,6 +252,7 @@ $crypto.=" include/internal/o_dir.h"; $crypto.=" include/internal/o_str.h"; $crypto.=" include/internal/err.h"; $crypto.=" include/internal/asn1t.h"; +$crypto.=" include/internal/sslconf.h"; $crypto.=" include/openssl/des.h" ; # unless $no_des; $crypto.=" include/openssl/idea.h" ; # unless $no_idea; $crypto.=" include/openssl/rc4.h" ; # unless $no_rc4; From matt at openssl.org Thu Apr 5 14:49:09 2018 From: matt at openssl.org (Matt Caswell) Date: Thu, 05 Apr 2018 14:49:09 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1522939749.430040.2836.nullmailer@dev.openssl.org> The branch master has been updated via 77579510aa40aa769ceafc7a0c856381800e79c2 (commit) via d54897cf5445e0da8ce5c0599d5412c66fb104e7 (commit) via 06d3b485db8b6bfd5437c9998d92e882a3cdfa1f (commit) from fdb8113daedbcc01e3effc5b0a1ed97558d700a5 (commit) - Log ----------------------------------------------------------------- commit 77579510aa40aa769ceafc7a0c856381800e79c2 Author: Matt Caswell Date: Thu Mar 29 21:02:20 2018 +0100 Update the genpkey documentation Fixes #5739 Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5800) commit d54897cf5445e0da8ce5c0599d5412c66fb104e7 Author: Matt Caswell Date: Thu Mar 29 17:49:17 2018 +0100 Pick a q size consistent with the digest for DSA param generation There are two undocumented DSA parameter generation options available in the genpkey command line app: dsa_paramgen_md and dsa_paramgen_q_bits. These can also be accessed via the EVP API but only by using EVP_PKEY_CTX_ctrl() or EVP_PKEY_CTX_ctrl_str() directly. There are no helper macros for these options. dsa_paramgen_q_bits sets the length of q in bits (default 160 bits). dsa_paramgen_md sets the digest that is used during the parameter generation (default SHA1). In particular the output length of the digest used must be equal to or greater than the number of bits in q because of this code: if (!EVP_Digest(seed, qsize, md, NULL, evpmd, NULL)) goto err; if (!EVP_Digest(buf, qsize, buf2, NULL, evpmd, NULL)) goto err; for (i = 0; i < qsize; i++) md[i] ^= buf2[i]; /* step 3 */ md[0] |= 0x80; md[qsize - 1] |= 0x01; if (!BN_bin2bn(md, qsize, q)) goto err; qsize here is the number of bits in q and evpmd is the digest set via dsa_paramgen_md. md and buf2 are buffers of length SHA256_DIGEST_LENGTH. buf2 has been filled with qsize bits of random seed data, and md is uninitialised. If the output size of evpmd is less than qsize then the line "md[i] ^= buf2[i]" will be xoring an uninitialised value and the random seed data together to form the least significant bits of q (and not using the output of the digest at all for those bits) - which is probably not what was intended. The same seed is then used as an input to generating p. If the uninitialised data is actually all zeros (as seems quite likely) then the least significant bits of q will exactly match the least significant bits of the seed. This problem only occurs if you use these undocumented and difficult to find options and you set the size of q to be greater than the message digest output size. This is for parameter generation only not key generation. This scenario is considered highly unlikely and therefore the security risk of this is considered negligible. Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5800) commit 06d3b485db8b6bfd5437c9998d92e882a3cdfa1f Author: Matt Caswell Date: Thu Mar 29 17:48:28 2018 +0100 Don't crash if an unrecognised digest is used with dsa_paramgen_md Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5800) ----------------------------------------------------------------------- Summary of changes: crypto/dsa/dsa_err.c | 3 +- crypto/dsa/dsa_gen.c | 13 +++- crypto/dsa/dsa_pmeth.c | 8 ++- crypto/err/openssl.txt | 1 + doc/man1/genpkey.pod | 171 +++++++++++++++++++++++++---------------------- include/openssl/dsaerr.h | 1 + 6 files changed, 111 insertions(+), 86 deletions(-) diff --git a/crypto/dsa/dsa_err.c b/crypto/dsa/dsa_err.c index 168dadf..8f97f6f 100644 --- a/crypto/dsa/dsa_err.c +++ b/crypto/dsa/dsa_err.c @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -38,6 +38,7 @@ static const ERR_STRING_DATA DSA_str_functs[] = { {ERR_PACK(ERR_LIB_DSA, DSA_F_OLD_DSA_PRIV_DECODE, 0), "old_dsa_priv_decode"}, {ERR_PACK(ERR_LIB_DSA, DSA_F_PKEY_DSA_CTRL, 0), "pkey_dsa_ctrl"}, + {ERR_PACK(ERR_LIB_DSA, DSA_F_PKEY_DSA_CTRL_STR, 0), "pkey_dsa_ctrl_str"}, {ERR_PACK(ERR_LIB_DSA, DSA_F_PKEY_DSA_KEYGEN, 0), "pkey_dsa_keygen"}, {0, NULL} }; diff --git a/crypto/dsa/dsa_gen.c b/crypto/dsa/dsa_gen.c index e58ad8d..dc61660 100644 --- a/crypto/dsa/dsa_gen.c +++ b/crypto/dsa/dsa_gen.c @@ -64,9 +64,16 @@ int dsa_builtin_paramgen(DSA *ret, size_t bits, size_t qbits, /* invalid q size */ return 0; - if (evpmd == NULL) - /* use SHA1 as default */ - evpmd = EVP_sha1(); + if (evpmd == NULL) { + if (qsize == SHA_DIGEST_LENGTH) + evpmd = EVP_sha1(); + else if (qsize == SHA224_DIGEST_LENGTH) + evpmd = EVP_sha224(); + else + evpmd = EVP_sha256(); + } else { + qsize = EVP_MD_size(evpmd); + } if (bits < 512) bits = 512; diff --git a/crypto/dsa/dsa_pmeth.c b/crypto/dsa/dsa_pmeth.c index 88744a9..4934276 100644 --- a/crypto/dsa/dsa_pmeth.c +++ b/crypto/dsa/dsa_pmeth.c @@ -189,9 +189,15 @@ static int pkey_dsa_ctrl_str(EVP_PKEY_CTX *ctx, NULL); } if (strcmp(type, "dsa_paramgen_md") == 0) { + const EVP_MD *md = EVP_get_digestbyname(value); + + if (md == NULL) { + DSAerr(DSA_F_PKEY_DSA_CTRL_STR, DSA_R_INVALID_DIGEST_TYPE); + return 0; + } return EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DSA, EVP_PKEY_OP_PARAMGEN, EVP_PKEY_CTRL_DSA_PARAMGEN_MD, 0, - (void *)EVP_get_digestbyname(value)); + (void *)md); } return -2; } diff --git a/crypto/err/openssl.txt b/crypto/err/openssl.txt index 51bd461..d1cc039 100644 --- a/crypto/err/openssl.txt +++ b/crypto/err/openssl.txt @@ -424,6 +424,7 @@ DSA_F_DSA_SIGN_SETUP:107:DSA_sign_setup DSA_F_DSA_SIG_NEW:102:DSA_SIG_new DSA_F_OLD_DSA_PRIV_DECODE:122:old_dsa_priv_decode DSA_F_PKEY_DSA_CTRL:120:pkey_dsa_ctrl +DSA_F_PKEY_DSA_CTRL_STR:104:pkey_dsa_ctrl_str DSA_F_PKEY_DSA_KEYGEN:121:pkey_dsa_keygen DSO_F_DLFCN_BIND_FUNC:100:dlfcn_bind_func DSO_F_DLFCN_LOAD:102:dlfcn_load diff --git a/doc/man1/genpkey.pod b/doc/man1/genpkey.pod index de94a6b..cdf2173 100644 --- a/doc/man1/genpkey.pod +++ b/doc/man1/genpkey.pod @@ -63,13 +63,27 @@ options. Public key algorithm to use such as RSA, DSA or DH. If used this option must precede any B<-pkeyopt> options. The options B<-paramfile> and B<-algorithm> -are mutually exclusive. +are mutually exclusive. Engines may add algorithms in addition to the standard +built-in ones. + +Valid built-in algorithm names for private key generation are RSA, RSA-PSS, EC, +X25519, X448, ED25519 and ED448. + +Valid built-in algorithm names for parameter generation (see the B<-genparam> +option) are DH, DSA and EC. + +Note that the algorithm name X9.42 DH may be used as a synonym for the DH +algorithm. These are identical and do not indicate the type of parameters that +will be generated. Use the B option to indicate whether PKCS#3 +or X9.42 DH parameters are required. See L +below for more details. =item B<-pkeyopt opt:value> Set the public key algorithm option B to B. The precise set of options supported depends on the public key algorithm used and its -implementation. See B below for more details. +implementation. See L and +L below for more details. =item B<-genparam> @@ -95,9 +109,10 @@ parameters along with the PEM or DER structure. The options supported by each algorithm and indeed each implementation of an algorithm can vary. The options for the OpenSSL implementations are detailed -below. +below. There are no key generation options defined for the X25519, X448, ED25519 +or ED448 algorithms. -=head1 RSA KEY GENERATION OPTIONS +=head2 RSA Key Generation Options =over 4 @@ -116,32 +131,13 @@ hexadecimal value if preceded by B<0x>. Default value is 65537. =back -=head1 RSA-PSS KEY GENERATION OPTIONS +=head2 RSA-PSS Key Generation Options Note: by default an B key has no parameter restrictions. =over 4 -=item B, B - -These options have the same meaning as the B algorithm. - -=item B - -=item B - -The RSA public exponent value. This can be a large decimal or -hexadecimal value if preceded by B<0x>. Default value is 65537. - -=back - -=head1 RSA-PSS KEY GENERATION OPTIONS - -Note: by default an B key has no parameter restrictions. - -=over 4 - -=item B, B +=item B, B, B These options have the same meaning as the B algorithm. @@ -160,91 +156,92 @@ If set the key is restricted and B specifies the minimum salt length. =back -=head1 DSA PARAMETER GENERATION OPTIONS +=head2 EC Key Generation Options + +The EC key generation options can also be used for parameter generation. =over 4 -=item B +=item B -The number of bits in the generated parameters. If not specified 1024 is used. +The EC curve to use. OpenSSL supports NIST curve names such as "P-256". + +=item B + +The encoding to use for parameters. The "encoding" parameter must be either +"named_curve" or "explicit". The default value is "named_curve". =back -=head1 DH PARAMETER GENERATION OPTIONS +=head1 PARAMETER GENERATION OPTIONS + +The options supported by each algorithm and indeed each implementation of an +algorithm can vary. The options for the OpenSSL implementations are detailed +below. + +=head2 DSA Parameter Generation Options =over 4 -=item B +=item B -The number of bits in the prime parameter B

. +The number of bits in the generated prime. If not specified 1024 is used. -=item B +=item B -The value to use for the generator B. +The number of bits in the q parameter. Must be one of 160, 224 or 256. If not +specified 160 is used. -=item B +=item B -If this option is set then the appropriate RFC5114 parameters are used -instead of generating new parameters. The value B can take the -values 1, 2 or 3 corresponding to RFC5114 DH parameters consisting of -1024 bit group with 160 bit subgroup, 2048 bit group with 224 bit subgroup -and 2048 bit group with 256 bit subgroup as mentioned in RFC5114 sections -2.1, 2.2 and 2.3 respectively. +The digest to use during parameter generation. Must be one of B, B +or B. If set, then the number of bits in B will match the output size +of the specified digest and the B parameter will be +ignored. If not set, then a digest will be used that gives an output matching +the number of bits in B, i.e. B if q length is 160, B if it 224 +or B if it is 256. =back -=head1 EC PARAMETER GENERATION OPTIONS - -The EC parameter generation options below can also -be supplied as EC key generation options. This can (for example) generate a -key from a named curve without the need to use an explicit parameter file. +=head2 DH Parameter Generation Options =over 4 -=item B - -The EC curve to use. OpenSSL supports NIST curve names such as "P-256". - -=item B +=item B -The encoding to use for parameters. The "encoding" parameter must be either -"named_curve" or "explicit". +The number of bits in the prime parameter B

. The default is 1024. -=back +=item B -=head1 GOST2001 KEY GENERATION AND PARAMETER OPTIONS +The number of bits in the sub prime parameter B. The default is 256 if the +prime is at least 2048 bits long or 160 otherwise. Only relevant if used in +conjunction with the B option to generate X9.42 DH parameters. -Gost 2001 support is not enabled by default. To enable this algorithm, -one should load the ccgost engine in the OpenSSL configuration file. -See README.gost file in the engines/ccgost directory of the source -distribution for more details. +=item B -Use of a parameter file for the GOST R 34.10 algorithm is optional. -Parameters can be specified during key generation directly as well as -during generation of parameter file. +The value to use for the generator B. The default is 2. -=over 4 +=item B -=item B +The type of DH parameters to generate. Use 0 for PKCS#3 DH and 1 for X9.42 DH. +The default is 0. -Specifies GOST R 34.10-2001 parameter set according to RFC 4357. -Parameter set can be specified using abbreviated name, object short name or -numeric OID. Following parameter sets are supported: +=item B - paramset OID Usage - A 1.2.643.2.2.35.1 Signature - B 1.2.643.2.2.35.2 Signature - C 1.2.643.2.2.35.3 Signature - XA 1.2.643.2.2.36.0 Key exchange - XB 1.2.643.2.2.36.1 Key exchange - test 1.2.643.2.2.35.0 Test purposes +If this option is set, then the appropriate RFC5114 parameters are used +instead of generating new parameters. The value B can take the +values 1, 2 or 3 corresponding to RFC5114 DH parameters consisting of +1024 bit group with 160 bit subgroup, 2048 bit group with 224 bit subgroup +and 2048 bit group with 256 bit subgroup as mentioned in RFC5114 sections +2.1, 2.2 and 2.3 respectively. If present this overrides all other DH parameter +options. =back -=head1 X25519 and X448 KEY GENERATION OPTIONS +=head2 EC Parameter Generation Options -The X25519 and X448 algorithms do not currently support any key generation -options. +The EC parameter generation options are the same as for key generation. See +L above. =head1 NOTES @@ -267,19 +264,25 @@ Generate a 2048 bit RSA key using 3 as the public exponent: openssl genpkey -algorithm RSA -out key.pem -pkeyopt rsa_keygen_bits:2048 \ -pkeyopt rsa_keygen_pubexp:3 -Generate 1024 bit DSA parameters: +Generate 2048 bit DSA parameters: openssl genpkey -genparam -algorithm DSA -out dsap.pem \ - -pkeyopt dsa_paramgen_bits:1024 + -pkeyopt dsa_paramgen_bits:2048 Generate DSA key from parameters: openssl genpkey -paramfile dsap.pem -out dsakey.pem -Generate 1024 bit DH parameters: +Generate 2048 bit DH parameters: openssl genpkey -genparam -algorithm DH -out dhp.pem \ - -pkeyopt dh_paramgen_prime_len:1024 + -pkeyopt dh_paramgen_prime_len:2048 + +Generate 2048 bit X9.42 DH parameters: + + openssl genpkey -genparam -algorithm DH -out dhpx.pem \ + -pkeyopt dh_paramgen_prime_len:2048 \ + -pkeyopt dh_paramgen_type:1 Output RFC5114 2048 bit DH parameters with 224 bit subgroup: @@ -309,10 +312,16 @@ Generate an X25519 private key: openssl genpkey -algorithm X25519 -out xkey.pem +Generate an ED448 private key: + + openssl genpkey -algorithm ED448 -out xkey.pem + =head1 HISTORY The ability to use NIST curve names, and to generate an EC key directly, -were added in OpenSSL 1.0.2. +were added in OpenSSL 1.0.2. The ability to generate X25519 keys was added in +OpenSSL 1.1.0. The ability to generate X448, ED25519 and ED448 keys was added in +OpenSSL 1.1.1. =head1 COPYRIGHT diff --git a/include/openssl/dsaerr.h b/include/openssl/dsaerr.h index a5248ab..d94f97b 100644 --- a/include/openssl/dsaerr.h +++ b/include/openssl/dsaerr.h @@ -44,6 +44,7 @@ int ERR_load_DSA_strings(void); # define DSA_F_DSA_SIG_NEW 102 # define DSA_F_OLD_DSA_PRIV_DECODE 122 # define DSA_F_PKEY_DSA_CTRL 120 +# define DSA_F_PKEY_DSA_CTRL_STR 104 # define DSA_F_PKEY_DSA_KEYGEN 121 /* From osslsanity at gmail.com Thu Apr 5 15:13:49 2018 From: osslsanity at gmail.com (osslsanity at gmail.com) Date: Thu, 5 Apr 2018 15:13:49 +0000 (UTC) Subject: [openssl-commits] Build failed in Jenkins: master_make_errors #472 Message-ID: <711817743.443.1522941229567.JavaMail.jenkins@ip-172-31-34-99> See Changes: [matt] Move the loading of the ssl_conf module to libcrypto [matt] Document the change in the previous commit about loading the config file [matt] Don't crash if an unrecognised digest is used with dsa_paramgen_md [matt] Pick a q size consistent with the digest for DSA param generation [matt] Update the genpkey documentation ------------------------------------------ Started by upstream project "master_basic" build number 483 originally caused by: Started by an SCM change Building in workspace [WS-CLEANUP] Deleting project workspace... [WS-CLEANUP] Done Cloning the remote Git repository Cloning repository https://github.com/openssl/openssl.git > git init # timeout=10 Fetching upstream changes from https://github.com/openssl/openssl.git > git --version # timeout=10 > git fetch --tags --progress https://github.com/openssl/openssl.git +refs/heads/*:refs/remotes/origin/* > git config remote.origin.url https://github.com/openssl/openssl.git # timeout=10 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10 > git config remote.origin.url https://github.com/openssl/openssl.git # timeout=10 Fetching upstream changes from https://github.com/openssl/openssl.git > git fetch --tags --progress https://github.com/openssl/openssl.git +refs/heads/*:refs/remotes/origin/* > git rev-parse refs/remotes/origin/master^{commit} # timeout=10 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10 Checking out Revision 77579510aa40aa769ceafc7a0c856381800e79c2 (refs/remotes/origin/master) > git config core.sparsecheckout # timeout=10 > git checkout -f 77579510aa40aa769ceafc7a0c856381800e79c2 > git rev-list 4845aeba4c49e1bd65259a5014d7e3ab38657d42 # timeout=10 [master_make_errors] $ /bin/sh -xe /tmp/jenkins6665230723697528939.sh + ./config Operating system: x86_64-whatever-linux2 Configuring OpenSSL version 1.1.1-pre5-dev (0x10101005L) for linux-x86_64 Using os-specific seed configuration Creating configdata.pm Creating Makefile ********************************************************************** *** *** *** If you want to report a building issue, please include the *** *** output from this command: *** *** *** *** perl configdata.pm --dump *** *** *** ********************************************************************** + make depend + make errors ( cd .; /usr/bin/perl util/ck_errf.pl -strict */*.c */*/*.c ) ( b=`pwd`; cd .; \ /usr/bin/perl -I$b util/mkerr.pl -internal ) CONF function code 122 collision at CONF_F_SSL_MODULE_INIT make: *** [errors] Error 25 Build step 'Execute shell' marked build as failure From matt at openssl.org Thu Apr 5 16:03:33 2018 From: matt at openssl.org (Matt Caswell) Date: Thu, 05 Apr 2018 16:03:33 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1522944213.347920.14276.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via 0d9967a644502925d95dfe1bdb2364fa8162c258 (commit) via 57c766fb9a578082e550a887e764c512e1652391 (commit) via 5dcd9b1c7c138576d39aa2b5669270a570eb6b9f (commit) from 23dec58b9c2e36311208a90efb3d56818a9ed6fd (commit) - Log ----------------------------------------------------------------- commit 0d9967a644502925d95dfe1bdb2364fa8162c258 Author: Matt Caswell Date: Thu Mar 29 21:02:20 2018 +0100 Update the genpkey documentation Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5883) commit 57c766fb9a578082e550a887e764c512e1652391 Author: Matt Caswell Date: Thu Mar 29 17:49:17 2018 +0100 Pick a q size consistent with the digest for DSA param generation There are two undocumented DSA parameter generation options available in the genpkey command line app: dsa_paramgen_md and dsa_paramgen_q_bits. These can also be accessed via the EVP API but only by using EVP_PKEY_CTX_ctrl() or EVP_PKEY_CTX_ctrl_str() directly. There are no helper macros for these options. dsa_paramgen_q_bits sets the length of q in bits (default 160 bits). dsa_paramgen_md sets the digest that is used during the parameter generation (default SHA1). In particular the output length of the digest used must be equal to or greater than the number of bits in q because of this code: if (!EVP_Digest(seed, qsize, md, NULL, evpmd, NULL)) goto err; if (!EVP_Digest(buf, qsize, buf2, NULL, evpmd, NULL)) goto err; for (i = 0; i < qsize; i++) md[i] ^= buf2[i]; /* step 3 */ md[0] |= 0x80; md[qsize - 1] |= 0x01; if (!BN_bin2bn(md, qsize, q)) goto err; qsize here is the number of bits in q and evpmd is the digest set via dsa_paramgen_md. md and buf2 are buffers of length SHA256_DIGEST_LENGTH. buf2 has been filled with qsize bits of random seed data, and md is uninitialised. If the output size of evpmd is less than qsize then the line "md[i] ^= buf2[i]" will be xoring an uninitialised value and the random seed data together to form the least significant bits of q (and not using the output of the digest at all for those bits) - which is probably not what was intended. The same seed is then used as an input to generating p. If the uninitialised data is actually all zeros (as seems quite likely) then the least significant bits of q will exactly match the least significant bits of the seed. This problem only occurs if you use these undocumented and difficult to find options and you set the size of q to be greater than the message digest output size. This is for parameter generation only not key generation. This scenario is considered highly unlikely and therefore the security risk of this is considered negligible. Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5883) commit 5dcd9b1c7c138576d39aa2b5669270a570eb6b9f Author: Matt Caswell Date: Thu Mar 29 17:48:28 2018 +0100 Don't crash if an unrecognised digest is used with dsa_paramgen_md Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5883) ----------------------------------------------------------------------- Summary of changes: crypto/dsa/dsa_err.c | 3 +- crypto/dsa/dsa_gen.c | 13 +++- crypto/dsa/dsa_pmeth.c | 8 ++- doc/apps/genpkey.pod | 157 ++++++++++++++++++++++++++++--------------------- include/openssl/dsa.h | 1 + 5 files changed, 109 insertions(+), 73 deletions(-) diff --git a/crypto/dsa/dsa_err.c b/crypto/dsa/dsa_err.c index b8f0af4..1320088 100644 --- a/crypto/dsa/dsa_err.c +++ b/crypto/dsa/dsa_err.c @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -40,6 +40,7 @@ static ERR_STRING_DATA DSA_str_functs[] = { {ERR_FUNC(DSA_F_DSA_SIG_NEW), "DSA_SIG_new"}, {ERR_FUNC(DSA_F_OLD_DSA_PRIV_DECODE), "old_dsa_priv_decode"}, {ERR_FUNC(DSA_F_PKEY_DSA_CTRL), "pkey_dsa_ctrl"}, + {ERR_FUNC(DSA_F_PKEY_DSA_CTRL_STR), "pkey_dsa_ctrl_str"}, {ERR_FUNC(DSA_F_PKEY_DSA_KEYGEN), "pkey_dsa_keygen"}, {0, NULL} }; diff --git a/crypto/dsa/dsa_gen.c b/crypto/dsa/dsa_gen.c index e58ad8d..dc61660 100644 --- a/crypto/dsa/dsa_gen.c +++ b/crypto/dsa/dsa_gen.c @@ -64,9 +64,16 @@ int dsa_builtin_paramgen(DSA *ret, size_t bits, size_t qbits, /* invalid q size */ return 0; - if (evpmd == NULL) - /* use SHA1 as default */ - evpmd = EVP_sha1(); + if (evpmd == NULL) { + if (qsize == SHA_DIGEST_LENGTH) + evpmd = EVP_sha1(); + else if (qsize == SHA224_DIGEST_LENGTH) + evpmd = EVP_sha224(); + else + evpmd = EVP_sha256(); + } else { + qsize = EVP_MD_size(evpmd); + } if (bits < 512) bits = 512; diff --git a/crypto/dsa/dsa_pmeth.c b/crypto/dsa/dsa_pmeth.c index 95f088a..a1cbaad 100644 --- a/crypto/dsa/dsa_pmeth.c +++ b/crypto/dsa/dsa_pmeth.c @@ -187,9 +187,15 @@ static int pkey_dsa_ctrl_str(EVP_PKEY_CTX *ctx, NULL); } if (strcmp(type, "dsa_paramgen_md") == 0) { + const EVP_MD *md = EVP_get_digestbyname(value); + + if (md == NULL) { + DSAerr(DSA_F_PKEY_DSA_CTRL_STR, DSA_R_INVALID_DIGEST_TYPE); + return 0; + } return EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DSA, EVP_PKEY_OP_PARAMGEN, EVP_PKEY_CTRL_DSA_PARAMGEN_MD, 0, - (void *)EVP_get_digestbyname(value)); + (void *)md); } return -2; } diff --git a/doc/apps/genpkey.pod b/doc/apps/genpkey.pod index d486952..91b12e2 100644 --- a/doc/apps/genpkey.pod +++ b/doc/apps/genpkey.pod @@ -12,7 +12,7 @@ B B [B<-out filename>] [B<-outform PEM|DER>] [B<-pass arg>] -[B<-cipher>] +[B<-I>] [B<-engine id>] [B<-paramfile file>] [B<-algorithm alg>] @@ -39,21 +39,21 @@ standard output is used. =item B<-outform DER|PEM> -This specifies the output format DER or PEM. +This specifies the output format DER or PEM. The default format is PEM. =item B<-pass arg> -the output file password source. For more information about the format of B +The output file password source. For more information about the format of B see the B section in L. -=item B<-cipher> +=item B<-I> This option encrypts the private key with the supplied cipher. Any algorithm name accepted by EVP_get_cipherbyname() is acceptable such as B. =item B<-engine id> -specifying an engine (by its unique B string) will cause B +Specifying an engine (by its unique B string) will cause B to attempt to obtain a functional reference to the specified engine, thus initialising it if needed. The engine will then be set as the default for all available algorithms. If used this option should precede all other @@ -61,19 +61,32 @@ options. =item B<-algorithm alg> -public key algorithm to use such as RSA, DSA or DH. If used this option must +Public key algorithm to use such as RSA, DSA or DH. If used this option must precede any B<-pkeyopt> options. The options B<-paramfile> and B<-algorithm> -are mutually exclusive. +are mutually exclusive. Engines may add algorithms in addition to the standard +built-in ones. + +Valid built-in algorithm names for private key generation are RSA and EC. + +Valid built-in algorithm names for parameter generation (see the B<-genparam> +option) are DH, DSA and EC. + +Note that the algorithm name X9.42 DH may be used as a synonym for the DH +algorithm. These are identical and do not indicate the type of parameters that +will be generated. Use the B option to indicate whether PKCS#3 +or X9.42 DH parameters are required. See L +below for more details. =item B<-pkeyopt opt:value> -set the public key algorithm option B to B. The precise set of +Set the public key algorithm option B to B. The precise set of options supported depends on the public key algorithm used and its -implementation. See B below for more details. +implementation. See L and +L below for more details. =item B<-genparam> -generate a set of parameters instead of a private key. If used this option must +Generate a set of parameters instead of a private key. If used this option must precede any B<-algorithm>, B<-paramfile> or B<-pkeyopt> options. =item B<-paramfile filename> @@ -97,7 +110,7 @@ The options supported by each algorithm and indeed each implementation of an algorithm can vary. The options for the OpenSSL implementations are detailed below. -=head1 RSA KEY GENERATION OPTIONS +=head2 RSA Key Generation Options =over 4 @@ -112,91 +125,92 @@ hexadecimal value if preceded by B<0x>. Default value is 65537. =back -=head1 DSA PARAMETER GENERATION OPTIONS +=head2 EC Key Generation Options + +The EC key generation options can also be used for parameter generation. =over 4 -=item B +=item B + +The EC curve to use. OpenSSL supports NIST curve names such as "P-256". -The number of bits in the generated parameters. If not specified 1024 is used. +=item B + +The encoding to use for parameters. The "encoding" parameter must be either +"named_curve" or "explicit". The default value is "named_curve". =back -=head1 DH PARAMETER GENERATION OPTIONS +=head1 PARAMETER GENERATION OPTIONS + +The options supported by each algorithm and indeed each implementation of an +algorithm can vary. The options for the OpenSSL implementations are detailed +below. + +=head2 DSA Parameter Generation Options =over 4 -=item B +=item B -The number of bits in the prime parameter B

. +The number of bits in the generated prime. If not specified 1024 is used. -=item B +=item B -The value to use for the generator B. +The number of bits in the q parameter. Must be one of 160, 224 or 256. If not +specified 160 is used. -=item B +=item B -If this option is set then the appropriate RFC5114 parameters are used -instead of generating new parameters. The value B can take the -values 1, 2 or 3 corresponding to RFC5114 DH parameters consisting of -1024 bit group with 160 bit subgroup, 2048 bit group with 224 bit subgroup -and 2048 bit group with 256 bit subgroup as mentioned in RFC5114 sections -2.1, 2.2 and 2.3 respectively. +The digest to use during parameter generation. Must be one of B, B +or B. If set, then the number of bits in B will match the output size +of the specified digest and the B parameter will be +ignored. If not set, then a digest will be used that gives an output matching +the number of bits in B, i.e. B if q length is 160, B if it 224 +or B if it is 256. =back -=head1 EC PARAMETER GENERATION OPTIONS - -The EC parameter generation options below can also -be supplied as EC key generation options. This can (for example) generate a -key from a named curve without the need to use an explicit parameter file. +=head2 DH Parameter Generation Options =over 4 -=item B - -the EC curve to use. OpenSSL supports NIST curve names such as "P-256". +=item B -=item B +The number of bits in the prime parameter B

. The default is 1024. -the encoding to use for parameters. The "encoding" parameter must be either -"named_curve" or "explicit". +=item B -=back +The number of bits in the sub prime parameter B. The default is 256 if the +prime is at least 2048 bits long or 160 otherwise. Only relevant if used in +conjunction with the B option to generate X9.42 DH parameters. -=head1 GOST2001 KEY GENERATION AND PARAMETER OPTIONS - -Gost 2001 support is not enabled by default. To enable this algorithm, -one should load the ccgost engine in the OpenSSL configuration file. -See README.gost file in the engines/ccgost directory of the source -distribution for more details. +=item B -Use of a parameter file for the GOST R 34.10 algorithm is optional. -Parameters can be specified during key generation directly as well as -during generation of parameter file. +The value to use for the generator B. The default is 2. -=over 4 +=item B -=item B +The type of DH parameters to generate. Use 0 for PKCS#3 DH and 1 for X9.42 DH. +The default is 0. -Specifies GOST R 34.10-2001 parameter set according to RFC 4357. -Parameter set can be specified using abbreviated name, object short name or -numeric OID. Following parameter sets are supported: +=item B - paramset OID Usage - A 1.2.643.2.2.35.1 Signature - B 1.2.643.2.2.35.2 Signature - C 1.2.643.2.2.35.3 Signature - XA 1.2.643.2.2.36.0 Key exchange - XB 1.2.643.2.2.36.1 Key exchange - test 1.2.643.2.2.35.0 Test purposes +If this option is set, then the appropriate RFC5114 parameters are used +instead of generating new parameters. The value B can take the +values 1, 2 or 3 corresponding to RFC5114 DH parameters consisting of +1024 bit group with 160 bit subgroup, 2048 bit group with 224 bit subgroup +and 2048 bit group with 256 bit subgroup as mentioned in RFC5114 sections +2.1, 2.2 and 2.3 respectively. If present this overrides all other DH parameter +options. =back -=head1 X25519 KEY GENERATION OPTIONS - -The X25519 algorithm does not currently support any key generation options. +=head2 EC Parameter Generation Options +The EC parameter generation options are the same as for key generation. See +L above. =head1 NOTES @@ -219,19 +233,25 @@ Generate a 2048 bit RSA key using 3 as the public exponent: openssl genpkey -algorithm RSA -out key.pem -pkeyopt rsa_keygen_bits:2048 \ -pkeyopt rsa_keygen_pubexp:3 -Generate 1024 bit DSA parameters: +Generate 2048 bit DSA parameters: openssl genpkey -genparam -algorithm DSA -out dsap.pem \ - -pkeyopt dsa_paramgen_bits:1024 + -pkeyopt dsa_paramgen_bits:2048 Generate DSA key from parameters: openssl genpkey -paramfile dsap.pem -out dsakey.pem -Generate 1024 bit DH parameters: +Generate 2048 bit DH parameters: openssl genpkey -genparam -algorithm DH -out dhp.pem \ - -pkeyopt dh_paramgen_prime_len:1024 + -pkeyopt dh_paramgen_prime_len:2048 + +Generate 2048 bit X9.42 DH parameters: + + openssl genpkey -genparam -algorithm DH -out dhpx.pem \ + -pkeyopt dh_paramgen_prime_len:2048 \ + -pkeyopt dh_paramgen_type:1 Output RFC5114 2048 bit DH parameters with 224 bit subgroup: @@ -264,11 +284,12 @@ Generate an X25519 private key: =head1 HISTORY The ability to use NIST curve names, and to generate an EC key directly, -were added in OpenSSL 1.0.2. +were added in OpenSSL 1.0.2. The ability to generate X25519 keys was added in +OpenSSL 1.1.0. =head1 COPYRIGHT -Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2006-2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/include/openssl/dsa.h b/include/openssl/dsa.h index 139718e..5b8a3cf 100644 --- a/include/openssl/dsa.h +++ b/include/openssl/dsa.h @@ -260,6 +260,7 @@ int ERR_load_DSA_strings(void); # define DSA_F_DSA_SIG_NEW 102 # define DSA_F_OLD_DSA_PRIV_DECODE 122 # define DSA_F_PKEY_DSA_CTRL 120 +# define DSA_F_PKEY_DSA_CTRL_STR 104 # define DSA_F_PKEY_DSA_KEYGEN 121 /* Reason codes. */ From matt at openssl.org Thu Apr 5 16:04:28 2018 From: matt at openssl.org (Matt Caswell) Date: Thu, 05 Apr 2018 16:04:28 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_0_2-stable update Message-ID: <1522944268.479892.15344.nullmailer@dev.openssl.org> The branch OpenSSL_1_0_2-stable has been updated via 0ac1a7eace815bb4a0597bd43774c2e607288968 (commit) via 3e5f19a352ce532eb0561a43c8993b30a3283516 (commit) via 5068cfbd439d97660eb30f8bec5252f11d1ec796 (commit) from a3dbbe47f09336484c8c874a0b1838266b51a8e8 (commit) - Log ----------------------------------------------------------------- commit 0ac1a7eace815bb4a0597bd43774c2e607288968 Author: Matt Caswell Date: Thu Mar 29 21:02:20 2018 +0100 Update the genpkey documentation Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5884) commit 3e5f19a352ce532eb0561a43c8993b30a3283516 Author: Matt Caswell Date: Thu Mar 29 17:49:17 2018 +0100 Pick a q size consistent with the digest for DSA param generation There are two undocumented DSA parameter generation options available in the genpkey command line app: dsa_paramgen_md and dsa_paramgen_q_bits. These can also be accessed via the EVP API but only by using EVP_PKEY_CTX_ctrl() or EVP_PKEY_CTX_ctrl_str() directly. There are no helper macros for these options. dsa_paramgen_q_bits sets the length of q in bits (default 160 bits). dsa_paramgen_md sets the digest that is used during the parameter generation (default SHA1). In particular the output length of the digest used must be equal to or greater than the number of bits in q because of this code: if (!EVP_Digest(seed, qsize, md, NULL, evpmd, NULL)) goto err; if (!EVP_Digest(buf, qsize, buf2, NULL, evpmd, NULL)) goto err; for (i = 0; i < qsize; i++) md[i] ^= buf2[i]; /* step 3 */ md[0] |= 0x80; md[qsize - 1] |= 0x01; if (!BN_bin2bn(md, qsize, q)) goto err; qsize here is the number of bits in q and evpmd is the digest set via dsa_paramgen_md. md and buf2 are buffers of length SHA256_DIGEST_LENGTH. buf2 has been filled with qsize bits of random seed data, and md is uninitialised. If the output size of evpmd is less than qsize then the line "md[i] ^= buf2[i]" will be xoring an uninitialised value and the random seed data together to form the least significant bits of q (and not using the output of the digest at all for those bits) - which is probably not what was intended. The same seed is then used as an input to generating p. If the uninitialised data is actually all zeros (as seems quite likely) then the least significant bits of q will exactly match the least significant bits of the seed. This problem only occurs if you use these undocumented and difficult to find options and you set the size of q to be greater than the message digest output size. This is for parameter generation only not key generation. This scenario is considered highly unlikely and therefore the security risk of this is considered negligible. Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5884) commit 5068cfbd439d97660eb30f8bec5252f11d1ec796 Author: Matt Caswell Date: Thu Mar 29 17:48:28 2018 +0100 Don't crash if an unrecognised digest is used with dsa_paramgen_md Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5884) ----------------------------------------------------------------------- Summary of changes: crypto/dsa/dsa.h | 1 + crypto/dsa/dsa_err.c | 3 +- crypto/dsa/dsa_gen.c | 13 +++-- crypto/dsa/dsa_pmeth.c | 10 +++- doc/apps/genpkey.pod | 139 +++++++++++++++++++++++++++++++++++++------------ 5 files changed, 126 insertions(+), 40 deletions(-) diff --git a/crypto/dsa/dsa.h b/crypto/dsa/dsa.h index 545358f..7f8346d 100644 --- a/crypto/dsa/dsa.h +++ b/crypto/dsa/dsa.h @@ -307,6 +307,7 @@ void ERR_load_DSA_strings(void); # define DSA_F_I2D_DSA_SIG 111 # define DSA_F_OLD_DSA_PRIV_DECODE 122 # define DSA_F_PKEY_DSA_CTRL 120 +# define DSA_F_PKEY_DSA_CTRL_STR 127 # define DSA_F_PKEY_DSA_KEYGEN 121 # define DSA_F_SIG_CB 114 diff --git a/crypto/dsa/dsa_err.c b/crypto/dsa/dsa_err.c index f5ddc66..7e507fa 100644 --- a/crypto/dsa/dsa_err.c +++ b/crypto/dsa/dsa_err.c @@ -1,6 +1,6 @@ /* crypto/dsa/dsa_err.c */ /* ==================================================================== - * Copyright (c) 1999-2013 The OpenSSL Project. All rights reserved. + * Copyright (c) 1999-2018 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -95,6 +95,7 @@ static ERR_STRING_DATA DSA_str_functs[] = { {ERR_FUNC(DSA_F_I2D_DSA_SIG), "i2d_DSA_SIG"}, {ERR_FUNC(DSA_F_OLD_DSA_PRIV_DECODE), "OLD_DSA_PRIV_DECODE"}, {ERR_FUNC(DSA_F_PKEY_DSA_CTRL), "PKEY_DSA_CTRL"}, + {ERR_FUNC(DSA_F_PKEY_DSA_CTRL_STR), "PKEY_DSA_CTRL_STR"}, {ERR_FUNC(DSA_F_PKEY_DSA_KEYGEN), "PKEY_DSA_KEYGEN"}, {ERR_FUNC(DSA_F_SIG_CB), "SIG_CB"}, {0, NULL} diff --git a/crypto/dsa/dsa_gen.c b/crypto/dsa/dsa_gen.c index 21af2e1..db52a38 100644 --- a/crypto/dsa/dsa_gen.c +++ b/crypto/dsa/dsa_gen.c @@ -146,9 +146,16 @@ int dsa_builtin_paramgen(DSA *ret, size_t bits, size_t qbits, /* invalid q size */ return 0; - if (evpmd == NULL) - /* use SHA1 as default */ - evpmd = EVP_sha1(); + if (evpmd == NULL) { + if (qsize == SHA_DIGEST_LENGTH) + evpmd = EVP_sha1(); + else if (qsize == SHA224_DIGEST_LENGTH) + evpmd = EVP_sha224(); + else + evpmd = EVP_sha256(); + } else { + qsize = EVP_MD_size(evpmd); + } if (bits < 512) bits = 512; diff --git a/crypto/dsa/dsa_pmeth.c b/crypto/dsa/dsa_pmeth.c index 7872483..2d98132 100644 --- a/crypto/dsa/dsa_pmeth.c +++ b/crypto/dsa/dsa_pmeth.c @@ -230,10 +230,16 @@ static int pkey_dsa_ctrl_str(EVP_PKEY_CTX *ctx, EVP_PKEY_CTRL_DSA_PARAMGEN_Q_BITS, qbits, NULL); } - if (!strcmp(type, "dsa_paramgen_md")) { + if (strcmp(type, "dsa_paramgen_md") == 0) { + const EVP_MD *md = EVP_get_digestbyname(value); + + if (md == NULL) { + DSAerr(DSA_F_PKEY_DSA_CTRL_STR, DSA_R_INVALID_DIGEST_TYPE); + return 0; + } return EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DSA, EVP_PKEY_OP_PARAMGEN, EVP_PKEY_CTRL_DSA_PARAMGEN_MD, 0, - (void *)EVP_get_digestbyname(value)); + (void *)md); } return -2; } diff --git a/doc/apps/genpkey.pod b/doc/apps/genpkey.pod index 4d09fc0..2e24400 100644 --- a/doc/apps/genpkey.pod +++ b/doc/apps/genpkey.pod @@ -11,7 +11,7 @@ B B [B<-out filename>] [B<-outform PEM|DER>] [B<-pass arg>] -[B<-cipher>] +[B<-I>] [B<-engine id>] [B<-paramfile file>] [B<-algorithm alg>] @@ -34,21 +34,21 @@ used. =item B<-outform DER|PEM> -This specifies the output format DER or PEM. +This specifies the output format DER or PEM. The default format is PEM. =item B<-pass arg> -the output file password source. For more information about the format of B -see the B section in L. +The output file password source. For more information about the format of B +see the B section in L. -=item B<-cipher> +=item B<-I> This option encrypts the private key with the supplied cipher. Any algorithm name accepted by EVP_get_cipherbyname() is acceptable such as B. =item B<-engine id> -specifying an engine (by its unique B string) will cause B +Specifying an engine (by its unique B string) will cause B to attempt to obtain a functional reference to the specified engine, thus initialising it if needed. The engine will then be set as the default for all available algorithms. If used this option should precede all other @@ -56,20 +56,33 @@ options. =item B<-algorithm alg> -public key algorithm to use such as RSA, DSA or DH. If used this option must +Public key algorithm to use such as RSA, DSA or DH. If used this option must precede any B<-pkeyopt> options. The options B<-paramfile> and B<-algorithm> -are mutually exclusive. +are mutually exclusive. Engines may add algorithms in addition to the standard +built-in ones. + +Valid built-in algorithm names for private key generation are RSA and EC. + +Valid built-in algorithm names for parameter generation (see the B<-genparam> +option) are DH, DSA and EC. + +Note that the algorithm name X9.42 DH may be used as a synonym for the DH +algorithm. These are identical and do not indicate the type of parameters that +will be generated. Use the B option to indicate whether PKCS#3 +or X9.42 DH parameters are required. See L +below for more details. =item B<-pkeyopt opt:value> -set the public key algorithm option B to B. The precise set of +Set the public key algorithm option B to B. The precise set of options supported depends on the public key algorithm used and its -implementation. See B below for more details. +implementation. See L and +L below for more details. =item B<-genparam> -generate a set of parameters instead of a private key. If used this option must -precede and B<-algorithm>, B<-paramfile> or B<-pkeyopt> options. +Generate a set of parameters instead of a private key. If used this option must +precede any B<-algorithm>, B<-paramfile> or B<-pkeyopt> options. =item B<-paramfile filename> @@ -92,7 +105,7 @@ The options supported by each algorith and indeed each implementation of an algorithm can vary. The options for the OpenSSL implementations are detailed below. -=head1 RSA KEY GENERATION OPTIONS +=head2 RSA Key Generation Options =over 4 @@ -107,48 +120,92 @@ hexadecimal value if preceded by B<0x>. Default value is 65537. =back -=head1 DSA PARAMETER GENERATION OPTIONS +=head2 EC Key Generation Options + +The EC key generation options can also be used for parameter generation. + +=over 4 + +=item B + +The EC curve to use. OpenSSL supports NIST curve names such as "P-256". + +=item B + +The encoding to use for parameters. The "encoding" parameter must be either +"named_curve" or "explicit". The default value is "named_curve". + +=back + +=head1 PARAMETER GENERATION OPTIONS + +The options supported by each algorithm and indeed each implementation of an +algorithm can vary. The options for the OpenSSL implementations are detailed +below. + +=head2 DSA Parameter Generation Options =over 4 =item B -The number of bits in the generated parameters. If not specified 1024 is used. +The number of bits in the generated prime. If not specified 1024 is used. + +=item B + +The number of bits in the q parameter. Must be one of 160, 224 or 256. If not +specified 160 is used. + +=item B + +The digest to use during parameter generation. Must be one of B, B +or B. If set, then the number of bits in B will match the output size +of the specified digest and the B parameter will be +ignored. If not set, then a digest will be used that gives an output matching +the number of bits in B, i.e. B if q length is 160, B if it 224 +or B if it is 256. =back -=head1 DH PARAMETER GENERATION OPTIONS +=head2 DH Parameter Generation Options =over 4 =item B -The number of bits in the prime parameter B

. +The number of bits in the prime parameter B

. The default is 1024. + +=item B + +The number of bits in the sub prime parameter B. The default is 256 if the +prime is at least 2048 bits long or 160 otherwise. Only relevant if used in +conjunction with the B option to generate X9.42 DH parameters. =item B -The value to use for the generator B. +The value to use for the generator B. The default is 2. + +=item B + +The type of DH parameters to generate. Use 0 for PKCS#3 DH and 1 for X9.42 DH. +The default is 0. =item B -If this option is set then the appropriate RFC5114 parameters are used +If this option is set, then the appropriate RFC5114 parameters are used instead of generating new parameters. The value B can take the values 1, 2 or 3 corresponding to RFC5114 DH parameters consisting of 1024 bit group with 160 bit subgroup, 2048 bit group with 224 bit subgroup and 2048 bit group with 256 bit subgroup as mentioned in RFC5114 sections -2.1, 2.2 and 2.3 respectively. +2.1, 2.2 and 2.3 respectively. If present this overrides all other DH parameter +options. =back -=head1 EC PARAMETER GENERATION OPTIONS - -=over 4 - -=item B - -the EC curve to use. +=head2 EC Parameter Generation Options -=back +The EC parameter generation options are the same as for key generation. See +L above. =head1 GOST2001 KEY GENERATION AND PARAMETER OPTIONS @@ -179,8 +236,6 @@ numeric OID. Following parameter sets are supported: =back - - =head1 NOTES The use of the genpkey program is encouraged over the algorithm specific @@ -202,19 +257,25 @@ Generate a 2048 bit RSA key using 3 as the public exponent: openssl genpkey -algorithm RSA -out key.pem -pkeyopt rsa_keygen_bits:2048 \ -pkeyopt rsa_keygen_pubexp:3 -Generate 1024 bit DSA parameters: +Generate 2048 bit DSA parameters: openssl genpkey -genparam -algorithm DSA -out dsap.pem \ - -pkeyopt dsa_paramgen_bits:1024 + -pkeyopt dsa_paramgen_bits:2048 Generate DSA key from parameters: openssl genpkey -paramfile dsap.pem -out dsakey.pem -Generate 1024 bit DH parameters: +Generate 2048 bit DH parameters: openssl genpkey -genparam -algorithm DH -out dhp.pem \ - -pkeyopt dh_paramgen_prime_len:1024 + -pkeyopt dh_paramgen_prime_len:2048 + +Generate 2048 bit X9.42 DH parameters: + + openssl genpkey -genparam -algorithm DH -out dhpx.pem \ + -pkeyopt dh_paramgen_prime_len:2048 \ + -pkeyopt dh_paramgen_type:1 Output RFC5114 2048 bit DH parameters with 224 bit subgroup: @@ -224,6 +285,16 @@ Generate DH key from parameters: openssl genpkey -paramfile dhp.pem -out dhkey.pem +Generate EC key directly: + + openssl genpkey -algorithm EC -out eckey.pem \ + -pkeyopt ec_paramgen_curve:P-384 \ + -pkeyopt ec_param_enc:named_curve + +=head1 HISTORY + +The ability to use NIST curve names, and to generate an EC key directly, +were added in OpenSSL 1.0.2. =cut From matt at openssl.org Thu Apr 5 16:07:14 2018 From: matt at openssl.org (Matt Caswell) Date: Thu, 05 Apr 2018 16:07:14 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1522944434.958350.16630.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via e6b5cbb45ae6258a5a096e2c3b207f662e97532e (commit) from 0d9967a644502925d95dfe1bdb2364fa8162c258 (commit) - Log ----------------------------------------------------------------- commit e6b5cbb45ae6258a5a096e2c3b207f662e97532e Author: Matt Caswell Date: Wed Apr 4 16:54:33 2018 +0100 Add test/versions to gitignore Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5881) ----------------------------------------------------------------------- Summary of changes: .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 7324bda..3dee392 100644 --- a/.gitignore +++ b/.gitignore @@ -51,6 +51,7 @@ Makefile /test/ssltest_old /test/x509aux /test/v3ext +/test/versions # Certain files that get created by tests on the fly /test/test-runs From rsalz at openssl.org Thu Apr 5 19:23:32 2018 From: rsalz at openssl.org (Rich Salz) Date: Thu, 05 Apr 2018 19:23:32 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1522956212.293643.13547.nullmailer@dev.openssl.org> The branch master has been updated via 7de2b9c4afd90359e47d81a5fa70bcb8506fbf91 (commit) from 77579510aa40aa769ceafc7a0c856381800e79c2 (commit) - Log ----------------------------------------------------------------- commit 7de2b9c4afd90359e47d81a5fa70bcb8506fbf91 Author: Rich Salz Date: Thu Apr 5 15:13:55 2018 -0400 Set error code if alloc returns NULL Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5886) ----------------------------------------------------------------------- Summary of changes: crypto/cmac/cmac.c | 6 ++++-- crypto/cpt_err.c | 10 ++++++++++ crypto/err/openssl.txt | 8 +++++++- crypto/hmac/hm_pmeth.c | 6 ++++-- crypto/modes/ocb128.c | 11 +++++++---- crypto/poly1305/poly1305_pmeth.c | 6 ++++-- crypto/siphash/siphash_pmeth.c | 6 ++++-- crypto/threads_none.c | 7 +++++-- crypto/threads_pthread.c | 14 ++++++++++---- crypto/threads_win.c | 7 +++++-- include/openssl/conferr.h | 2 +- include/openssl/cryptoerr.h | 6 ++++++ 12 files changed, 67 insertions(+), 22 deletions(-) diff --git a/crypto/cmac/cmac.c b/crypto/cmac/cmac.c index 46e3cb7..0c59659 100644 --- a/crypto/cmac/cmac.c +++ b/crypto/cmac/cmac.c @@ -12,6 +12,7 @@ #include #include "internal/cryptlib.h" #include +#include struct CMAC_CTX_st { /* Cipher context to use */ @@ -46,9 +47,10 @@ CMAC_CTX *CMAC_CTX_new(void) { CMAC_CTX *ctx; - ctx = OPENSSL_malloc(sizeof(*ctx)); - if (ctx == NULL) + if ((ctx = OPENSSL_malloc(sizeof(*ctx))) == NULL) { + CRYPTOerr(CRYPTO_F_CMAC_CTX_NEW, ERR_R_MALLOC_FAILURE); return NULL; + } ctx->cctx = EVP_CIPHER_CTX_new(); if (ctx->cctx == NULL) { OPENSSL_free(ctx); diff --git a/crypto/cpt_err.c b/crypto/cpt_err.c index 43426ec..da1004d 100644 --- a/crypto/cpt_err.c +++ b/crypto/cpt_err.c @@ -14,6 +14,7 @@ #ifndef OPENSSL_NO_ERR static const ERR_STRING_DATA CRYPTO_str_functs[] = { + {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_CMAC_CTX_NEW, 0), "CMAC_CTX_new"}, {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_CRYPTO_DUP_EX_DATA, 0), "CRYPTO_dup_ex_data"}, {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_CRYPTO_FREE_EX_DATA, 0), @@ -23,6 +24,10 @@ static const ERR_STRING_DATA CRYPTO_str_functs[] = { {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_CRYPTO_MEMDUP, 0), "CRYPTO_memdup"}, {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_CRYPTO_NEW_EX_DATA, 0), "CRYPTO_new_ex_data"}, + {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_CRYPTO_OCB128_COPY_CTX, 0), + "CRYPTO_ocb128_copy_ctx"}, + {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_CRYPTO_OCB128_INIT, 0), + "CRYPTO_ocb128_init"}, {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_CRYPTO_SET_EX_DATA, 0), "CRYPTO_set_ex_data"}, {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_FIPS_MODE_SET, 0), "FIPS_mode_set"}, @@ -35,6 +40,11 @@ static const ERR_STRING_DATA CRYPTO_str_functs[] = { "OPENSSL_hexstr2buf"}, {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_OPENSSL_INIT_CRYPTO, 0), "OPENSSL_init_crypto"}, + {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_PKEY_HMAC_INIT, 0), "pkey_hmac_init"}, + {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_PKEY_POLY1305_INIT, 0), + "pkey_poly1305_init"}, + {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_PKEY_SIPHASH_INIT, 0), + "pkey_siphash_init"}, {0, NULL} }; diff --git a/crypto/err/openssl.txt b/crypto/err/openssl.txt index d1cc039..b238cd7 100644 --- a/crypto/err/openssl.txt +++ b/crypto/err/openssl.txt @@ -335,13 +335,16 @@ CONF_F_NCONF_LOAD_BIO:110:NCONF_load_bio CONF_F_NCONF_LOAD_FP:114:NCONF_load_fp CONF_F_NCONF_NEW:111:NCONF_new CONF_F_PROCESS_INCLUDE:116:process_include -CONF_F_SSL_MODULE_INIT:122:ssl_module_init +CONF_F_SSL_MODULE_INIT:123:ssl_module_init CONF_F_STR_COPY:101:str_copy +CRYPTO_F_CMAC_CTX_NEW:120:CMAC_CTX_new CRYPTO_F_CRYPTO_DUP_EX_DATA:110:CRYPTO_dup_ex_data CRYPTO_F_CRYPTO_FREE_EX_DATA:111:CRYPTO_free_ex_data CRYPTO_F_CRYPTO_GET_EX_NEW_INDEX:100:CRYPTO_get_ex_new_index CRYPTO_F_CRYPTO_MEMDUP:115:CRYPTO_memdup CRYPTO_F_CRYPTO_NEW_EX_DATA:112:CRYPTO_new_ex_data +CRYPTO_F_CRYPTO_OCB128_COPY_CTX:121:CRYPTO_ocb128_copy_ctx +CRYPTO_F_CRYPTO_OCB128_INIT:122:CRYPTO_ocb128_init CRYPTO_F_CRYPTO_SET_EX_DATA:102:CRYPTO_set_ex_data CRYPTO_F_FIPS_MODE_SET:109:FIPS_mode_set CRYPTO_F_GET_AND_LOCK:113:get_and_lock @@ -350,6 +353,9 @@ CRYPTO_F_OPENSSL_BUF2HEXSTR:117:OPENSSL_buf2hexstr CRYPTO_F_OPENSSL_FOPEN:119:openssl_fopen CRYPTO_F_OPENSSL_HEXSTR2BUF:118:OPENSSL_hexstr2buf CRYPTO_F_OPENSSL_INIT_CRYPTO:116:OPENSSL_init_crypto +CRYPTO_F_PKEY_HMAC_INIT:123:pkey_hmac_init +CRYPTO_F_PKEY_POLY1305_INIT:124:pkey_poly1305_init +CRYPTO_F_PKEY_SIPHASH_INIT:125:pkey_siphash_init CT_F_CTLOG_NEW:117:CTLOG_new CT_F_CTLOG_NEW_FROM_BASE64:118:CTLOG_new_from_base64 CT_F_CTLOG_NEW_FROM_CONF:119:ctlog_new_from_conf diff --git a/crypto/hmac/hm_pmeth.c b/crypto/hmac/hm_pmeth.c index 5b98477..ceca6f7 100644 --- a/crypto/hmac/hm_pmeth.c +++ b/crypto/hmac/hm_pmeth.c @@ -13,6 +13,7 @@ #include #include #include +#include #include "internal/evp_int.h" /* HMAC pkey context structure */ @@ -27,9 +28,10 @@ static int pkey_hmac_init(EVP_PKEY_CTX *ctx) { HMAC_PKEY_CTX *hctx; - hctx = OPENSSL_zalloc(sizeof(*hctx)); - if (hctx == NULL) + if ((hctx = OPENSSL_zalloc(sizeof(*hctx))) == NULL) { + CRYPTOerr(CRYPTO_F_PKEY_HMAC_INIT, ERR_R_MALLOC_FAILURE); return 0; + } hctx->ktmp.type = V_ASN1_OCTET_STRING; hctx->ctx = HMAC_CTX_new(); if (hctx->ctx == NULL) { diff --git a/crypto/modes/ocb128.c b/crypto/modes/ocb128.c index db794d0..350c41f 100644 --- a/crypto/modes/ocb128.c +++ b/crypto/modes/ocb128.c @@ -9,6 +9,7 @@ #include #include +#include #include "modes_lcl.h" #ifndef OPENSSL_NO_OCB @@ -164,9 +165,10 @@ int CRYPTO_ocb128_init(OCB128_CONTEXT *ctx, void *keyenc, void *keydec, memset(ctx, 0, sizeof(*ctx)); ctx->l_index = 0; ctx->max_l_index = 5; - ctx->l = OPENSSL_malloc(ctx->max_l_index * 16); - if (ctx->l == NULL) + if ((ctx->l = OPENSSL_malloc(ctx->max_l_index * 16)) == NULL) { + CRYPTOerr(CRYPTO_F_CRYPTO_OCB128_INIT, ERR_R_MALLOC_FAILURE); return 0; + } /* * We set both the encryption and decryption key schedules - decryption @@ -210,9 +212,10 @@ int CRYPTO_ocb128_copy_ctx(OCB128_CONTEXT *dest, OCB128_CONTEXT *src, if (keydec) dest->keydec = keydec; if (src->l) { - dest->l = OPENSSL_malloc(src->max_l_index * 16); - if (dest->l == NULL) + if ((dest->l = OPENSSL_malloc(src->max_l_index * 16)) == NULL) { + CRYPTOerr(CRYPTO_F_CRYPTO_OCB128_COPY_CTX, ERR_R_MALLOC_FAILURE); return 0; + } memcpy(dest->l, src->l, (src->l_index + 1) * 16); } return 1; diff --git a/crypto/poly1305/poly1305_pmeth.c b/crypto/poly1305/poly1305_pmeth.c index 7bc6add..1459a32 100644 --- a/crypto/poly1305/poly1305_pmeth.c +++ b/crypto/poly1305/poly1305_pmeth.c @@ -12,6 +12,7 @@ #include #include #include +#include #include "internal/poly1305.h" #include "poly1305_local.h" #include "internal/evp_int.h" @@ -27,9 +28,10 @@ static int pkey_poly1305_init(EVP_PKEY_CTX *ctx) { POLY1305_PKEY_CTX *pctx; - pctx = OPENSSL_zalloc(sizeof(*pctx)); - if (pctx == NULL) + if ((pctx = OPENSSL_zalloc(sizeof(*pctx))) == NULL) { + CRYPTOerr(CRYPTO_F_PKEY_POLY1305_INIT, ERR_R_MALLOC_FAILURE); return 0; + } pctx->ktmp.type = V_ASN1_OCTET_STRING; EVP_PKEY_CTX_set_data(ctx, pctx); diff --git a/crypto/siphash/siphash_pmeth.c b/crypto/siphash/siphash_pmeth.c index ae16e55..a5211f2 100644 --- a/crypto/siphash/siphash_pmeth.c +++ b/crypto/siphash/siphash_pmeth.c @@ -12,6 +12,7 @@ #include #include #include +#include #include "internal/siphash.h" #include "siphash_local.h" #include "internal/evp_int.h" @@ -27,9 +28,10 @@ static int pkey_siphash_init(EVP_PKEY_CTX *ctx) { SIPHASH_PKEY_CTX *pctx; - pctx = OPENSSL_zalloc(sizeof(*pctx)); - if (pctx == NULL) + if ((pctx = OPENSSL_zalloc(sizeof(*pctx))) == NULL) { + CRYPTOerr(CRYPTO_F_PKEY_SIPHASH_INIT, ERR_R_MALLOC_FAILURE); return 0; + } pctx->ktmp.type = V_ASN1_OCTET_STRING; EVP_PKEY_CTX_set_data(ctx, pctx); diff --git a/crypto/threads_none.c b/crypto/threads_none.c index 30ed4e6..35c985b 100644 --- a/crypto/threads_none.c +++ b/crypto/threads_none.c @@ -14,9 +14,12 @@ CRYPTO_RWLOCK *CRYPTO_THREAD_lock_new(void) { - CRYPTO_RWLOCK *lock = OPENSSL_zalloc(sizeof(unsigned int)); - if (lock == NULL) + CRYPTO_RWLOCK *lock; + + if ((lock = OPENSSL_zalloc(sizeof(unsigned int))) == NULL) { + /* Don't set error, to avoid recursion blowup. */ return NULL; + } *(unsigned int *)lock = 1; diff --git a/crypto/threads_pthread.c b/crypto/threads_pthread.c index 3aeef21..a2c1707 100644 --- a/crypto/threads_pthread.c +++ b/crypto/threads_pthread.c @@ -19,9 +19,12 @@ CRYPTO_RWLOCK *CRYPTO_THREAD_lock_new(void) { # ifdef USE_RWLOCK - CRYPTO_RWLOCK *lock = OPENSSL_zalloc(sizeof(pthread_rwlock_t)); - if (lock == NULL) + CRYPTO_RWLOCK *lock; + + if ((lock = OPENSSL_zalloc(sizeof(pthread_rwlock_t))) == NULL) { + /* Don't set error, to avoid recursion blowup. */ return NULL; + } if (pthread_rwlock_init(lock, NULL) != 0) { OPENSSL_free(lock); @@ -29,9 +32,12 @@ CRYPTO_RWLOCK *CRYPTO_THREAD_lock_new(void) } # else pthread_mutexattr_t attr; - CRYPTO_RWLOCK *lock = OPENSSL_zalloc(sizeof(pthread_mutex_t)); - if (lock == NULL) + CRYPTO_RWLOCK *lock; + + if ((lock = OPENSSL_zalloc(sizeof(pthread_mutex_t))) == NULL) { + /* Don't set error, to avoid recursion blowup. */ return NULL; + } pthread_mutexattr_init(&attr); pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); diff --git a/crypto/threads_win.c b/crypto/threads_win.c index f222aa5..ad4f5e1 100644 --- a/crypto/threads_win.c +++ b/crypto/threads_win.c @@ -17,9 +17,12 @@ CRYPTO_RWLOCK *CRYPTO_THREAD_lock_new(void) { - CRYPTO_RWLOCK *lock = OPENSSL_zalloc(sizeof(CRITICAL_SECTION)); - if (lock == NULL) + CRYPTO_RWLOCK *lock; + + if ((lock = OPENSSL_zalloc(sizeof(CRITICAL_SECTION))) == NULL) { + /* Don't set error, to avoid recursion blowup. */ return NULL; + } /* 0x400 is the spin count value suggested in the documentation */ if (!InitializeCriticalSectionAndSpinCount(lock, 0x400)) { diff --git a/include/openssl/conferr.h b/include/openssl/conferr.h index e2317d8..4574636 100644 --- a/include/openssl/conferr.h +++ b/include/openssl/conferr.h @@ -40,7 +40,7 @@ int ERR_load_CONF_strings(void); # define CONF_F_NCONF_LOAD_FP 114 # define CONF_F_NCONF_NEW 111 # define CONF_F_PROCESS_INCLUDE 116 -# define CONF_F_SSL_MODULE_INIT 122 +# define CONF_F_SSL_MODULE_INIT 123 # define CONF_F_STR_COPY 101 /* diff --git a/include/openssl/cryptoerr.h b/include/openssl/cryptoerr.h index 63f3f0f..85c1952 100644 --- a/include/openssl/cryptoerr.h +++ b/include/openssl/cryptoerr.h @@ -19,11 +19,14 @@ int ERR_load_CRYPTO_strings(void); /* * CRYPTO function codes. */ +# define CRYPTO_F_CMAC_CTX_NEW 120 # define CRYPTO_F_CRYPTO_DUP_EX_DATA 110 # define CRYPTO_F_CRYPTO_FREE_EX_DATA 111 # define CRYPTO_F_CRYPTO_GET_EX_NEW_INDEX 100 # define CRYPTO_F_CRYPTO_MEMDUP 115 # define CRYPTO_F_CRYPTO_NEW_EX_DATA 112 +# define CRYPTO_F_CRYPTO_OCB128_COPY_CTX 121 +# define CRYPTO_F_CRYPTO_OCB128_INIT 122 # define CRYPTO_F_CRYPTO_SET_EX_DATA 102 # define CRYPTO_F_FIPS_MODE_SET 109 # define CRYPTO_F_GET_AND_LOCK 113 @@ -32,6 +35,9 @@ int ERR_load_CRYPTO_strings(void); # define CRYPTO_F_OPENSSL_FOPEN 119 # define CRYPTO_F_OPENSSL_HEXSTR2BUF 118 # define CRYPTO_F_OPENSSL_INIT_CRYPTO 116 +# define CRYPTO_F_PKEY_HMAC_INIT 123 +# define CRYPTO_F_PKEY_POLY1305_INIT 124 +# define CRYPTO_F_PKEY_SIPHASH_INIT 125 /* * CRYPTO reason codes. From no-reply at appveyor.com Thu Apr 5 21:25:26 2018 From: no-reply at appveyor.com (AppVeyor) Date: Thu, 05 Apr 2018 21:25:26 +0000 Subject: [openssl-commits] Build failed: openssl master.17061 Message-ID: <20180405212526.1.7C53EF700E817819@appveyor.com> An HTML attachment was scrubbed... URL: From rsalz at openssl.org Fri Apr 6 02:57:17 2018 From: rsalz at openssl.org (Rich Salz) Date: Fri, 06 Apr 2018 02:57:17 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1522983437.269982.15797.nullmailer@dev.openssl.org> The branch master has been updated via bbf27cd58337116c57a1c942153330ff83d5540a (commit) from 7de2b9c4afd90359e47d81a5fa70bcb8506fbf91 (commit) - Log ----------------------------------------------------------------- commit bbf27cd58337116c57a1c942153330ff83d5540a Author: Rich Salz Date: Thu Apr 5 22:55:28 2018 -0400 Fix bugs in X509_NAME_ENTRY_set The wrong "set" field was incremented in the wrong place and would create a new RDN, not a multi-valued RDN. RDN inserts would happen after not before. Prepending an entry to an RDN incorrectly created a new RDN Anything which built up an X509_NAME could get a messed-up structure, which would then be "wrong" for anyone using that name. Thanks to Ingo Schwarze for extensive debugging and the initial fix (documented in GitHub issue #5870). Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/5882) ----------------------------------------------------------------------- Summary of changes: crypto/x509/x509name.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/crypto/x509/x509name.c b/crypto/x509/x509name.c index bde5db4..8b08cae 100644 --- a/crypto/x509/x509name.c +++ b/crypto/x509/x509name.c @@ -193,7 +193,7 @@ int X509_NAME_add_entry(X509_NAME *name, const X509_NAME_ENTRY *ne, int loc, loc = n; else if (loc < 0) loc = n; - + inc = (set == 0); name->modified = 1; if (set == -1) { @@ -202,7 +202,6 @@ int X509_NAME_add_entry(X509_NAME *name, const X509_NAME_ENTRY *ne, int loc, inc = 1; } else { set = sk_X509_NAME_ENTRY_value(sk, loc - 1)->set; - inc = 0; } } else { /* if (set >= 0) */ @@ -213,12 +212,11 @@ int X509_NAME_add_entry(X509_NAME *name, const X509_NAME_ENTRY *ne, int loc, set = 0; } else set = sk_X509_NAME_ENTRY_value(sk, loc)->set; - inc = (set == 0) ? 1 : 0; } /* * X509_NAME_ENTRY_dup is ASN1 generated code, that can't be easily - * const'ified; harmless cast as dup() don't modify its input. + * const'ified; harmless cast since dup() don't modify its input. */ if ((new_name = X509_NAME_ENTRY_dup((X509_NAME_ENTRY *)ne)) == NULL) goto err; @@ -230,7 +228,7 @@ int X509_NAME_add_entry(X509_NAME *name, const X509_NAME_ENTRY *ne, int loc, if (inc) { n = sk_X509_NAME_ENTRY_num(sk); for (i = loc + 1; i < n; i++) - sk_X509_NAME_ENTRY_value(sk, i - 1)->set += 1; + sk_X509_NAME_ENTRY_value(sk, i)->set += 1; } return 1; err: From matt at openssl.org Fri Apr 6 09:07:47 2018 From: matt at openssl.org (Matt Caswell) Date: Fri, 06 Apr 2018 09:07:47 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1523005667.501399.22732.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via 6ad8253306f96e1a749d020ddbb131c71aa1edf8 (commit) from e6b5cbb45ae6258a5a096e2c3b207f662e97532e (commit) - Log ----------------------------------------------------------------- commit 6ad8253306f96e1a749d020ddbb131c71aa1edf8 Author: Matt Caswell Date: Fri Apr 6 08:44:58 2018 +0100 Fix an error code to be consistent with master Reviewed-by: Richard Levitte Reviewed-by: Tim Hudson (Merged from https://github.com/openssl/openssl/pull/5892) ----------------------------------------------------------------------- Summary of changes: include/openssl/conf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/openssl/conf.h b/include/openssl/conf.h index 845abf5..f85b40d 100644 --- a/include/openssl/conf.h +++ b/include/openssl/conf.h @@ -191,7 +191,7 @@ int ERR_load_CONF_strings(void); # define CONF_F_NCONF_LOAD_BIO 110 # define CONF_F_NCONF_LOAD_FP 114 # define CONF_F_NCONF_NEW 111 -# define CONF_F_SSL_MODULE_INIT 122 +# define CONF_F_SSL_MODULE_INIT 123 # define CONF_F_STR_COPY 101 /* Reason codes. */ From matt at openssl.org Fri Apr 6 09:13:44 2018 From: matt at openssl.org (Matt Caswell) Date: Fri, 06 Apr 2018 09:13:44 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523006024.609127.28463.nullmailer@dev.openssl.org> The branch master has been updated via e65c959f1fd5469ba96fceb68ce8b7c8d52edb39 (commit) via a6f5b1163452a36da1c8378eab3f29ae234e5c7f (commit) from bbf27cd58337116c57a1c942153330ff83d5540a (commit) - Log ----------------------------------------------------------------- commit e65c959f1fd5469ba96fceb68ce8b7c8d52edb39 Author: Matt Caswell Date: Thu Apr 5 13:03:37 2018 +0100 Add a note and better error if using Ed25519/Ed448 in dgst Fixes #5873 Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5880) commit a6f5b1163452a36da1c8378eab3f29ae234e5c7f Author: Matt Caswell Date: Thu Apr 5 12:33:34 2018 +0100 Support EVP_PKEY_sign() and EVP_PKEY_verify() for EdDSA Adding support for these operations for the EdDSA implementations makes pkeyutl usable for signing/verifying for these algorithms. Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5880) ----------------------------------------------------------------------- Summary of changes: apps/dgst.c | 11 +++++++ crypto/ec/ec_err.c | 2 ++ crypto/ec/ecx_meth.c | 79 ++++++++++++++++++++++++++++++++++++------------- crypto/err/openssl.txt | 2 ++ doc/man1/dgst.pod | 4 ++- include/openssl/ecerr.h | 2 ++ 6 files changed, 79 insertions(+), 21 deletions(-) diff --git a/apps/dgst.c b/apps/dgst.c index 4bf20f3..d158a0c 100644 --- a/apps/dgst.c +++ b/apps/dgst.c @@ -235,6 +235,8 @@ int dgst_main(int argc, char **argv) } if (keyfile != NULL) { + int type; + if (want_pub) sigkey = load_pubkey(keyfile, keyform, 0, NULL, e, "key file"); else @@ -245,6 +247,15 @@ int dgst_main(int argc, char **argv) */ goto end; } + type = EVP_PKEY_id(sigkey); + if (type == EVP_PKEY_ED25519 || type == EVP_PKEY_ED448) { + /* + * We implement PureEdDSA for these which doesn't have a separate + * digest, and only supports one shot. + */ + BIO_printf(bio_err, "Key type not supported for this operation\n"); + goto end; + } } if (mac_name != NULL) { diff --git a/crypto/ec/ec_err.c b/crypto/ec/ec_err.c index 475f4e1..fba986d 100644 --- a/crypto/ec/ec_err.c +++ b/crypto/ec/ec_err.c @@ -249,6 +249,8 @@ static const ERR_STRING_DATA EC_str_functs[] = { "pkey_ecd_digestsign25519"}, {ERR_PACK(ERR_LIB_EC, EC_F_PKEY_ECD_DIGESTSIGN448, 0), "pkey_ecd_digestsign448"}, + {ERR_PACK(ERR_LIB_EC, EC_F_PKEY_ECD_SIGN25519, 0), "pkey_ecd_sign25519"}, + {ERR_PACK(ERR_LIB_EC, EC_F_PKEY_ECD_SIGN448, 0), "pkey_ecd_sign448"}, {ERR_PACK(ERR_LIB_EC, EC_F_PKEY_ECX_DERIVE, 0), "pkey_ecx_derive"}, {ERR_PACK(ERR_LIB_EC, EC_F_PKEY_EC_CTRL, 0), "pkey_ec_ctrl"}, {ERR_PACK(ERR_LIB_EC, EC_F_PKEY_EC_CTRL_STR, 0), "pkey_ec_ctrl_str"}, diff --git a/crypto/ec/ecx_meth.c b/crypto/ec/ecx_meth.c index 4de8876..501daec 100644 --- a/crypto/ec/ecx_meth.c +++ b/crypto/ec/ecx_meth.c @@ -675,18 +675,18 @@ const EVP_PKEY_METHOD ecx448_pkey_meth = { 0 }; -static int pkey_ecd_digestsign25519(EVP_MD_CTX *ctx, unsigned char *sig, - size_t *siglen, const unsigned char *tbs, - size_t tbslen) +static int pkey_ecd_sign25519(EVP_PKEY_CTX *ctx, unsigned char *sig, + size_t *siglen, const unsigned char *tbs, + size_t tbslen) { - const ECX_KEY *edkey = EVP_MD_CTX_pkey_ctx(ctx)->pkey->pkey.ecx; + const ECX_KEY *edkey = ctx->pkey->pkey.ecx; if (sig == NULL) { *siglen = ED25519_SIGSIZE; return 1; } if (*siglen < ED25519_SIGSIZE) { - ECerr(EC_F_PKEY_ECD_DIGESTSIGN25519, EC_R_BUFFER_TOO_SMALL); + ECerr(EC_F_PKEY_ECD_SIGN25519, EC_R_BUFFER_TOO_SMALL); return 0; } @@ -696,18 +696,26 @@ static int pkey_ecd_digestsign25519(EVP_MD_CTX *ctx, unsigned char *sig, return 1; } -static int pkey_ecd_digestsign448(EVP_MD_CTX *ctx, unsigned char *sig, - size_t *siglen, const unsigned char *tbs, - size_t tbslen) +static int pkey_ecd_digestsign25519(EVP_MD_CTX *ctx, unsigned char *sig, + size_t *siglen, const unsigned char *tbs, + size_t tbslen) +{ + return pkey_ecd_sign25519(EVP_MD_CTX_pkey_ctx(ctx), sig, siglen, tbs, + tbslen); +} + +static int pkey_ecd_sign448(EVP_PKEY_CTX *ctx, unsigned char *sig, + size_t *siglen, const unsigned char *tbs, + size_t tbslen) { - const ECX_KEY *edkey = EVP_MD_CTX_pkey_ctx(ctx)->pkey->pkey.ecx; + const ECX_KEY *edkey = ctx->pkey->pkey.ecx; if (sig == NULL) { *siglen = ED448_SIGSIZE; return 1; } if (*siglen < ED448_SIGSIZE) { - ECerr(EC_F_PKEY_ECD_DIGESTSIGN448, EC_R_BUFFER_TOO_SMALL); + ECerr(EC_F_PKEY_ECD_SIGN448, EC_R_BUFFER_TOO_SMALL); return 0; } @@ -718,11 +726,18 @@ static int pkey_ecd_digestsign448(EVP_MD_CTX *ctx, unsigned char *sig, return 1; } -static int pkey_ecd_digestverify25519(EVP_MD_CTX *ctx, const unsigned char *sig, - size_t siglen, const unsigned char *tbs, - size_t tbslen) +static int pkey_ecd_digestsign448(EVP_MD_CTX *ctx, unsigned char *sig, + size_t *siglen, const unsigned char *tbs, + size_t tbslen) +{ + return pkey_ecd_sign448(EVP_MD_CTX_pkey_ctx(ctx), sig, siglen, tbs, tbslen); +} + +static int pkey_ecd_verify25519(EVP_PKEY_CTX *ctx, const unsigned char *sig, + size_t siglen, const unsigned char *tbs, + size_t tbslen) { - const ECX_KEY *edkey = EVP_MD_CTX_pkey_ctx(ctx)->pkey->pkey.ecx; + const ECX_KEY *edkey = ctx->pkey->pkey.ecx; if (siglen != ED25519_SIGSIZE) return 0; @@ -730,11 +745,19 @@ static int pkey_ecd_digestverify25519(EVP_MD_CTX *ctx, const unsigned char *sig, return ED25519_verify(tbs, tbslen, sig, edkey->pubkey); } -static int pkey_ecd_digestverify448(EVP_MD_CTX *ctx, const unsigned char *sig, - size_t siglen, const unsigned char *tbs, - size_t tbslen) +static int pkey_ecd_digestverify25519(EVP_MD_CTX *ctx, const unsigned char *sig, + size_t siglen, const unsigned char *tbs, + size_t tbslen) +{ + return pkey_ecd_verify25519(EVP_MD_CTX_pkey_ctx(ctx), sig, siglen, tbs, + tbslen); +} + +static int pkey_ecd_verify448(EVP_PKEY_CTX *ctx, const unsigned char *sig, + size_t siglen, const unsigned char *tbs, + size_t tbslen) { - const ECX_KEY *edkey = EVP_MD_CTX_pkey_ctx(ctx)->pkey->pkey.ecx; + const ECX_KEY *edkey = ctx->pkey->pkey.ecx; if (siglen != ED448_SIGSIZE) return 0; @@ -742,6 +765,14 @@ static int pkey_ecd_digestverify448(EVP_MD_CTX *ctx, const unsigned char *sig, return ED448_verify(tbs, tbslen, sig, edkey->pubkey, NULL, 0); } +static int pkey_ecd_digestverify448(EVP_MD_CTX *ctx, const unsigned char *sig, + size_t siglen, const unsigned char *tbs, + size_t tbslen) +{ + return pkey_ecd_verify448(EVP_MD_CTX_pkey_ctx(ctx), sig, siglen, tbs, + tbslen); +} + static int pkey_ecd_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2) { switch (type) { @@ -762,7 +793,11 @@ const EVP_PKEY_METHOD ed25519_pkey_meth = { EVP_PKEY_ED25519, EVP_PKEY_FLAG_SIGCTX_CUSTOM, 0, 0, 0, 0, 0, 0, pkey_ecx_keygen, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, + pkey_ecd_sign25519, + 0, + pkey_ecd_verify25519, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, pkey_ecd_ctrl, 0, pkey_ecd_digestsign25519, @@ -773,7 +808,11 @@ const EVP_PKEY_METHOD ed448_pkey_meth = { EVP_PKEY_ED448, EVP_PKEY_FLAG_SIGCTX_CUSTOM, 0, 0, 0, 0, 0, 0, pkey_ecx_keygen, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, + pkey_ecd_sign448, + 0, + pkey_ecd_verify448, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, pkey_ecd_ctrl, 0, pkey_ecd_digestsign448, diff --git a/crypto/err/openssl.txt b/crypto/err/openssl.txt index b238cd7..e134585 100644 --- a/crypto/err/openssl.txt +++ b/crypto/err/openssl.txt @@ -634,6 +634,8 @@ EC_F_PKEY_ECD_CTRL:271:pkey_ecd_ctrl EC_F_PKEY_ECD_DIGESTSIGN:272:pkey_ecd_digestsign EC_F_PKEY_ECD_DIGESTSIGN25519:276:pkey_ecd_digestsign25519 EC_F_PKEY_ECD_DIGESTSIGN448:277:pkey_ecd_digestsign448 +EC_F_PKEY_ECD_SIGN25519:284:pkey_ecd_sign25519 +EC_F_PKEY_ECD_SIGN448:285:pkey_ecd_sign448 EC_F_PKEY_ECX_DERIVE:269:pkey_ecx_derive EC_F_PKEY_EC_CTRL:197:pkey_ec_ctrl EC_F_PKEY_EC_CTRL_STR:198:pkey_ec_ctrl_str diff --git a/doc/man1/dgst.pod b/doc/man1/dgst.pod index 5cad243..3d546f0 100644 --- a/doc/man1/dgst.pod +++ b/doc/man1/dgst.pod @@ -86,7 +86,9 @@ Filename to output to, or standard output by default. =item B<-sign filename> -Digitally sign the digest using the private key in "filename". +Digitally sign the digest using the private key in "filename". Note this option +does not support Ed25519 or Ed448 private keys. Use the B command +instead for this. =item B<-keyform arg> diff --git a/include/openssl/ecerr.h b/include/openssl/ecerr.h index 2bd4ee9..202088d 100644 --- a/include/openssl/ecerr.h +++ b/include/openssl/ecerr.h @@ -172,6 +172,8 @@ int ERR_load_EC_strings(void); # define EC_F_PKEY_ECD_DIGESTSIGN 272 # define EC_F_PKEY_ECD_DIGESTSIGN25519 276 # define EC_F_PKEY_ECD_DIGESTSIGN448 277 +# define EC_F_PKEY_ECD_SIGN25519 284 +# define EC_F_PKEY_ECD_SIGN448 285 # define EC_F_PKEY_ECX_DERIVE 269 # define EC_F_PKEY_EC_CTRL 197 # define EC_F_PKEY_EC_CTRL_STR 198 From osslsanity at gmail.com Fri Apr 6 09:13:49 2018 From: osslsanity at gmail.com (osslsanity at gmail.com) Date: Fri, 6 Apr 2018 09:13:49 +0000 (UTC) Subject: [openssl-commits] Jenkins build is back to normal : master_make_errors #473 In-Reply-To: <711817743.443.1522941229567.JavaMail.jenkins@ip-172-31-34-99> References: <711817743.443.1522941229567.JavaMail.jenkins@ip-172-31-34-99> Message-ID: <491487262.444.1523006029042.JavaMail.jenkins@ip-172-31-34-99> See From rsalz at openssl.org Fri Apr 6 12:38:13 2018 From: rsalz at openssl.org (Rich Salz) Date: Fri, 06 Apr 2018 12:38:13 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1523018293.986908.22025.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via 4bf4b86518297b47af9b160f063e09832c406b51 (commit) from 6ad8253306f96e1a749d020ddbb131c71aa1edf8 (commit) - Log ----------------------------------------------------------------- commit 4bf4b86518297b47af9b160f063e09832c406b51 Author: Neel Goyal Date: Fri Apr 6 08:32:35 2018 -0400 Set biom->type in BIO_METH_new Reviewed-by: Paul Dale Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5812) ----------------------------------------------------------------------- Summary of changes: crypto/bio/bio_meth.c | 1 + 1 file changed, 1 insertion(+) diff --git a/crypto/bio/bio_meth.c b/crypto/bio/bio_meth.c index 1e785d3..d1f3815 100644 --- a/crypto/bio/bio_meth.c +++ b/crypto/bio/bio_meth.c @@ -43,6 +43,7 @@ BIO_METHOD *BIO_meth_new(int type, const char *name) BIOerr(BIO_F_BIO_METH_NEW, ERR_R_MALLOC_FAILURE); return NULL; } + biom->type = type; return biom; } From no-reply at appveyor.com Fri Apr 6 14:07:13 2018 From: no-reply at appveyor.com (AppVeyor) Date: Fri, 06 Apr 2018 14:07:13 +0000 Subject: [openssl-commits] Build failed: openssl master.17076 Message-ID: <20180406140713.1.9DF8EA4AEF4A2CB0@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Fri Apr 6 14:32:48 2018 From: no-reply at appveyor.com (AppVeyor) Date: Fri, 06 Apr 2018 14:32:48 +0000 Subject: [openssl-commits] Build completed: openssl master.17077 Message-ID: <20180406143248.1.2C6FC997BFEBC2C0@appveyor.com> An HTML attachment was scrubbed... URL: From rsalz at openssl.org Fri Apr 6 14:55:31 2018 From: rsalz at openssl.org (Rich Salz) Date: Fri, 06 Apr 2018 14:55:31 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523026531.720438.24023.nullmailer@dev.openssl.org> The branch master has been updated via 69b15002913c1b85b0a9d03e11a6608fb153d6bd (commit) from e65c959f1fd5469ba96fceb68ce8b7c8d52edb39 (commit) - Log ----------------------------------------------------------------- commit 69b15002913c1b85b0a9d03e11a6608fb153d6bd Author: Kaoru Toda Date: Fri Apr 6 08:42:31 2018 -0400 Duplicate code refactored add_attribute_object and add_DN_object have similar code, so move it into a common function build_data. Reviewed-by: Paul Dale Reviewed-by: Ben Kaduk Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/4566) ----------------------------------------------------------------------- Summary of changes: apps/req.c | 106 +++++++++++++++++++++++++------------------------------------ 1 file changed, 43 insertions(+), 63 deletions(-) diff --git a/apps/req.c b/apps/req.c index ac14fdb..4ab636e 100644 --- a/apps/req.c +++ b/apps/req.c @@ -63,6 +63,11 @@ static int add_DN_object(X509_NAME *n, char *text, const char *def, char *value, int nid, int n_min, int n_max, unsigned long chtype, int mval); static int genpkey_cb(EVP_PKEY_CTX *ctx); +static int build_data(char *text, const char *def, + char *value, int n_min, int n_max, + char *buf, const int buf_size, + const char *desc1, const char *desc2 + ); static int req_check_len(int len, int n_min, int n_max); static int check_end(const char *str, const char *end); static int join(char buf[], size_t buf_size, const char *name, @@ -1202,58 +1207,19 @@ static int add_DN_object(X509_NAME *n, char *text, const char *def, char *value, int nid, int n_min, int n_max, unsigned long chtype, int mval) { - int i, ret = 0; + int ret = 0; char buf[1024]; - start: - if (!batch) - BIO_printf(bio_err, "%s [%s]:", text, def); - (void)BIO_flush(bio_err); - if (value != NULL) { - if (!join(buf, sizeof(buf), value, "\n", "DN value")) - return 0; - BIO_printf(bio_err, "%s\n", value); - } else { - buf[0] = '\0'; - if (!batch) { - if (!fgets(buf, sizeof(buf), stdin)) - return 0; - } else { - buf[0] = '\n'; - buf[1] = '\0'; - } - } - if (buf[0] == '\0') - return 0; - if (buf[0] == '\n') { - if ((def == NULL) || (def[0] == '\0')) - return 1; - if (!join(buf, sizeof(buf), def, "\n", "DN default")) - return 0; - } else if ((buf[0] == '.') && (buf[1] == '\n')) { - return 1; - } - - i = strlen(buf); - if (buf[i - 1] != '\n') { - BIO_printf(bio_err, "weird input :-(\n"); - return 0; - } - buf[--i] = '\0'; -#ifdef CHARSET_EBCDIC - ebcdic2ascii(buf, buf, i); -#endif - if (!req_check_len(i, n_min, n_max)) { - if (batch || value) - return 0; - goto start; - } + ret = build_data(text, def, value, n_min, n_max, buf, sizeof(buf), + "DN value", "DN default"); + if ((ret == 0) || (ret == 1)) + return ret; + ret = 1; if (!X509_NAME_add_entry_by_NID(n, nid, chtype, (unsigned char *)buf, -1, -1, mval)) - goto err; - ret = 1; - err: + ret = 0; + return ret; } @@ -1261,21 +1227,45 @@ static int add_attribute_object(X509_REQ *req, char *text, const char *def, char *value, int nid, int n_min, int n_max, unsigned long chtype) { - int i; - static char buf[1024]; + int ret = 0; + char buf[1024]; + + ret = build_data(text, def, value, n_min, n_max, buf, sizeof(buf), + "Attribute value", "Attribute default"); + if ((ret == 0) || (ret == 1)) + return ret; + ret = 1; + + if (!X509_REQ_add1_attr_by_NID(req, nid, chtype, + (unsigned char *)buf, -1)) { + BIO_printf(bio_err, "Error adding attribute\n"); + ERR_print_errors(bio_err); + ret = 0; + } + + return ret; +} + +static int build_data(char *text, const char *def, + char *value, int n_min, int n_max, + char *buf, const int buf_size, + const char *desc1, const char *desc2 + ) +{ + int i; start: if (!batch) BIO_printf(bio_err, "%s [%s]:", text, def); (void)BIO_flush(bio_err); if (value != NULL) { - if (!join(buf, sizeof(buf), value, "\n", "Attribute value")) + if (!join(buf, buf_size, value, "\n", desc1)) return 0; BIO_printf(bio_err, "%s\n", value); } else { buf[0] = '\0'; if (!batch) { - if (!fgets(buf, sizeof(buf), stdin)) + if (!fgets(buf, buf_size, stdin)) return 0; } else { buf[0] = '\n'; @@ -1288,7 +1278,7 @@ static int add_attribute_object(X509_REQ *req, char *text, const char *def, if (buf[0] == '\n') { if ((def == NULL) || (def[0] == '\0')) return 1; - if (!join(buf, sizeof(buf), def, "\n", "Attribute default")) + if (!join(buf, buf_size, def, "\n", desc2)) return 0; } else if ((buf[0] == '.') && (buf[1] == '\n')) { return 1; @@ -1308,17 +1298,7 @@ static int add_attribute_object(X509_REQ *req, char *text, const char *def, return 0; goto start; } - - if (!X509_REQ_add1_attr_by_NID(req, nid, chtype, - (unsigned char *)buf, -1)) { - BIO_printf(bio_err, "Error adding attribute\n"); - ERR_print_errors(bio_err); - goto err; - } - - return 1; - err: - return 0; + return 2; } static int req_check_len(int len, int n_min, int n_max) From no-reply at appveyor.com Fri Apr 6 16:29:07 2018 From: no-reply at appveyor.com (AppVeyor) Date: Fri, 06 Apr 2018 16:29:07 +0000 Subject: [openssl-commits] Build failed: openssl master.17080 Message-ID: <20180406162907.1.3D34298814149C34@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Fri Apr 6 17:16:18 2018 From: no-reply at appveyor.com (AppVeyor) Date: Fri, 06 Apr 2018 17:16:18 +0000 Subject: [openssl-commits] Build completed: openssl master.17081 Message-ID: <20180406171618.1.8C8EF87F6DFB2D3A@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Fri Apr 6 21:39:09 2018 From: no-reply at appveyor.com (AppVeyor) Date: Fri, 06 Apr 2018 21:39:09 +0000 Subject: [openssl-commits] Build failed: openssl master.17084 Message-ID: <20180406213909.1.C155DC93B2962EA7@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Fri Apr 6 22:41:35 2018 From: no-reply at appveyor.com (AppVeyor) Date: Fri, 06 Apr 2018 22:41:35 +0000 Subject: [openssl-commits] Build completed: openssl master.17085 Message-ID: <20180406224135.1.777D071480761C6B@appveyor.com> An HTML attachment was scrubbed... URL: From rsalz at openssl.org Sat Apr 7 17:47:10 2018 From: rsalz at openssl.org (Rich Salz) Date: Sat, 07 Apr 2018 17:47:10 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523123230.495774.17991.nullmailer@dev.openssl.org> The branch master has been updated via 2876872ffe5dd53ec1c446656e924ff463e5d4bf (commit) from 69b15002913c1b85b0a9d03e11a6608fb153d6bd (commit) - Log ----------------------------------------------------------------- commit 2876872ffe5dd53ec1c446656e924ff463e5d4bf Author: Rich Salz Date: Sat Apr 7 13:09:15 2018 -0400 Updated to CONTRIBUTING to reflect GitHub, etc. Reviewed-by: Richard Levitte Reviewed-by: Tim Hudson (Merged from https://github.com/openssl/openssl/pull/5889) ----------------------------------------------------------------------- Summary of changes: CONTRIBUTING | 51 ++++++++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/CONTRIBUTING b/CONTRIBUTING index 08c607a..7654862 100644 --- a/CONTRIBUTING +++ b/CONTRIBUTING @@ -1,26 +1,26 @@ -HOW TO CONTRIBUTE PATCHES TO OpenSSL ------------------------------------- +HOW TO CONTRIBUTE TO OpenSSL +---------------------------- (Please visit https://www.openssl.org/community/getting-started.html for other ideas about how to contribute.) -Development is coordinated on the openssl-dev mailing list (see the -above link or https://mta.openssl.org for information on subscribing). -If you are unsure as to whether a feature will be useful for the general -OpenSSL community you might want to discuss it on the openssl-dev mailing -list first. Someone may be already working on the same thing or there -may be a good reason as to why that feature isn't implemented. +Development is done on GitHub, https://github.com/openssl/openssl. -To submit a patch, make a pull request on GitHub. If you think the patch -could use feedback from the community, please start a thread on openssl-dev -to discuss it. +To request new features or report bugs, please open an issue on GitHub -Having addressed the following items before the PR will help make the -acceptance and review process faster: +To submit a patch, please open a pull request on GitHub. If you are thinking +of making a large contribution, open an issue for it before starting work, +to get comments from the community. Someone may be already working on +the same thing or there may be reasons why that feature isn't implemented. - 1. Anything other than trivial contributions will require a contributor - licensing agreement, giving us permission to use your code. See - https://www.openssl.org/policies/cla.html for details. +To make it easier to review and accept your pull request, please follow these +guidelines: + + 1. Anything other than a trivial contribution requires a Contributor + License Agreement (CLA), giving us permission to use your code. See + https://www.openssl.org/policies/cla.html for details. If your + contribution is too small to require a CLA, put "CLA: trivial" on a + line by itself in your commit message body. 2. All source files should start with the following text (with appropriate comment characters at the start of each line and the @@ -34,21 +34,22 @@ acceptance and review process faster: https://www.openssl.org/source/license.html 3. Patches should be as current as possible; expect to have to rebase - often. We do not accept merge commits; You will be asked to remove - them before a patch is considered acceptable. + often. We do not accept merge commits, you will have to remove them + (usually by rebasing) before it will be acceptable. 4. Patches should follow our coding style (see - https://www.openssl.org/policies/codingstyle.html) and compile without - warnings. Where gcc or clang is available you should use the + https://www.openssl.org/policies/codingstyle.html) and compile + without warnings. Where gcc or clang is available you should use the --strict-warnings Configure option. OpenSSL compiles on many varied - platforms: try to ensure you only use portable features. - Clean builds via Travis and AppVeyor are expected, and done whenever - a PR is created or updated. + platforms: try to ensure you only use portable features. Clean builds + via Travis and AppVeyor are required, and they are started automatically + whenever a PR is created or updated. 5. When at all possible, patches should include tests. These can either be added to an existing test, or completely new. Please see test/README for information on the test framework. 6. New features or changed functionality must include - documentation. Please look at the "pod" files in doc/man[1357] - for examples of our style. + documentation. Please look at the "pod" files in doc/man[1357] for + examples of our style. Run "make doc-nits" to make sure that your + documentation changes are clean. From rsalz at openssl.org Sat Apr 7 17:48:20 2018 From: rsalz at openssl.org (Rich Salz) Date: Sat, 07 Apr 2018 17:48:20 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1523123300.062169.19747.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via facd09a0784d3337bec66987ab0ba6653cd6dd75 (commit) from 4bf4b86518297b47af9b160f063e09832c406b51 (commit) - Log ----------------------------------------------------------------- commit facd09a0784d3337bec66987ab0ba6653cd6dd75 Author: Rich Salz Date: Sat Apr 7 13:09:15 2018 -0400 Updated to CONTRIBUTING to reflect GitHub, etc. Reviewed-by: Richard Levitte Reviewed-by: Tim Hudson (Merged from https://github.com/openssl/openssl/pull/5889) (cherry picked from commit 2876872ffe5dd53ec1c446656e924ff463e5d4bf) ----------------------------------------------------------------------- Summary of changes: CONTRIBUTING | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/CONTRIBUTING b/CONTRIBUTING index 1eebaf3..efcb0b8 100644 --- a/CONTRIBUTING +++ b/CONTRIBUTING @@ -1,26 +1,26 @@ -HOW TO CONTRIBUTE PATCHES TO OpenSSL ------------------------------------- +HOW TO CONTRIBUTE TO OpenSSL +---------------------------- (Please visit https://www.openssl.org/community/getting-started.html for other ideas about how to contribute.) -Development is coordinated on the openssl-dev mailing list (see the -above link or https://mta.openssl.org for information on subscribing). -If you are unsure as to whether a feature will be useful for the general -OpenSSL community you might want to discuss it on the openssl-dev mailing -list first. Someone may be already working on the same thing or there -may be a good reason as to why that feature isn't implemented. +Development is done on GitHub, https://github.com/openssl/openssl. -To submit a patch, make a pull request on GitHub. If you think the patch -could use feedback from the community, please start a thread on openssl-dev -to discuss it. +To request new features or report bugs, please open an issue on GitHub -Having addressed the following items before the PR will help make the -acceptance and review process faster: +To submit a patch, please open a pull request on GitHub. If you are thinking +of making a large contribution, open an issue for it before starting work, +to get comments from the community. Someone may be already working on +the same thing or there may be reasons why that feature isn't implemented. - 1. Anything other than trivial contributions will require a contributor - licensing agreement, giving us permission to use your code. See - https://www.openssl.org/policies/cla.html for details. +To make it easier to review and accept your pull request, please follow these +guidelines: + + 1. Anything other than a trivial contribution requires a Contributor + License Agreement (CLA), giving us permission to use your code. See + https://www.openssl.org/policies/cla.html for details. If your + contribution is too small to require a CLA, put "CLA: trivial" on a + line by itself in your commit message body. 2. All source files should start with the following text (with appropriate comment characters at the start of each line and the @@ -34,21 +34,21 @@ acceptance and review process faster: https://www.openssl.org/source/license.html 3. Patches should be as current as possible; expect to have to rebase - often. We do not accept merge commits; You will be asked to remove - them before a patch is considered acceptable. + often. We do not accept merge commits, you will have to remove them + (usually by rebasing) before it will be acceptable. 4. Patches should follow our coding style (see - https://www.openssl.org/policies/codingstyle.html) and compile without - warnings. Where gcc or clang is available you should use the + https://www.openssl.org/policies/codingstyle.html) and compile + without warnings. Where gcc or clang is available you should use the --strict-warnings Configure option. OpenSSL compiles on many varied - platforms: try to ensure you only use portable features. - Clean builds via Travis and AppVeyor are expected, and done whenever - a PR is created or updated. + platforms: try to ensure you only use portable features. Clean builds + via Travis and AppVeyor are required, and they are started automatically + whenever a PR is created or updated. 5. When at all possible, patches should include tests. These can either be added to an existing test, or completely new. Please see test/README for information on the test framework. 6. New features or changed functionality must include - documentation. Please look at the "pod" files in doc/apps, doc/crypto - and doc/ssl for examples of our style. + documentation. Please look at the "pod" files in doc for + examples of our style. From rsalz at openssl.org Sat Apr 7 17:49:05 2018 From: rsalz at openssl.org (Rich Salz) Date: Sat, 07 Apr 2018 17:49:05 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_0_2-stable update Message-ID: <1523123345.775165.21069.nullmailer@dev.openssl.org> The branch OpenSSL_1_0_2-stable has been updated via 06196e717651fe2c724fb326e31e8d666b27de33 (commit) from 0ac1a7eace815bb4a0597bd43774c2e607288968 (commit) - Log ----------------------------------------------------------------- commit 06196e717651fe2c724fb326e31e8d666b27de33 Author: Rich Salz Date: Sat Apr 7 13:09:15 2018 -0400 Updated to CONTRIBUTING to reflect GitHub, etc. Reviewed-by: Richard Levitte Reviewed-by: Tim Hudson (Merged from https://github.com/openssl/openssl/pull/5889) (cherry picked from commit 2876872ffe5dd53ec1c446656e924ff463e5d4bf) ----------------------------------------------------------------------- Summary of changes: CONTRIBUTING | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/CONTRIBUTING b/CONTRIBUTING index f734d77..efcb0b8 100644 --- a/CONTRIBUTING +++ b/CONTRIBUTING @@ -1,26 +1,26 @@ -HOW TO CONTRIBUTE PATCHES TO OpenSSL ------------------------------------- +HOW TO CONTRIBUTE TO OpenSSL +---------------------------- (Please visit https://www.openssl.org/community/getting-started.html for other ideas about how to contribute.) -Development is coordinated on the openssl-dev mailing list (see the -above link or https://mta.openssl.org for information on subscribing). -If you are unsure as to whether a feature will be useful for the general -OpenSSL community you might want to discuss it on the openssl-dev mailing -list first. Someone may be already working on the same thing or there -may be a good reason as to why that feature isn't implemented. +Development is done on GitHub, https://github.com/openssl/openssl. -To submit a patch, make a pull request on GitHub. If you think the patch -could use feedback from the community, please start a thread on openssl-dev -to discuss it. +To request new features or report bugs, please open an issue on GitHub -Having addressed the following items before the PR will help make the -acceptance and review process faster: +To submit a patch, please open a pull request on GitHub. If you are thinking +of making a large contribution, open an issue for it before starting work, +to get comments from the community. Someone may be already working on +the same thing or there may be reasons why that feature isn't implemented. - 1. Anything other than trivial contributions will require a contributor - licensing agreement, giving us permission to use your code. See - https://www.openssl.org/policies/cla.html for details. +To make it easier to review and accept your pull request, please follow these +guidelines: + + 1. Anything other than a trivial contribution requires a Contributor + License Agreement (CLA), giving us permission to use your code. See + https://www.openssl.org/policies/cla.html for details. If your + contribution is too small to require a CLA, put "CLA: trivial" on a + line by itself in your commit message body. 2. All source files should start with the following text (with appropriate comment characters at the start of each line and the @@ -34,21 +34,21 @@ acceptance and review process faster: https://www.openssl.org/source/license.html 3. Patches should be as current as possible; expect to have to rebase - often. We do not accept merge commits; You will be asked to remove - them before a patch is considered acceptable. + often. We do not accept merge commits, you will have to remove them + (usually by rebasing) before it will be acceptable. 4. Patches should follow our coding style (see - https://www.openssl.org/policies/codingstyle.html) and compile without - warnings. Where gcc or clang is availble you should use the + https://www.openssl.org/policies/codingstyle.html) and compile + without warnings. Where gcc or clang is available you should use the --strict-warnings Configure option. OpenSSL compiles on many varied - platforms: try to ensure you only use portable features. - Clean builds via Travis and AppVeyor are expected, and done whenever - a PR is created or updated. + platforms: try to ensure you only use portable features. Clean builds + via Travis and AppVeyor are required, and they are started automatically + whenever a PR is created or updated. 5. When at all possible, patches should include tests. These can either be added to an existing test, or completely new. Please see test/README for information on the test framework. 6. New features or changed functionality must include - documentation. Please look at the "pod" files in doc/apps, doc/crypto - and doc/ssl for examples of our style. + documentation. Please look at the "pod" files in doc for + examples of our style. From appro at openssl.org Sun Apr 8 09:23:16 2018 From: appro at openssl.org (Andy Polyakov) Date: Sun, 08 Apr 2018 09:23:16 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523179396.444732.12739.nullmailer@dev.openssl.org> The branch master has been updated via 6e301900503f43564029754c799976c89950d33e (commit) via e14795f83bd99b7df6305e411d4b6c52bdd98938 (commit) via f5e3115361f9e6f6407379d6c262b346e32ea25c (commit) from 2876872ffe5dd53ec1c446656e924ff463e5d4bf (commit) - Log ----------------------------------------------------------------- commit 6e301900503f43564029754c799976c89950d33e Author: Andy Polyakov Date: Sat Mar 24 21:05:05 2018 +0100 Configurations/10-main.conf: clean up HP-UX targets and add magic macros. HP-UX provides sockets symbols with incompatible prototypes under same name. This caused problems in 64-bit builds. Additional macros force unambiguous symbols with unambiguous prototypes. Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5742) commit e14795f83bd99b7df6305e411d4b6c52bdd98938 Author: Andy Polyakov Date: Sat Mar 24 20:54:09 2018 +0100 config: fix hpux64-parisc2-gcc detection. hpux64-parisc2-gcc is chosen based on gcc's bitness, and it was overriden unconditionally. Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5742) commit f5e3115361f9e6f6407379d6c262b346e32ea25c Author: Andy Polyakov Date: Sat Mar 24 20:45:43 2018 +0100 test/asn1_time_test.c: make it work on 64-bit HP-UX. HP-UX gmtime fails with ERANGE past 19011213204552Z, so skip some tests. Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5742) ----------------------------------------------------------------------- Summary of changes: Configurations/10-main.conf | 35 +++++++++++++++++++++-------------- config | 11 +++++------ test/asn1_time_test.c | 2 ++ 3 files changed, 28 insertions(+), 20 deletions(-) diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf index 03a53d3..7f1c64d 100644 --- a/Configurations/10-main.conf +++ b/Configurations/10-main.conf @@ -452,14 +452,19 @@ my %targets = ( # targets; b) performance-critical 32-bit assembly modules implement # even PA-RISC 2.0-specific code paths, which are chosen at run-time, # thus adequate performance is provided even with PA-RISC 1.1 build. + "hpux-network" => { + template => 1, + defines => add("_XOPEN_SOURCE", "_XOPEN_SOURCE_EXTENDED", + "_HPUX_ALT_XOPEN_SOCKET_API"), + }, "hpux-parisc-gcc" => { - inherit_from => [ "BASE_unix" ], + inherit_from => [ "BASE_unix", "hpux-network" ], CC => "gcc", CFLAGS => picker(debug => "-O0 -g", release => "-O3"), cflags => add(threads("-pthread")), lib_cppflags => "-DB_ENDIAN -DBN_DIV2W", - ex_libs => add("-Wl,+s -ldld", threads("-pthread")), + ex_libs => add("-ldld", threads("-pthread")), bn_ops => "BN_LLONG", thread_scheme => "pthreads", dso_scheme => "dl", @@ -473,13 +478,14 @@ my %targets = ( multilib => "/pa1.1", }, "hpux64-parisc2-gcc" => { - inherit_from => [ "BASE_unix", asm("parisc20_64_asm") ], + inherit_from => [ "BASE_unix", "hpux-network", + asm("parisc20_64_asm") ], CC => "gcc", CFLAGS => combine(picker(debug => "-O0 -g", release => "-O3")), - cppflags => threads("-D_REENTRANT"), + cflags => add(threads("-pthread")), lib_cppflags => "-DB_ENDIAN", - ex_libs => add("-ldl"), + ex_libs => add("-ldl", threads("-pthread")), bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR", thread_scheme => "pthreads", dso_scheme => "dlfcn", @@ -492,14 +498,14 @@ my %targets = ( # More attempts at unified 10.X and 11.X targets for HP C compiler. "hpux-parisc-cc" => { - inherit_from => [ "BASE_unix" ], + inherit_from => [ "BASE_unix", "hpux-network" ], CC => "cc", CFLAGS => picker(debug => "+O0 +d -g", release => "+O3"), cflags => "+Optrs_strongly_typed -Ae +ESlit", cppflags => threads("-D_REENTRANT"), lib_cppflags => "-DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY", - ex_libs => add("-Wl,+s -ldld",threads("-lpthread")), + ex_libs => add("-ldld", threads("-lpthread")), bn_ops => "RC4_CHAR", thread_scheme => "pthreads", dso_scheme => "dl", @@ -514,14 +520,15 @@ my %targets = ( multilib => "/pa1.1", }, "hpux64-parisc2-cc" => { - inherit_from => [ "BASE_unix", asm("parisc20_64_asm") ], + inherit_from => [ "BASE_unix", "hpux-network", + asm("parisc20_64_asm") ], CC => "cc", CFLAGS => picker(debug => "+O0 +d -g", release => "+O3") , cflags => "+DD64 +Optrs_strongly_typed -Ae +ESlit", cppflags => threads("-D_REENTRANT") , lib_cppflags => "-DB_ENDIAN -DMD32_XARRAY", - ex_libs => add("-ldl",threads("-lpthread")), + ex_libs => add("-ldl", threads("-lpthread")), bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR", thread_scheme => "pthreads", dso_scheme => "dlfcn", @@ -534,14 +541,14 @@ my %targets = ( # HP/UX IA-64 targets "hpux-ia64-cc" => { - inherit_from => [ "BASE_unix", asm("ia64_asm") ], + inherit_from => [ "BASE_unix", "hpux-network", asm("ia64_asm") ], CC => "cc", CFLAGS => picker(debug => "+O0 +d -g", release => "+O2"), cflags => "-Ae +DD32 +Olit=all -z", cppflags => add(threads("-D_REENTRANT")), lib_cppflags => "-DB_ENDIAN", - ex_libs => add("-ldl",threads("-lpthread")), + ex_libs => add("-ldl", threads("-lpthread")), bn_ops => "SIXTY_FOUR_BIT", thread_scheme => "pthreads", dso_scheme => "dlfcn", @@ -552,7 +559,7 @@ my %targets = ( multilib => "/hpux32", }, "hpux64-ia64-cc" => { - inherit_from => [ "BASE_unix", asm("ia64_asm") ], + inherit_from => [ "BASE_unix", "hpux-network", asm("ia64_asm") ], CC => "cc", CFLAGS => picker(debug => "+O0 +d -g", release => "+O3"), @@ -571,7 +578,7 @@ my %targets = ( }, # GCC builds... "hpux-ia64-gcc" => { - inherit_from => [ "BASE_unix", asm("ia64_asm") ], + inherit_from => [ "BASE_unix", "hpux-network", asm("ia64_asm") ], CC => "gcc", CFLAGS => picker(debug => "-O0 -g", release => "-O3"), @@ -588,7 +595,7 @@ my %targets = ( multilib => "/hpux32", }, "hpux64-ia64-gcc" => { - inherit_from => [ "BASE_unix", asm("ia64_asm") ], + inherit_from => [ "BASE_unix", "hpux-network", asm("ia64_asm") ], CC => "gcc", CFLAGS => picker(debug => "-O0 -g", release => "-O3"), diff --git a/config b/config index ce99302..a44cd21 100755 --- a/config +++ b/config @@ -760,7 +760,11 @@ case "$GUESSOS" in OUT="hpux-ia64-cc" fi elif [ $CPU_VERSION -ge 532 ]; then # PA-RISC 2.x CPU - OUT=${OUT:-"hpux-parisc2-${CC}"} + # PA-RISC 2.0 is no longer supported as separate 32-bit + # target. This is compensated for by run-time detection + # in most critical assembly modules and taking advantage + # of 2.0 architecture in PA-RISC 1.1 build. + OUT=${OUT:-"hpux-parisc1_1-${CC}"} if [ $KERNEL_BITS -eq 64 -a "$CC" = "cc" ]; then echo "WARNING! If you wish to build 64-bit library then you have to" echo " invoke '$THERE/Configure hpux64-parisc2-cc' *manually*." @@ -769,11 +773,6 @@ case "$GUESSOS" in (trap "stty `stty -g`; exit 0" 2 0; stty -icanon min 0 time 50; read waste) <&1 fi fi - # PA-RISC 2.0 is no longer supported as separate 32-bit - # target. This is compensated for by run-time detection - # in most critical assembly modules and taking advantage - # of 2.0 architecture in PA-RISC 1.1 build. - OUT="hpux-parisc1_1-${CC}" elif [ $CPU_VERSION -ge 528 ]; then # PA-RISC 1.1+ CPU OUT="hpux-parisc1_1-${CC}" elif [ $CPU_VERSION -ge 523 ]; then # PA-RISC 1.0 CPU diff --git a/test/asn1_time_test.c b/test/asn1_time_test.c index 25105c6..1df630f 100644 --- a/test/asn1_time_test.c +++ b/test/asn1_time_test.c @@ -346,10 +346,12 @@ int setup_tests(void) if (sizeof(time_t) > sizeof(uint32_t)) { TEST_info("Adding 64-bit time_t tests"); ADD_ALL_TESTS(test_table_pos_64bit, OSSL_NELEM(tbl_testdata_pos_64bit)); +#ifndef __hpux if (!(t > 0) && ptm != NULL) { TEST_info("Adding negative-sign 64-bit time_t tests"); ADD_ALL_TESTS(test_table_neg_64bit, OSSL_NELEM(tbl_testdata_neg_64bit)); } +#endif } ADD_ALL_TESTS(test_table_compare, OSSL_NELEM(tbl_compare_testdata)); return 1; From appro at openssl.org Sun Apr 8 09:29:07 2018 From: appro at openssl.org (Andy Polyakov) Date: Sun, 08 Apr 2018 09:29:07 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1523179748.001188.16122.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via da3c4565887f74c711547be6b165d7f27c506bbf (commit) from facd09a0784d3337bec66987ab0ba6653cd6dd75 (commit) - Log ----------------------------------------------------------------- commit da3c4565887f74c711547be6b165d7f27c506bbf Author: Andy Polyakov Date: Tue Apr 3 23:55:51 2018 +0200 Configurations/10-main.conf: add magic macros to hpux targets. HP-UX provides sockets symbols with incompatible prototypes under same names. Additional macros force unambitious symbols with unambitious prototypes. Reviewed-by: Tim Hudson Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/5862) ----------------------------------------------------------------------- Summary of changes: Configurations/10-main.conf | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf index b49f04b..c440a2f 100644 --- a/Configurations/10-main.conf +++ b/Configurations/10-main.conf @@ -428,8 +428,13 @@ sub vms_info { # even PA-RISC 2.0-specific code paths, which are chosen at run-time, # thus adequate performance is provided even with PA-RISC 1.1 build. # + "hpux-network" => { + template => 1, + defines => add("_XOPEN_SOURCE", "_XOPEN_SOURCE_EXTENDED", + "_HPUX_ALT_XOPEN_SOCKET_API"), + }, "hpux-parisc-gcc" => { - inherit_from => [ "BASE_unix" ], + inherit_from => [ "BASE_unix", "hpux-network" ], cc => "gcc", cflags => combine(picker(default => "-DB_ENDIAN -DBN_DIV2W", debug => "-O0 -g", @@ -449,7 +454,8 @@ sub vms_info { multilib => "/pa1.1", }, "hpux64-parisc2-gcc" => { - inherit_from => [ "BASE_unix", asm("parisc20_64_asm") ], + inherit_from => [ "BASE_unix", "hpux-network", + asm("parisc20_64_asm") ], cc => "gcc", cflags => combine(picker(default => "-DB_ENDIAN", debug => "-O0 -g", @@ -471,7 +477,7 @@ sub vms_info { # Chris Ruemmler # Kevin Steves "hpux-parisc-cc" => { - inherit_from => [ "BASE_unix" ], + inherit_from => [ "BASE_unix", "hpux-network" ], cc => "cc", cflags => combine(picker(default => "+Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY", debug => "+O0 +d -g", @@ -492,7 +498,8 @@ sub vms_info { multilib => "/pa1.1", }, "hpux64-parisc2-cc" => { - inherit_from => [ "BASE_unix", asm("parisc20_64_asm") ], + inherit_from => [ "BASE_unix", "hpux-network", + asm("parisc20_64_asm") ], cc => "cc", cflags => combine(picker(default => "+DD64 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY", debug => "+O0 +d -g", @@ -511,7 +518,7 @@ sub vms_info { # HP/UX IA-64 targets "hpux-ia64-cc" => { - inherit_from => [ "BASE_unix", asm("ia64_asm") ], + inherit_from => [ "BASE_unix", "hpux-network", asm("ia64_asm") ], cc => "cc", cflags => combine(picker(default => "-Ae +DD32 +Olit=all -z -DB_ENDIAN", debug => "+O0 +d -g", @@ -530,7 +537,7 @@ sub vms_info { # Frank Geurts has patiently assisted # with debugging of the following config. "hpux64-ia64-cc" => { - inherit_from => [ "BASE_unix", asm("ia64_asm") ], + inherit_from => [ "BASE_unix", "hpux-network", asm("ia64_asm") ], cc => "cc", cflags => combine(picker(default => "-Ae +DD64 +Olit=all -z -DB_ENDIAN", debug => "+O0 +d -g", @@ -548,7 +555,7 @@ sub vms_info { }, # GCC builds... "hpux-ia64-gcc" => { - inherit_from => [ "BASE_unix", asm("ia64_asm") ], + inherit_from => [ "BASE_unix", "hpux-network", asm("ia64_asm") ], cc => "gcc", cflags => combine(picker(default => "-DB_ENDIAN", debug => "-O0 -g", @@ -565,7 +572,7 @@ sub vms_info { multilib => "/hpux32", }, "hpux64-ia64-gcc" => { - inherit_from => [ "BASE_unix", asm("ia64_asm") ], + inherit_from => [ "BASE_unix", "hpux-network", asm("ia64_asm") ], cc => "gcc", cflags => combine(picker(default => "-mlp64 -DB_ENDIAN", debug => "-O0 -g", From appro at openssl.org Sun Apr 8 09:43:36 2018 From: appro at openssl.org (Andy Polyakov) Date: Sun, 08 Apr 2018 09:43:36 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523180616.430140.17883.nullmailer@dev.openssl.org> The branch master has been updated via ceaa389445f9f6b99244bd45041580883b4e8502 (commit) via c53c2fec82b6026331c98642ce4ad32ff7fe4fef (commit) via f69d050ee344e931aea4102f09bb0134a4f4c12a (commit) via dcf3d83faf3542b984d5586bdb1d50c90137a29d (commit) via 55fd5d3fc5f7df2bbbdc11caa14a33da383cf65b (commit) from 6e301900503f43564029754c799976c89950d33e (commit) - Log ----------------------------------------------------------------- commit ceaa389445f9f6b99244bd45041580883b4e8502 Author: Andy Polyakov Date: Fri Apr 6 11:44:38 2018 +0200 TLSProxy/Record.pm: remove dead condition and improve readability. Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5887) commit c53c2fec82b6026331c98642ce4ad32ff7fe4fef Author: Andy Polyakov Date: Fri Apr 6 11:33:16 2018 +0200 TLSProxy/Proxy.pm: refine partial packet handling. Original logic was "if no records found *or* last one is truncated, then leave complete records in queue." Trouble is that if we don't pass on complete records and get complete packet in opposite direction, then queued records will go back to sender. In other words complete records should always be passed on. [Possible alternative would be to match direction in reconstruct_record.] Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5887) commit f69d050ee344e931aea4102f09bb0134a4f4c12a Author: Andy Polyakov Date: Thu Apr 5 19:19:35 2018 +0200 apps/{s_client.c|s_socket}.c: omit usleep calls. Even though removed calls were oiriginally added on Windows, problem they tried to mitigate is not Windows-specific. Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5887) commit dcf3d83faf3542b984d5586bdb1d50c90137a29d Author: Andy Polyakov Date: Thu Apr 5 18:59:36 2018 +0200 apps/s_socket.c: disable the Nagle algorithm. Without TCP_NODELAY alerts risk to be dropped between shutdown and close. Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5887) commit 55fd5d3fc5f7df2bbbdc11caa14a33da383cf65b Author: Andy Polyakov Date: Thu Apr 5 18:56:52 2018 +0200 TLSProxy/Proxy.pm: harmonize inner loop with the way sockets are. Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5887) ----------------------------------------------------------------------- Summary of changes: apps/s_client.c | 26 +++++------ apps/s_socket.c | 16 +------ util/perl/TLSProxy/Proxy.pm | 34 ++++++++++----- util/perl/TLSProxy/Record.pm | 102 +++++++++++++++++++------------------------ 4 files changed, 83 insertions(+), 95 deletions(-) diff --git a/apps/s_client.c b/apps/s_client.c index ce7366f..89cddb3 100644 --- a/apps/s_client.c +++ b/apps/s_client.c @@ -3051,19 +3051,6 @@ int s_client_main(int argc, char **argv) do_ssl_shutdown(con); /* - * Give the socket time to send its last data before we close it. - * No amount of setting SO_LINGER etc on the socket seems to persuade - * Windows to send the data before closing the socket...but sleeping - * for a short time seems to do it (units in ms) - * TODO: Find a better way to do this - */ -#if defined(OPENSSL_SYS_WINDOWS) - Sleep(50); -#elif defined(OPENSSL_SYS_CYGWIN) - usleep(50000); -#endif - - /* * If we ended with an alert being sent, but still with data in the * network buffer to be read, then calling BIO_closesocket() will * result in a TCP-RST being sent. On some platforms (notably @@ -3074,6 +3061,19 @@ int s_client_main(int argc, char **argv) * TCP-RST. This seems to allow the peer to read the alert data. */ shutdown(SSL_get_fd(con), 1); /* SHUT_WR */ + /* + * We just said we have nothing else to say, but it doesn't mean that + * the other side has nothing. It's even recommended to consume incoming + * data. [In testing context this ensures that alerts are passed on...] + */ + timeout.tv_sec = 0; + timeout.tv_usec = 500000; /* some extreme round-trip */ + do { + FD_ZERO(&readfds); + openssl_fdset(s, &readfds); + } while (select(s + 1, &readfds, NULL, NULL, &timeout) > 0 + && BIO_read(sbio, sbuf, BUFSIZZ) > 0); + BIO_closesocket(SSL_get_fd(con)); end: if (con != NULL) { diff --git a/apps/s_socket.c b/apps/s_socket.c index e3cfda9..ae62a13 100644 --- a/apps/s_socket.c +++ b/apps/s_socket.c @@ -146,7 +146,7 @@ int init_client(int *sock, const char *host, const char *port, } #endif - if (!BIO_connect(*sock, BIO_ADDRINFO_address(ai), 0)) { + if (!BIO_connect(*sock, BIO_ADDRINFO_address(ai), BIO_SOCK_NODELAY)) { BIO_closesocket(*sock); *sock = INVALID_SOCKET; continue; @@ -330,22 +330,10 @@ int do_server(int *accept_sock, const char *host, const char *port, BIO_closesocket(asock); break; } + BIO_set_tcp_ndelay(sock, 1); i = (*cb)(sock, type, protocol, context); /* - * Give the socket time to send its last data before we close it. - * No amount of setting SO_LINGER etc on the socket seems to - * persuade Windows to send the data before closing the socket... - * but sleeping for a short time seems to do it (units in ms) - * TODO: Find a better way to do this - */ -#if defined(OPENSSL_SYS_WINDOWS) - Sleep(50); -#elif defined(OPENSSL_SYS_CYGWIN) - usleep(50000); -#endif - - /* * If we ended with an alert being sent, but still with data in the * network buffer to be read, then calling BIO_closesocket() will * result in a TCP-RST being sent. On some platforms (notably diff --git a/util/perl/TLSProxy/Proxy.pm b/util/perl/TLSProxy/Proxy.pm index c20b556..b3b2fec 100644 --- a/util/perl/TLSProxy/Proxy.pm +++ b/util/perl/TLSProxy/Proxy.pm @@ -356,7 +356,8 @@ sub clientstart my @ready; my $ctr = 0; local $SIG{PIPE} = "IGNORE"; - while( (!(TLSProxy::Message->end) + while($fdset->count + && (!(TLSProxy::Message->end) || (defined $self->sessionfile() && (-s $self->sessionfile()) == 0)) && $ctr < 10) { @@ -366,15 +367,25 @@ sub clientstart } foreach my $hand (@ready) { if ($hand == $server_sock) { - $server_sock->sysread($indata, 16384) or goto END; - $indata = $self->process_packet(1, $indata); - $client_sock->syswrite($indata); - $ctr = 0; + if ($server_sock->sysread($indata, 16384)) { + if ($indata = $self->process_packet(1, $indata)) { + $client_sock->syswrite($indata) or goto END; + } + $ctr = 0; + } else { + $fdset->remove($server_sock); + $client_sock->shutdown(SHUT_WR); + } } elsif ($hand == $client_sock) { - $client_sock->sysread($indata, 16384) or goto END; - $indata = $self->process_packet(0, $indata); - $server_sock->syswrite($indata); - $ctr = 0; + if ($client_sock->sysread($indata, 16384)) { + if ($indata = $self->process_packet(0, $indata)) { + $server_sock->syswrite($indata) or goto END; + } + $ctr = 0; + } else { + $fdset->remove($client_sock); + $server_sock->shutdown(SHUT_WR); + } } else { kill(3, $self->{real_serverpid}); die "Unexpected handle"; @@ -445,14 +456,15 @@ sub process_packet #Return contains the list of record found in the packet followed by the #list of messages in those records and any partial message - my @ret = TLSProxy::Record->get_records($server, $self->flight, $self->{partial}[$server].$packet); + my @ret = TLSProxy::Record->get_records($server, $self->flight, + $self->{partial}[$server].$packet); $self->{partial}[$server] = $ret[2]; push @{$self->{record_list}}, @{$ret[0]}; push @{$self->{message_list}}, @{$ret[1]}; print "\n"; - if (scalar(@{$ret[0]}) == 0 or length($ret[2]) != 0) { + if (scalar(@{$ret[0]}) == 0) { return ""; } diff --git a/util/perl/TLSProxy/Record.pm b/util/perl/TLSProxy/Record.pm index 624d31c..acace36 100644 --- a/util/perl/TLSProxy/Record.pm +++ b/util/perl/TLSProxy/Record.pm @@ -64,12 +64,6 @@ sub get_records my $partial = ""; my @record_list = (); my @message_list = (); - my $data; - my $content_type; - my $version; - my $len; - my $len_real; - my $decrypt_len; my $recnum = 1; while (length ($packet) > 0) { @@ -79,65 +73,59 @@ sub get_records } else { print " (client -> server)\n"; } - #Get the record header - if (length($packet) < TLS_RECORD_HEADER_LENGTH - || length($packet) < 5 + unpack("n", substr($packet, 3, 2))) { + + #Get the record header (unpack can't fail if $packet is too short) + my ($content_type, $version, $len) = unpack('Cnn', $packet); + + if (length($packet) < TLS_RECORD_HEADER_LENGTH + $len) { print "Partial data : ".length($packet)." bytes\n"; $partial = $packet; - $packet = ""; - } else { - ($content_type, $version, $len) = unpack('CnnC*', $packet); - $data = substr($packet, 5, $len); - - print " Content type: ".$record_type{$content_type}."\n"; - print " Version: $tls_version{$version}\n"; - print " Length: $len"; - if ($len == length($data)) { - print "\n"; - $decrypt_len = $len_real = $len; - } else { - print " (expected), ".length($data)." (actual)\n"; - $decrypt_len = $len_real = length($data); - } + last; + } + + my $data = substr($packet, TLS_RECORD_HEADER_LENGTH, $len); + + print " Content type: ".$record_type{$content_type}."\n"; + print " Version: $tls_version{$version}\n"; + print " Length: $len\n"; + + my $record = TLSProxy::Record->new( + $flight, + $content_type, + $version, + $len, + 0, + $len, # len_real + $len, # decrypt_len + $data, # data + $data # decrypt_data + ); + + if ($content_type != RT_CCS) { + if (($server && $server_encrypting) + || (!$server && $client_encrypting)) { + if (!TLSProxy::Proxy->is_tls13() && $etm) { + $record->decryptETM(); + } else { + $record->decrypt(); + } + $record->encrypted(1); - my $record = TLSProxy::Record->new( - $flight, - $content_type, - $version, - $len, - 0, - $len_real, - $decrypt_len, - substr($packet, TLS_RECORD_HEADER_LENGTH, $len_real), - substr($packet, TLS_RECORD_HEADER_LENGTH, $len_real) - ); - - if ($content_type != RT_CCS) { - if (($server && $server_encrypting) - || (!$server && $client_encrypting)) { - if (!TLSProxy::Proxy->is_tls13() && $etm) { - $record->decryptETM(); - } else { - $record->decrypt(); - } - $record->encrypted(1); - - if (TLSProxy::Proxy->is_tls13()) { - print " Inner content type: " - .$record_type{$record->content_type()}."\n"; - } + if (TLSProxy::Proxy->is_tls13()) { + print " Inner content type: " + .$record_type{$record->content_type()}."\n"; } } + } - push @record_list, $record; + push @record_list, $record; - #Now figure out what messages are contained within this record - my @messages = TLSProxy::Message->get_messages($server, $record); - push @message_list, @messages; + #Now figure out what messages are contained within this record + my @messages = TLSProxy::Message->get_messages($server, $record); + push @message_list, @messages; - $packet = substr($packet, TLS_RECORD_HEADER_LENGTH + $len_real); - $recnum++; - } + $packet = substr($packet, TLS_RECORD_HEADER_LENGTH + $len); + $recnum++; } return (\@record_list, \@message_list, $partial); From no-reply at appveyor.com Sun Apr 8 10:52:38 2018 From: no-reply at appveyor.com (AppVeyor) Date: Sun, 08 Apr 2018 10:52:38 +0000 Subject: [openssl-commits] Build failed: openssl master.17099 Message-ID: <20180408105238.1.8CC4ED872DA85C9B@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Sun Apr 8 12:26:44 2018 From: no-reply at appveyor.com (AppVeyor) Date: Sun, 08 Apr 2018 12:26:44 +0000 Subject: [openssl-commits] Build completed: openssl master.17100 Message-ID: <20180408122644.1.61CFE811190A6C48@appveyor.com> An HTML attachment was scrubbed... URL: From bernd.edlinger at hotmail.de Sun Apr 8 15:20:35 2018 From: bernd.edlinger at hotmail.de (bernd.edlinger at hotmail.de) Date: Sun, 08 Apr 2018 15:20:35 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523200835.074569.10120.nullmailer@dev.openssl.org> The branch master has been updated via 5283e19f11f06d26bc92c6351cbb61324ffb3dfc (commit) from ceaa389445f9f6b99244bd45041580883b4e8502 (commit) - Log ----------------------------------------------------------------- commit 5283e19f11f06d26bc92c6351cbb61324ffb3dfc Author: Bernd Edlinger Date: Fri Apr 6 17:46:27 2018 +0200 Fix the build_all_generated rule to include generated .map, .def and .opt files Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5900) ----------------------------------------------------------------------- Summary of changes: Configurations/descrip.mms.tmpl | 2 +- Configurations/unix-Makefile.tmpl | 2 +- Configurations/windows-makefile.tmpl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Configurations/descrip.mms.tmpl b/Configurations/descrip.mms.tmpl index f6061f1..029ba57 100644 --- a/Configurations/descrip.mms.tmpl +++ b/Configurations/descrip.mms.tmpl @@ -59,7 +59,7 @@ grep { defined $unified_info{generate}->{$_} } map { @{$unified_info{sources}->{$_}} } grep { /\.o$/ } keys %{$unified_info{sources}} ), - ( grep { /\.h$/ } keys %{$unified_info{generate}} ) ); + ( grep { /\.(?:h|opt)$/ } keys %{$unified_info{generate}} ) ); # This is a horrible hack, but is needed because recursive inclusion of files # in different directories does not work well with HP C. diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl index caf2783..62fd5e7 100644 --- a/Configurations/unix-Makefile.tmpl +++ b/Configurations/unix-Makefile.tmpl @@ -111,7 +111,7 @@ GENERATED={- join(" ", ( grep { defined $unified_info{generate}->{$_} } map { @{$unified_info{sources}->{$_}} } grep { /\.(?:o|res)$/ } keys %{$unified_info{sources}} ), - ( grep { /\.h$/ } keys %{$unified_info{generate}} )) -} + ( grep { /\.(?:h|map|def)$/ } keys %{$unified_info{generate}} )) -} INSTALL_LIBS={- join(" ", map { lib($_) } @{$unified_info{install}->{libraries}}) -} INSTALL_SHLIBS={- join(" ", map { shlib($_) } @{$unified_info{install}->{libraries}}) -} diff --git a/Configurations/windows-makefile.tmpl b/Configurations/windows-makefile.tmpl index e9179a4..5d767f7 100644 --- a/Configurations/windows-makefile.tmpl +++ b/Configurations/windows-makefile.tmpl @@ -93,7 +93,7 @@ GENERATED={- join(" ", grep { defined $unified_info{generate}->{$_} } map { @{$unified_info{sources}->{$_}} } grep { /\.o$/ } keys %{$unified_info{sources}} ), - ( grep { /\.h$/ } keys %{$unified_info{generate}} )) -} + ( grep { /\.(?:h|def)$/ } keys %{$unified_info{generate}} )) -} INSTALL_LIBS={- join(" ", map { lib($_) } @{$unified_info{install}->{libraries}}) -} INSTALL_SHLIBS={- join(" ", map { shlib($_) } @{$unified_info{install}->{libraries}}) -} From matthias.st.pierre at ncp-e.com Sun Apr 8 18:13:22 2018 From: matthias.st.pierre at ncp-e.com (matthias.st.pierre at ncp-e.com) Date: Sun, 08 Apr 2018 18:13:22 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523211202.727371.20639.nullmailer@dev.openssl.org> The branch master has been updated via a9b7a06ed8e6d70bf7caa778838d7a869a17db78 (commit) from 5283e19f11f06d26bc92c6351cbb61324ffb3dfc (commit) - Log ----------------------------------------------------------------- commit a9b7a06ed8e6d70bf7caa778838d7a869a17db78 Author: Dr. Matthias St. Pierre Date: Mon Apr 2 22:37:30 2018 +0200 Fix false positives of IS_*() macros for 8-bit ASCII characters Fixes #5778, #5840 The various IS_*() macros did not work correctly for 8-bit ASCII characters with the high bit set, because the CVT(a) preprocessor macro and'ed the given ASCII value with 0x7F, effectively folding the high value range 128-255 over the low value range 0-127. As a consequence, some of the IS_*() erroneously returned TRUE. This commit fixes the issue by adding range checks instead of cutting off high order bits using a mask. In order avoid multiple evaluation of macro arguments, most of the implementation was moved from macros into a static function is_keytype(). Thanks to ????? ?????? for reporting and analyzing the UTF-8 parsing issue #5840. Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5903) ----------------------------------------------------------------------- Summary of changes: crypto/conf/conf_def.c | 25 +++++++++++++++++++++++++ crypto/conf/conf_def.h | 27 ++++++++++----------------- crypto/conf/keysets.pl | 27 ++++++++++----------------- 3 files changed, 45 insertions(+), 34 deletions(-) diff --git a/crypto/conf/conf_def.c b/crypto/conf/conf_def.c index 05ba1c9..aa9f2fa 100644 --- a/crypto/conf/conf_def.c +++ b/crypto/conf/conf_def.c @@ -33,6 +33,7 @@ */ #define MAX_CONF_VALUE_LENGTH 65536 +static int is_keytype(const CONF *conf, char c, unsigned short type); static char *eat_ws(CONF *conf, char *p); static void trim_ws(CONF *conf, char *start); static char *eat_alpha_numeric(CONF *conf, char *p); @@ -732,6 +733,30 @@ static BIO *get_next_file(const char *path, OPENSSL_DIR_CTX **dirctx) } #endif +static int is_keytype(const CONF *conf, char c, unsigned short type) +{ + const unsigned short * keytypes = (const unsigned short *) conf->meth_data; + unsigned char key = (unsigned char)c; + +#ifdef CHARSET_EBCDIC +# if CHAR_BIT > 8 + if (key > 255) { + /* key is out of range for os_toascii table */ + return 0; + } +# endif + /* convert key from ebcdic to ascii */ + key = os_toascii[key]; +#endif + + if (key > 127) { + /* key is not a seven bit ascii character */ + return 0; + } + + return (keytypes[key] & type) ? 1 : 0; +} + static char *eat_ws(CONF *conf, char *p) { while (IS_WS(conf, *p) && (!IS_EOF(conf, *p))) diff --git a/crypto/conf/conf_def.h b/crypto/conf/conf_def.h index aa14d4a..73e88ba 100644 --- a/crypto/conf/conf_def.h +++ b/crypto/conf/conf_def.h @@ -25,24 +25,17 @@ #define CONF_ALNUM (CONF_ALPHA|CONF_NUMBER|CONF_UNDER) #define CONF_ALNUM_PUNCT (CONF_ALPHA|CONF_NUMBER|CONF_UNDER|CONF_PUNCT) -#define KEYTYPES(c) ((const unsigned short *)((c)->meth_data)) -#ifndef CHARSET_EBCDIC -# define CVT(a) ((a) & 0x7F) -#else -# define CVT(a) os_toascci[(a) & 0x7F] -#endif - -#define IS_COMMENT(c,a) (KEYTYPES(c)[CVT(a)] & CONF_COMMENT) -#define IS_FCOMMENT(c,a) (KEYTYPES(c)[CVT(a)] & CONF_FCOMMENT) -#define IS_EOF(c,a) (KEYTYPES(c)[CVT(a)] & CONF_EOF) -#define IS_ESC(c,a) (KEYTYPES(c)[CVT(a)] & CONF_ESC) -#define IS_NUMBER(c,a) (KEYTYPES(c)[CVT(a)] & CONF_NUMBER) -#define IS_WS(c,a) (KEYTYPES(c)[CVT(a)] & CONF_WS) -#define IS_ALNUM(c,a) (KEYTYPES(c)[CVT(a)] & CONF_ALNUM) -#define IS_ALNUM_PUNCT(c,a) (KEYTYPES(c)[CVT(a)] & CONF_ALNUM_PUNCT) -#define IS_QUOTE(c,a) (KEYTYPES(c)[CVT(a)] & CONF_QUOTE) -#define IS_DQUOTE(c,a) (KEYTYPES(c)[CVT(a)] & CONF_DQUOTE) +#define IS_COMMENT(conf,c) is_keytype(conf, c, CONF_COMMENT) +#define IS_FCOMMENT(conf,c) is_keytype(conf, c, CONF_FCOMMENT) +#define IS_EOF(conf,c) is_keytype(conf, c, CONF_EOF) +#define IS_ESC(conf,c) is_keytype(conf, c, CONF_ESC) +#define IS_NUMBER(conf,c) is_keytype(conf, c, CONF_NUMBER) +#define IS_WS(conf,c) is_keytype(conf, c, CONF_WS) +#define IS_ALNUM(conf,c) is_keytype(conf, c, CONF_ALNUM) +#define IS_ALNUM_PUNCT(conf,c) is_keytype(conf, c, CONF_ALNUM_PUNCT) +#define IS_QUOTE(conf,c) is_keytype(conf, c, CONF_QUOTE) +#define IS_DQUOTE(conf,c) is_keytype(conf, c, CONF_DQUOTE) static const unsigned short CONF_type_default[128] = { 0x0008, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, diff --git a/crypto/conf/keysets.pl b/crypto/conf/keysets.pl index e2af26c..cfa230e 100644 --- a/crypto/conf/keysets.pl +++ b/crypto/conf/keysets.pl @@ -85,24 +85,17 @@ print <<"EOF"; #define CONF_ALNUM (CONF_ALPHA|CONF_NUMBER|CONF_UNDER) #define CONF_ALNUM_PUNCT (CONF_ALPHA|CONF_NUMBER|CONF_UNDER|CONF_PUNCT) -#define KEYTYPES(c) ((const unsigned short *)((c)->meth_data)) -#ifndef CHARSET_EBCDIC -# define CVT(a) ((a) & 0x7F) -#else -# define CVT(a) os_toascci[(a) & 0x7F] -#endif - -#define IS_COMMENT(c,a) (KEYTYPES(c)[CVT(a)] & CONF_COMMENT) -#define IS_FCOMMENT(c,a) (KEYTYPES(c)[CVT(a)] & CONF_FCOMMENT) -#define IS_EOF(c,a) (KEYTYPES(c)[CVT(a)] & CONF_EOF) -#define IS_ESC(c,a) (KEYTYPES(c)[CVT(a)] & CONF_ESC) -#define IS_NUMBER(c,a) (KEYTYPES(c)[CVT(a)] & CONF_NUMBER) -#define IS_WS(c,a) (KEYTYPES(c)[CVT(a)] & CONF_WS) -#define IS_ALNUM(c,a) (KEYTYPES(c)[CVT(a)] & CONF_ALNUM) -#define IS_ALNUM_PUNCT(c,a) (KEYTYPES(c)[CVT(a)] & CONF_ALNUM_PUNCT) -#define IS_QUOTE(c,a) (KEYTYPES(c)[CVT(a)] & CONF_QUOTE) -#define IS_DQUOTE(c,a) (KEYTYPES(c)[CVT(a)] & CONF_DQUOTE) +#define IS_COMMENT(conf,c) is_keytype(conf, c, CONF_COMMENT) +#define IS_FCOMMENT(conf,c) is_keytype(conf, c, CONF_FCOMMENT) +#define IS_EOF(conf,c) is_keytype(conf, c, CONF_EOF) +#define IS_ESC(conf,c) is_keytype(conf, c, CONF_ESC) +#define IS_NUMBER(conf,c) is_keytype(conf, c, CONF_NUMBER) +#define IS_WS(conf,c) is_keytype(conf, c, CONF_WS) +#define IS_ALNUM(conf,c) is_keytype(conf, c, CONF_ALNUM) +#define IS_ALNUM_PUNCT(conf,c) is_keytype(conf, c, CONF_ALNUM_PUNCT) +#define IS_QUOTE(conf,c) is_keytype(conf, c, CONF_QUOTE) +#define IS_DQUOTE(conf,c) is_keytype(conf, c, CONF_DQUOTE) EOF From no-reply at appveyor.com Sun Apr 8 19:22:57 2018 From: no-reply at appveyor.com (AppVeyor) Date: Sun, 08 Apr 2018 19:22:57 +0000 Subject: [openssl-commits] Build failed: openssl master.17110 Message-ID: <20180408192257.1.D03443A4989ACC67@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Sun Apr 8 19:56:03 2018 From: no-reply at appveyor.com (AppVeyor) Date: Sun, 08 Apr 2018 19:56:03 +0000 Subject: [openssl-commits] Build failed: openssl master.17111 Message-ID: <20180408195603.1.E18428D02D0C749D@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Sun Apr 8 22:09:05 2018 From: no-reply at appveyor.com (AppVeyor) Date: Sun, 08 Apr 2018 22:09:05 +0000 Subject: [openssl-commits] Build failed: openssl master.17115 Message-ID: <20180408220905.1.1C5571BF7E0F0E8F@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Sun Apr 8 22:30:19 2018 From: no-reply at appveyor.com (AppVeyor) Date: Sun, 08 Apr 2018 22:30:19 +0000 Subject: [openssl-commits] Build completed: openssl master.17116 Message-ID: <20180408223019.1.83771434E111E0D7@appveyor.com> An HTML attachment was scrubbed... URL: From rsalz at openssl.org Mon Apr 9 12:40:42 2018 From: rsalz at openssl.org (Rich Salz) Date: Mon, 09 Apr 2018 12:40:42 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523277642.513000.12707.nullmailer@dev.openssl.org> The branch master has been updated via eb8e052c4b43551f205b328e3a6568309c9e042e (commit) from a9b7a06ed8e6d70bf7caa778838d7a869a17db78 (commit) - Log ----------------------------------------------------------------- commit eb8e052c4b43551f205b328e3a6568309c9e042e Author: Kunxian Xia Date: Mon Apr 9 08:38:51 2018 -0400 Correct the equation for Y' in the comment of point_double function CLA: trivial Reviewed-by: Matt Caswell Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5908) ----------------------------------------------------------------------- Summary of changes: crypto/ec/ecp_nistp224.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/ec/ecp_nistp224.c b/crypto/ec/ecp_nistp224.c index 346f84d..5b8da3f 100644 --- a/crypto/ec/ecp_nistp224.c +++ b/crypto/ec/ecp_nistp224.c @@ -813,7 +813,7 @@ static void copy_conditional(felem out, const felem in, limb icopy) * Double an elliptic curve point: * (X', Y', Z') = 2 * (X, Y, Z), where * X' = (3 * (X - Z^2) * (X + Z^2))^2 - 8 * X * Y^2 - * Y' = 3 * (X - Z^2) * (X + Z^2) * (4 * X * Y^2 - X') - 8 * Y^2 + * Y' = 3 * (X - Z^2) * (X + Z^2) * (4 * X * Y^2 - X') - 8 * Y^4 * Z' = (Y + Z)^2 - Y^2 - Z^2 = 2 * Y * Z * Outputs can equal corresponding inputs, i.e., x_out == x_in is allowed, * while x_out == y_in is not (maybe this works, but it's not tested). From appro at openssl.org Mon Apr 9 19:52:31 2018 From: appro at openssl.org (Andy Polyakov) Date: Mon, 09 Apr 2018 19:52:31 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523303551.738979.17062.nullmailer@dev.openssl.org> The branch master has been updated via 3c3badcf42a7aa7fe6ed84c943808d1d769abd14 (commit) from eb8e052c4b43551f205b328e3a6568309c9e042e (commit) - Log ----------------------------------------------------------------- commit 3c3badcf42a7aa7fe6ed84c943808d1d769abd14 Author: Andy Polyakov Date: Sun Apr 8 14:00:03 2018 +0200 Configurations/10-main.conf: further HP-UX cleanups/unifications. Reviewed-by: Rich Salz ----------------------------------------------------------------------- Summary of changes: Configurations/10-main.conf | 60 ++++++++++++++------------------------------- 1 file changed, 18 insertions(+), 42 deletions(-) diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf index 7f1c64d..cb3e05e 100644 --- a/Configurations/10-main.conf +++ b/Configurations/10-main.conf @@ -452,23 +452,26 @@ my %targets = ( # targets; b) performance-critical 32-bit assembly modules implement # even PA-RISC 2.0-specific code paths, which are chosen at run-time, # thus adequate performance is provided even with PA-RISC 1.1 build. - "hpux-network" => { + "hpux-common" => { + inherit_from => [ "BASE_unix" ], template => 1, defines => add("_XOPEN_SOURCE", "_XOPEN_SOURCE_EXTENDED", "_HPUX_ALT_XOPEN_SOCKET_API"), + lib_cppflags => "-DB_ENDIAN", + thread_scheme => "pthreads", + dso_scheme => "dlfcn", # overridden in 32-bit PA-RISC builds + shared_target => "hpux-shared", }, "hpux-parisc-gcc" => { - inherit_from => [ "BASE_unix", "hpux-network" ], + inherit_from => [ "hpux-common" ], CC => "gcc", CFLAGS => picker(debug => "-O0 -g", release => "-O3"), cflags => add(threads("-pthread")), - lib_cppflags => "-DB_ENDIAN -DBN_DIV2W", + lib_cppflags => add("-DBN_DIV2W"), ex_libs => add("-ldld", threads("-pthread")), - bn_ops => "BN_LLONG", - thread_scheme => "pthreads", + bn_ops => "BN_LLONG RC4_CHAR", dso_scheme => "dl", - shared_target => "hpux-shared", shared_cflag => "-fPIC", shared_ldflag => "-shared", shared_extension => ".sl.\$(SHLIB_VERSION_NUMBER)", @@ -478,18 +481,13 @@ my %targets = ( multilib => "/pa1.1", }, "hpux64-parisc2-gcc" => { - inherit_from => [ "BASE_unix", "hpux-network", - asm("parisc20_64_asm") ], + inherit_from => [ "hpux-common", asm("parisc20_64_asm") ], CC => "gcc", CFLAGS => combine(picker(debug => "-O0 -g", release => "-O3")), cflags => add(threads("-pthread")), - lib_cppflags => "-DB_ENDIAN", ex_libs => add("-ldl", threads("-pthread")), bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR", - thread_scheme => "pthreads", - dso_scheme => "dlfcn", - shared_target => "hpux-shared", shared_cflag => "-fpic", shared_ldflag => "-shared", shared_extension => ".sl.\$(SHLIB_VERSION_NUMBER)", @@ -498,18 +496,16 @@ my %targets = ( # More attempts at unified 10.X and 11.X targets for HP C compiler. "hpux-parisc-cc" => { - inherit_from => [ "BASE_unix", "hpux-network" ], + inherit_from => [ "hpux-common" ], CC => "cc", CFLAGS => picker(debug => "+O0 +d -g", release => "+O3"), cflags => "+Optrs_strongly_typed -Ae +ESlit", cppflags => threads("-D_REENTRANT"), - lib_cppflags => "-DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY", + lib_cppflags => add("-DBN_DIV2W -DMD32_XARRAY"), ex_libs => add("-ldld", threads("-lpthread")), bn_ops => "RC4_CHAR", - thread_scheme => "pthreads", dso_scheme => "dl", - shared_target => "hpux-shared", shared_cflag => "+Z", shared_ldflag => "-b", shared_extension => ".sl.\$(SHLIB_VERSION_NUMBER)", @@ -520,19 +516,15 @@ my %targets = ( multilib => "/pa1.1", }, "hpux64-parisc2-cc" => { - inherit_from => [ "BASE_unix", "hpux-network", - asm("parisc20_64_asm") ], + inherit_from => [ "hpux-common", asm("parisc20_64_asm") ], CC => "cc", CFLAGS => picker(debug => "+O0 +d -g", release => "+O3") , cflags => "+DD64 +Optrs_strongly_typed -Ae +ESlit", cppflags => threads("-D_REENTRANT") , - lib_cppflags => "-DB_ENDIAN -DMD32_XARRAY", + lib_cppflags => add("-DMD32_XARRAY"), ex_libs => add("-ldl", threads("-lpthread")), bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR", - thread_scheme => "pthreads", - dso_scheme => "dlfcn", - shared_target => "hpux-shared", shared_cflag => "+Z", shared_ldflag => "-b", shared_extension => ".sl.\$(SHLIB_VERSION_NUMBER)", @@ -541,36 +533,28 @@ my %targets = ( # HP/UX IA-64 targets "hpux-ia64-cc" => { - inherit_from => [ "BASE_unix", "hpux-network", asm("ia64_asm") ], + inherit_from => [ "hpux-common", asm("ia64_asm") ], CC => "cc", CFLAGS => picker(debug => "+O0 +d -g", release => "+O2"), cflags => "-Ae +DD32 +Olit=all -z", cppflags => add(threads("-D_REENTRANT")), - lib_cppflags => "-DB_ENDIAN", ex_libs => add("-ldl", threads("-lpthread")), bn_ops => "SIXTY_FOUR_BIT", - thread_scheme => "pthreads", - dso_scheme => "dlfcn", - shared_target => "hpux-shared", shared_cflag => "+Z", shared_ldflag => "-b", shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", multilib => "/hpux32", }, "hpux64-ia64-cc" => { - inherit_from => [ "BASE_unix", "hpux-network", asm("ia64_asm") ], + inherit_from => [ "hpux-common", asm("ia64_asm") ], CC => "cc", CFLAGS => picker(debug => "+O0 +d -g", release => "+O3"), cflags => "-Ae +DD64 +Olit=all -z", cppflags => threads("-D_REENTRANT"), - lib_cppflags => "-DB_ENDIAN", ex_libs => add("-ldl", threads("-lpthread")), bn_ops => "SIXTY_FOUR_BIT_LONG", - thread_scheme => "pthreads", - dso_scheme => "dlfcn", - shared_target => "hpux-shared", shared_cflag => "+Z", shared_ldflag => "-b", shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", @@ -578,34 +562,26 @@ my %targets = ( }, # GCC builds... "hpux-ia64-gcc" => { - inherit_from => [ "BASE_unix", "hpux-network", asm("ia64_asm") ], + inherit_from => [ "hpux-common", asm("ia64_asm") ], CC => "gcc", CFLAGS => picker(debug => "-O0 -g", release => "-O3"), cflags => add(threads("-pthread")), - lib_cppflags => "-DB_ENDIAN", ex_libs => add("-ldl", threads("-pthread")), bn_ops => "SIXTY_FOUR_BIT", - thread_scheme => "pthreads", - dso_scheme => "dlfcn", - shared_target => "hpux-shared", shared_cflag => "-fpic", shared_ldflag => "-shared", shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", multilib => "/hpux32", }, "hpux64-ia64-gcc" => { - inherit_from => [ "BASE_unix", "hpux-network", asm("ia64_asm") ], + inherit_from => [ "hpux-common", asm("ia64_asm") ], CC => "gcc", CFLAGS => picker(debug => "-O0 -g", release => "-O3"), cflags => combine("-mlp64", threads("-pthread")), - lib_cppflags => "-DB_ENDIAN", ex_libs => add("-ldl", threads("-pthread")), bn_ops => "SIXTY_FOUR_BIT_LONG", - thread_scheme => "pthreads", - dso_scheme => "dlfcn", - shared_target => "hpux-shared", shared_cflag => "-fpic", shared_ldflag => "-shared", shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", From appro at openssl.org Mon Apr 9 19:55:33 2018 From: appro at openssl.org (Andy Polyakov) Date: Mon, 09 Apr 2018 19:55:33 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1523303733.383348.21039.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via d78cecd0c0275268726cb34defd3ccc6ab124396 (commit) from da3c4565887f74c711547be6b165d7f27c506bbf (commit) - Log ----------------------------------------------------------------- commit d78cecd0c0275268726cb34defd3ccc6ab124396 Author: Andy Polyakov Date: Sun Apr 8 14:15:04 2018 +0200 Configurations/10-main.conf: further HP-UX cleanups/unifications. Reviewed-by: Rich Salz ----------------------------------------------------------------------- Summary of changes: Configurations/10-main.conf | 46 +++++++++++++-------------------------------- 1 file changed, 13 insertions(+), 33 deletions(-) diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf index c440a2f..8559667 100644 --- a/Configurations/10-main.conf +++ b/Configurations/10-main.conf @@ -428,13 +428,17 @@ sub vms_info { # even PA-RISC 2.0-specific code paths, which are chosen at run-time, # thus adequate performance is provided even with PA-RISC 1.1 build. # - "hpux-network" => { + "hpux-common" => { + inherit_from => [ "BASE_unix" ], template => 1, defines => add("_XOPEN_SOURCE", "_XOPEN_SOURCE_EXTENDED", "_HPUX_ALT_XOPEN_SOCKET_API"), + thread_scheme => "pthreads", + dso_scheme => "dlfcn", # overridden in 32-bit PA-RISC builds + shared_target => "hpux-shared", }, "hpux-parisc-gcc" => { - inherit_from => [ "BASE_unix", "hpux-network" ], + inherit_from => [ "hpux-common" ], cc => "gcc", cflags => combine(picker(default => "-DB_ENDIAN -DBN_DIV2W", debug => "-O0 -g", @@ -442,9 +446,7 @@ sub vms_info { threads("-pthread")), ex_libs => add("-Wl,+s -ldld", threads("-pthread")), bn_ops => "BN_LLONG", - thread_scheme => "pthreads", dso_scheme => "dl", - shared_target => "hpux-shared", shared_cflag => "-fPIC", shared_ldflag => "-shared", shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", @@ -454,8 +456,7 @@ sub vms_info { multilib => "/pa1.1", }, "hpux64-parisc2-gcc" => { - inherit_from => [ "BASE_unix", "hpux-network", - asm("parisc20_64_asm") ], + inherit_from => [ "hpux-common", asm("parisc20_64_asm") ], cc => "gcc", cflags => combine(picker(default => "-DB_ENDIAN", debug => "-O0 -g", @@ -463,9 +464,6 @@ sub vms_info { threads("-D_REENTRANT")), ex_libs => add("-ldl"), bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR", - thread_scheme => "pthreads", - dso_scheme => "dlfcn", - shared_target => "hpux-shared", shared_cflag => "-fpic", shared_ldflag => "-shared", shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", @@ -477,7 +475,7 @@ sub vms_info { # Chris Ruemmler # Kevin Steves "hpux-parisc-cc" => { - inherit_from => [ "BASE_unix", "hpux-network" ], + inherit_from => [ "hpux-common" ], cc => "cc", cflags => combine(picker(default => "+Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY", debug => "+O0 +d -g", @@ -485,9 +483,7 @@ sub vms_info { threads("-D_REENTRANT")), ex_libs => add("-Wl,+s -ldld",threads("-lpthread")), bn_ops => "RC4_CHAR", - thread_scheme => "pthreads", dso_scheme => "dl", - shared_target => "hpux-shared", shared_cflag => "+Z", shared_ldflag => "-b", shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", @@ -498,8 +494,7 @@ sub vms_info { multilib => "/pa1.1", }, "hpux64-parisc2-cc" => { - inherit_from => [ "BASE_unix", "hpux-network", - asm("parisc20_64_asm") ], + inherit_from => [ "hpux-common", asm("parisc20_64_asm") ], cc => "cc", cflags => combine(picker(default => "+DD64 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY", debug => "+O0 +d -g", @@ -507,9 +502,6 @@ sub vms_info { threads("-D_REENTRANT")), ex_libs => add("-ldl",threads("-lpthread")), bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR", - thread_scheme => "pthreads", - dso_scheme => "dlfcn", - shared_target => "hpux-shared", shared_cflag => "+Z", shared_ldflag => "+DD64 -b", shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", @@ -518,7 +510,7 @@ sub vms_info { # HP/UX IA-64 targets "hpux-ia64-cc" => { - inherit_from => [ "BASE_unix", "hpux-network", asm("ia64_asm") ], + inherit_from => [ "hpux-common", asm("ia64_asm") ], cc => "cc", cflags => combine(picker(default => "-Ae +DD32 +Olit=all -z -DB_ENDIAN", debug => "+O0 +d -g", @@ -526,9 +518,6 @@ sub vms_info { threads("-D_REENTRANT")), ex_libs => add("-ldl",threads("-lpthread")), bn_ops => "SIXTY_FOUR_BIT", - thread_scheme => "pthreads", - dso_scheme => "dlfcn", - shared_target => "hpux-shared", shared_cflag => "+Z", shared_ldflag => "+DD32 -b", shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", @@ -537,7 +526,7 @@ sub vms_info { # Frank Geurts has patiently assisted # with debugging of the following config. "hpux64-ia64-cc" => { - inherit_from => [ "BASE_unix", "hpux-network", asm("ia64_asm") ], + inherit_from => [ "hpux-common", asm("ia64_asm") ], cc => "cc", cflags => combine(picker(default => "-Ae +DD64 +Olit=all -z -DB_ENDIAN", debug => "+O0 +d -g", @@ -545,9 +534,6 @@ sub vms_info { threads("-D_REENTRANT")), ex_libs => add("-ldl", threads("-lpthread")), bn_ops => "SIXTY_FOUR_BIT_LONG", - thread_scheme => "pthreads", - dso_scheme => "dlfcn", - shared_target => "hpux-shared", shared_cflag => "+Z", shared_ldflag => "+DD64 -b", shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", @@ -555,7 +541,7 @@ sub vms_info { }, # GCC builds... "hpux-ia64-gcc" => { - inherit_from => [ "BASE_unix", "hpux-network", asm("ia64_asm") ], + inherit_from => [ "hpux-common", asm("ia64_asm") ], cc => "gcc", cflags => combine(picker(default => "-DB_ENDIAN", debug => "-O0 -g", @@ -563,16 +549,13 @@ sub vms_info { threads("-pthread")), ex_libs => add("-ldl", threads("-pthread")), bn_ops => "SIXTY_FOUR_BIT", - thread_scheme => "pthreads", - dso_scheme => "dlfcn", - shared_target => "hpux-shared", shared_cflag => "-fpic", shared_ldflag => "-shared", shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", multilib => "/hpux32", }, "hpux64-ia64-gcc" => { - inherit_from => [ "BASE_unix", "hpux-network", asm("ia64_asm") ], + inherit_from => [ "hpux-common", asm("ia64_asm") ], cc => "gcc", cflags => combine(picker(default => "-mlp64 -DB_ENDIAN", debug => "-O0 -g", @@ -580,9 +563,6 @@ sub vms_info { threads("-pthread")), ex_libs => add("-ldl", threads("-pthread")), bn_ops => "SIXTY_FOUR_BIT_LONG", - thread_scheme => "pthreads", - dso_scheme => "dlfcn", - shared_target => "hpux-shared", shared_cflag => "-fpic", shared_ldflag => "-mlp64 -shared", shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", From appro at openssl.org Mon Apr 9 20:34:25 2018 From: appro at openssl.org (Andy Polyakov) Date: Mon, 09 Apr 2018 20:34:25 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523306065.621624.27251.nullmailer@dev.openssl.org> The branch master has been updated via 55bd917bc4213bc668f48b87d8c6feb9918fef8f (commit) from 3c3badcf42a7aa7fe6ed84c943808d1d769abd14 (commit) - Log ----------------------------------------------------------------- commit 55bd917bc4213bc668f48b87d8c6feb9918fef8f Author: Andy Polyakov Date: Fri Apr 6 14:33:30 2018 +0200 bio/b_addr.c: resolve HP-UX compiler warnings. The warning reads "[cast] may cause misaligned access". Even though this can be application-supplied pointer, misaligned access shouldn't happen, because structure type is "encoded" into data itself, and application would customarily pass correctly aligned pointer. But there is no harm in resolving the warning... Reviewed-by: Rich Salz Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5894) ----------------------------------------------------------------------- Summary of changes: crypto/bio/b_addr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crypto/bio/b_addr.c b/crypto/bio/b_addr.c index a2ef944..9832c0c 100644 --- a/crypto/bio/b_addr.c +++ b/crypto/bio/b_addr.c @@ -66,18 +66,18 @@ void BIO_ADDR_clear(BIO_ADDR *ap) int BIO_ADDR_make(BIO_ADDR *ap, const struct sockaddr *sa) { if (sa->sa_family == AF_INET) { - ap->s_in = *(const struct sockaddr_in *)sa; + memcpy(&(ap->s_in), sa, sizeof(struct sockaddr_in)); return 1; } #ifdef AF_INET6 if (sa->sa_family == AF_INET6) { - ap->s_in6 = *(const struct sockaddr_in6 *)sa; + memcpy(&(ap->s_in6), sa, sizeof(struct sockaddr_in6)); return 1; } #endif #ifdef AF_UNIX if (sa->sa_family == AF_UNIX) { - ap->s_un = *(const struct sockaddr_un *)sa; + memcpy(&(ap->s_un), sa, sizeof(struct sockaddr_un)); return 1; } #endif From appro at openssl.org Mon Apr 9 20:35:35 2018 From: appro at openssl.org (Andy Polyakov) Date: Mon, 09 Apr 2018 20:35:35 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1523306135.303353.29355.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via ca1beab7c11f0fe5e2717adc85fcf4ee8a9b4ae1 (commit) from d78cecd0c0275268726cb34defd3ccc6ab124396 (commit) - Log ----------------------------------------------------------------- commit ca1beab7c11f0fe5e2717adc85fcf4ee8a9b4ae1 Author: Andy Polyakov Date: Fri Apr 6 14:33:30 2018 +0200 bio/b_addr.c: resolve HP-UX compiler warnings. The warning reads "[cast] may cause misaligned access". Even though this can be application-supplied pointer, misaligned access shouldn't happen, because structure type is "encoded" into data itself, and application would customarily pass correctly aligned pointer. But there is no harm in resolving the warning... Reviewed-by: Rich Salz Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5894) (cherry picked from commit 55bd917bc4213bc668f48b87d8c6feb9918fef8f) ----------------------------------------------------------------------- Summary of changes: crypto/bio/b_addr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crypto/bio/b_addr.c b/crypto/bio/b_addr.c index aea843a..24097d7 100644 --- a/crypto/bio/b_addr.c +++ b/crypto/bio/b_addr.c @@ -66,18 +66,18 @@ void BIO_ADDR_clear(BIO_ADDR *ap) int BIO_ADDR_make(BIO_ADDR *ap, const struct sockaddr *sa) { if (sa->sa_family == AF_INET) { - ap->s_in = *(const struct sockaddr_in *)sa; + memcpy(&(ap->s_in), sa, sizeof(struct sockaddr_in)); return 1; } #ifdef AF_INET6 if (sa->sa_family == AF_INET6) { - ap->s_in6 = *(const struct sockaddr_in6 *)sa; + memcpy(&(ap->s_in6), sa, sizeof(struct sockaddr_in6)); return 1; } #endif #ifdef AF_UNIX if (sa->sa_family == AF_UNIX) { - ap->s_un = *(const struct sockaddr_un *)sa; + memcpy(&(ap->s_un), sa, sizeof(struct sockaddr_un)); return 1; } #endif From no-reply at appveyor.com Tue Apr 10 11:21:45 2018 From: no-reply at appveyor.com (AppVeyor) Date: Tue, 10 Apr 2018 11:21:45 +0000 Subject: [openssl-commits] Build failed: openssl master.17139 Message-ID: <20180410112145.1.7406BA874BCA3FE5@appveyor.com> An HTML attachment was scrubbed... URL: From matthias.st.pierre at ncp-e.com Tue Apr 10 11:38:13 2018 From: matthias.st.pierre at ncp-e.com (matthias.st.pierre at ncp-e.com) Date: Tue, 10 Apr 2018 11:38:13 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523360293.588839.1862.nullmailer@dev.openssl.org> The branch master has been updated via 63a65d16acca53622a08861cdde8fe0e79beb522 (commit) from 55bd917bc4213bc668f48b87d8c6feb9918fef8f (commit) - Log ----------------------------------------------------------------- commit 63a65d16acca53622a08861cdde8fe0e79beb522 Author: Dr. Matthias St. Pierre Date: Sun Apr 8 12:09:10 2018 +0200 DRBG: fix memory leak on error in rand_drbg_get_entropy() Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5918) ----------------------------------------------------------------------- Summary of changes: crypto/rand/rand_lib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crypto/rand/rand_lib.c b/crypto/rand/rand_lib.c index 3589e75..6e98e4d 100644 --- a/crypto/rand/rand_lib.c +++ b/crypto/rand/rand_lib.c @@ -229,7 +229,7 @@ size_t rand_drbg_get_entropy(RAND_DRBG *drbg, */ RANDerr(RAND_F_RAND_DRBG_GET_ENTROPY, RAND_R_PREDICTION_RESISTANCE_NOT_SUPPORTED); - return 0; + goto err; } /* Get entropy by polling system entropy sources. */ @@ -241,6 +241,7 @@ size_t rand_drbg_get_entropy(RAND_DRBG *drbg, *pout = rand_pool_detach(pool); } + err: rand_pool_free(pool); return ret; } From no-reply at appveyor.com Tue Apr 10 11:43:27 2018 From: no-reply at appveyor.com (AppVeyor) Date: Tue, 10 Apr 2018 11:43:27 +0000 Subject: [openssl-commits] Build completed: openssl master.17140 Message-ID: <20180410114327.1.FBBBC93C1ECC2946@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Tue Apr 10 11:59:00 2018 From: no-reply at appveyor.com (AppVeyor) Date: Tue, 10 Apr 2018 11:59:00 +0000 Subject: [openssl-commits] Build failed: openssl master.17141 Message-ID: <20180410115900.1.5309D29012FC3327@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Tue Apr 10 12:43:19 2018 From: no-reply at appveyor.com (AppVeyor) Date: Tue, 10 Apr 2018 12:43:19 +0000 Subject: [openssl-commits] Build failed: openssl master.17142 Message-ID: <20180410124319.1.C6A3A499A0FC78C6@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Tue Apr 10 13:26:01 2018 From: no-reply at appveyor.com (AppVeyor) Date: Tue, 10 Apr 2018 13:26:01 +0000 Subject: [openssl-commits] Build failed: openssl master.17143 Message-ID: <20180410132601.1.2FC6AFC742D46C44@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Tue Apr 10 14:09:54 2018 From: no-reply at appveyor.com (AppVeyor) Date: Tue, 10 Apr 2018 14:09:54 +0000 Subject: [openssl-commits] Build failed: openssl master.17144 Message-ID: <20180410140954.1.1DDDCBD7AABD1674@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Tue Apr 10 14:44:20 2018 From: no-reply at appveyor.com (AppVeyor) Date: Tue, 10 Apr 2018 14:44:20 +0000 Subject: [openssl-commits] Build completed: openssl master.17145 Message-ID: <20180410144420.1.A85FE5D8FDA804A8@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Tue Apr 10 16:04:59 2018 From: no-reply at appveyor.com (AppVeyor) Date: Tue, 10 Apr 2018 16:04:59 +0000 Subject: [openssl-commits] Build failed: openssl master.17148 Message-ID: <20180410160459.1.4FF47FDD9C68C9ED@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Tue Apr 10 16:29:50 2018 From: no-reply at appveyor.com (AppVeyor) Date: Tue, 10 Apr 2018 16:29:50 +0000 Subject: [openssl-commits] Build failed: openssl master.17149 Message-ID: <20180410162950.1.80B0229F35A225FE@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Tue Apr 10 16:53:11 2018 From: no-reply at appveyor.com (AppVeyor) Date: Tue, 10 Apr 2018 16:53:11 +0000 Subject: [openssl-commits] Build completed: openssl master.17150 Message-ID: <20180410165311.1.2199755775DE8200@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Tue Apr 10 18:30:35 2018 From: no-reply at appveyor.com (AppVeyor) Date: Tue, 10 Apr 2018 18:30:35 +0000 Subject: [openssl-commits] Build failed: openssl master.17153 Message-ID: <20180410183035.1.4F584D8874D74ADF@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Tue Apr 10 19:05:03 2018 From: no-reply at appveyor.com (AppVeyor) Date: Tue, 10 Apr 2018 19:05:03 +0000 Subject: [openssl-commits] Build failed: openssl master.17154 Message-ID: <20180410190503.1.7B4646821C7CA11F@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Tue Apr 10 19:32:36 2018 From: no-reply at appveyor.com (AppVeyor) Date: Tue, 10 Apr 2018 19:32:36 +0000 Subject: [openssl-commits] Build completed: openssl master.17155 Message-ID: <20180410193236.1.AACD2AB5EF228CC3@appveyor.com> An HTML attachment was scrubbed... URL: From levitte at openssl.org Wed Apr 11 10:04:32 2018 From: levitte at openssl.org (Richard Levitte) Date: Wed, 11 Apr 2018 10:04:32 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523441072.288510.10324.nullmailer@dev.openssl.org> The branch master has been updated via 708a6a17592865590344eca541cbfccd472d7b45 (commit) from 63a65d16acca53622a08861cdde8fe0e79beb522 (commit) - Log ----------------------------------------------------------------- commit 708a6a17592865590344eca541cbfccd472d7b45 Author: Richard Levitte Date: Wed Apr 11 09:54:59 2018 +0200 OpenSSL::Test: add data_dir() For test recipes that want to use the directory of the data directory or a subdirectory thereof, rather than just individual files. Reviewed-by: Andy Polyakov (Merged from https://github.com/openssl/openssl/pull/5928) ----------------------------------------------------------------------- Summary of changes: util/perl/OpenSSL/Test.pm | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/util/perl/OpenSSL/Test.pm b/util/perl/OpenSSL/Test.pm index f4b1b50..19141e9 100644 --- a/util/perl/OpenSSL/Test.pm +++ b/util/perl/OpenSSL/Test.pm @@ -607,6 +607,23 @@ sub srctop_file { =over 4 +=item B + +LIST is a list of directories that make up a path from the data directory +associated with the test (see L above). +C returns the resulting directory as a string, adapted to the local +operating system. + +=back + +=cut + +sub data_dir { + return __data_dir(@_); +} + +=over 4 + =item B LIST is a list of directories that make up a path from the data directory @@ -967,6 +984,12 @@ sub __data_file { return catfile($directories{SRCDATA}, at _,$f); } +sub __data_dir { + BAIL_OUT("Must run setup() first") if (! $test_name); + + return catdir($directories{SRCDATA}, at _); +} + sub __results_file { BAIL_OUT("Must run setup() first") if (! $test_name); From matthias.st.pierre at ncp-e.com Wed Apr 11 16:56:41 2018 From: matthias.st.pierre at ncp-e.com (matthias.st.pierre at ncp-e.com) Date: Wed, 11 Apr 2018 16:56:41 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523465801.067303.23743.nullmailer@dev.openssl.org> The branch master has been updated via f7bef277eac05853224d33e67465147833c49108 (commit) from 708a6a17592865590344eca541cbfccd472d7b45 (commit) - Log ----------------------------------------------------------------- commit f7bef277eac05853224d33e67465147833c49108 Author: Dr. Matthias St. Pierre Date: Fri Mar 30 01:07:00 2018 +0200 Minor corrections for the RAND_DRBG API documentation - added some explaining text to a sentence that lost its context. - removed mention of per-ssl drbg - fix whitespace errors Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5804) ----------------------------------------------------------------------- Summary of changes: doc/man3/RAND_DRBG_set_callbacks.pod | 2 +- doc/man7/RAND.pod | 4 ++-- doc/man7/RAND_DRBG.pod | 17 +++++++++-------- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/doc/man3/RAND_DRBG_set_callbacks.pod b/doc/man3/RAND_DRBG_set_callbacks.pod index 3e9a985..a927d6a 100644 --- a/doc/man3/RAND_DRBG_set_callbacks.pod +++ b/doc/man3/RAND_DRBG_set_callbacks.pod @@ -79,7 +79,7 @@ See NOTES section for more details. The B() callback is called from the B to to clear and free the buffer allocated previously by get_entropy(). -The values B and B are the random buffer's address and length, +The values B and B are the random buffer's address and length, as returned by the get_entropy() callback. The B() and B() callbacks are used to obtain a nonce diff --git a/doc/man7/RAND.pod b/doc/man7/RAND.pod index 6ec7548..578018f 100644 --- a/doc/man7/RAND.pod +++ b/doc/man7/RAND.pod @@ -32,8 +32,8 @@ return value of L and don't take randomness for granted. For long-term secrets, you can use L instead. This method does not provide 'better' randomness, it uses the same type of CSPRNG. The intention behind using a dedicated CSPRNG exclusively for long-term secrets is -that none of its output should be visible to an attacker (e.g used as salt value), -in order to reveal as little information as possible about its internal state. +that none of its output should be visible to an attacker (e.g used as salt value), +in order to reveal as little information as possible about its internal state. In the rare case where the default implementation does not satisfy your special requirements, there are two options: diff --git a/doc/man7/RAND_DRBG.pod b/doc/man7/RAND_DRBG.pod index a4c58c1..9f7f124 100644 --- a/doc/man7/RAND_DRBG.pod +++ b/doc/man7/RAND_DRBG.pod @@ -37,8 +37,7 @@ Typical examples for such special use cases are the following: =item * -You want to use your own private DRBG instances, similar to how it -is currently done in the ssl library. +You want to use your own private DRBG instances. Multiple DRBG instances which are accessed only by a single thread provide additional security (because their internal states are independent) and better scalability in multithreaded applications (because they don't need @@ -80,8 +79,8 @@ the thread-local and DRBG instance, respectively. =head2 The DRBG instance The DRBG is not used directly by the application, only for reseeding -the two other two DRBG instances. It reseeds itself by obtaining randomness -either from os entropy sources or by consuming randomness which was added +the two other two DRBG instances. It reseeds itself by obtaining randomness +either from os entropy sources or by consuming randomness which was added previously by L. =head2 The DRBG instance @@ -144,10 +143,12 @@ together and are being used. +------------------+ +------------------------------------+ - -The method L is a convenience method wrapping the -L function, which serves the actual request for -random data. +The usual way to obtain random bytes is to call RAND_bytes(...) or +RAND_priv_bytes(...). These calls are roughly equivalent to calling +RAND_DRBG_bytes(, ...) and RAND_DRBG_bytes(, ...), +respectively. The method L is a convenience method +wrapping the L function, which serves the actual +request for random data. =head1 RESEEDING From rsalz at openssl.org Wed Apr 11 16:58:08 2018 From: rsalz at openssl.org (Rich Salz) Date: Wed, 11 Apr 2018 16:58:08 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523465888.969248.26080.nullmailer@dev.openssl.org> The branch master has been updated via a8b2b52fe57249f5093e190eb40def9fed9c9627 (commit) from f7bef277eac05853224d33e67465147833c49108 (commit) - Log ----------------------------------------------------------------- commit a8b2b52fe57249f5093e190eb40def9fed9c9627 Author: Daniel Bevenius Date: Wed Apr 11 12:57:31 2018 -0400 Fix minor typos in Configurations/README Reviewed-by: Andy Polyakov Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5774) ----------------------------------------------------------------------- Summary of changes: Configurations/README | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Configurations/README b/Configurations/README index d553cab..4457b94 100644 --- a/Configurations/README +++ b/Configurations/README @@ -165,7 +165,7 @@ In each table entry, the following keys are significant: that use dlopen() et al but do not have fcntl.h), "DL" (shl_load() et al), "WIN32" and "VMS". - perlasm_scheme => The perlasm method used to created the + perlasm_scheme => The perlasm method used to create the assembler files used when compiling with assembler implementations. shared_target => The shared library building method used. @@ -429,7 +429,7 @@ It's also possible to depend on static libraries explicitly: This should be rarely used, and care should be taken to make sure it's only used when supported. For example, native Windows build doesn't -support build static libraries and DLLs at the same time, so using +support building static libraries and DLLs at the same time, so using static libraries on Windows can only be done when configured 'no-shared'. @@ -445,7 +445,7 @@ library: RENAME[libfoo]=libbar -That lines has "libfoo" get renamed to "libbar". While it makes no +That line has "libfoo" renamed to "libbar". While it makes no sense at all to just have a rename like that (why not just use "libbar" everywhere?), it does make sense when it can be used conditionally. See a little further below for an example. From rsalz at openssl.org Wed Apr 11 16:59:42 2018 From: rsalz at openssl.org (Rich Salz) Date: Wed, 11 Apr 2018 16:59:42 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523465982.264661.28290.nullmailer@dev.openssl.org> The branch master has been updated via c12a2d2728fd9eb555ab347049ebdddef9d81d7f (commit) from a8b2b52fe57249f5093e190eb40def9fed9c9627 (commit) - Log ----------------------------------------------------------------- commit c12a2d2728fd9eb555ab347049ebdddef9d81d7f Author: Theo Buehler Date: Wed Apr 11 12:59:25 2018 -0400 EVP_MD_CTX_cleanup replaced with EVP_MD_CTX_reset The EVP_MD_CTX_cleanup() function was merged into EVP_MD_CTX_reset() which is called by EVP_MD_CTX_free(). Adjust the documentation to say that the latter should be used to avoid leaking memory. CLA: trivial Reviewed-by: Andy Polyakov Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5921) ----------------------------------------------------------------------- Summary of changes: doc/man3/EVP_DigestSignInit.pod | 2 +- doc/man3/EVP_DigestVerifyInit.pod | 2 +- doc/man3/EVP_SignInit.pod | 2 +- doc/man3/EVP_VerifyInit.pod | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/man3/EVP_DigestSignInit.pod b/doc/man3/EVP_DigestSignInit.pod index c3513f5..176872d 100644 --- a/doc/man3/EVP_DigestSignInit.pod +++ b/doc/man3/EVP_DigestSignInit.pod @@ -77,7 +77,7 @@ context. This means that calls to EVP_DigestSignUpdate() and EVP_DigestSignFinal() can be called later to digest and sign additional data. Since only a copy of the digest context is ever finalized the context must -be cleaned up after use by calling EVP_MD_CTX_cleanup() or a memory leak +be cleaned up after use by calling EVP_MD_CTX_free() or a memory leak will occur. The use of EVP_PKEY_size() with these functions is discouraged because some diff --git a/doc/man3/EVP_DigestVerifyInit.pod b/doc/man3/EVP_DigestVerifyInit.pod index 2191b9e..603e2cd 100644 --- a/doc/man3/EVP_DigestVerifyInit.pod +++ b/doc/man3/EVP_DigestVerifyInit.pod @@ -76,7 +76,7 @@ context. This means that EVP_VerifyUpdate() and EVP_VerifyFinal() can be called later to digest and verify additional data. Since only a copy of the digest context is ever finalized the context must -be cleaned up after use by calling EVP_MD_CTX_cleanup() or a memory leak +be cleaned up after use by calling EVP_MD_CTX_free() or a memory leak will occur. =head1 SEE ALSO diff --git a/doc/man3/EVP_SignInit.pod b/doc/man3/EVP_SignInit.pod index d3fe79c..12e67f8 100644 --- a/doc/man3/EVP_SignInit.pod +++ b/doc/man3/EVP_SignInit.pod @@ -75,7 +75,7 @@ This means that calls to EVP_SignUpdate() and EVP_SignFinal() can be called later to digest and sign additional data. Since only a copy of the digest context is ever finalized the context must -be cleaned up after use by calling EVP_MD_CTX_cleanup() or a memory leak +be cleaned up after use by calling EVP_MD_CTX_free() or a memory leak will occur. =head1 BUGS diff --git a/doc/man3/EVP_VerifyInit.pod b/doc/man3/EVP_VerifyInit.pod index faabc71..f868258 100644 --- a/doc/man3/EVP_VerifyInit.pod +++ b/doc/man3/EVP_VerifyInit.pod @@ -57,7 +57,7 @@ This means that calls to EVP_VerifyUpdate() and EVP_VerifyFinal() can be called later to digest and verify additional data. Since only a copy of the digest context is ever finalized the context must -be cleaned up after use by calling EVP_MD_CTX_cleanup() or a memory leak +be cleaned up after use by calling EVP_MD_CTX_free() or a memory leak will occur. =head1 BUGS From levitte at openssl.org Wed Apr 11 18:52:27 2018 From: levitte at openssl.org (Richard Levitte) Date: Wed, 11 Apr 2018 18:52:27 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523472747.663429.10917.nullmailer@dev.openssl.org> The branch master has been updated via ad5c205c011d1e2ec538d1f4d75477133e0dcab3 (commit) via 6197bc7c5490d215f6abc20afa27308d5e301df2 (commit) via 8258975c94398930e7b5406b8a3af53a662d1354 (commit) from c12a2d2728fd9eb555ab347049ebdddef9d81d7f (commit) - Log ----------------------------------------------------------------- commit ad5c205c011d1e2ec538d1f4d75477133e0dcab3 Author: Andy Polyakov Date: Wed Apr 11 16:07:38 2018 +0200 appveyor.yml: exercise build_all_generated. Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5930) commit 6197bc7c5490d215f6abc20afa27308d5e301df2 Author: Richard Levitte Date: Wed Apr 11 15:49:19 2018 +0200 .travis.yml: exercise build_all_generated Reviewed-by: Andy Polyakov (Merged from https://github.com/openssl/openssl/pull/5930) commit 8258975c94398930e7b5406b8a3af53a662d1354 Author: Richard Levitte Date: Wed Apr 11 13:13:22 2018 +0200 Configuration: Simplify generating list of generated files in build file templates Computing the value of the GENERATED variable in the build file templates is somewhat overcomplicated, and because of possible duplication errors, changes are potentially error prone. Looking more closely at how this list is determined, it can be observed that the exact list of files to check is consistently available in all the values found in the %unified_info tables 'depends', 'sources' and 'shared_sources', and all that's needed is to filter those values so only those present as keys in the 'generate' table are left. This computation is also common for all build files, so due to its apparent complexity, we move it to common0.tmpl, with the result left in a global variable (@generated), to be consumed by all build file templates. common0.tmpl is included among the files to process when creating build files, but unlike common.tmpl, it comes first of all. Reviewed-by: Andy Polyakov (Merged from https://github.com/openssl/openssl/pull/5930) ----------------------------------------------------------------------- Summary of changes: .travis.yml | 32 ++++++++++++++++++++++---------- Configurations/common0.tmpl | 31 +++++++++++++++++++++++++++++++ Configurations/descrip.mms.tmpl | 9 +++------ Configurations/unix-Makefile.tmpl | 9 +++------ Configurations/windows-makefile.tmpl | 9 +++------ Configure | 4 +++- appveyor.yml | 3 ++- 7 files changed, 67 insertions(+), 30 deletions(-) create mode 100644 Configurations/common0.tmpl diff --git a/.travis.yml b/.travis.yml index 3096ae8..bd9d8f8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,7 +31,7 @@ compiler: env: - CONFIG_OPTS="" DESTDIR="_install" - CONFIG_OPTS="no-asm -Werror --debug no-afalgeng no-shared enable-crypto-mdebug enable-rc5 enable-md2" - - CONFIG_OPTS="no-asm --strict-warnings" BUILDONLY="yes" CHECKDOCS="yes" + - CONFIG_OPTS="no-asm no-makedepend --strict-warnings" BUILDONLY="yes" CHECKDOCS="yes" GENERATE="yes" matrix: include: @@ -161,6 +161,11 @@ script: else make="make"; fi + - if [ -n "$GENERATE" ]; then + make2="$make PERL=no-perl"; + else + make2="$make"; + fi - top=${PWD} - if [ -n "$DESTDIR" ]; then cd _build; @@ -178,10 +183,17 @@ script: echo -e '+\057\057 MAKE DOC-NITS FAILED'; false; fi; fi - - if $make; then - echo -e '+\057\057\057 MAKE OK'; + - if [ -n "$GENERATE" ]; then + if $make build_all_generated; then + echo -e '+\057\057\057 MAKE BUILD_ALL_GENERATED OK'; + else + echo -e '+\057\057\057 MAKE BUILD_ALL_GENERATED FAILED'; false; + fi; + fi + - if $make2; then + echo -e '+\057\057\057\057 MAKE OK'; else - echo -e '+\057\057\057 MAKE FAILED'; false; + echo -e '+\057\057\057\057 MAKE FAILED'; false; fi; - if [ -z "$BUILDONLY" ]; then if [ -n "$CROSS_COMPILE" ]; then @@ -194,15 +206,15 @@ script: sudo apt-get -yq install bison dejagnu gettext keyutils ldap-utils libldap2-dev libkeyutils-dev python-cjson python-paste python-pyrad slapd tcl-dev tcsh; fi; if HARNESS_VERBOSE=yes BORING_RUNNER_DIR=$top/boringssl/ssl/test/runner make test; then - echo -e '+\057\057\057\057 MAKE TEST OK'; + echo -e '+\057\057\057\057\057 MAKE TEST OK'; else - echo -e '+\057\057\057\057 MAKE TEST FAILED'; false; + echo -e '+\057\057\057\057\057 MAKE TEST FAILED'; false; fi; else if $make build_tests >~/build.log 2>&1; then - echo -e '+\057\057\057\057\057 MAKE BUILD_TESTS OK'; + echo -e '+\057\057\057\057\057\057 MAKE BUILD_TESTS OK'; else - echo -e '+\057\057\057\057\057 MAKE BUILD_TESTS FAILED'; + echo -e '+\057\057\057\057\057\057 MAKE BUILD_TESTS FAILED'; cat ~/build.log false; fi; @@ -210,9 +222,9 @@ script: - if [ -n "$DESTDIR" ]; then mkdir "$top/$DESTDIR"; if $make install install_docs DESTDIR="$top/$DESTDIR" >~/install.log 2>&1 ; then - echo -e '+\057\057\057\057\057\057 MAKE INSTALL OK'; + echo -e '+\057\057\057\057\057\057\057 MAKE INSTALL OK'; else - echo -e '+\057\057\057\057\057\057 MAKE INSTALL FAILED'; + echo -e '+\057\057\057\057\057\057\057 MAKE INSTALL FAILED'; cat ~/install.log; false; fi; diff --git a/Configurations/common0.tmpl b/Configurations/common0.tmpl new file mode 100644 index 0000000..c006009 --- /dev/null +++ b/Configurations/common0.tmpl @@ -0,0 +1,31 @@ +{- # -*- Mode: perl -*- + + # Commonly used list of generated files + # The reason for the complexity is that the build.info files provide + # GENERATE rules for *all* platforms without discrimination, while the + # build files only want those for a particular build. Therefore, we + # need to extrapolate exactly what we need to generate. The way to do + # that is to extract all possible source files from diverse tables and + # filter out all that are not generated + my %generatables = + map { $_ => 1 } + ( # The sources of stuff may be generated + ( map { @{$unified_info{sources}->{$_}} } + keys %{$unified_info{sources}} ), + $disabled{shared} + ? () + : ( map { @{$unified_info{shared_sources}->{$_}} } + keys %{$unified_info{shared_sources}} ), + # Things we explicitely depend on are usually generated + ( map { $_ eq "" ? () : @{$unified_info{depends}->{$_}} } + keys %{$unified_info{depends}} )); + our @generated = + sort ( ( grep { defined $unified_info{generate}->{$_} } + sort keys %generatables ), + # Scripts are assumed to be generated, so add thhem too + ( grep { defined $unified_info{sources}->{$_} } + @{$unified_info{scripts}} ) ); + + # Avoid strange output + ""; +-} diff --git a/Configurations/descrip.mms.tmpl b/Configurations/descrip.mms.tmpl index 029ba57..09b6763 100644 --- a/Configurations/descrip.mms.tmpl +++ b/Configurations/descrip.mms.tmpl @@ -55,11 +55,6 @@ our @install_shlibs = map { $unified_info{sharednames}->{$_} || () } grep(!/\.a$/, @{$unified_info{install}->{libraries}}); - our @generated = ( ( map { (my $x = $_) =~ s|\.[sS]$|\.asm|; $x } - grep { defined $unified_info{generate}->{$_} } - map { @{$unified_info{sources}->{$_}} } - grep { /\.o$/ } keys %{$unified_info{sources}} ), - ( grep { /\.(?:h|opt)$/ } keys %{$unified_info{generate}} ) ); # This is a horrible hack, but is needed because recursive inclusion of files # in different directories does not work well with HP C. @@ -136,7 +131,9 @@ DEPS={- our @deps = map { (my $x = $_) =~ s|\.o$|\$(DEP_EXT)|; $x; } join(", ", map { "-\n\t".$_ } @deps); -} {- output_on() if $disabled{makedepend}; "" -} GENERATED_MANDATORY={- join(", ", map { "-\n\t".$_ } @{$unified_info{depends}->{""}} ) -} -GENERATED={- join(", ", map { "-\n\t".$_ } @generated) -} +GENERATED={- # common0.tmpl provides @generated + join(", ", map { (my $x = $_) =~ s|\.[sS]$|.asm|; "-\n\t".$x } + @generated) -} INSTALL_LIBS={- join(", ", map { "-\n\t".$_.".OLB" } @install_libs) -} INSTALL_SHLIBS={- join(", ", map { "-\n\t".$_.".EXE" } @install_shlibs) -} diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl index 62fd5e7..46a4866 100644 --- a/Configurations/unix-Makefile.tmpl +++ b/Configurations/unix-Makefile.tmpl @@ -106,12 +106,9 @@ DEPS={- join(" ", map { (my $x = $_) =~ s|\.o$|$depext|; $x; } grep { $unified_info{sources}->{$_}->[0] =~ /\.c$/ } keys %{$unified_info{sources}}); -} {- output_on() if $disabled{makedepend}; "" -} -GENERATED_MANDATORY={- join(" ", @{$unified_info{depends}->{""}} ) -} -GENERATED={- join(" ", - ( grep { defined $unified_info{generate}->{$_} } - map { @{$unified_info{sources}->{$_}} } - grep { /\.(?:o|res)$/ } keys %{$unified_info{sources}} ), - ( grep { /\.(?:h|map|def)$/ } keys %{$unified_info{generate}} )) -} +GENERATED_MANDATORY={- join(" ", @{$unified_info{depends}->{""}}) -} +GENERATED={- # common0.tmpl provides @generated + join(" ", @generated ) -} INSTALL_LIBS={- join(" ", map { lib($_) } @{$unified_info{install}->{libraries}}) -} INSTALL_SHLIBS={- join(" ", map { shlib($_) } @{$unified_info{install}->{libraries}}) -} diff --git a/Configurations/windows-makefile.tmpl b/Configurations/windows-makefile.tmpl index 5d767f7..1c6ce51 100644 --- a/Configurations/windows-makefile.tmpl +++ b/Configurations/windows-makefile.tmpl @@ -88,12 +88,9 @@ DEPS={- join(" ", map { (my $x = $_) =~ s|\.o$|$depext|; $x; } keys %{$unified_info{sources}}); -} {- output_on() if $disabled{makedepend}; "" -} GENERATED_MANDATORY={- join(" ", @{$unified_info{depends}->{""}} ) -} -GENERATED={- join(" ", - ( map { (my $x = $_) =~ s|\.[sS]$|\.asm|; $x } - grep { defined $unified_info{generate}->{$_} } - map { @{$unified_info{sources}->{$_}} } - grep { /\.o$/ } keys %{$unified_info{sources}} ), - ( grep { /\.(?:h|def)$/ } keys %{$unified_info{generate}} )) -} +GENERATED={- # common0.tmpl provides @generated + join(" ", map { (my $x = $_) =~ s|\.[sS]$|.asm|; $x } + @generated) -} INSTALL_LIBS={- join(" ", map { lib($_) } @{$unified_info{install}->{libraries}}) -} INSTALL_SHLIBS={- join(" ", map { shlib($_) } @{$unified_info{install}->{libraries}}) -} diff --git a/Configure b/Configure index d1ea061..99ab26f 100755 --- a/Configure +++ b/Configure @@ -1630,7 +1630,9 @@ if ($builder eq "unified") { die "*** Couldn't find any of:\n", join("\n", @build_file_templates), "\n"; } $config{build_file_templates} - = [ $build_file_template, + = [ cleanfile($srcdir, catfile("Configurations", "common0.tmpl"), + $blddir), + $build_file_template, cleanfile($srcdir, catfile("Configurations", "common.tmpl"), $blddir) ]; diff --git a/appveyor.yml b/appveyor.yml index 5074a31..3b66f0d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -43,7 +43,8 @@ build_script: - cd _build - ps: >- If ($env:Configuration -Match "shared" -or $env:EXTENDED_TESTS) { - cmd /c "nmake 2>&1" + cmd /c "nmake build_all_generated 2>&1" + cmd /c "nmake PERL=no-perl 2>&1" } - cd .. From no-reply at appveyor.com Wed Apr 11 21:46:37 2018 From: no-reply at appveyor.com (AppVeyor) Date: Wed, 11 Apr 2018 21:46:37 +0000 Subject: [openssl-commits] Build failed: openssl master.17187 Message-ID: <20180411214637.1.67B29F96D1DA20B3@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Wed Apr 11 22:13:55 2018 From: no-reply at appveyor.com (AppVeyor) Date: Wed, 11 Apr 2018 22:13:55 +0000 Subject: [openssl-commits] Build failed: openssl master.17188 Message-ID: <20180411221355.1.322C1C42C1C93F1C@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Thu Apr 12 06:39:53 2018 From: no-reply at appveyor.com (AppVeyor) Date: Thu, 12 Apr 2018 06:39:53 +0000 Subject: [openssl-commits] Build failed: openssl master.17189 Message-ID: <20180412063953.1.3CE9D47028DCB119@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Thu Apr 12 08:30:12 2018 From: no-reply at appveyor.com (AppVeyor) Date: Thu, 12 Apr 2018 08:30:12 +0000 Subject: [openssl-commits] Build failed: openssl master.17192 Message-ID: <20180412083012.1.3C7A3888EF857898@appveyor.com> An HTML attachment was scrubbed... URL: From levitte at openssl.org Thu Apr 12 09:19:38 2018 From: levitte at openssl.org (Richard Levitte) Date: Thu, 12 Apr 2018 09:19:38 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1523524778.051999.26640.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via 7faab6869b09c7b66b52dd7b71469fe862157e32 (commit) from ca1beab7c11f0fe5e2717adc85fcf4ee8a9b4ae1 (commit) - Log ----------------------------------------------------------------- commit 7faab6869b09c7b66b52dd7b71469fe862157e32 Author: Rich Salz Date: Thu Apr 5 22:55:28 2018 -0400 Fix bugs in X509_NAME_ENTRY_set The wrong "set" field was incremented in the wrong place and would create a new RDN, not a multi-valued RDN. RDN inserts would happen after not before. Prepending an entry to an RDN incorrectly created a new RDN Anything which built up an X509_NAME could get a messed-up structure, which would then be "wrong" for anyone using that name. Thanks to Ingo Schwarze for extensive debugging and the initial fix (documented in GitHub issue #5870). Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/5882) (cherry picked from commit bbf27cd58337116c57a1c942153330ff83d5540a) ----------------------------------------------------------------------- Summary of changes: crypto/x509/x509name.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/crypto/x509/x509name.c b/crypto/x509/x509name.c index f87dc7d..3dc781f 100644 --- a/crypto/x509/x509name.c +++ b/crypto/x509/x509name.c @@ -191,7 +191,7 @@ int X509_NAME_add_entry(X509_NAME *name, const X509_NAME_ENTRY *ne, int loc, loc = n; else if (loc < 0) loc = n; - + inc = (set == 0); name->modified = 1; if (set == -1) { @@ -200,7 +200,6 @@ int X509_NAME_add_entry(X509_NAME *name, const X509_NAME_ENTRY *ne, int loc, inc = 1; } else { set = sk_X509_NAME_ENTRY_value(sk, loc - 1)->set; - inc = 0; } } else { /* if (set >= 0) */ @@ -211,12 +210,11 @@ int X509_NAME_add_entry(X509_NAME *name, const X509_NAME_ENTRY *ne, int loc, set = 0; } else set = sk_X509_NAME_ENTRY_value(sk, loc)->set; - inc = (set == 0) ? 1 : 0; } /* * X509_NAME_ENTRY_dup is ASN1 generated code, that can't be easily - * const'ified; harmless cast as dup() don't modify its input. + * const'ified; harmless cast since dup() don't modify its input. */ if ((new_name = X509_NAME_ENTRY_dup((X509_NAME_ENTRY *)ne)) == NULL) goto err; @@ -228,7 +226,7 @@ int X509_NAME_add_entry(X509_NAME *name, const X509_NAME_ENTRY *ne, int loc, if (inc) { n = sk_X509_NAME_ENTRY_num(sk); for (i = loc + 1; i < n; i++) - sk_X509_NAME_ENTRY_value(sk, i - 1)->set += 1; + sk_X509_NAME_ENTRY_value(sk, i)->set += 1; } return (1); err: From no-reply at appveyor.com Thu Apr 12 09:25:54 2018 From: no-reply at appveyor.com (AppVeyor) Date: Thu, 12 Apr 2018 09:25:54 +0000 Subject: [openssl-commits] Build completed: openssl master.17193 Message-ID: <20180412092554.1.7E5751D2C14875F8@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Thu Apr 12 12:19:52 2018 From: no-reply at appveyor.com (AppVeyor) Date: Thu, 12 Apr 2018 12:19:52 +0000 Subject: [openssl-commits] Build failed: openssl master.17198 Message-ID: <20180412121952.1.8AE70BC9BCD77465@appveyor.com> An HTML attachment was scrubbed... URL: From levitte at openssl.org Thu Apr 12 12:27:19 2018 From: levitte at openssl.org (Richard Levitte) Date: Thu, 12 Apr 2018 12:27:19 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523536039.053428.28638.nullmailer@dev.openssl.org> The branch master has been updated via 0652e8a7fe6dd8cbdf4516b221642b10bbfc68fe (commit) from ad5c205c011d1e2ec538d1f4d75477133e0dcab3 (commit) - Log ----------------------------------------------------------------- commit 0652e8a7fe6dd8cbdf4516b221642b10bbfc68fe Author: Daniel Bevenius Date: Thu Apr 12 13:39:37 2018 +0200 Clarify default section in config.pod This is a minor update which hopefully makes these particular lines read a little easier. Reviewed-by: Matthias St. Pierre Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5938) ----------------------------------------------------------------------- Summary of changes: doc/man5/config.pod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/man5/config.pod b/doc/man5/config.pod index 09d72be..c930ddd 100644 --- a/doc/man5/config.pod +++ b/doc/man5/config.pod @@ -18,7 +18,7 @@ started or end of file is reached. A section name can consist of alphanumeric characters and underscores. The first section of a configuration file is special and is referred -to as the B section this is usually unnamed and is from the +to as the B section. This section is usually unnamed and spans from the start of file until the first named section. When a name is being looked up it is first looked up in a named section (if any) and then the default section. From levitte at openssl.org Thu Apr 12 12:32:50 2018 From: levitte at openssl.org (Richard Levitte) Date: Thu, 12 Apr 2018 12:32:50 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1523536370.142464.3368.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via 9e8554fca5019b81ed7659d97f103f388ea3a2bf (commit) from 7faab6869b09c7b66b52dd7b71469fe862157e32 (commit) - Log ----------------------------------------------------------------- commit 9e8554fca5019b81ed7659d97f103f388ea3a2bf Author: Daniel Bevenius Date: Thu Apr 12 13:39:37 2018 +0200 Clarify default section in config.pod This is a minor update which hopefully makes these particular lines read a little easier. Reviewed-by: Matthias St. Pierre Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5938) (cherry picked from commit 0652e8a7fe6dd8cbdf4516b221642b10bbfc68fe) ----------------------------------------------------------------------- Summary of changes: doc/apps/config.pod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/apps/config.pod b/doc/apps/config.pod index 76f282f..1b935a7 100644 --- a/doc/apps/config.pod +++ b/doc/apps/config.pod @@ -20,7 +20,7 @@ started or end of file is reached. A section name can consist of alphanumeric characters and underscores. The first section of a configuration file is special and is referred -to as the B section this is usually unnamed and is from the +to as the B section. This section is usually unnamed and spans from the start of file until the first named section. When a name is being looked up it is first looked up in a named section (if any) and then the default section. From levitte at openssl.org Thu Apr 12 12:34:28 2018 From: levitte at openssl.org (Richard Levitte) Date: Thu, 12 Apr 2018 12:34:28 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_0_2-stable update Message-ID: <1523536468.284917.6157.nullmailer@dev.openssl.org> The branch OpenSSL_1_0_2-stable has been updated via d1a64149b061172d120559aea289498ec680b497 (commit) from 06196e717651fe2c724fb326e31e8d666b27de33 (commit) - Log ----------------------------------------------------------------- commit d1a64149b061172d120559aea289498ec680b497 Author: Daniel Bevenius Date: Thu Apr 12 13:39:37 2018 +0200 Clarify default section in config.pod This is a minor update which hopefully makes these particular lines read a little easier. Reviewed-by: Matthias St. Pierre Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5938) (cherry picked from commit 0652e8a7fe6dd8cbdf4516b221642b10bbfc68fe) (cherry picked from commit 9e8554fca5019b81ed7659d97f103f388ea3a2bf) ----------------------------------------------------------------------- Summary of changes: doc/apps/config.pod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/apps/config.pod b/doc/apps/config.pod index 3f607d3..b1300a9 100644 --- a/doc/apps/config.pod +++ b/doc/apps/config.pod @@ -21,7 +21,7 @@ started or end of file is reached. A section name can consist of alphanumeric characters and underscores. The first section of a configuration file is special and is referred -to as the B section this is usually unnamed and is from the +to as the B section. This section is usually unnamed and spans from the start of file until the first named section. When a name is being looked up it is first looked up in a named section (if any) and then the default section. From no-reply at appveyor.com Thu Apr 12 12:40:39 2018 From: no-reply at appveyor.com (AppVeyor) Date: Thu, 12 Apr 2018 12:40:39 +0000 Subject: [openssl-commits] Build completed: openssl master.17199 Message-ID: <20180412124039.1.AC82F6B33394CD70@appveyor.com> An HTML attachment was scrubbed... URL: From appro at openssl.org Thu Apr 12 13:00:06 2018 From: appro at openssl.org (Andy Polyakov) Date: Thu, 12 Apr 2018 13:00:06 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523538006.998094.1551.nullmailer@dev.openssl.org> The branch master has been updated via 18d1588268f0fbec249d3386113df4452234573d (commit) from 0652e8a7fe6dd8cbdf4516b221642b10bbfc68fe (commit) - Log ----------------------------------------------------------------- commit 18d1588268f0fbec249d3386113df4452234573d Author: Andy Polyakov Date: Wed Apr 11 10:11:07 2018 +0200 Configurations/*.tmpl: refine build_all_generated. Purpose of build_all_generated is to execute all the rules that require perl, so that one can copy the tree to system with compiler but without perl. This commit removes last dependencies on perl. Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5929) ----------------------------------------------------------------------- Summary of changes: Configurations/descrip.mms.tmpl | 5 +++++ Configurations/unix-Makefile.tmpl | 21 +++++++++++---------- Configurations/windows-makefile.tmpl | 10 ++++++++++ 3 files changed, 26 insertions(+), 10 deletions(-) diff --git a/Configurations/descrip.mms.tmpl b/Configurations/descrip.mms.tmpl index 09b6763..bbd9b0e 100644 --- a/Configurations/descrip.mms.tmpl +++ b/Configurations/descrip.mms.tmpl @@ -415,6 +415,11 @@ build_apps build_tests : build_programs # Convenience target to prebuild all generated files, not just the mandatory # ones build_all_generated : $(GENERATED_MANDATORY) $(GENERATED) + @ ! {- output_off() if $disabled{makedepend}; "" -} + @ WRITE SYS$OUTPUT "Warning: consider configuring with no-makedepend, because if" + @ WRITE SYS$OUTPUT " target system doesn't have $(PERL)," + @ WRITE SYS$OUTPUT " then make will fail..." + @ ! {- output_on() if $disabled{makedepend}; "" -} test : tests {- dependmagic('tests'); -} : build_programs_nodep, build_engines_nodep diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl index 46a4866..39df5cd 100644 --- a/Configurations/unix-Makefile.tmpl +++ b/Configurations/unix-Makefile.tmpl @@ -353,6 +353,11 @@ build_apps build_tests: build_programs # Convenience target to prebuild all generated files, not just the mandatory # ones build_all_generated: $(GENERATED_MANDATORY) $(GENERATED) + @ : {- output_off() if $disabled{makedepend}; "" -} + @echo "Warning: consider configuring with no-makedepend, because if" + @echo " target system doesn't have $(PERL)," + @echo " then make will fail..." + @ : {- output_on() if $disabled{makedepend}; "" -} test: tests {- dependmagic('tests'); -}: build_programs_nodep build_engines_nodep link-utils @@ -1000,18 +1005,14 @@ $obj$objext: $deps $cmd $cmdflags -c -o \$\@ $srcs EOF } elsif (grep /\.S$/, @srcs) { - # In case one wonders why not just $(CC) -c file.S. While it - # does work with contemporary compilers, there are some legacy - # ones that get it wrong. Hence the elaborate scheme... We - # don't care to maintain dependecy lists, because dependency - # is rather weak, at most one header file that lists constants - # which are assigned in ascending order. + # Originally there was mutli-step rule with $(CC) -E file.S + # followed by $(CC) -c file.s. It compensated for one of + # legacy platform compiler's inability to handle .S files. + # The platform is long discontinued by vendor so there is + # hardly a point to drag it along... $recipe .= <<"EOF"; $obj$objext: $deps - ( trap "rm -f \$@.*" INT 0; \\ - \$(CC) $incs $cmdflags -E $srcs | \\ - \$(PERL) -ne '/^#(line)?\\s*[0-9]+/ or print' > \$@.s && \\ - $cmd $cmdflags -c -o \$\@ \$@.s ) + $cmd $incs $cmdflags -c -o \$\@ $srcs EOF } elsif (defined $makedepprog && $makedepprog !~ /\/makedepend/) { $recipe .= <<"EOF"; diff --git a/Configurations/windows-makefile.tmpl b/Configurations/windows-makefile.tmpl index 1c6ce51..c51e4c7 100644 --- a/Configurations/windows-makefile.tmpl +++ b/Configurations/windows-makefile.tmpl @@ -319,6 +319,11 @@ build_apps build_tests: build_programs # Convenience target to prebuild all generated files, not just the mandatory # ones build_all_generated: $(GENERATED_MANDATORY) $(GENERATED) + @rem {- output_off() if $disabled{makedepend}; "" -} + @echo "Warning: consider configuring with no-makedepend, because if" + @echo " target system doesn't have $(PERL)," + @echo " then make will fail..." + @rem {- output_on() if $disabled{makedepend}; "" -} test: tests {- dependmagic('tests'); -}: build_programs_nodep build_engines_nodep @@ -580,6 +585,11 @@ EOF $obj$objext: $deps \$(AS) $asflags \$(ASOUTFLAG)\$\@ $srcs EOF + } elsif ($srcs[0] =~ /.S$/) { + return <<"EOF"; +$obj$objext: $deps + \$(CC) /EP /D__ASSEMBLER__ $cflags $srcs > \$@.asm && \$(AS) $asflags \$(ASOUTFLAG)\$\@ \$@.asm +EOF } return <<"EOF" if (!$disabled{makedepend}); $obj$depext: $deps From levitte at openssl.org Thu Apr 12 13:35:04 2018 From: levitte at openssl.org (Richard Levitte) Date: Thu, 12 Apr 2018 13:35:04 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523540104.874046.7816.nullmailer@dev.openssl.org> The branch master has been updated via 362ff3c39703633ac53ba9130c7acc02177bedc5 (commit) via adaf3cfad2319fe5c0d6fe179c726cc85eebf2d3 (commit) from 18d1588268f0fbec249d3386113df4452234573d (commit) - Log ----------------------------------------------------------------- commit 362ff3c39703633ac53ba9130c7acc02177bedc5 Author: Richard Levitte Date: Thu Apr 12 13:30:57 2018 +0200 openssl rehash: use libcrypto variables for default dir X509_get_default_cert_dir_env() returns the default environment variable to check for certificate directories. X509_get_default_cert_dir() returns the default configured certificate directory. Use these instead of hard coding our own values, and thereby be more integrated with the rest of OpenSSL. Reviewed-by: Andy Polyakov (Merged from https://github.com/openssl/openssl/pull/5937) commit adaf3cfad2319fe5c0d6fe179c726cc85eebf2d3 Author: Richard Levitte Date: Thu Apr 12 13:30:21 2018 +0200 openssl rehash: document -compat Fixes #5902 Reviewed-by: Andy Polyakov (Merged from https://github.com/openssl/openssl/pull/5937) ----------------------------------------------------------------------- Summary of changes: apps/rehash.c | 7 ++++--- doc/man1/rehash.pod | 6 ++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/apps/rehash.c b/apps/rehash.c index 6f2b5da..2b6167f 100644 --- a/apps/rehash.c +++ b/apps/rehash.c @@ -479,13 +479,14 @@ int rehash_main(int argc, char **argv) if (*argv != NULL) { while (*argv != NULL) errs += do_dir(*argv++, h); - } else if ((env = getenv("SSL_CERT_DIR")) != NULL) { + } else if ((env = getenv(X509_get_default_cert_dir_env())) != NULL) { + char lsc[2] = { LIST_SEPARATOR_CHAR, '\0' }; m = OPENSSL_strdup(env); - for (e = strtok(m, ":"); e != NULL; e = strtok(NULL, ":")) + for (e = strtok(m, lsc); e != NULL; e = strtok(NULL, lsc)) errs += do_dir(e, h); OPENSSL_free(m); } else { - errs += do_dir("/etc/ssl/certs", h); + errs += do_dir(X509_get_default_cert_dir(), h); } end: diff --git a/doc/man1/rehash.pod b/doc/man1/rehash.pod index 79268d4..0a192e9 100644 --- a/doc/man1/rehash.pod +++ b/doc/man1/rehash.pod @@ -99,6 +99,12 @@ Note that current versions will not use the old style. Do not remove existing links. This is needed when keeping new and old-style links in the same directory. +=item B<-compat> + +Generate links for both old-style (MD5) and new-style (SHA1) hashing. +This allows releases before 1.0.0 to use these links along-side newer +releases. + =item B<-v> Print messages about old links removed and new links created. From levitte at openssl.org Thu Apr 12 13:36:31 2018 From: levitte at openssl.org (Richard Levitte) Date: Thu, 12 Apr 2018 13:36:31 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1523540191.050690.10061.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via e7bc92bc782b995231dbf855970f206ebc65c75d (commit) via f93f6a3bbcd253cd90a280ce7ba598908eed1489 (commit) from 9e8554fca5019b81ed7659d97f103f388ea3a2bf (commit) - Log ----------------------------------------------------------------- commit e7bc92bc782b995231dbf855970f206ebc65c75d Author: Richard Levitte Date: Thu Apr 12 13:30:57 2018 +0200 openssl rehash: use libcrypto variables for default dir X509_get_default_cert_dir_env() returns the default environment variable to check for certificate directories. X509_get_default_cert_dir() returns the default configured certificate directory. Use these instead of hard coding our own values, and thereby be more integrated with the rest of OpenSSL. Reviewed-by: Andy Polyakov (Merged from https://github.com/openssl/openssl/pull/5937) (cherry picked from commit 362ff3c39703633ac53ba9130c7acc02177bedc5) commit f93f6a3bbcd253cd90a280ce7ba598908eed1489 Author: Richard Levitte Date: Thu Apr 12 13:30:21 2018 +0200 openssl rehash: document -compat Fixes #5902 Reviewed-by: Andy Polyakov (Merged from https://github.com/openssl/openssl/pull/5937) (cherry picked from commit adaf3cfad2319fe5c0d6fe179c726cc85eebf2d3) ----------------------------------------------------------------------- Summary of changes: apps/rehash.c | 7 ++++--- doc/apps/rehash.pod | 6 ++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/apps/rehash.c b/apps/rehash.c index 273ad74..19e24d9 100644 --- a/apps/rehash.c +++ b/apps/rehash.c @@ -502,13 +502,14 @@ int rehash_main(int argc, char **argv) if (*argv) { while (*argv) errs += do_dir(*argv++, h); - } else if ((env = getenv("SSL_CERT_DIR")) != NULL) { + } else if ((env = getenv(X509_get_default_cert_dir_env())) != NULL) { + char lsc[2] = { LIST_SEPARATOR_CHAR, '\0' }; m = OPENSSL_strdup(env); - for (e = strtok(m, ":"); e != NULL; e = strtok(NULL, ":")) + for (e = strtok(m, lsc); e != NULL; e = strtok(NULL, lsc)) errs += do_dir(e, h); OPENSSL_free(m); } else { - errs += do_dir("/etc/ssl/certs", h); + errs += do_dir(X509_get_default_cert_dir(), h); } end: diff --git a/doc/apps/rehash.pod b/doc/apps/rehash.pod index 79268d4..0a192e9 100644 --- a/doc/apps/rehash.pod +++ b/doc/apps/rehash.pod @@ -99,6 +99,12 @@ Note that current versions will not use the old style. Do not remove existing links. This is needed when keeping new and old-style links in the same directory. +=item B<-compat> + +Generate links for both old-style (MD5) and new-style (SHA1) hashing. +This allows releases before 1.0.0 to use these links along-side newer +releases. + =item B<-v> Print messages about old links removed and new links created. From mark at openssl.org Thu Apr 12 14:47:03 2018 From: mark at openssl.org (Mark J. Cox) Date: Thu, 12 Apr 2018 14:47:03 +0000 Subject: [openssl-commits] [web] master update Message-ID: <1523544423.121601.17782.nullmailer@dev.openssl.org> The branch master has been updated via e73e4460aa47e8cb6c694625584c26e9298d0bb5 (commit) from a2e614d7f5554b477dedd0066709df3cd3e14990 (commit) - Log ----------------------------------------------------------------- commit e73e4460aa47e8cb6c694625584c26e9298d0bb5 Author: Mark J. Cox Date: Thu Apr 12 15:46:30 2018 +0100 Use a unified converter tool with Apache by making it handle both formats and abstracting the differences ----------------------------------------------------------------------- Summary of changes: bin/vulnxml2json.py | 137 ++++++++++++++++++++++++--------------------- bin/vulnxml2jsonproject.py | 43 ++++++++++++++ 2 files changed, 117 insertions(+), 63 deletions(-) create mode 100644 bin/vulnxml2jsonproject.py diff --git a/bin/vulnxml2json.py b/bin/vulnxml2json.py index b905da1..cffa29f 100755 --- a/bin/vulnxml2json.py +++ b/bin/vulnxml2json.py @@ -3,8 +3,11 @@ # Convert our XML file to a JSON file as accepted by Mitre for CNA purposes # as per https://github.com/CVEProject/automation-working-group/blob/master/cve_json_schema/DRAFT-JSON-file-format-v4.md # +# ASF httpd and OpenSSL use quite similar files, so this script is designed to work with either +# from xml.dom import minidom +import HTMLParser import simplejson as json import codecs import re @@ -17,45 +20,15 @@ from jsonschema import validate from jsonschema import Draft4Validator import urllib -# Versions of OpenSSL we never released, to allow us to display ranges -neverreleased = "1.0.0h,"; +# Specific project stuff is here +import vulnxml2jsonproject as cfg # Location of CVE JSON schema (default, can use local file etc) default_cve_schema = "https://raw.githubusercontent.com/CVEProject/automation-working-group/master/cve_json_schema/CVE_JSON_4.0_min_public.schema" -def merge_affects(issue,base): - # let's merge the affects into a nice list which is better for Mitre text but we have to take into account our stange lettering scheme - prev = "" - anext = "" - alist = list() - vlist = list() - for affects in issue.getElementsByTagName('affects'): # so we can sort them - version = affects.getAttribute("version") - if (not base or base in version): - vlist.append(version) - for ver in sorted(vlist): - # print "version %s (last was %s, next was %s)" %(ver,prev,anext) - if (ver != anext): - alist.append([ver]) - elif len(alist[-1]) > 1: - alist[-1][-1] = ver - else: - alist[-1].append(ver) - prev = ver - if (unicode.isdigit(ver[-1])): # First version after 1.0.1 is 1.0.1a - anext = ver + "a" - elif (ver[-1] == "y"): - anext = ver[:-1] + "za" # We ran out of letters once so y->za->zb.... - else: - anext = ver[:-1]+chr(ord(ver[-1])+1) # otherwise after 1.0.1a is 1.0.1b - while (anext in neverreleased): # skip unreleased versions - anext = anext[:-1]+chr(ord(anext[-1])+1) - - return ",".join(['-'.join(map(str,aff)) for aff in alist]) - parser = OptionParser() parser.add_option("-s", "--schema", help="location of schema to check (default "+default_cve_schema+")", default=default_cve_schema,dest="schema") -parser.add_option("-i", "--input", help="input vulnerability file live openssl-web/news/vulnerabilities.xml", dest="input") +parser.add_option("-i", "--input", help="input vulnerability file vulnerabilities.xml", dest="input") parser.add_option("-c", "--cve", help="comma separated list of cve names to generate a json file for (or all)", dest="cves") parser.add_option("-o", "--outputdir", help="output directory for json file (default ./)", default=".", dest="outputdir") (options, args) = parser.parse_args() @@ -74,61 +47,99 @@ cvej = list() with codecs.open(options.input,"r","utf-8") as vulnfile: vulns = vulnfile.read() dom = minidom.parseString(vulns.encode("utf-8")) -issues = dom.getElementsByTagName('issue') -for issue in issues: - cve = issue.getElementsByTagName('cve')[0].getAttribute('name') - if (cve == ""): + +for issue in dom.getElementsByTagName('issue'): + if not issue.getElementsByTagName('cve'): + continue + # ASF httpd has CVE- prefix, but OpenSSL does not, make either work + cvename = issue.getElementsByTagName('cve')[0].getAttribute('name').replace('CVE-','') + if (cvename == ""): continue - if (options.cves): - if (not cve in options.cves): + if (options.cves): # If we only want a certain list of CVEs, skip the rest + if (not cvename in options.cves): continue + cve = dict() cve['data_type']="CVE" cve['data_format']="MITRE" cve['data_version']="4.0" - cve['CVE_data_meta']= { "ID": "CVE-"+issue.getElementsByTagName('cve')[0].getAttribute('name'), "ASSIGNER": "openssl-security at openssl.org", "STATE":"PUBLIC" } + cve['CVE_data_meta']= { "ID": "CVE-"+cvename, "ASSIGNER": cfg.config['cve_meta_assigner'], "STATE":"PUBLIC" } datepublic = issue.getAttribute("public") - cve['CVE_data_meta']['DATE_PUBLIC'] = datepublic[:4]+'-'+datepublic[4:6]+'-'+datepublic[6:8] + if datepublic: + cve['CVE_data_meta']['DATE_PUBLIC'] = datepublic[:4]+'-'+datepublic[4:6]+'-'+datepublic[6:8] if issue.getElementsByTagName('title'): - cve['CVE_data_meta']['TITLE'] = issue.getElementsByTagName('title')[0].childNodes[0].nodeValue.strip() - desc = issue.getElementsByTagName('description')[0].childNodes[0].nodeValue.strip() + cve['CVE_data_meta']['TITLE'] = issue.getElementsByTagName('title')[0].childNodes[0].nodeValue.strip() + desc = "" + for d in issue.getElementsByTagName('description')[0].childNodes: +# if d.nodeType == d.ELEMENT_NODE: + if desc: + desc += " " + desc += re.sub('<[^<]+?>', '', d.toxml().strip()) + desc = HTMLParser.HTMLParser().unescape(desc) problemtype = "(undefined)" if issue.getElementsByTagName('problemtype'): problemtype = issue.getElementsByTagName('problemtype')[0].childNodes[0].nodeValue.strip() cve['problemtype'] = { "problemtype_data": [ { "description" : [ { "lang":"eng", "value": problemtype} ] } ] } - impact = issue.getElementsByTagName('impact') + impact = issue.getElementsByTagName('impact') # openssl does it like this if impact: - cve['impact'] = [ { "lang":"eng", "value":impact[0].getAttribute('severity'), "url":"https://www.openssl.org/policies/secpolicy.html#"+impact[0].getAttribute('severity') } ] - for reported in issue.getElementsByTagName('reported'): - cve['credit'] = [ { "lang":"eng", "value":reported.getAttribute("source")} ] + cve['impact'] = [ { "lang":"eng", "value":impact[0].getAttribute('severity'), "url":cfg.config['security_policy_url']+impact[0].getAttribute('severity') } ] + impact = issue.getElementsByTagName('severity') # httpd does it like this + if impact: + cve['impact'] = [ { "lang":"eng", "value":impact[0].childNodes[0].nodeValue, "url":cfg.config['security_policy_url']+impact[0].childNodes[0].nodeValue } ] + + # Create the list of credits + + credit = list() + for reported in issue.getElementsByTagName('reported'): # openssl style credits + credit.append( { "lang":"eng", "value":re.sub('[\n ]+',' ', reported.getAttribute("source"))} ) + for reported in issue.getElementsByTagName('acknowledgements'): # ASF httpd style credits + credit.append( { "lang":"eng", "value":re.sub('[\n ]+',' ', reported.childNodes[0].nodeValue.strip())} ) + if credit: + cve['credit']=credit + + # Create the list of references + refs = list() for adv in issue.getElementsByTagName('advisory'): url = adv.getAttribute("url") if (not url.startswith("htt")): - url = "https://www.openssl.org"+url - refs.append({"url":url}) - for git in issue.getElementsByTagName('git'): - refs.append({"url":"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h="+git.getAttribute("hash")}) + url = cfg.config['default_reference_prefix']+url + refs.append({"url":url,"name":url,"refsource":"CONFIRM"}) + for git in issue.getElementsByTagName('git'): # openssl style references to git + url = cfg.config['git_prefix']+git.getAttribute("hash") + refs.append({"url":url,"name":url,"refsource":"CONFIRM"}) + if cfg.config['project'] == 'httpd': # ASF httpd has no references so fake them + for fixed in issue.getElementsByTagName('fixed'): + base = "".join(fixed.getAttribute("version").split('.')[:-1]) + refurl = cfg.config['default_reference']+base+".html#CVE-"+cvename + refs.append({"url":refurl,"name":refurl,"refsource":"CONFIRM"}) if refs: cve['references'] = { "reference_data": refs } - vv = list() - for affects in issue.getElementsByTagName('fixed'): - text = "Fixed in OpenSSL %s (Affected %s)" %(affects.getAttribute('version'),merge_affects(issue,affects.getAttribute("base"))) - # Let's condense into a list form since the format of this field is 'free text' at the moment, not machine readable (as per mail with George Theall) - vv.append({"version_value":text}) - # Mitre want the fixed/affected versions in the text too - desc += " "+text+"." - - cve['affects'] = { "vendor" : { "vendor_data" : [ { "vendor_name": "OpenSSL", "product": { "product_data" : [ { "product_name": "OpenSSL", "version": { "version_data" : vv}}]}}]}} + # Create the "affected products" list + vv = list() + for affects in issue.getElementsByTagName('fixed'): # OpenSSL and httpd since April 2018 does it this way + text = "Fixed in %s %s (Affected %s)" %(cfg.config['product_name'],affects.getAttribute('version'),cfg.merge_affects(issue,affects.getAttribute("base"))) + # Let's condense into a list form since the format of this field is 'free text' at the moment, not machine readable (as per mail with George Theall) + vv.append({"version_value":text}) + # Mitre want the fixed/affected versions in the text too + desc += " "+text+"." + +# if issue.getAttribute('fixed'): # httpd used to do it this way +# base = ".".join(issue.getAttribute("fixed").split('.')[:-1])+"." +# text = "Fixed in %s %s (Affected %s)" %(cfg.config['product_name'],issue.getAttribute('fixed'),cfg.merge_affects(issue,base)) +# vv.append({"version_value":text}) +# # Mitre want the fixed/affected versions in the text too +# desc += " "+text+"." + + cve['affects'] = { "vendor" : { "vendor_data" : [ { "vendor_name": cfg.config['vendor_name'], "product": { "product_data" : [ { "product_name": cfg.config['product_name'], "version": { "version_data" : vv}}]}}]}} + # Mitre want newlines and excess spaces stripped - desc = re.sub('[\n ]+',' ', desc) - + desc = re.sub('[\n ]+',' ', desc) cve['description'] = { "description_data": [ { "lang":"eng", "value": desc} ] } cvej.append(cve) - for issue in cvej: fn = issue['CVE_data_meta']['ID'] + ".json" if not issue: diff --git a/bin/vulnxml2jsonproject.py b/bin/vulnxml2jsonproject.py new file mode 100644 index 0000000..bd7ba65 --- /dev/null +++ b/bin/vulnxml2jsonproject.py @@ -0,0 +1,43 @@ +#! /usr/bin/python + +# project specific details +config = dict() +config['project'] = "openssl" +config['vendor_name'] = "OpenSSL" +config['product_name'] = "OpenSSL" +config['cve_meta_assigner'] = "openssl-security at openssl.org" +# Versions of OpenSSL we never released, to allow us to display ranges +config['neverreleased'] = "1.0.0h," +config['security_policy_url'] = "https://www.openssl.org/policies/secpolicy.html#" +config['git_prefix'] = "https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=" +config['default_reference_prefix'] = "https://www.openssl.org" + +def merge_affects(issue,base): + # let's merge the affects into a nice list which is better for Mitre text but we have to take into account our stange lettering scheme + prev = "" + anext = "" + alist = list() + vlist = list() + for affects in issue.getElementsByTagName('affects'): # so we can sort them + version = affects.getAttribute("version") + if (not base or base in version): + vlist.append(version) + for ver in sorted(vlist): + # print "version %s (last was %s, next was %s)" %(ver,prev,anext) + if (ver != anext): + alist.append([ver]) + elif len(alist[-1]) > 1: + alist[-1][-1] = ver + else: + alist[-1].append(ver) + prev = ver + if (unicode.isdigit(ver[-1])): # First version after 1.0.1 is 1.0.1a + anext = ver + "a" + elif (ver[-1] == "y"): + anext = ver[:-1] + "za" # We ran out of letters once so y->za->zb.... + else: + anext = ver[:-1]+chr(ord(ver[-1])+1) # otherwise after 1.0.1a is 1.0.1b + while (anext in config['neverreleased']): # skip unreleased versions + anext = anext[:-1]+chr(ord(anext[-1])+1) + + return ",".join(['-'.join(map(str,aff)) for aff in alist]) From no-reply at appveyor.com Thu Apr 12 15:11:08 2018 From: no-reply at appveyor.com (AppVeyor) Date: Thu, 12 Apr 2018 15:11:08 +0000 Subject: [openssl-commits] Build failed: openssl master.17205 Message-ID: <20180412151108.1.68D2D8C562FF18A5@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Thu Apr 12 15:56:50 2018 From: no-reply at appveyor.com (AppVeyor) Date: Thu, 12 Apr 2018 15:56:50 +0000 Subject: [openssl-commits] Build completed: openssl master.17206 Message-ID: <20180412155650.1.E4888654008CE32C@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Thu Apr 12 17:52:52 2018 From: no-reply at appveyor.com (AppVeyor) Date: Thu, 12 Apr 2018 17:52:52 +0000 Subject: [openssl-commits] Build failed: openssl master.17210 Message-ID: <20180412175252.1.34307862E9E79C0A@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Thu Apr 12 21:24:03 2018 From: no-reply at appveyor.com (AppVeyor) Date: Thu, 12 Apr 2018 21:24:03 +0000 Subject: [openssl-commits] Build failed: openssl master.17213 Message-ID: <20180412212403.1.5FC4C8084DCC014D@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Fri Apr 13 03:23:34 2018 From: no-reply at appveyor.com (AppVeyor) Date: Fri, 13 Apr 2018 03:23:34 +0000 Subject: [openssl-commits] Build failed: openssl master.17216 Message-ID: <20180413032334.1.2053A2E131784765@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Fri Apr 13 06:46:39 2018 From: no-reply at appveyor.com (AppVeyor) Date: Fri, 13 Apr 2018 06:46:39 +0000 Subject: [openssl-commits] Build completed: openssl master.17217 Message-ID: <20180413064639.1.0AD8A7D740AECE92@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Fri Apr 13 07:35:18 2018 From: no-reply at appveyor.com (AppVeyor) Date: Fri, 13 Apr 2018 07:35:18 +0000 Subject: [openssl-commits] Build failed: openssl master.17218 Message-ID: <20180413073518.1.B839EBCCCBE011B5@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Fri Apr 13 08:10:57 2018 From: no-reply at appveyor.com (AppVeyor) Date: Fri, 13 Apr 2018 08:10:57 +0000 Subject: [openssl-commits] Build completed: openssl OpenSSL_1_1_0-stable.17219 Message-ID: <20180413081057.1.27B1EA2F4A4C0257@appveyor.com> An HTML attachment was scrubbed... URL: From appro at openssl.org Fri Apr 13 08:15:02 2018 From: appro at openssl.org (Andy Polyakov) Date: Fri, 13 Apr 2018 08:15:02 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523607302.184297.13478.nullmailer@dev.openssl.org> The branch master has been updated via b4c1950d8914775db503d8ab931735325032a40d (commit) via 6b3e8b94301d1081e88d276eeb452668c8f13632 (commit) from 362ff3c39703633ac53ba9130c7acc02177bedc5 (commit) - Log ----------------------------------------------------------------- commit b4c1950d8914775db503d8ab931735325032a40d Author: Andy Polyakov Date: Wed Apr 11 14:56:37 2018 +0200 TLSProxy/Proxy.pm: handle "impossible" failure to connect to s_server. The failure is "impossible", because we have confirmation that s_server listens, yet Mac OS X fails to connect. This avoids 10 minutes timeout on Travis CI. Reviewed-by: Bernd Edlinger Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5907) commit 6b3e8b94301d1081e88d276eeb452668c8f13632 Author: Andy Polyakov Date: Sun Apr 8 14:44:59 2018 +0200 TLSProxy/Proxy.pm: handle -1 as return value from waitpid. On rare occasion 's_server | perl -ne print' can complete before corresponding waitpid, which on Windows can results in -1 return value. This is not an error, don't treat it like one. Collect even return value from s_server. Reviewed-by: Bernd Edlinger Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5907) ----------------------------------------------------------------------- Summary of changes: util/perl/TLSProxy/Proxy.pm | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/util/perl/TLSProxy/Proxy.pm b/util/perl/TLSProxy/Proxy.pm index b3b2fec..45d88bf 100644 --- a/util/perl/TLSProxy/Proxy.pm +++ b/util/perl/TLSProxy/Proxy.pm @@ -189,10 +189,16 @@ sub connect_to_server $servaddr =~ s/[\[\]]//g; # Remove [ and ] - $self->{server_sock} = $IP_factory->(PeerAddr => $servaddr, - PeerPort => $self->{server_port}, - Proto => 'tcp') - or die "unable to connect: $!\n"; + my $sock = $IP_factory->(PeerAddr => $servaddr, + PeerPort => $self->{server_port}, + Proto => 'tcp'); + if (!defined($sock)) { + my $err = $!; + kill(3, $self->{real_serverpid}); + die "unable to connect: $err\n"; + } + + $self->{server_sock} = $sock; } sub start @@ -243,7 +249,8 @@ sub start if ($self->{server_port} == 0) { # This actually means that s_server exited, because otherwise # we would still searching for ACCEPT... - die "no ACCEPT detected in '$execcmd' output\n"; + waitpid($pid, 0); + die "no ACCEPT detected in '$execcmd' output: $?\n"; } # Just make sure everything else is simply printed [as separate lines]. @@ -255,6 +262,7 @@ sub start if (eval { require Win32::Process; 1; }) { if (Win32::Process::Create(my $h, $^X, "perl -ne print", 0, 0, ".")) { $pid = $h->GetProcessID(); + $self->{proc_handle} = $h; # hold handle till next round [or exit] } else { $error = Win32::FormatMessage(Win32::GetLastError()); } @@ -412,11 +420,19 @@ sub clientstart my $pid; if (--$self->{serverconnects} == 0) { $pid = $self->{serverpid}; - die "serverpid is zero\n" if $pid == 0; - print "Waiting for server process to close: $pid...\n"; - # recall that we wait on process that buffers server's output + print "Waiting for 'perl -ne print' process to close: $pid...\n"; + $pid = waitpid($pid, 0); + if ($pid > 0) { + die "exit code $? from 'perl -ne print' process\n" if $? != 0; + } elsif ($pid == 0) { + kill(3, $self->{real_serverpid}); + die "lost control over $self->{serverpid}?"; + } + $pid = $self->{real_serverpid}; + print "Waiting for s_server process to close: $pid...\n"; + # it's done already, just collect the exit code [and reap]... waitpid($pid, 0); - die "exit code $? from server process\n" if $? != 0; + die "exit code $? from s_server process\n" if $? != 0; } else { # It's a bit counter-intuitive spot to make next connection to # the s_server. Rationale is that established connection works @@ -425,7 +441,6 @@ sub clientstart $self->connect_to_server(); } $pid = $self->{clientpid}; - die "clientpid is zero\n" if $pid == 0; print "Waiting for client process to close: $pid...\n"; waitpid($pid, 0); From levitte at openssl.org Fri Apr 13 08:24:26 2018 From: levitte at openssl.org (Richard Levitte) Date: Fri, 13 Apr 2018 08:24:26 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523607866.393166.16487.nullmailer@dev.openssl.org> The branch master has been updated via 0320e8e2869fb6cde4579375e65f6d576bbec95e (commit) from b4c1950d8914775db503d8ab931735325032a40d (commit) - Log ----------------------------------------------------------------- commit 0320e8e2869fb6cde4579375e65f6d576bbec95e Author: Richard Levitte Date: Fri Apr 13 08:19:54 2018 +0200 Docs for OpenSSL_init_crypto: there is no way to specify another file The documentation erroneously stated that one can change the default configuration file name. Fixes #5939 Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/5941) ----------------------------------------------------------------------- Summary of changes: doc/man3/OPENSSL_init_crypto.pod | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/man3/OPENSSL_init_crypto.pod b/doc/man3/OPENSSL_init_crypto.pod index c6a1715..b979c25 100644 --- a/doc/man3/OPENSSL_init_crypto.pod +++ b/doc/man3/OPENSSL_init_crypto.pod @@ -197,10 +197,10 @@ resources should be freed at an earlier time, or under the circumstances described in the NOTES section below. The B flag will load a default configuration -file. To specify a different file, an B must -be created and used. The routines -OPENSSL_INIT_new() and OPENSSL_INIT_set_config_appname() can be used to -allocate the object and set the application name, and then the +file. For optional configuration file settings, an B +must be created and used. +The routines OPENSSL_init_new() and OPENSSL_INIT_set_config_appname() can +be used to allocate the object and set the application name, and then the object can be released with OPENSSL_INIT_free() when done. =head1 NOTES From no-reply at appveyor.com Fri Apr 13 08:25:31 2018 From: no-reply at appveyor.com (AppVeyor) Date: Fri, 13 Apr 2018 08:25:31 +0000 Subject: [openssl-commits] Build failed: openssl master.17220 Message-ID: <20180413082531.1.03C4B3BF79250A71@appveyor.com> An HTML attachment was scrubbed... URL: From levitte at openssl.org Fri Apr 13 08:26:56 2018 From: levitte at openssl.org (Richard Levitte) Date: Fri, 13 Apr 2018 08:26:56 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1523608016.890169.17995.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via 2a479a86bd5eca8792a75a08c836b405f3cef4d6 (commit) from e7bc92bc782b995231dbf855970f206ebc65c75d (commit) - Log ----------------------------------------------------------------- commit 2a479a86bd5eca8792a75a08c836b405f3cef4d6 Author: Richard Levitte Date: Fri Apr 13 08:19:54 2018 +0200 Docs for OpenSSL_init_crypto: there is no way to specify another file The documentation erroneously stated that one can change the default configuration file name. Fixes #5939 Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/5941) (cherry picked from commit 0320e8e2869fb6cde4579375e65f6d576bbec95e) ----------------------------------------------------------------------- Summary of changes: doc/crypto/OPENSSL_init_crypto.pod | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/crypto/OPENSSL_init_crypto.pod b/doc/crypto/OPENSSL_init_crypto.pod index f0b3c8a..cb64705 100644 --- a/doc/crypto/OPENSSL_init_crypto.pod +++ b/doc/crypto/OPENSSL_init_crypto.pod @@ -190,10 +190,10 @@ resources should be freed at an earlier time, or under the circumstances described in the NOTES section below. The B flag will load a default configuration -file. To specify a different file, an B must -be created and used. The routines -OPENSSL_init_new() and OPENSSL_INIT_set_config_appname() can be used to -allocate the object and set the application name, and then the +file. For optional configuration file settings, an B +must be created and used. +The routines OPENSSL_init_new() and OPENSSL_INIT_set_config_appname() can +be used to allocate the object and set the application name, and then the object can be released with OPENSSL_INIT_free() when done. =head1 NOTES From matt at openssl.org Fri Apr 13 08:41:09 2018 From: matt at openssl.org (Matt Caswell) Date: Fri, 13 Apr 2018 08:41:09 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523608869.803807.21941.nullmailer@dev.openssl.org> The branch master has been updated via 76fd7a1d61924ba5ee45224454cc3754b672efbf (commit) via 3fd59700357072c567785a1fb1430a55ef7bd45b (commit) via c080461448815dab809661080ee5e21417478fb4 (commit) from 0320e8e2869fb6cde4579375e65f6d576bbec95e (commit) - Log ----------------------------------------------------------------- commit 76fd7a1d61924ba5ee45224454cc3754b672efbf Author: Matt Caswell Date: Tue Apr 10 14:51:12 2018 +0100 Add a test for SRP Reviewed-by: Andy Polyakov (Merged from https://github.com/openssl/openssl/pull/5925) commit 3fd59700357072c567785a1fb1430a55ef7bd45b Author: Matt Caswell Date: Mon Apr 9 15:50:20 2018 +0100 Add support for the SRP base64 alphabet Historically we used to implement standalone base64 code for SRP. This was replaced by commit 3d3f21aa with the standard base64 processing code. However, the SRP base64 code was designed to be compatible with other SRP libraries (notably libsrp, but also others) that use a variant of standard base64. Specifically a different alphabet is used and no padding '=' characters are used. Instead 0 padding is added to the front of the string. By changing to standard base64 we change the behaviour of the API which may impact interoperability. It also means that SRP verifier files created prior to 1.1.1 would not be readable in 1.1.1 and vice versa. Instead we expand our standard base64 processing with the capability to be able to read and generate the SRP base64 variant. Reviewed-by: Andy Polyakov (Merged from https://github.com/openssl/openssl/pull/5925) commit c080461448815dab809661080ee5e21417478fb4 Author: Matt Caswell Date: Mon Apr 9 15:06:50 2018 +0100 Change SRP functions to use EVP_EncodeUpdate/EVP_DecodeUpdate functions Previously they were using EVP_EncodeBlock/EVP_DecodeBlock. These are low level functions that do not handle padding characters. This was causing the SRP code to fail. One side effect of using EVP_EncodeUpdate is that it inserts newlines which is not what we need in SRP so we add a flag to avoid that. Reviewed-by: Andy Polyakov (Merged from https://github.com/openssl/openssl/pull/5925) ----------------------------------------------------------------------- Summary of changes: crypto/evp/encode.c | 150 +++++++++++++----- crypto/evp/evp_locl.h | 2 +- crypto/include/internal/evp_int.h | 9 ++ crypto/srp/srp_vfy.c | 131 +++++++++++++++- test/recipes/90-test_sslapi.t | 10 +- test/recipes/90-test_sslapi_data/passwd.txt | 1 + test/sslapitest.c | 230 +++++++++++++++++++++++++++- 7 files changed, 487 insertions(+), 46 deletions(-) create mode 100644 test/recipes/90-test_sslapi_data/passwd.txt diff --git a/crypto/evp/encode.c b/crypto/evp/encode.c index 17198ff..88e5a17 100644 --- a/crypto/evp/encode.c +++ b/crypto/evp/encode.c @@ -12,10 +12,17 @@ #include "internal/cryptlib.h" #include #include "evp_locl.h" +#include "internal/evp_int.h" + +static unsigned char conv_ascii2bin(unsigned char a, + const unsigned char *table); +static int evp_encodeblock_int(EVP_ENCODE_CTX *ctx, unsigned char *t, + const unsigned char *f, int dlen); +static int evp_decodeblock_int(EVP_ENCODE_CTX *ctx, unsigned char *t, + const unsigned char *f, int n); -static unsigned char conv_ascii2bin(unsigned char a); #ifndef CHARSET_EBCDIC -# define conv_bin2ascii(a) (data_bin2ascii[(a)&0x3f]) +# define conv_bin2ascii(a, table) ((table)[(a)&0x3f]) #else /* * We assume that PEM encoded files are EBCDIC files (i.e., printable text @@ -23,7 +30,7 @@ static unsigned char conv_ascii2bin(unsigned char a); * (text) format again. (No need for conversion in the conv_bin2ascii macro, * as the underlying textstring data_bin2ascii[] is already EBCDIC) */ -# define conv_bin2ascii(a) (data_bin2ascii[(a)&0x3f]) +# define conv_bin2ascii(a, table) ((table)[(a)&0x3f]) #endif /*- @@ -38,8 +45,13 @@ static unsigned char conv_ascii2bin(unsigned char a); #define CHUNKS_PER_LINE (64/4) #define CHAR_PER_LINE (64+1) -static const unsigned char data_bin2ascii[65] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ\ -abcdefghijklmnopqrstuvwxyz0123456789+/"; +static const unsigned char data_bin2ascii[65] = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + +/* SRP uses a different base64 alphabet */ +static const unsigned char srpdata_bin2ascii[65] = + "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz./"; + /*- * 0xF0 is a EOLN @@ -76,20 +88,39 @@ static const unsigned char data_ascii2bin[128] = { 0x31, 0x32, 0x33, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, }; +static const unsigned char srpdata_ascii2bin[128] = { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xE0, 0xF0, 0xFF, 0xFF, 0xF1, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x3E, 0x3F, + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0xFF, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, + 0xFF, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, + 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, + 0x21, 0x22, 0x23, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, + 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, + 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, + 0x3B, 0x3C, 0x3D, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +}; + #ifndef CHARSET_EBCDIC -static unsigned char conv_ascii2bin(unsigned char a) +static unsigned char conv_ascii2bin(unsigned char a, const unsigned char *table) { if (a & 0x80) return B64_ERROR; - return data_ascii2bin[a]; + return table[a]; } #else -static unsigned char conv_ascii2bin(unsigned char a) +static unsigned char conv_ascii2bin(unsigned char a, const unsigned char *table) { a = os_toascii[a]; if (a & 0x80) return B64_ERROR; - return data_ascii2bin[a]; + return table[a]; } #endif @@ -115,11 +146,17 @@ int EVP_ENCODE_CTX_num(EVP_ENCODE_CTX *ctx) return ctx->num; } +void evp_encode_ctx_set_flags(EVP_ENCODE_CTX *ctx, unsigned int flags) +{ + ctx->flags = flags; +} + void EVP_EncodeInit(EVP_ENCODE_CTX *ctx) { ctx->length = 48; ctx->num = 0; ctx->line_num = 0; + ctx->flags = 0; } int EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, @@ -142,21 +179,27 @@ int EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, memcpy(&(ctx->enc_data[ctx->num]), in, i); in += i; inl -= i; - j = EVP_EncodeBlock(out, ctx->enc_data, ctx->length); + j = evp_encodeblock_int(ctx, out, ctx->enc_data, ctx->length); ctx->num = 0; out += j; - *(out++) = '\n'; + total = j; + if ((ctx->flags & EVP_ENCODE_CTX_NO_NEWLINES) == 0) { + *(out++) = '\n'; + total++; + } *out = '\0'; - total = j + 1; } while (inl >= ctx->length && total <= INT_MAX) { - j = EVP_EncodeBlock(out, in, ctx->length); + j = evp_encodeblock_int(ctx, out, in, ctx->length); in += ctx->length; inl -= ctx->length; out += j; - *(out++) = '\n'; + total += j; + if ((ctx->flags & EVP_ENCODE_CTX_NO_NEWLINES) == 0) { + *(out++) = '\n'; + total++; + } *out = '\0'; - total += j + 1; } if (total > INT_MAX) { /* Too much output data! */ @@ -176,35 +219,43 @@ void EVP_EncodeFinal(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl) unsigned int ret = 0; if (ctx->num != 0) { - ret = EVP_EncodeBlock(out, ctx->enc_data, ctx->num); - out[ret++] = '\n'; + ret = evp_encodeblock_int(ctx, out, ctx->enc_data, ctx->num); + if ((ctx->flags & EVP_ENCODE_CTX_NO_NEWLINES) == 0) + out[ret++] = '\n'; out[ret] = '\0'; ctx->num = 0; } *outl = ret; } -int EVP_EncodeBlock(unsigned char *t, const unsigned char *f, int dlen) +static int evp_encodeblock_int(EVP_ENCODE_CTX *ctx, unsigned char *t, + const unsigned char *f, int dlen) { int i, ret = 0; unsigned long l; + const unsigned char *table; + + if (ctx != NULL && (ctx->flags & EVP_ENCODE_CTX_USE_SRP_ALPHABET) != 0) + table = srpdata_bin2ascii; + else + table = data_bin2ascii; for (i = dlen; i > 0; i -= 3) { if (i >= 3) { l = (((unsigned long)f[0]) << 16L) | (((unsigned long)f[1]) << 8L) | f[2]; - *(t++) = conv_bin2ascii(l >> 18L); - *(t++) = conv_bin2ascii(l >> 12L); - *(t++) = conv_bin2ascii(l >> 6L); - *(t++) = conv_bin2ascii(l); + *(t++) = conv_bin2ascii(l >> 18L, table); + *(t++) = conv_bin2ascii(l >> 12L, table); + *(t++) = conv_bin2ascii(l >> 6L, table); + *(t++) = conv_bin2ascii(l, table); } else { l = ((unsigned long)f[0]) << 16L; if (i == 2) l |= ((unsigned long)f[1] << 8L); - *(t++) = conv_bin2ascii(l >> 18L); - *(t++) = conv_bin2ascii(l >> 12L); - *(t++) = (i == 1) ? '=' : conv_bin2ascii(l >> 6L); + *(t++) = conv_bin2ascii(l >> 18L, table); + *(t++) = conv_bin2ascii(l >> 12L, table); + *(t++) = (i == 1) ? '=' : conv_bin2ascii(l >> 6L, table); *(t++) = '='; } ret += 4; @@ -215,13 +266,18 @@ int EVP_EncodeBlock(unsigned char *t, const unsigned char *f, int dlen) return ret; } +int EVP_EncodeBlock(unsigned char *t, const unsigned char *f, int dlen) +{ + return evp_encodeblock_int(NULL, t, f, dlen); +} + void EVP_DecodeInit(EVP_ENCODE_CTX *ctx) { - /* Only ctx->num is used during decoding. */ + /* Only ctx->num and ctx->flags are used during decoding. */ ctx->num = 0; ctx->length = 0; ctx->line_num = 0; - ctx->expect_nl = 0; + ctx->flags = 0; } /*- @@ -249,6 +305,7 @@ int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, { int seof = 0, eof = 0, rv = -1, ret = 0, i, v, tmp, n, decoded_len; unsigned char *d; + const unsigned char *table; n = ctx->num; d = ctx->enc_data; @@ -265,9 +322,14 @@ int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, goto end; } + if ((ctx->flags & EVP_ENCODE_CTX_USE_SRP_ALPHABET) != 0) + table = srpdata_ascii2bin; + else + table = data_ascii2bin; + for (i = 0; i < inl; i++) { tmp = *(in++); - v = conv_ascii2bin(tmp); + v = conv_ascii2bin(tmp, table); if (v == B64_ERROR) { rv = -1; goto end; @@ -307,7 +369,7 @@ int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, } if (n == 64) { - decoded_len = EVP_DecodeBlock(out, d, n); + decoded_len = evp_decodeblock_int(ctx, out, d, n); n = 0; if (decoded_len < 0 || eof > decoded_len) { rv = -1; @@ -326,7 +388,7 @@ int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, tail: if (n > 0) { if ((n & 3) == 0) { - decoded_len = EVP_DecodeBlock(out, d, n); + decoded_len = evp_decodeblock_int(ctx, out, d, n); n = 0; if (decoded_len < 0 || eof > decoded_len) { rv = -1; @@ -348,13 +410,20 @@ end: return rv; } -int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n) +static int evp_decodeblock_int(EVP_ENCODE_CTX *ctx, unsigned char *t, + const unsigned char *f, int n) { int i, ret = 0, a, b, c, d; unsigned long l; + const unsigned char *table; + + if (ctx != NULL && (ctx->flags & EVP_ENCODE_CTX_USE_SRP_ALPHABET) != 0) + table = srpdata_ascii2bin; + else + table = data_ascii2bin; /* trim white space from the start of the line. */ - while ((conv_ascii2bin(*f) == B64_WS) && (n > 0)) { + while ((conv_ascii2bin(*f, table) == B64_WS) && (n > 0)) { f++; n--; } @@ -363,17 +432,17 @@ int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n) * strip off stuff at the end of the line ascii2bin values B64_WS, * B64_EOLN, B64_EOLN and B64_EOF */ - while ((n > 3) && (B64_NOT_BASE64(conv_ascii2bin(f[n - 1])))) + while ((n > 3) && (B64_NOT_BASE64(conv_ascii2bin(f[n - 1], table)))) n--; if (n % 4 != 0) return -1; for (i = 0; i < n; i += 4) { - a = conv_ascii2bin(*(f++)); - b = conv_ascii2bin(*(f++)); - c = conv_ascii2bin(*(f++)); - d = conv_ascii2bin(*(f++)); + a = conv_ascii2bin(*(f++), table); + b = conv_ascii2bin(*(f++), table); + c = conv_ascii2bin(*(f++), table); + d = conv_ascii2bin(*(f++), table); if ((a & 0x80) || (b & 0x80) || (c & 0x80) || (d & 0x80)) return -1; l = ((((unsigned long)a) << 18L) | @@ -387,13 +456,18 @@ int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n) return ret; } +int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n) +{ + return evp_decodeblock_int(NULL, t, f, n); +} + int EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl) { int i; *outl = 0; if (ctx->num != 0) { - i = EVP_DecodeBlock(out, ctx->enc_data, ctx->num); + i = evp_decodeblock_int(ctx, out, ctx->enc_data, ctx->num); if (i < 0) return -1; ctx->num = 0; diff --git a/crypto/evp/evp_locl.h b/crypto/evp/evp_locl.h index 209577b..d5dbbeb 100644 --- a/crypto/evp/evp_locl.h +++ b/crypto/evp/evp_locl.h @@ -59,7 +59,7 @@ struct evp_Encode_Ctx_st { unsigned char enc_data[80]; /* number read on current line */ int line_num; - int expect_nl; + unsigned int flags; }; typedef struct evp_pbe_st EVP_PBE_CTL; diff --git a/crypto/include/internal/evp_int.h b/crypto/include/internal/evp_int.h index 77c8731..691b28b 100644 --- a/crypto/include/internal/evp_int.h +++ b/crypto/include/internal/evp_int.h @@ -7,6 +7,7 @@ * https://www.openssl.org/source/license.html */ +#include #include "internal/refcount.h" struct evp_pkey_ctx_st { @@ -422,3 +423,11 @@ void evp_app_cleanup_int(void); #ifndef TLS1_1_VERSION # define TLS1_1_VERSION 0x0302 #endif + +void evp_encode_ctx_set_flags(EVP_ENCODE_CTX *ctx, unsigned int flags); + +/* EVP_ENCODE_CTX flags */ +/* Don't generate new lines when encoding */ +#define EVP_ENCODE_CTX_NO_NEWLINES 1 +/* Use the SRP base64 alphabet instead of the standard one */ +#define EVP_ENCODE_CTX_USE_SRP_ALPHABET 2 diff --git a/crypto/srp/srp_vfy.c b/crypto/srp/srp_vfy.c index 38d1a0f..1bf2f26 100644 --- a/crypto/srp/srp_vfy.c +++ b/crypto/srp/srp_vfy.c @@ -13,6 +13,7 @@ #ifndef OPENSSL_NO_SRP # include "internal/cryptlib.h" +# include "internal/evp_int.h" # include # include # include @@ -25,25 +26,145 @@ # define MAX_LEN 2500 /* + * Note that SRP uses its own variant of base 64 encoding. A different base64 + * alphabet is used and no padding '=' characters are added. Instead we pad to + * the front with 0 bytes and subsequently strip off leading encoded padding. + * This variant is used for compatibility with other SRP implementations - + * notably libsrp, but also others. It is also required for backwards + * compatibility in order to load verifier files from other OpenSSL versions. + */ + +/* * Convert a base64 string into raw byte array representation. + * Returns the length of the decoded data, or -1 on error. */ static int t_fromb64(unsigned char *a, size_t alen, const char *src) { - size_t size = strlen(src); + EVP_ENCODE_CTX *ctx; + int outl = 0, outl2 = 0; + size_t size, padsize; + const unsigned char *pad = (const unsigned char *)"00"; + + while (*src == ' ' || *src == '\t' || *src == '\n') + ++src; + size = strlen(src); + padsize = 4 - (size & 3); + padsize &= 3; /* Four bytes in src become three bytes output. */ - if (size > INT_MAX || (size / 4) * 3 > alen) + if (size > INT_MAX || ((size + padsize) / 4) * 3 > alen) return -1; - return EVP_DecodeBlock(a, (unsigned char *)src, (int)size); + ctx = EVP_ENCODE_CTX_new(); + if (ctx == NULL) + return -1; + + /* + * This should never occur because 1 byte of data always requires 2 bytes of + * encoding, i.e. + * 0 bytes unencoded = 0 bytes encoded + * 1 byte unencoded = 2 bytes encoded + * 2 bytes unencoded = 3 bytes encoded + * 3 bytes unencoded = 4 bytes encoded + * 4 bytes unencoded = 6 bytes encoded + * etc + */ + if (padsize == 3) + return -1; + + /* Valid padsize values are now 0, 1 or 2 */ + + EVP_DecodeInit(ctx); + evp_encode_ctx_set_flags(ctx, EVP_ENCODE_CTX_USE_SRP_ALPHABET); + + /* Add any encoded padding that is required */ + if (padsize != 0 + && EVP_DecodeUpdate(ctx, a, &outl, pad, padsize) < 0) { + EVP_ENCODE_CTX_free(ctx); + return -1; + } + if (EVP_DecodeUpdate(ctx, a, &outl2, (const unsigned char *)src, size) < 0) { + EVP_ENCODE_CTX_free(ctx); + return -1; + } + outl += outl2; + EVP_DecodeFinal(ctx, a + outl, &outl2); + outl += outl2; + + /* Strip off the leading padding */ + if (padsize != 0) { + if ((int)padsize >= outl) + return -1; + /* + * If we added 1 byte of padding prior to encoding then we have 2 bytes + * of "real" data which gets spread across 4 encoded bytes like this: + * (6 bits pad)(2 bits pad | 4 bits data)(6 bits data)(6 bits data) + * So 1 byte of pre-encoding padding results in 1 full byte of encoded + * padding. + * If we added 2 bytes of padding prior to encoding this gets encoded + * as: + * (6 bits pad)(6 bits pad)(4 bits pad | 2 bits data)(6 bits data) + * So 2 bytes of pre-encoding padding results in 2 full bytes of encoded + * padding, i.e. we have to strip the same number of bytes of padding + * from the encoded data as we added to the pre-encoded data. + */ + memmove(a, a + padsize, outl - padsize); + outl -= padsize; + } + + EVP_ENCODE_CTX_free(ctx); + + return outl; } /* * Convert a raw byte string into a null-terminated base64 ASCII string. + * Returns 1 on success or 0 on error. */ -static void t_tob64(char *dst, const unsigned char *src, int size) +static int t_tob64(char *dst, const unsigned char *src, int size) { - EVP_EncodeBlock((unsigned char *)dst, src, size); + EVP_ENCODE_CTX *ctx = EVP_ENCODE_CTX_new(); + int outl = 0, outl2 = 0; + unsigned char pad[2] = {0, 0}; + size_t leadz = 0; + + if (ctx == NULL) + return 0; + + EVP_EncodeInit(ctx); + evp_encode_ctx_set_flags(ctx, EVP_ENCODE_CTX_NO_NEWLINES + | EVP_ENCODE_CTX_USE_SRP_ALPHABET); + + /* + * We pad at the front with zero bytes until the length is a multiple of 3 + * so that EVP_EncodeUpdate/EVP_EncodeFinal does not add any of its own "=" + * padding + */ + leadz = 3 - (size % 3); + if (leadz != 3 + && !EVP_EncodeUpdate(ctx, (unsigned char *)dst, &outl, pad, + leadz)) { + EVP_ENCODE_CTX_free(ctx); + return 0; + } + + if (!EVP_EncodeUpdate(ctx, (unsigned char *)dst + outl, &outl2, src, + size)) { + EVP_ENCODE_CTX_free(ctx); + return 0; + } + outl += outl2; + EVP_EncodeFinal(ctx, (unsigned char *)dst + outl, &outl2); + outl += outl2; + + /* Strip the encoded padding at the front */ + if (leadz != 3) { + memmove(dst, dst + leadz, outl - leadz); + dst[outl - leadz] = '\0'; + } + + EVP_ENCODE_CTX_free(ctx); + return 1; } void SRP_user_pwd_free(SRP_user_pwd *user_pwd) diff --git a/test/recipes/90-test_sslapi.t b/test/recipes/90-test_sslapi.t index efaae3b..08af52d 100644 --- a/test/recipes/90-test_sslapi.t +++ b/test/recipes/90-test_sslapi.t @@ -9,6 +9,7 @@ use OpenSSL::Test::Utils; use OpenSSL::Test qw/:DEFAULT srctop_file/; +use File::Temp qw(tempfile); setup("test_sslapi"); @@ -17,5 +18,12 @@ plan skip_all => "No TLS/SSL protocols are supported by this OpenSSL build" plan tests => 1; +(undef, my $tmpfilename) = tempfile(); + ok(run(test(["sslapitest", srctop_file("apps", "server.pem"), - srctop_file("apps", "server.pem")])), "running sslapitest"); + srctop_file("apps", "server.pem"), + srctop_file("test", "recipes", "90-test_sslapi_data", + "passwd.txt"), $tmpfilename])), + "running sslapitest"); + +unlink $tmpfilename; diff --git a/test/recipes/90-test_sslapi_data/passwd.txt b/test/recipes/90-test_sslapi_data/passwd.txt new file mode 100644 index 0000000..b611aed --- /dev/null +++ b/test/recipes/90-test_sslapi_data/passwd.txt @@ -0,0 +1 @@ +V 1auIY/NQXwKWVeWaYg.YV0AaU.mpHSsZw8PWfrYT0oMTPYekTqGXu6ElyTN64DmK03V3P2yVRdhN0UBxMBujLnTauROkuEep/vp7S5xhW1VK8zg1gtJslTqOp4l.GTJF9x0WYmS6VNRnj5AVi3mgfVJ3nmzlMJUMm7niQxm5awLZZ8xykox1j6MFRa80y02Ub87A88DwqA5wrIM/Uojx9VBxUhTHC.353aBA/rL4O/179rgIBbhID08RA6uLv7pIJQVl5OjYsRu/XzQsgFFW6Wog7PaB.AATqArzXZieZxs/teOiFKPSgKI.76vvVEMQIifSj3hRuVK/immK.9hBCTHYjAv96MUmitb0ErPYJRl2MeBC8M6aHJ8FaMmak.Qv.bwyiqpEjlX1a9KjdBAKIaAswECjeP6G0Gk5v1g5D7ZmP5JUK7Wp/X9sKuZZYOsDwEGfXNmmJG6Y3TETx105HT2QMJ5ti5QCbrd71VWABmVWpHJc03YLUExw6WtYdUW0YHTbRKVntgVe2hOQD.XPtFPn2SwxbGonq1bwEvdCp22uTb5HFSC3I7amCUTZteVmMgqJAcx.x.2yfliESVvpmG.dnDFkp6vsQxch6Q1dV5rDmR4GGSy8FoPSFXc7NS0kCSs.qsTqLSmHN1XMzwrwYuVbItXBwetwxcIcdi.sFG6OLuwRUGaNOXiMwhlDHyQtVfEm3L/KIjPpzLlYRAJWF9M40FIcNsI6xiMNhvUGNO7LaBHKSV3oHlwUWWUnL7Uo/ePH8lBpGadYPxObXZ1/wOcWdJ1Rb5dB9orSSTSvoNrZyALKO.swl7pP7beYq6bUx8qtBJLaqI2zQzr1tnmJi8azVicuFtsDs363ntCRtd1LLT3CX3EBVXMbEy6xgAKWI2GL3HO6v8k3Gv96UeGFN/w5yAz61mbajDrSeJekUaKgfucV8h9tgHNlTA1kGowd2Yn/EQdVc/qSETddySqNC0mXlPW1tgb2ixV6sWbYrb5TLBUdztdw5L2D62Aal.9IjpTEKc4F/gMjYsazIX6nzpXZtWnYP7dIOpSi4c.48B2RIeDrZVMzUF.9QOF9Dk1fy5Z2X91z8J2I0GuqIWKKfwnx4xA3RbGUds1Cv2XvUA1tP7eqtvs/mTsC8KWApNSpL6K.U.Pt0ee6F76CV.ZcBXTbXl9zJZ0H1peiehzZpbuIPLZPtzIHClRQovjqdrlEUzS5VdSgCfNhEUr3ZOpG3cCKO4Lk25jZuQtoFmyxUuRAIXejLizCd727hO7rHZoD.GGm4HiNaH2jgZaftoFhfSBXvPRGYfcj.ZkiLyurNlumMXTduHImB1ZMkZ1af5dggKaQG4bJe9WbF6KYxmeRwV 1oFJIzMwXA0RFKXCGcSV0nAToL5 test 8192 A test user diff --git a/test/sslapitest.c b/test/sslapitest.c index 876be31..74ee897 100644 --- a/test/sslapitest.c +++ b/test/sslapitest.c @@ -14,6 +14,8 @@ #include #include #include +#include +#include #include "ssltestlib.h" #include "testutil.h" @@ -23,6 +25,8 @@ static char *cert = NULL; static char *privkey = NULL; +static char *srpvfile = NULL; +static char *tmpfilename = NULL; #define LOG_BUFFER_SIZE 1024 static char server_log_buffer[LOG_BUFFER_SIZE + 1] = {0}; @@ -3786,10 +3790,231 @@ static int test_pha_key_update(void) } #endif +#if !defined(OPENSSL_NO_SRP) && !defined(OPENSSL_NO_TLS1_2) + +static SRP_VBASE *vbase = NULL; + +static int ssl_srp_cb(SSL *s, int *ad, void *arg) +{ + int ret = SSL3_AL_FATAL; + char *username; + SRP_user_pwd *user = NULL; + + username = SSL_get_srp_username(s); + if (username == NULL) { + *ad = SSL_AD_INTERNAL_ERROR; + goto err; + } + + user = SRP_VBASE_get1_by_user(vbase, username); + if (user == NULL) { + *ad = SSL_AD_INTERNAL_ERROR; + goto err; + } + + if (SSL_set_srp_server_param(s, user->N, user->g, user->s, user->v, + user->info) <= 0) { + *ad = SSL_AD_INTERNAL_ERROR; + goto err; + } + + ret = 0; + + err: + SRP_user_pwd_free(user); + return ret; +} + +static int create_new_vfile(char *userid, char *password, const char *filename) +{ + char *gNid = NULL; + OPENSSL_STRING *row = OPENSSL_zalloc(sizeof(row) * (DB_NUMBER + 1)); + TXT_DB *db = NULL; + int ret = 0; + BIO *out = NULL, *dummy = BIO_new_mem_buf("", 0); + size_t i; + + if (!TEST_ptr(dummy) || !TEST_ptr(row)) + goto end; + + gNid = SRP_create_verifier(userid, password, &row[DB_srpsalt], + &row[DB_srpverifier], NULL, NULL); + if (!TEST_ptr(gNid)) + goto end; + + /* + * The only way to create an empty TXT_DB is to provide a BIO with no data + * in it! + */ + db = TXT_DB_read(dummy, DB_NUMBER); + if (!TEST_ptr(db)) + goto end; + + out = BIO_new_file(filename, "w"); + if (!TEST_ptr(out)) + goto end; + + row[DB_srpid] = OPENSSL_strdup(userid); + row[DB_srptype] = OPENSSL_strdup("V"); + row[DB_srpgN] = OPENSSL_strdup(gNid); + + if (!TEST_ptr(row[DB_srpid]) + || !TEST_ptr(row[DB_srptype]) + || !TEST_ptr(row[DB_srpgN]) + || !TEST_true(TXT_DB_insert(db, row))) + goto end; + + row = NULL; + + if (!TXT_DB_write(out, db)) + goto end; + + ret = 1; + end: + if (row != NULL) { + for (i = 0; i < DB_NUMBER; i++) + OPENSSL_free(row[i]); + } + OPENSSL_free(row); + BIO_free(dummy); + BIO_free(out); + TXT_DB_free(db); + + return ret; +} + +static int create_new_vbase(char *userid, char *password) +{ + BIGNUM *verifier = NULL, *salt = NULL; + const SRP_gN *lgN = NULL; + SRP_user_pwd *user_pwd = NULL; + int ret = 0; + + lgN = SRP_get_default_gN(NULL); + if (!TEST_ptr(lgN)) + goto end; + + if (!TEST_true(SRP_create_verifier_BN(userid, password, &salt, &verifier, + lgN->N, lgN->g))) + goto end; + + user_pwd = OPENSSL_zalloc(sizeof(*user_pwd)); + if (!TEST_ptr(user_pwd)) + goto end; + + user_pwd->N = lgN->N; + user_pwd->g = lgN->g; + user_pwd->id = OPENSSL_strdup(userid); + if (!TEST_ptr(user_pwd->id)) + goto end; + + user_pwd->v = verifier; + user_pwd->s = salt; + verifier = salt = NULL; + + if (sk_SRP_user_pwd_insert(vbase->users_pwd, user_pwd, 0) == 0) + goto end; + user_pwd = NULL; + + ret = 1; +end: + SRP_user_pwd_free(user_pwd); + BN_free(salt); + BN_free(verifier); + + return ret; +} + +/* + * SRP tests + * + * Test 0: Simple successful SRP connection, new vbase + * Test 1: Connection failure due to bad password, new vbase + * Test 2: Simple successful SRP connection, vbase loaded from existing file + * Test 3: Connection failure due to bad password, vbase loaded from existing + * file + * Test 4: Simple successful SRP connection, vbase loaded from new file + * Test 5: Connection failure due to bad password, vbase loaded from new file + */ +static int test_srp(int tst) +{ + char *userid = "test", *password = "password", *tstsrpfile; + SSL_CTX *cctx = NULL, *sctx = NULL; + SSL *clientssl = NULL, *serverssl = NULL; + int ret, testresult = 0; + + vbase = SRP_VBASE_new(NULL); + if (!TEST_ptr(vbase)) + goto end; + + if (tst == 0 || tst == 1) { + if (!TEST_true(create_new_vbase(userid, password))) + goto end; + } else { + if (tst == 4 || tst == 5) { + if (!TEST_true(create_new_vfile(userid, password, tmpfilename))) + goto end; + tstsrpfile = tmpfilename; + } else { + tstsrpfile = srpvfile; + } + if (!TEST_int_eq(SRP_VBASE_init(vbase, tstsrpfile), SRP_NO_ERROR)) + goto end; + } + + if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), TLS_client_method(), + TLS1_VERSION, TLS_MAX_VERSION, + &sctx, &cctx, cert, privkey))) + goto end; + + if (!TEST_int_gt(SSL_CTX_set_srp_username_callback(sctx, ssl_srp_cb), 0) + || !TEST_true(SSL_CTX_set_cipher_list(cctx, "SRP-AES-128-CBC-SHA")) + || !TEST_true(SSL_CTX_set_max_proto_version(sctx, TLS1_2_VERSION)) + || !TEST_true(SSL_CTX_set_max_proto_version(cctx, TLS1_2_VERSION)) + || !TEST_int_gt(SSL_CTX_set_srp_username(cctx, userid), 0)) + goto end; + + if (tst % 2 == 1) { + if (!TEST_int_gt(SSL_CTX_set_srp_password(cctx, "badpass"), 0)) + goto end; + } else { + if (!TEST_int_gt(SSL_CTX_set_srp_password(cctx, password), 0)) + goto end; + } + + if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, + NULL, NULL))) + goto end; + + ret = create_ssl_connection(serverssl, clientssl, SSL_ERROR_NONE); + if (ret) { + if (!TEST_true(tst % 2 == 0)) + goto end; + } else { + if (!TEST_true(tst % 2 == 1)) + goto end; + } + + testresult = 1; + + end: + SRP_VBASE_free(vbase); + vbase = NULL; + SSL_free(serverssl); + SSL_free(clientssl); + SSL_CTX_free(sctx); + SSL_CTX_free(cctx); + + return testresult; +} +#endif + int setup_tests(void) { if (!TEST_ptr(cert = test_get_argument(0)) - || !TEST_ptr(privkey = test_get_argument(1))) + || !TEST_ptr(privkey = test_get_argument(1)) + || !TEST_ptr(srpvfile = test_get_argument(2)) + || !TEST_ptr(tmpfilename = test_get_argument(3))) return 0; if (getenv("OPENSSL_TEST_GETCOUNTS") != NULL) { @@ -3871,6 +4096,9 @@ int setup_tests(void) #endif ADD_ALL_TESTS(test_ssl_clear, 2); ADD_ALL_TESTS(test_max_fragment_len_ext, OSSL_NELEM(max_fragment_len_test)); +#if !defined(OPENSSL_NO_SRP) && !defined(OPENSSL_NO_TLS1_2) + ADD_ALL_TESTS(test_srp, 6); +#endif return 1; } From levitte at openssl.org Fri Apr 13 09:55:22 2018 From: levitte at openssl.org (Richard Levitte) Date: Fri, 13 Apr 2018 09:55:22 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523613322.552894.6352.nullmailer@dev.openssl.org> The branch master has been updated via a8ca496ddb532d7f7dc356fd2b026697388d2384 (commit) from 76fd7a1d61924ba5ee45224454cc3754b672efbf (commit) - Log ----------------------------------------------------------------- commit a8ca496ddb532d7f7dc356fd2b026697388d2384 Author: Richard Levitte Date: Fri Apr 13 10:14:40 2018 +0200 Split the scrypt and RSA-PSS into man3 and man7 pages The scrypt and RSA-PSS documents were a mixture of section 3 and section 7 material. With pre-1.1.1 OpenSSL, this is understandable, since we had a different directory layout. With 1.1.1, we've moved to the typical man-page directory layout, and the documents need to be updated accordingly. Also, the scrypt document contained a description of EVP_PKEY_CTX_set1_pbe_pass(), which is a generic function rather than an scrypt specific function, and therefore should be documented separately. Fixes #5802 Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/5942) ----------------------------------------------------------------------- Summary of changes: doc/man3/EVP_PKEY_CTX_set1_pbe_pass.pod | 70 ++++++++++++++++++ .../EVP_PKEY_CTX_set_rsa_pss_keygen_md.pod} | 47 ++++-------- doc/man3/EVP_PKEY_CTX_set_scrypt_N.pod | 86 ++++++++++++++++++++++ doc/man7/RSA-PSS.pod | 68 +++-------------- doc/man7/scrypt.pod | 59 ++------------- util/private.num | 9 +++ 6 files changed, 197 insertions(+), 142 deletions(-) create mode 100644 doc/man3/EVP_PKEY_CTX_set1_pbe_pass.pod copy doc/{man7/RSA-PSS.pod => man3/EVP_PKEY_CTX_set_rsa_pss_keygen_md.pod} (61%) create mode 100644 doc/man3/EVP_PKEY_CTX_set_scrypt_N.pod diff --git a/doc/man3/EVP_PKEY_CTX_set1_pbe_pass.pod b/doc/man3/EVP_PKEY_CTX_set1_pbe_pass.pod new file mode 100644 index 0000000..1e740f4 --- /dev/null +++ b/doc/man3/EVP_PKEY_CTX_set1_pbe_pass.pod @@ -0,0 +1,70 @@ +=pod + +=head1 NAME + +EVP_PKEY_CTX_set1_pbe_pass +- generic KDF support functions + +=head1 SYNOPSIS + + #include + + int EVP_PKEY_CTX_set1_pbe_pass(EVP_PKEY_CTX *pctx, unsigned char *pass, + int passlen); + +=head1 DESCRIPTION + +These functions are generic support functions for all KDF algorithms. + +EVP_PKEY_CTX_set1_pbe_pass() sets the password to the B first +bytes from B. + +=begin comment + +We really should have a few more, such as EVP_PKEY_CTX_set1_kdf_salt, +EVP_PKEY_CTX_set1_kdf_key (to be used by the algorithms that use a +key, such as hkdf), EVP_PKEY_CTX_set1_kdf_md (same thing here). + +=end comment + +=head1 STRING CTRLS + +There is also support for string based control operations via +L. +The B can be directly specified using the B parameter +"pass" or given in hex encoding using the "hexpass" parameter. + +=begin comment + +Just as for the function description, the strings "salt", "hexsalt", +"key", "hexkey" and "md" should be generically specified, and +supported by the algorithms that use them. + +=end comment + +=head1 NOTES + +All these functions are implemented as macros. + +=head1 RETURN VALUES + +All these functions return 1 for success and 0 or a negative value for failure. +In particular a return value of -2 indicates the operation is not supported by +the public key algorithm. + +=head1 SEE ALSO + +L, +L, +L + +=head1 COPYRIGHT + +Copyright 2018 The OpenSSL Project Authors. All Rights Reserved. + +Licensed under the OpenSSL license (the "License"). You may not use +this file except in compliance with the License. You can obtain a copy +in the file LICENSE in the source distribution or at +L. + +=cut diff --git a/doc/man7/RSA-PSS.pod b/doc/man3/EVP_PKEY_CTX_set_rsa_pss_keygen_md.pod similarity index 61% copy from doc/man7/RSA-PSS.pod copy to doc/man3/EVP_PKEY_CTX_set_rsa_pss_keygen_md.pod index b608561..bd1193e 100644 --- a/doc/man7/RSA-PSS.pod +++ b/doc/man3/EVP_PKEY_CTX_set_rsa_pss_keygen_md.pod @@ -2,7 +2,10 @@ =head1 NAME -RSA-PSS - EVP_PKEY RSA-PSS algorithm support +EVP_PKEY_CTX_set_rsa_pss_keygen_md, +EVP_PKEY_CTX_set_rsa_pss_keygen_mgf1_md, +EVP_PKEY_CTX_set_rsa_pss_keygen_saltlen +- EVP_PKEY RSA-PSS algorithm support functions =head1 SYNOPSIS @@ -17,23 +20,9 @@ RSA-PSS - EVP_PKEY RSA-PSS algorithm support =head1 DESCRIPTION -The B EVP_PKEY implementation is a restricted version of the RSA -algorithm which only supports signing, verification and key generation -using PSS padding modes with optional parameter restrictions. +These are the functions that implement L. -It has associated private key and public key formats. - -This algorithm shares several control operations with the B algorithm -but with some restrictions described below. - -=head1 SIGNING AND VERIFICATION - -Signing and verification is similar to the B algorithm except the -padding mode is always PSS. If the key in use has parameter restrictions then -the corresponding signature parameters are set to the restrictions: -for example, if the key can only be used with digest SHA256, MGF1 SHA256 -and minimum salt length 32 then the digest, MGF1 digest and salt length -will be set to SHA256, SHA256 and 32 respectively. +=head2 Signing and Verification The macro EVP_PKEY_CTX_set_rsa_padding() is supported but an error is returned if an attempt is made to set the padding mode to anything other @@ -52,19 +41,18 @@ usage restrictions then an error is returned if an attempt is made to set the digest to anything other than the restricted value. Otherwise these are similar to the B versions. -=head1 KEY GENERATION +=head2 Key Generation As with RSA key generation the EVP_PKEY_CTX_set_rsa_rsa_keygen_bits() and EVP_PKEY_CTX_set_rsa_keygen_pubexp() macros are supported for RSA-PSS: they have exactly the same meaning as for the RSA algorithm. -Optional parameter restrictions can be specified when generating a PSS key. By -default no parameter restrictions are placed on the generated key. If any -restrictions are set (using the macros described below) then B parameters -are restricted. For example, setting a minimum salt length also restricts the -digest and MGF1 algorithms. If any restrictions are in place then they are -reflected in the corresponding parameters of the public key when (for example) -a certificate request is signed. +Optional parameter restrictions can be specified when generating a PSS key. +If any restrictions are set (using the macros described below) then B +parameters are restricted. For example, setting a minimum salt length also +restricts the digest and MGF1 algorithms. If any restrictions are in place +then they are reflected in the corresponding parameters of the public key +when (for example) a certificate request is signed. EVP_PKEY_CTX_set_rsa_pss_keygen_md() restricts the digest algorithm the generated key can use to B. @@ -81,12 +69,6 @@ A context for the B algorithm can be obtained by calling: EVP_PKEY_CTX *pctx = EVP_PKEY_CTX_new_id(EVP_PKEY_RSA_PSS, NULL); -The public key format is documented in RFC4055. - -The PKCS#8 private key format used for RSA-PSS keys is similar to the RSA -format except it uses the B OID and the parameters field, if -present, restricts the key parameters in the same way as the public key. - =head1 RETURN VALUES All these functions return 1 for success and 0 or a negative value for failure. @@ -95,13 +77,14 @@ the public key algorithm. =head1 SEE ALSO +L, L, L, L =head1 COPYRIGHT -Copyright 2017 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/doc/man3/EVP_PKEY_CTX_set_scrypt_N.pod b/doc/man3/EVP_PKEY_CTX_set_scrypt_N.pod new file mode 100644 index 0000000..4e2a4ea --- /dev/null +++ b/doc/man3/EVP_PKEY_CTX_set_scrypt_N.pod @@ -0,0 +1,86 @@ +=pod + +=head1 NAME + +EVP_PKEY_CTX_set1_scrypt_salt, +EVP_PKEY_CTX_set_scrypt_N, +EVP_PKEY_CTX_set_scrypt_r, +EVP_PKEY_CTX_set_scrypt_p, +EVP_PKEY_CTX_set_scrypt_maxmem_bytes +- EVP_PKEY scrypt KDF support functions + +=head1 SYNOPSIS + + #include + + int EVP_PKEY_CTX_set1_scrypt_salt(EVP_PKEY_CTX *pctx, unsigned char *salt, + int saltlen); + + int EVP_PKEY_CTX_set_scrypt_N(EVP_PKEY_CTX *pctx, uint64_t N); + + int EVP_PKEY_CTX_set_scrypt_r(EVP_PKEY_CTX *pctx, uint64_t r); + + int EVP_PKEY_CTX_set_scrypt_p(EVP_PKEY_CTX *pctx, uint64_t p); + + int EVP_PKEY_CTX_set_scrypt_maxmem_bytes(EVP_PKEY_CTX *pctx, + uint64_t maxmem); + +=head1 DESCRIPTION + +These functions are used to set up the necessary data to use the +scrypt KDF. +For more information on scrypt, see L. + +EVP_PKEY_CTX_set1_scrypt_salt() sets the B bytes long salt +value. + +EVP_PKEY_CTX_set_scrypt_N(), EVP_PKEY_CTX_set_scrypt_r() and +EVP_PKEY_CTX_set_scrypt_p() configure the work factors N, r and p. + +EVP_PKEY_CTX_set_scrypt_maxmem_bytes() sets how much RAM key +derivation may maximally use, given in bytes. +If RAM is exceeded because the load factors are chosen too high, the +key derivation will fail. + +=head1 STRING CTRLS + +scrypt also supports string based control operations via +L. +Similarly, the B can either be specified using the B +parameter "salt" or in hex encoding by using the "hexsalt" parameter. +The work factors B, B and B

as well as B can be +set by using the parameters "N", "r", "p" and "maxmem_bytes", +respectively. + +=head1 NOTES + +The scrypt KDF also uses EVP_PKEY_CTX_set1_pbe_pass() as well as +the value from the string controls "pass" and "hexpass". +See L. + +All the functions described here are implemented as macros. + +=head1 RETURN VALUES + +All these functions return 1 for success and 0 or a negative value for +failure. +In particular a return value of -2 indicates the operation is not +supported by the public key algorithm. + +=head1 SEE ALSO + +L, +L, +L, +L + +=head1 COPYRIGHT + +Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved. + +Licensed under the OpenSSL license (the "License"). You may not use +this file except in compliance with the License. You can obtain a copy +in the file LICENSE in the source distribution or at +L. + +=cut diff --git a/doc/man7/RSA-PSS.pod b/doc/man7/RSA-PSS.pod index b608561..29775d8 100644 --- a/doc/man7/RSA-PSS.pod +++ b/doc/man7/RSA-PSS.pod @@ -4,17 +4,6 @@ RSA-PSS - EVP_PKEY RSA-PSS algorithm support -=head1 SYNOPSIS - - #include - - int EVP_PKEY_CTX_set_rsa_pss_keygen_md(EVP_PKEY_CTX *pctx, - const EVP_MD *md); - int EVP_PKEY_CTX_set_rsa_pss_keygen_mgf1_md(EVP_PKEY_CTX *pctx, - const EVP_MD *md); - int EVP_PKEY_CTX_set_rsa_pss_keygen_saltlen(EVP_PKEY_CTX *pctx, - int saltlen); - =head1 DESCRIPTION The B EVP_PKEY implementation is a restricted version of the RSA @@ -26,7 +15,7 @@ It has associated private key and public key formats. This algorithm shares several control operations with the B algorithm but with some restrictions described below. -=head1 SIGNING AND VERIFICATION +=head2 Signing and Verification Signing and verification is similar to the B algorithm except the padding mode is always PSS. If the key in use has parameter restrictions then @@ -35,73 +24,34 @@ for example, if the key can only be used with digest SHA256, MGF1 SHA256 and minimum salt length 32 then the digest, MGF1 digest and salt length will be set to SHA256, SHA256 and 32 respectively. -The macro EVP_PKEY_CTX_set_rsa_padding() is supported but an error is -returned if an attempt is made to set the padding mode to anything other -than B. It is otherwise similar to the B version. - -The EVP_PKEY_CTX_set_rsa_pss_saltlen() macro is used to set the salt length. -If the key has usage restrictions then an error is returned if an attempt is -made to set the salt length below the minimum value. It is otherwise similar -to the B operation except detection of the salt length (using -RSA_PSS_SALTLEN_AUTO is not supported for verification if the key has -usage restrictions. - -The EVP_PKEY_CTX_set_signature_md() and EVP_PKEY_CTX_set_rsa_mgf1_md() macros -are used to set the digest and MGF1 algorithms respectively. If the key has -usage restrictions then an error is returned if an attempt is made to set the -digest to anything other than the restricted value. Otherwise these are -similar to the B versions. - -=head1 KEY GENERATION +=head2 Key Generation -As with RSA key generation the EVP_PKEY_CTX_set_rsa_rsa_keygen_bits() -and EVP_PKEY_CTX_set_rsa_keygen_pubexp() macros are supported for RSA-PSS: -they have exactly the same meaning as for the RSA algorithm. - -Optional parameter restrictions can be specified when generating a PSS key. By -default no parameter restrictions are placed on the generated key. If any -restrictions are set (using the macros described below) then B parameters -are restricted. For example, setting a minimum salt length also restricts the -digest and MGF1 algorithms. If any restrictions are in place then they are -reflected in the corresponding parameters of the public key when (for example) -a certificate request is signed. - -EVP_PKEY_CTX_set_rsa_pss_keygen_md() restricts the digest algorithm the -generated key can use to B. - -EVP_PKEY_CTX_set_rsa_pss_keygen_mgf1_md() restricts the MGF1 algorithm the -generated key can use to B. - -EVP_PKEY_CTX_set_rsa_pss_keygen_saltlen() restricts the minimum salt length -to B. +By default no parameter restrictions are placed on the generated key. =head1 NOTES -A context for the B algorithm can be obtained by calling: - - EVP_PKEY_CTX *pctx = EVP_PKEY_CTX_new_id(EVP_PKEY_RSA_PSS, NULL); - The public key format is documented in RFC4055. The PKCS#8 private key format used for RSA-PSS keys is similar to the RSA format except it uses the B OID and the parameters field, if present, restricts the key parameters in the same way as the public key. -=head1 RETURN VALUES +=head1 CONFORMING TO -All these functions return 1 for success and 0 or a negative value for failure. -In particular a return value of -2 indicates the operation is not supported by -the public key algorithm. +RFC 4055 =head1 SEE ALSO +L, +L, +L, L, L, L =head1 COPYRIGHT -Copyright 2017 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/doc/man7/scrypt.pod b/doc/man7/scrypt.pod index 4de0c72..aabb6c9 100644 --- a/doc/man7/scrypt.pod +++ b/doc/man7/scrypt.pod @@ -4,24 +4,6 @@ scrypt - EVP_PKEY scrypt KDF support -=head1 SYNOPSIS - - #include - - int EVP_PKEY_CTX_set1_pbe_pass(EVP_PKEY_CTX *pctx, unsigned char *pass, - int passlen); - - int EVP_PKEY_CTX_set1_scrypt_salt(EVP_PKEY_CTX *pctx, unsigned char *salt, - int saltlen); - - int EVP_PKEY_CTX_set_scrypt_N(EVP_PKEY_CTX *pctx, uint64_t N); - - int EVP_PKEY_CTX_set_scrypt_r(EVP_PKEY_CTX *pctx, uint64_t r); - - int EVP_PKEY_CTX_set_scrypt_p(EVP_PKEY_CTX *pctx, uint64_t p); - - int EVP_PKEY_CTX_set_scrypt_maxmem_bytes(EVP_PKEY_CTX *pctx, uint64_t maxmem); - =head1 DESCRIPTION The EVP_PKEY_SCRYPT algorithm implements the scrypt password based key @@ -47,44 +29,14 @@ GHz), this computation takes about 3 seconds. When N, r or p are not specified, they default to 1048576, 8, and 1, respectively. The default amount of RAM that may be used by scrypt defaults to 1025 MiB. -EVP_PKEY_CTX_set1_pbe_pass() sets the B bytes long password. - -EVP_PKEY_CTX_set1_scrypt_salt() sets the B bytes long salt value. - -EVP_PKEY_CTX_set_scrypt_N(), EVP_PKEY_CTX_set_scrypt_r() and -EVP_PKEY_CTX_set_scrypt_p() configure the work factors N, r and p. - -EVP_PKEY_CTX_set_scrypt_maxmem_bytes() sets how much RAM key derivation may -maximally use, given in bytes. If RAM is exceeded because the load factors are -chosen too high, the key derivation will fail. - -=head1 STRING CTRLS - -scrypt also supports string based control operations via -L. -The B can be directly specified using the B parameter "pass" or -given in hex encoding using the "hexpass" parameter. Similarly, the B can -either be specified using the B parameter "salt" or in hex encoding by -using the "hexsalt" parameter. The work factors B, B and B

as well as -B can be set by using the parameters "N", "r", "p" and -"maxmem_bytes", respectively. - =head1 NOTES -All these functions are implemented as macros. - A context for scrypt can be obtained by calling: EVP_PKEY_CTX *pctx = EVP_PKEY_new_id(EVP_PKEY_SCRYPT, NULL); -The output length of an scrypt key derivation is specified via the length -parameter to the L function. - -=head1 RETURN VALUES - -All these functions return 1 for success and 0 or a negative value for failure. -In particular a return value of -2 indicates the operation is not supported by -the public key algorithm. +The output length of an scrypt key derivation is specified via the +length parameter to the L function. =head1 EXAMPLE @@ -142,13 +94,18 @@ RFC 7914 =head1 SEE ALSO +L, +L, +L, +L, +L, L, L, L =head1 COPYRIGHT -Copyright 2017 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/util/private.num b/util/private.num index 706da80..8a461ac 100644 --- a/util/private.num +++ b/util/private.num @@ -187,6 +187,8 @@ EVP_PKEY_CTX_get_signature_md define EVP_PKEY_CTX_hkdf_mode define EVP_PKEY_CTX_set1_hkdf_key define EVP_PKEY_CTX_set1_hkdf_salt define +EVP_PKEY_CTX_set1_pbe_pass define +EVP_PKEY_CTX_set1_scrypt_salt define EVP_PKEY_CTX_set1_tls1_prf_secret define EVP_PKEY_CTX_set_dh_paramgen_generator define EVP_PKEY_CTX_set_dh_paramgen_prime_len define @@ -199,7 +201,14 @@ EVP_PKEY_CTX_set_hkdf_md define EVP_PKEY_CTX_set_mac_key define EVP_PKEY_CTX_set_rsa_keygen_pubexp define EVP_PKEY_CTX_set_rsa_padding define +EVP_PKEY_CTX_set_rsa_pss_keygen_mgf1_md define +EVP_PKEY_CTX_set_rsa_pss_keygen_saltlen define +EVP_PKEY_CTX_set_rsa_pss_keygen_md define EVP_PKEY_CTX_set_rsa_pss_saltlen define +EVP_PKEY_CTX_set_scrypt_N define +EVP_PKEY_CTX_set_scrypt_r define +EVP_PKEY_CTX_set_scrypt_maxmem_bytes define +EVP_PKEY_CTX_set_scrypt_p define EVP_PKEY_CTX_set_signature_md define EVP_PKEY_CTX_set_tls1_prf_md define EVP_PKEY_assign_DH define From no-reply at appveyor.com Fri Apr 13 10:17:31 2018 From: no-reply at appveyor.com (AppVeyor) Date: Fri, 13 Apr 2018 10:17:31 +0000 Subject: [openssl-commits] Build failed: openssl master.17227 Message-ID: <20180413101731.1.7B0B6619B9F369DD@appveyor.com> An HTML attachment was scrubbed... URL: From levitte at openssl.org Fri Apr 13 15:42:26 2018 From: levitte at openssl.org (Richard Levitte) Date: Fri, 13 Apr 2018 15:42:26 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1523634146.341888.4443.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via ec46830f8a4ce62c0c8ee7677b1eb8e53ee16df1 (commit) from 2a479a86bd5eca8792a75a08c836b405f3cef4d6 (commit) - Log ----------------------------------------------------------------- commit ec46830f8a4ce62c0c8ee7677b1eb8e53ee16df1 Author: Richard Levitte Date: Mon Mar 26 11:08:12 2018 +0200 test/recipes/test_genrsa.t : don't fail because of size limit changes There is a test to check that 'genrsa' doesn't accept absurdly low number of bits. Apart from that, this test is designed to check the working functionality of 'openssl genrsa', so instead of having a hard coded lower limit on the size key, let's figure out what it is. Partially fixes #5751 Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/5754) ----------------------------------------------------------------------- Summary of changes: test/recipes/15-test_genrsa.t | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/test/recipes/15-test_genrsa.t b/test/recipes/15-test_genrsa.t index cc74e30..270c2cc 100644 --- a/test/recipes/15-test_genrsa.t +++ b/test/recipes/15-test_genrsa.t @@ -18,9 +18,38 @@ setup("test_genrsa"); plan tests => 5; +# We want to know that an absurdly small number of bits isn't support is(run(app([ 'openssl', 'genrsa', '-3', '-out', 'genrsatest.pem', '8'])), 0, "genrsa -3 8"); -ok(run(app([ 'openssl', 'genrsa', '-3', '-out', 'genrsatest.pem', '16'])), "genrsa -3 16"); -ok(run(app([ 'openssl', 'rsa', '-check', '-in', 'genrsatest.pem', '-noout'])), "rsa -check"); -ok(run(app([ 'openssl', 'genrsa', '-f4', '-out', 'genrsatest.pem', '16'])), "genrsa -f4 16"); -ok(run(app([ 'openssl', 'rsa', '-check', '-in', 'genrsatest.pem', '-noout'])), "rsa -check"); + +# Depending on the shared library, we might have different lower limits. +# Let's find it! This is a simple binary search +# ------------------------------------------------------------ +# NOTE: $good may need an update in the future +# ------------------------------------------------------------ +note "Looking for lowest amount of bits"; +my $bad = 3; # Log2 of number of bits (2 << 3 == 8) +my $good = 11; # Log2 of number of bits (2 << 11 == 2048) +while ($good > $bad + 1) { + my $checked = int(($good + $bad + 1) / 2); + if (run(app([ 'openssl', 'genrsa', '-3', '-out', 'genrsatest.pem', + 2 ** $checked ], stderr => undef))) { + note 2 ** $checked, " bits is good"; + $good = $checked; + } else { + note 2 ** $checked, " bits is bad"; + $bad = $checked; + } +} +$good++ if $good == $bad; +$good = 2 ** $good; +note "Found lowest allowed amount of bits to be $good"; + +ok(run(app([ 'openssl', 'genrsa', '-3', '-out', 'genrsatest.pem', $good ])), + "genrsa -3 $good"); +ok(run(app([ 'openssl', 'rsa', '-check', '-in', 'genrsatest.pem', '-noout' ])), + "rsa -check"); +ok(run(app([ 'openssl', 'genrsa', '-f4', '-out', 'genrsatest.pem', $good ])), + "genrsa -f4 $good"); +ok(run(app([ 'openssl', 'rsa', '-check', '-in', 'genrsatest.pem', '-noout' ])), + "rsa -check"); unlink 'genrsatest.pem'; From levitte at openssl.org Fri Apr 13 15:45:28 2018 From: levitte at openssl.org (Richard Levitte) Date: Fri, 13 Apr 2018 15:45:28 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523634328.908317.5749.nullmailer@dev.openssl.org> The branch master has been updated via 1b9f41a0df6ed2fac1c5303be909c2f70c404f20 (commit) from a8ca496ddb532d7f7dc356fd2b026697388d2384 (commit) - Log ----------------------------------------------------------------- commit 1b9f41a0df6ed2fac1c5303be909c2f70c404f20 Author: Richard Levitte Date: Mon Mar 26 11:08:12 2018 +0200 test/recipes/test_genrsa.t : don't fail because of size limit changes There is a test to check that 'genrsa' doesn't accept absurdly low number of bits. Apart from that, this test is designed to check the working functionality of 'openssl genrsa', so instead of having a hard coded lower limit on the size key, let's figure out what it is. Partially fixes #5751 Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/5754) (cherry picked from commit ec46830f8a4ce62c0c8ee7677b1eb8e53ee16df1) ----------------------------------------------------------------------- Summary of changes: test/recipes/15-test_genrsa.t | 40 ++++++++++++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/test/recipes/15-test_genrsa.t b/test/recipes/15-test_genrsa.t index 72a58bc..c497533 100644 --- a/test/recipes/15-test_genrsa.t +++ b/test/recipes/15-test_genrsa.t @@ -18,9 +18,37 @@ setup("test_genrsa"); plan tests => 5; -is(run(app([ 'openssl', 'genrsa', '-3', '-out', 'genrsatest.pem', '256'])), 0, "genrsa -3 256"); -ok(run(app([ 'openssl', 'genrsa', '-3', '-out', 'genrsatest.pem', '512'])), "genrsa -3 512"); -ok(run(app([ 'openssl', 'rsa', '-check', '-in', 'genrsatest.pem', '-noout'])), "rsa -check"); -ok(run(app([ 'openssl', 'genrsa', '-f4', '-out', 'genrsatest.pem', '512'])), "genrsa -f4 512"); -ok(run(app([ 'openssl', 'rsa', '-check', '-in', 'genrsatest.pem', '-noout'])), "rsa -check"); -unlink 'genrsatest.pem'; +# We want to know that an absurdly small number of bits isn't support +is(run(app([ 'openssl', 'genrsa', '-3', '-out', 'genrsatest.pem', '8'])), 0, "genrsa -3 8"); + +# Depending on the shared library, we might have different lower limits. +# Let's find it! This is a simple binary search +# ------------------------------------------------------------ +# NOTE: $good may need an update in the future +# ------------------------------------------------------------ +note "Looking for lowest amount of bits"; +my $bad = 3; # Log2 of number of bits (2 << 3 == 8) +my $good = 11; # Log2 of number of bits (2 << 11 == 2048) +while ($good > $bad + 1) { + my $checked = int(($good + $bad + 1) / 2); + if (run(app([ 'openssl', 'genrsa', '-3', '-out', 'genrsatest.pem', + 2 ** $checked ], stderr => undef))) { + note 2 ** $checked, " bits is good"; + $good = $checked; + } else { + note 2 ** $checked, " bits is bad"; + $bad = $checked; + } +} +$good++ if $good == $bad; +$good = 2 ** $good; +note "Found lowest allowed amount of bits to be $good"; + +ok(run(app([ 'openssl', 'genrsa', '-3', '-out', 'genrsatest.pem', $good ])), + "genrsa -3 $good"); +ok(run(app([ 'openssl', 'rsa', '-check', '-in', 'genrsatest.pem', '-noout' ])), + "rsa -check"); +ok(run(app([ 'openssl', 'genrsa', '-f4', '-out', 'genrsatest.pem', $good ])), + "genrsa -f4 $good"); +ok(run(app([ 'openssl', 'rsa', '-check', '-in', 'genrsatest.pem', '-noout' ])), + "rsa -check"); From bernd.edlinger at hotmail.de Fri Apr 13 16:48:51 2018 From: bernd.edlinger at hotmail.de (bernd.edlinger at hotmail.de) Date: Fri, 13 Apr 2018 16:48:51 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523638131.488380.20379.nullmailer@dev.openssl.org> The branch master has been updated via 0e3ecaec3ebf2ed0dfbcff07b7fa1cfdd8240d5c (commit) from 1b9f41a0df6ed2fac1c5303be909c2f70c404f20 (commit) - Log ----------------------------------------------------------------- commit 0e3ecaec3ebf2ed0dfbcff07b7fa1cfdd8240d5c Author: Bernd Edlinger Date: Fri Apr 13 18:48:06 2018 +0200 Rework partial packet handling once more Address the concern that commit c53c2fec raised differently. The original direction of the traffic is encoded in bit 0 of the flight number. Reviewed-by: Andy Polyakov Reviewed-by: Richard Levitte Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5923) ----------------------------------------------------------------------- Summary of changes: util/perl/TLSProxy/Proxy.pm | 2 +- util/perl/TLSProxy/Record.pm | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/util/perl/TLSProxy/Proxy.pm b/util/perl/TLSProxy/Proxy.pm index 45d88bf..752b572 100644 --- a/util/perl/TLSProxy/Proxy.pm +++ b/util/perl/TLSProxy/Proxy.pm @@ -479,7 +479,7 @@ sub process_packet print "\n"; - if (scalar(@{$ret[0]}) == 0) { + if (scalar(@{$ret[0]}) == 0 or length($ret[2]) != 0) { return ""; } diff --git a/util/perl/TLSProxy/Record.pm b/util/perl/TLSProxy/Record.pm index acace36..49a0084 100644 --- a/util/perl/TLSProxy/Record.pm +++ b/util/perl/TLSProxy/Record.pm @@ -279,7 +279,8 @@ sub reconstruct_record my $server = shift; my $data; - if ($self->{sent}) { + #We only replay the records in the same direction + if ($self->{sent} || ($self->flight & 1) != $server) { return ""; } $self->{sent} = 1; From matthias.st.pierre at ncp-e.com Fri Apr 13 18:49:50 2018 From: matthias.st.pierre at ncp-e.com (matthias.st.pierre at ncp-e.com) Date: Fri, 13 Apr 2018 18:49:50 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523645390.355494.6682.nullmailer@dev.openssl.org> The branch master has been updated via 5bc6bcf82d2adce982e04837b0810b1a6cd55a19 (commit) from 0e3ecaec3ebf2ed0dfbcff07b7fa1cfdd8240d5c (commit) - Log ----------------------------------------------------------------- commit 5bc6bcf82d2adce982e04837b0810b1a6cd55a19 Author: Dr. Matthias St. Pierre Date: Tue Apr 10 10:22:52 2018 +0200 DRBG: implement a get_nonce() callback Fixes #5849 In pull request #5503 a fallback was added which adds a random nonce of security_strength/2 bits if no nonce callback is provided. This change raised the entropy requirements form 256 to 384 bit, which can cause problems on some platforms (e.g. VMS, see issue #5849). The requirements for the nonce are given in section 8.6.7 of NIST SP 800-90Ar1: A nonce may be required in the construction of a seed during instantiation in order to provide a security cushion to block certain attacks. The nonce shall be either: a) A value with at least (security_strength/2) bits of entropy, or b) A value that is expected to repeat no more often than a (security_strength/2)-bit random string would be expected to repeat. Each nonce shall be unique to the cryptographic module in which instantiation is performed, but need not be secret. When used, the nonce shall be considered to be a critical security parameter. This commit implements a nonce of type b) in order to lower the entropy requirements during instantiation back to 256 bits. The formulation "shall be unique to the cryptographic module" above implies that the nonce needs to be unique among (with high probability) among all DRBG instances in "space" and "time". We try to achieve this goal by creating a nonce of the following form nonce = app-specific-data || high-resolution-utc-timestamp || counter Where || denotes concatenation. The application specific data can be something like the process or group id of the application. A utc timestamp is used because it increases monotonically, provided the system time is synchronized. This approach may not be perfect yet for a FIPS evaluation, but it should be good enough for the moment. This commit also harmonizes the implementation of the get_nonce() and the get_additional_data() callbacks and moves the platform specific parts from rand_lib.c into rand_unix.c, rand_win.c, and rand_vms.c. Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5920) ----------------------------------------------------------------------- Summary of changes: crypto/include/internal/rand_int.h | 33 ++++++ crypto/rand/drbg_lib.c | 19 +++- crypto/rand/rand_lib.c | 200 ++++++++++++------------------------- crypto/rand/rand_unix.c | 179 ++++++++++++++++++++++++++++++--- crypto/rand/rand_vms.c | 39 ++++++++ crypto/rand/rand_win.c | 38 +++++++ 6 files changed, 354 insertions(+), 154 deletions(-) diff --git a/crypto/include/internal/rand_int.h b/crypto/include/internal/rand_int.h index baa9bfe..cf82e4a 100644 --- a/crypto/include/internal/rand_int.h +++ b/crypto/include/internal/rand_int.h @@ -39,8 +39,15 @@ size_t rand_drbg_get_entropy(RAND_DRBG *drbg, int prediction_resistance); void rand_drbg_cleanup_entropy(RAND_DRBG *drbg, unsigned char *out, size_t outlen); +size_t rand_drbg_get_nonce(RAND_DRBG *drbg, + unsigned char **pout, + int entropy, size_t min_len, size_t max_len); +void rand_drbg_cleanup_nonce(RAND_DRBG *drbg, + unsigned char *out, size_t outlen); + size_t rand_drbg_get_additional_data(unsigned char **pout, size_t max_len); +void rand_drbg_cleanup_additional_data(unsigned char *out, size_t outlen); /* * RAND_POOL functions @@ -77,4 +84,30 @@ int rand_pool_add_end(RAND_POOL *pool, size_t len, size_t entropy); */ size_t rand_pool_acquire_entropy(RAND_POOL *pool); +/* + * Add some application specific nonce data + * + * This function is platform specific and adds some application specific + * data to the nonce used for instantiating the drbg. + * + * This data currently consists of the process and thread id, and a high + * resolution timestamp. The data does not include an atomic counter, + * because that is added by the calling function rand_drbg_get_nonce(). + * + * Returns 1 on success and 0 on failure. + */ +int rand_pool_add_nonce_data(RAND_POOL *pool); + + +/* + * Add some platform specific additional data + * + * This function is platform specific and adds some random noise to the + * additional data used for generating random bytes and for reseeding + * the drbg. + * + * Returns 1 on success and 0 on failure. + */ +int rand_pool_add_additional_data(RAND_POOL *pool); + #endif diff --git a/crypto/rand/drbg_lib.c b/crypto/rand/drbg_lib.c index b9ad1b8..cc59236 100644 --- a/crypto/rand/drbg_lib.c +++ b/crypto/rand/drbg_lib.c @@ -184,9 +184,23 @@ static RAND_DRBG *rand_drbg_new(int secure, drbg->parent = parent; if (parent == NULL) { + drbg->get_entropy = rand_drbg_get_entropy; + drbg->cleanup_entropy = rand_drbg_cleanup_entropy; +#ifndef RAND_DRBG_GET_RANDOM_NONCE + drbg->get_nonce = rand_drbg_get_nonce; + drbg->cleanup_nonce = rand_drbg_cleanup_nonce; +#endif + drbg->reseed_interval = master_reseed_interval; drbg->reseed_time_interval = master_reseed_time_interval; } else { + drbg->get_entropy = rand_drbg_get_entropy; + drbg->cleanup_entropy = rand_drbg_cleanup_entropy; + /* + * Do not provide nonce callbacks, the child DRBGs will + * obtain their nonce using random bits from the parent. + */ + drbg->reseed_interval = slave_reseed_interval; drbg->reseed_time_interval = slave_reseed_time_interval; } @@ -208,11 +222,6 @@ static RAND_DRBG *rand_drbg_new(int secure, rand_drbg_unlock(parent); } - if (!RAND_DRBG_set_callbacks(drbg, rand_drbg_get_entropy, - rand_drbg_cleanup_entropy, - NULL, NULL)) - goto err; - return drbg; err: diff --git a/crypto/rand/rand_lib.c b/crypto/rand/rand_lib.c index 6e98e4d..5ae51a1 100644 --- a/crypto/rand/rand_lib.c +++ b/crypto/rand/rand_lib.c @@ -15,49 +15,8 @@ #include #include "internal/thread_once.h" #include "rand_lcl.h" -#ifdef OPENSSL_SYS_UNIX -# include -# include -# include -#endif #include "e_os.h" -/* Macro to convert two thirty two bit values into a sixty four bit one */ -#define TWO32TO64(a, b) ((((uint64_t)(a)) << 32) + (b)) - -/* - * Check for the existence and support of POSIX timers. The standard - * says that the _POSIX_TIMERS macro will have a positive value if they - * are available. - * - * However, we want an additional constraint: that the timer support does - * not require an extra library dependency. Early versions of glibc - * require -lrt to be specified on the link line to access the timers, - * so this needs to be checked for. - * - * It is worse because some libraries define __GLIBC__ but don't - * support the version testing macro (e.g. uClibc). This means - * an extra check is needed. - * - * The final condition is: - * "have posix timers and either not glibc or glibc without -lrt" - * - * The nested #if sequences are required to avoid using a parameterised - * macro that might be undefined. - */ -#undef OSSL_POSIX_TIMER_OKAY -#if defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0 -# if defined(__GLIBC__) -# if defined(__GLIBC_PREREQ) -# if __GLIBC_PREREQ(2, 17) -# define OSSL_POSIX_TIMER_OKAY -# endif -# endif -# else -# define OSSL_POSIX_TIMER_OKAY -# endif -#endif - #ifndef OPENSSL_NO_ENGINE /* non-NULL if default_RAND_meth is ENGINE-provided */ static ENGINE *funct_ref; @@ -69,6 +28,9 @@ static CRYPTO_ONCE rand_init = CRYPTO_ONCE_STATIC_INIT; int rand_fork_count; +static CRYPTO_RWLOCK *rand_nonce_lock; +static int rand_nonce_count; + #ifdef OPENSSL_RAND_SEED_RDTSC /* * IMPORTANT NOTE: It is not currently possible to use this code @@ -247,72 +209,62 @@ size_t rand_drbg_get_entropy(RAND_DRBG *drbg, } /* - * Find a suitable source of time. Start with the highest resolution source - * and work down to the slower ones. This is added as additional data and - * isn't counted as randomness, so any result is acceptable. + * Implements the cleanup_entropy() callback (see RAND_DRBG_set_callbacks()) * - * Returns 0 when we weren't able to find any time source */ -static uint64_t get_timer_bits(void) +void rand_drbg_cleanup_entropy(RAND_DRBG *drbg, + unsigned char *out, size_t outlen) { - uint64_t res = OPENSSL_rdtsc(); + OPENSSL_secure_clear_free(out, outlen); +} - if (res != 0) - return res; -#if defined(_WIN32) - { - LARGE_INTEGER t; - FILETIME ft; - if (QueryPerformanceCounter(&t) != 0) - return t.QuadPart; - GetSystemTimeAsFileTime(&ft); - return TWO32TO64(ft.dwHighDateTime, ft.dwLowDateTime); - } -#elif defined(__sun) || defined(__hpux) - return gethrtime(); -#elif defined(_AIX) - { - timebasestruct_t t; - - read_wall_time(&t, TIMEBASE_SZ); - return TWO32TO64(t.tb_high, t.tb_low); - } -#else +/* + * Implements the get_nonce() callback (see RAND_DRBG_set_callbacks()) + * + */ +size_t rand_drbg_get_nonce(RAND_DRBG *drbg, + unsigned char **pout, + int entropy, size_t min_len, size_t max_len) +{ + size_t ret = 0; + RAND_POOL *pool; -# if defined(OSSL_POSIX_TIMER_OKAY) - { - struct timespec ts; - clockid_t cid; - -# ifdef CLOCK_BOOTTIME - cid = CLOCK_BOOTTIME; -# elif defined(_POSIX_MONOTONIC_CLOCK) - cid = CLOCK_MONOTONIC; -# else - cid = CLOCK_REALTIME; -# endif - - if (clock_gettime(cid, &ts) == 0) - return TWO32TO64(ts.tv_sec, ts.tv_nsec); - } -# endif -# if defined(__unix__) \ - || (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L) - { - struct timeval tv; - - if (gettimeofday(&tv, NULL) == 0) - return TWO32TO64(tv.tv_sec, tv.tv_usec); - } -# endif - { - time_t t = time(NULL); - if (t == (time_t)-1) - return 0; - return t; - } -#endif + struct { + void * instance; + int count; + } data = { 0 }; + + pool = rand_pool_new(0, min_len, max_len); + if (pool == NULL) + return 0; + + if (rand_pool_add_nonce_data(pool) == 0) + goto err; + + data.instance = drbg; + CRYPTO_atomic_add(&rand_nonce_count, 1, &data.count, rand_nonce_lock); + + if (rand_pool_add(pool, (unsigned char *)&data, sizeof(data), 0) == 0) + goto err; + + ret = rand_pool_length(pool); + *pout = rand_pool_detach(pool); + + err: + rand_pool_free(pool); + + return ret; +} + +/* + * Implements the cleanup_nonce() callback (see RAND_DRBG_set_callbacks()) + * + */ +void rand_drbg_cleanup_nonce(RAND_DRBG *drbg, + unsigned char *out, size_t outlen) +{ + OPENSSL_secure_clear_free(out, outlen); } /* @@ -327,52 +279,26 @@ static uint64_t get_timer_bits(void) */ size_t rand_drbg_get_additional_data(unsigned char **pout, size_t max_len) { + size_t ret = 0; RAND_POOL *pool; - CRYPTO_THREAD_ID thread_id; - size_t len; -#ifdef OPENSSL_SYS_UNIX - pid_t pid; -#elif defined(OPENSSL_SYS_WIN32) - DWORD pid; -#endif - uint64_t tbits; pool = rand_pool_new(0, 0, max_len); if (pool == NULL) return 0; -#ifdef OPENSSL_SYS_UNIX - pid = getpid(); - rand_pool_add(pool, (unsigned char *)&pid, sizeof(pid), 0); -#elif defined(OPENSSL_SYS_WIN32) - pid = GetCurrentProcessId(); - rand_pool_add(pool, (unsigned char *)&pid, sizeof(pid), 0); -#endif - - thread_id = CRYPTO_THREAD_get_current_id(); - if (thread_id != 0) - rand_pool_add(pool, (unsigned char *)&thread_id, sizeof(thread_id), 0); - - tbits = get_timer_bits(); - if (tbits != 0) - rand_pool_add(pool, (unsigned char *)&tbits, sizeof(tbits), 0); + if (rand_pool_add_additional_data(pool) == 0) + goto err; - /* TODO: Use RDSEED? */ + ret = rand_pool_length(pool); + *pout = rand_pool_detach(pool); - len = rand_pool_length(pool); - if (len != 0) - *pout = rand_pool_detach(pool); + err: rand_pool_free(pool); - return len; + return ret; } -/* - * Implements the cleanup_entropy() callback (see RAND_DRBG_set_callbacks()) - * - */ -void rand_drbg_cleanup_entropy(RAND_DRBG *drbg, - unsigned char *out, size_t outlen) +void rand_drbg_cleanup_additional_data(unsigned char *out, size_t outlen) { OPENSSL_secure_clear_free(out, outlen); } @@ -393,6 +319,9 @@ DEFINE_RUN_ONCE_STATIC(do_rand_init) rand_meth_lock = CRYPTO_THREAD_lock_new(); ret &= rand_meth_lock != NULL; + rand_nonce_lock = CRYPTO_THREAD_lock_new(); + ret &= rand_meth_lock != NULL; + return ret; } @@ -407,6 +336,7 @@ void rand_cleanup_int(void) CRYPTO_THREAD_lock_free(rand_engine_lock); #endif CRYPTO_THREAD_lock_free(rand_meth_lock); + CRYPTO_THREAD_lock_free(rand_nonce_lock); } /* diff --git a/crypto/rand/rand_unix.c b/crypto/rand/rand_unix.c index 0f9407f..beb35a3 100644 --- a/crypto/rand/rand_unix.c +++ b/crypto/rand/rand_unix.c @@ -14,6 +14,50 @@ #include "rand_lcl.h" #include "internal/rand_int.h" #include +#ifdef OPENSSL_SYS_UNIX +# include +# include +# include + +static uint64_t get_time_stamp(void); +static uint64_t get_timer_bits(void); + +/* Macro to convert two thirty two bit values into a sixty four bit one */ +# define TWO32TO64(a, b) ((((uint64_t)(a)) << 32) + (b)) + +/* + * Check for the existence and support of POSIX timers. The standard + * says that the _POSIX_TIMERS macro will have a positive value if they + * are available. + * + * However, we want an additional constraint: that the timer support does + * not require an extra library dependency. Early versions of glibc + * require -lrt to be specified on the link line to access the timers, + * so this needs to be checked for. + * + * It is worse because some libraries define __GLIBC__ but don't + * support the version testing macro (e.g. uClibc). This means + * an extra check is needed. + * + * The final condition is: + * "have posix timers and either not glibc or glibc without -lrt" + * + * The nested #if sequences are required to avoid using a parameterised + * macro that might be undefined. + */ +# undef OSSL_POSIX_TIMER_OKAY +# if defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0 +# if defined(__GLIBC__) +# if defined(__GLIBC_PREREQ) +# if __GLIBC_PREREQ(2, 17) +# define OSSL_POSIX_TIMER_OKAY +# endif +# endif +# else +# define OSSL_POSIX_TIMER_OKAY +# endif +# endif +#endif #if (defined(OPENSSL_SYS_VXWORKS) || defined(OPENSSL_SYS_UEFI)) && \ !defined(OPENSSL_RAND_SEED_NONE) @@ -54,9 +98,6 @@ size_t rand_pool_acquire_entropy(RAND_POOL *pool) { short int code; - gid_t curr_gid; - pid_t curr_pid; - uid_t curr_uid; int i, k; size_t bytes_needed; struct timespec ts; @@ -69,17 +110,6 @@ size_t rand_pool_acquire_entropy(RAND_POOL *pool) extern void s$sleep2(long long *_duration, short int *_code); # endif - /* - * Seed with the gid, pid, and uid, to ensure *some* variation between - * different processes. - */ - curr_gid = getgid(); - rand_pool_add(pool, &curr_gid, sizeof(curr_gid), 0); - curr_pid = getpid(); - rand_pool_add(pool, &curr_pid, sizeof(curr_pid), 0); - curr_uid = getuid(); - rand_pool_add(pool, &curr_uid, sizeof(curr_uid), 0); - bytes_needed = rand_pool_bytes_needed(pool, 2 /*entropy_per_byte*/); for (i = 0; i < bytes_needed; i++) { @@ -256,5 +286,126 @@ size_t rand_pool_acquire_entropy(RAND_POOL *pool) # endif } # endif +#endif + +#ifdef OPENSSL_SYS_UNIX +int rand_pool_add_nonce_data(RAND_POOL *pool) +{ + struct { + pid_t pid; + CRYPTO_THREAD_ID tid; + uint64_t time; + } data = { 0 }; + + /* + * Add process id, thread id, and a high resolution timestamp to + * ensure that the nonce is unique whith high probability for + * different process instances. + */ + data.pid = getpid(); + data.tid = CRYPTO_THREAD_get_current_id(); + data.time = get_time_stamp(); + + return rand_pool_add(pool, (unsigned char *)&data, sizeof(data), 0); +} + +int rand_pool_add_additional_data(RAND_POOL *pool) +{ + struct { + CRYPTO_THREAD_ID tid; + uint64_t time; + } data = { 0 }; + + /* + * Add some noise from the thread id and a high resolution timer. + * The thread id adds a little randomness if the drbg is accessed + * concurrently (which is the case for the drbg). + */ + data.tid = CRYPTO_THREAD_get_current_id(); + data.time = get_timer_bits(); + + return rand_pool_add(pool, (unsigned char *)&data, sizeof(data), 0); +} + + + +/* + * Get the current time with the highest possible resolution + * + * The time stamp is added to the nonce, so it is optimized for not repeating. + * The current time is ideal for this purpose, provided the computer's clock + * is synchronized. + */ +static uint64_t get_time_stamp(void) +{ +# if defined(OSSL_POSIX_TIMER_OKAY) + { + struct timespec ts; + + if (clock_gettime(CLOCK_REALTIME, &ts) == 0) + return TWO32TO64(ts.tv_sec, ts.tv_nsec); + } +# endif +# if defined(__unix__) \ + || (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L) + { + struct timeval tv; + + if (gettimeofday(&tv, NULL) == 0) + return TWO32TO64(tv.tv_sec, tv.tv_usec); + } +# endif + return time(NULL); +} + +/* + * Get an arbitrary timer value of the highest possible resolution + * + * The timer value is added as random noise to the additional data, + * which is not considered a trusted entropy sourec, so any result + * is acceptable. + */ +static uint64_t get_timer_bits(void) +{ + uint64_t res = OPENSSL_rdtsc(); + + if (res != 0) + return res; + +# if defined(__sun) || defined(__hpux) + return gethrtime(); +# elif defined(_AIX) + { + timebasestruct_t t; + + read_wall_time(&t, TIMEBASE_SZ); + return TWO32TO64(t.tb_high, t.tb_low); + } +# elif defined(OSSL_POSIX_TIMER_OKAY) + { + struct timespec ts; + +# ifdef CLOCK_BOOTTIME +# define CLOCK_TYPE CLOCK_BOOTTIME +# elif defined(_POSIX_MONOTONIC_CLOCK) +# define CLOCK_TYPE CLOCK_MONOTONIC +# else +# define CLOCK_TYPE CLOCK_REALTIME +# endif + + if (clock_gettime(CLOCK_TYPE, &ts) == 0) + return TWO32TO64(ts.tv_sec, ts.tv_nsec); + } +# endif +# if defined(__unix__) \ + || (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L) + { + struct timeval tv; + if (gettimeofday(&tv, NULL) == 0) + return TWO32TO64(tv.tv_sec, tv.tv_usec); + } +# endif + return time(NULL); +} #endif diff --git a/crypto/rand/rand_vms.c b/crypto/rand/rand_vms.c index 1507c6f..c50b4b2 100644 --- a/crypto/rand/rand_vms.c +++ b/crypto/rand/rand_vms.c @@ -10,6 +10,7 @@ #include "e_os.h" #if defined(OPENSSL_SYS_VMS) +# include # include "internal/cryptlib.h" # include # include "internal/rand_int.h" @@ -153,4 +154,42 @@ size_t rand_pool_acquire_entropy(RAND_POOL *pool) return rand_pool_entropy_available(pool); } +int rand_pool_add_nonce_data(RAND_POOL *pool) +{ + struct { + pid_t pid; + CRYPTO_THREAD_ID tid; + uint64_t time; + } data = { 0 }; + + /* + * Add process id, thread id, and a high resolution timestamp to + * ensure that the nonce is unique whith high probability for + * different process instances. + */ + data.pid = getpid(); + data.tid = CRYPTO_THREAD_get_current_id(); + sys$gettim_prec((struct _generic_64 *)&data.time); + + return rand_pool_add(pool, (unsigned char *)&data, sizeof(data), 0); +} + +int rand_pool_add_additional_data(RAND_POOL *pool) +{ + struct { + CRYPTO_THREAD_ID tid; + uint64_t time; + } data = { 0 }; + + /* + * Add some noise from the thread id and a high resolution timer. + * The thread id adds a little randomness if the drbg is accessed + * concurrently (which is the case for the drbg). + */ + data.tid = CRYPTO_THREAD_get_current_id(); + sys$gettim_prec((struct _generic_64 *)&data.time); + + return rand_pool_add(pool, (unsigned char *)&data, sizeof(data), 0); +} + #endif diff --git a/crypto/rand/rand_win.c b/crypto/rand/rand_win.c index ad5e3d1..1d44204 100644 --- a/crypto/rand/rand_win.c +++ b/crypto/rand/rand_win.c @@ -118,6 +118,44 @@ size_t rand_pool_acquire_entropy(RAND_POOL *pool) return rand_pool_entropy_available(pool); } + +int rand_pool_add_nonce_data(RAND_POOL *pool) +{ + struct { + DWORD pid; + DWORD tid; + FILETIME time; + } data = { 0 }; + + /* + * Add process id, thread id, and a high resolution timestamp to + * ensure that the nonce is unique whith high probability for + * different process instances. + */ + data.pid = GetCurrentProcessId(); + data.tid = GetCurrentThreadId(); + GetSystemTimeAsFileTime(&data.time); + + return rand_pool_add(pool, (unsigned char *)&data, sizeof(data), 0); +} + +int rand_pool_add_additional_data(RAND_POOL *pool) +{ + struct { + DWORD tid; + LARGE_INTEGER time; + } data = { 0 }; + + /* + * Add some noise from the thread id and a high resolution timer. + * The thread id adds a little randomness if the drbg is accessed + * concurrently (which is the case for the drbg). + */ + data.tid = GetCurrentThreadId(); + QueryPerformanceCounter(&data.time); + return rand_pool_add(pool, (unsigned char *)&data, sizeof(data), 0); +} + # if OPENSSL_API_COMPAT < 0x10100000L int RAND_event(UINT iMsg, WPARAM wParam, LPARAM lParam) { From levitte at openssl.org Fri Apr 13 21:48:49 2018 From: levitte at openssl.org (Richard Levitte) Date: Fri, 13 Apr 2018 21:48:49 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523656129.775414.1889.nullmailer@dev.openssl.org> The branch master has been updated via 560096f804a3712eea161726a8f085beefe8838a (commit) from 5bc6bcf82d2adce982e04837b0810b1a6cd55a19 (commit) - Log ----------------------------------------------------------------- commit 560096f804a3712eea161726a8f085beefe8838a Author: Richard Levitte Date: Fri Apr 13 16:23:58 2018 +0200 make update Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/5948) ----------------------------------------------------------------------- Summary of changes: crypto/err/openssl.txt | 3 +++ crypto/rand/rand_err.c | 6 ++++++ include/openssl/randerr.h | 3 +++ 3 files changed, 12 insertions(+) diff --git a/crypto/err/openssl.txt b/crypto/err/openssl.txt index e134585..be03aeb 100644 --- a/crypto/err/openssl.txt +++ b/crypto/err/openssl.txt @@ -968,6 +968,7 @@ RAND_F_RAND_BYTES:100:RAND_bytes RAND_F_RAND_DRBG_ENABLE_LOCKING:119:rand_drbg_enable_locking RAND_F_RAND_DRBG_GENERATE:107:RAND_DRBG_generate RAND_F_RAND_DRBG_GET_ENTROPY:120:rand_drbg_get_entropy +RAND_F_RAND_DRBG_GET_NONCE:123:rand_drbg_get_nonce RAND_F_RAND_DRBG_INSTANTIATE:108:RAND_DRBG_instantiate RAND_F_RAND_DRBG_NEW:109:RAND_DRBG_new RAND_F_RAND_DRBG_RESEED:110:RAND_DRBG_reseed @@ -2403,6 +2404,8 @@ RAND_R_RANDOM_POOL_UNDERFLOW:134:random pool underflow RAND_R_REQUEST_TOO_LARGE_FOR_DRBG:117:request too large for drbg RAND_R_RESEED_ERROR:118:reseed error RAND_R_SELFTEST_FAILURE:119:selftest failure +RAND_R_TOO_LITTLE_NONCE_REQUESTED:135:too little nonce requested +RAND_R_TOO_MUCH_NONCE_REQUESTED:136:too much nonce requested RAND_R_UNSUPPORTED_DRBG_FLAGS:132:unsupported drbg flags RAND_R_UNSUPPORTED_DRBG_TYPE:120:unsupported drbg type RSA_R_ALGORITHM_MISMATCH:100:algorithm mismatch diff --git a/crypto/rand/rand_err.c b/crypto/rand/rand_err.c index 4286bf4..31480a6 100644 --- a/crypto/rand/rand_err.c +++ b/crypto/rand/rand_err.c @@ -25,6 +25,8 @@ static const ERR_STRING_DATA RAND_str_functs[] = { "RAND_DRBG_generate"}, {ERR_PACK(ERR_LIB_RAND, RAND_F_RAND_DRBG_GET_ENTROPY, 0), "rand_drbg_get_entropy"}, + {ERR_PACK(ERR_LIB_RAND, RAND_F_RAND_DRBG_GET_NONCE, 0), + "rand_drbg_get_nonce"}, {ERR_PACK(ERR_LIB_RAND, RAND_F_RAND_DRBG_INSTANTIATE, 0), "RAND_DRBG_instantiate"}, {ERR_PACK(ERR_LIB_RAND, RAND_F_RAND_DRBG_NEW, 0), "RAND_DRBG_new"}, @@ -107,6 +109,10 @@ static const ERR_STRING_DATA RAND_str_reasons[] = { "request too large for drbg"}, {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_RESEED_ERROR), "reseed error"}, {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_SELFTEST_FAILURE), "selftest failure"}, + {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_TOO_LITTLE_NONCE_REQUESTED), + "too little nonce requested"}, + {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_TOO_MUCH_NONCE_REQUESTED), + "too much nonce requested"}, {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_UNSUPPORTED_DRBG_FLAGS), "unsupported drbg flags"}, {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_UNSUPPORTED_DRBG_TYPE), diff --git a/include/openssl/randerr.h b/include/openssl/randerr.h index 415ca2f..128f4de 100644 --- a/include/openssl/randerr.h +++ b/include/openssl/randerr.h @@ -27,6 +27,7 @@ int ERR_load_RAND_strings(void); # define RAND_F_RAND_DRBG_ENABLE_LOCKING 119 # define RAND_F_RAND_DRBG_GENERATE 107 # define RAND_F_RAND_DRBG_GET_ENTROPY 120 +# define RAND_F_RAND_DRBG_GET_NONCE 123 # define RAND_F_RAND_DRBG_INSTANTIATE 108 # define RAND_F_RAND_DRBG_NEW 109 # define RAND_F_RAND_DRBG_RESEED 110 @@ -79,6 +80,8 @@ int ERR_load_RAND_strings(void); # define RAND_R_REQUEST_TOO_LARGE_FOR_DRBG 117 # define RAND_R_RESEED_ERROR 118 # define RAND_R_SELFTEST_FAILURE 119 +# define RAND_R_TOO_LITTLE_NONCE_REQUESTED 135 +# define RAND_R_TOO_MUCH_NONCE_REQUESTED 136 # define RAND_R_UNSUPPORTED_DRBG_FLAGS 132 # define RAND_R_UNSUPPORTED_DRBG_TYPE 120 From levitte at openssl.org Sat Apr 14 11:29:41 2018 From: levitte at openssl.org (Richard Levitte) Date: Sat, 14 Apr 2018 11:29:41 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523705381.142770.32686.nullmailer@dev.openssl.org> The branch master has been updated via d47eb76cd5fef2495c23705733d7034370063556 (commit) from 560096f804a3712eea161726a8f085beefe8838a (commit) - Log ----------------------------------------------------------------- commit d47eb76cd5fef2495c23705733d7034370063556 Author: Matthias Kraft Date: Thu Apr 12 12:25:27 2018 +0200 openssl#5668: corrections after compiling with -qinfo=all:als. The ongoing discussion about casting or not in PR #5626 had me compiling again with above mentioned flags. Indeed the compiler had to say something about it and I did these changes to silence it again. Reviewed-by: Bernd Edlinger Reviewed-by: Rich Salz Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5943) ----------------------------------------------------------------------- Summary of changes: crypto/dso/dso_dlfcn.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/crypto/dso/dso_dlfcn.c b/crypto/dso/dso_dlfcn.c index 7abfe66..21bfb3b 100644 --- a/crypto/dso/dso_dlfcn.c +++ b/crypto/dso/dso_dlfcn.c @@ -326,8 +326,9 @@ typedef struct Dl_info { * address of a function, which is just located in the DATA segment instead of * the TEXT segment. */ -static int dladdr(void *addr, Dl_info *dl) +static int dladdr(void *ptr, Dl_info *dl) { + uintptr_t addr = (uintptr_t)ptr; unsigned int found = 0; struct ld_info *ldinfos, *next_ldi, *this_ldi; @@ -352,11 +353,12 @@ static int dladdr(void *addr, Dl_info *dl) do { this_ldi = next_ldi; - if (((addr >= this_ldi->ldinfo_textorg) - && (addr < (this_ldi->ldinfo_textorg + this_ldi->ldinfo_textsize))) - || ((addr >= this_ldi->ldinfo_dataorg) - && (addr < - (this_ldi->ldinfo_dataorg + this_ldi->ldinfo_datasize)))) { + if (((addr >= (uintptr_t)this_ldi->ldinfo_textorg) + && (addr < ((uintptr_t)this_ldi->ldinfo_textorg + + this_ldi->ldinfo_textsize))) + || ((addr >= (uintptr_t)this_ldi->ldinfo_dataorg) + && (addr < ((uintptr_t)this_ldi->ldinfo_dataorg + + this_ldi->ldinfo_datasize)))) { found = 1; /* * Ignoring the possibility of a member name and just returning @@ -367,7 +369,8 @@ static int dladdr(void *addr, Dl_info *dl) OPENSSL_strdup(this_ldi->ldinfo_filename)) == NULL) errno = ENOMEM; } else { - next_ldi = (char *)this_ldi + this_ldi->ldinfo_next; + next_ldi = + (struct ld_info *)((uintptr_t)this_ldi + this_ldi->ldinfo_next); } } while (this_ldi->ldinfo_next && !found); OPENSSL_free((void *)ldinfos); @@ -395,7 +398,7 @@ static int dlfcn_pathbyaddr(void *addr, char *path, int sz) len = (int)strlen(dli.dli_fname); if (sz <= 0) { # ifdef _AIX - OPENSSL_free(dli.dli_fname); + OPENSSL_free((void *)dli.dli_fname); # endif return len + 1; } @@ -404,7 +407,7 @@ static int dlfcn_pathbyaddr(void *addr, char *path, int sz) memcpy(path, dli.dli_fname, len); path[len++] = 0; # ifdef _AIX - OPENSSL_free(dli.dli_fname); + OPENSSL_free((void *)dli.dli_fname); # endif return len; } From levitte at openssl.org Sat Apr 14 12:07:49 2018 From: levitte at openssl.org (Richard Levitte) Date: Sat, 14 Apr 2018 12:07:49 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1523707669.681433.5538.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via e4fa7cc3fb9909c6aee411de15a06f918687b8e2 (commit) from ec46830f8a4ce62c0c8ee7677b1eb8e53ee16df1 (commit) - Log ----------------------------------------------------------------- commit e4fa7cc3fb9909c6aee411de15a06f918687b8e2 Author: Matthias Kraft Date: Wed Mar 7 01:48:45 2018 +0100 Custome built dladdr() for AIX. Implemented a stripped down dladdr()-implementation using AIX' own loadquery()-function. Following the SGI example in the same code, the DL_info only has the dli_fname member. As the scope of dlfcn_pathbyaddr() is the filename, this implementation does not consider archive members, which can be dlopen()ed in AIX. Added DATA segment checking to catch ptrgl virtual addresses. Added test case for DSO_dsobyaddr(), but only for DSO_DLFCN. Added PIC-flag to aix*-cc build targets. Signed-off-by: Matthias Kraft Reviewed-by: Andy Polyakov Reviewed-by: Rich Salz Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5626) ----------------------------------------------------------------------- Summary of changes: Configurations/10-main.conf | 2 + crypto/dso/dso_dlfcn.c | 83 ++++++++++++++++++++++++++++++++++++++-- crypto/init.c | 17 +++++++- test/recipes/90-test_shlibload.t | 6 ++- test/shlibloadtest.c | 58 +++++++++++++++++++++++++--- 5 files changed, 155 insertions(+), 11 deletions(-) diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf index 8559667..7e66705 100644 --- a/Configurations/10-main.conf +++ b/Configurations/10-main.conf @@ -1210,6 +1210,7 @@ sub vms_info { perlasm_scheme => "aix32", dso_scheme => "dlfcn", shared_target => "aix-shared", + shared_cflag => "-qpic", shared_ldflag => "-q32 -G", shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", arflags => "-X 32", @@ -1228,6 +1229,7 @@ sub vms_info { perlasm_scheme => "aix64", dso_scheme => "dlfcn", shared_target => "aix-shared", + shared_cflag => "-qpic", shared_ldflag => "-q64 -G", shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", arflags => "-X 64", diff --git a/crypto/dso/dso_dlfcn.c b/crypto/dso/dso_dlfcn.c index a4b0cdd..e01425b 100644 --- a/crypto/dso/dso_dlfcn.c +++ b/crypto/dso/dso_dlfcn.c @@ -1,5 +1,5 @@ /* - * Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -26,7 +26,7 @@ # endif # include # define HAVE_DLINFO 1 -# if defined(_AIX) || defined(__CYGWIN__) || \ +# if defined(__CYGWIN__) || \ defined(__SCO_VERSION__) || defined(_SCO_ELF) || \ (defined(__osf__) && !defined(RTLD_NEXT)) || \ (defined(__OpenBSD__) && !defined(RTLD_SELF)) || \ @@ -308,6 +308,76 @@ static int dladdr(void *address, Dl_info *dl) } # endif /* __sgi */ +# ifdef _AIX +/*- + * See IBM's AIX Version 7.2, Technical Reference: + * Base Operating System and Extensions, Volume 1 and 2 + * https://www.ibm.com/support/knowledgecenter/ssw_aix_72/com.ibm.aix.base/technicalreferences.htm + */ +# include +# include +/* ~ 64 * (sizeof(struct ld_info) + _XOPEN_PATH_MAX + _XOPEN_NAME_MAX) */ +# define DLFCN_LDINFO_SIZE 86976 +typedef struct Dl_info { + const char *dli_fname; +} Dl_info; +/* + * This dladdr()-implementation will also find the ptrgl (Pointer Glue) virtual + * address of a function, which is just located in the DATA segment instead of + * the TEXT segment. + */ +static int dladdr(void *ptr, Dl_info *dl) +{ + uintptr_t addr = (uintptr_t)ptr; + unsigned int found = 0; + struct ld_info *ldinfos, *next_ldi, *this_ldi; + + if ((ldinfos = (struct ld_info *)OPENSSL_malloc(DLFCN_LDINFO_SIZE)) == NULL) { + errno = ENOMEM; + dl->dli_fname = NULL; + return 0; + } + + if ((loadquery(L_GETINFO, (void *)ldinfos, DLFCN_LDINFO_SIZE)) < 0) { + /*- + * Error handling is done through errno and dlerror() reading errno: + * ENOMEM (ldinfos buffer is too small), + * EINVAL (invalid flags), + * EFAULT (invalid ldinfos ptr) + */ + OPENSSL_free((void *)ldinfos); + dl->dli_fname = NULL; + return 0; + } + next_ldi = ldinfos; + + do { + this_ldi = next_ldi; + if (((addr >= (uintptr_t)this_ldi->ldinfo_textorg) + && (addr < ((uintptr_t)this_ldi->ldinfo_textorg + + this_ldi->ldinfo_textsize))) + || ((addr >= (uintptr_t)this_ldi->ldinfo_dataorg) + && (addr < ((uintptr_t)this_ldi->ldinfo_dataorg + + this_ldi->ldinfo_datasize)))) { + found = 1; + /* + * Ignoring the possibility of a member name and just returning + * the path name. See docs: sys/ldr.h, loadquery() and + * dlopen()/RTLD_MEMBER. + */ + if ((dl->dli_fname = + OPENSSL_strdup(this_ldi->ldinfo_filename)) == NULL) + errno = ENOMEM; + } else { + next_ldi = + (struct ld_info *)((uintptr_t)this_ldi + this_ldi->ldinfo_next); + } + } while (this_ldi->ldinfo_next && !found); + OPENSSL_free((void *)ldinfos); + return (found && dl->dli_fname != NULL); +} +# endif /* _AIX */ + static int dlfcn_pathbyaddr(void *addr, char *path, int sz) { # ifdef HAVE_DLINFO @@ -326,12 +396,19 @@ static int dlfcn_pathbyaddr(void *addr, char *path, int sz) if (dladdr(addr, &dli)) { len = (int)strlen(dli.dli_fname); - if (sz <= 0) + if (sz <= 0) { +# ifdef _AIX + OPENSSL_free((void *)dli.dli_fname); +# endif return len + 1; + } if (len >= sz) len = sz - 1; memcpy(path, dli.dli_fname, len); path[len++] = 0; +# ifdef _AIX + OPENSSL_free((void *)dli.dli_fname); +# endif return len; } diff --git a/crypto/init.c b/crypto/init.c index 173eac3..1553113 100644 --- a/crypto/init.c +++ b/crypto/init.c @@ -1,5 +1,5 @@ /* - * Copyright 2016-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -114,6 +114,15 @@ DEFINE_RUN_ONCE_STATIC(ossl_init_base) ERR_set_mark(); dso = DSO_dsobyaddr(&base_inited, DSO_FLAG_NO_UNLOAD_ON_FREE); +# ifdef OPENSSL_INIT_DEBUG + fprintf(stderr, "OPENSSL_INIT: obtained DSO reference? %s\n", + (dso == NULL ? "No!" : "Yes.")); + /* + * In case of No!, it is uncertain our exit()-handlers can still be + * called. After dlclose() the whole library might have been unloaded + * already. + */ +# endif DSO_free(dso); ERR_pop_to_mark(); } @@ -657,6 +666,12 @@ int OPENSSL_atexit(void (*handler)(void)) ERR_set_mark(); dso = DSO_dsobyaddr(handlersym.sym, DSO_FLAG_NO_UNLOAD_ON_FREE); +# ifdef OPENSSL_INIT_DEBUG + fprintf(stderr, + "OPENSSL_INIT: OPENSSL_atexit: obtained DSO reference? %s\n", + (dso == NULL ? "No!" : "Yes.")); + /* See same code above in ossl_init_base() for an explanation. */ +# endif DSO_free(dso); ERR_pop_to_mark(); } diff --git a/test/recipes/90-test_shlibload.t b/test/recipes/90-test_shlibload.t index aa8d98d..04d5265 100644 --- a/test/recipes/90-test_shlibload.t +++ b/test/recipes/90-test_shlibload.t @@ -1,5 +1,5 @@ #! /usr/bin/env perl -# Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy @@ -20,7 +20,7 @@ use configdata; plan skip_all => "Test only supported in a shared build" if disabled("shared"); -plan tests => 3; +plan tests => 4; my $libcrypto_idx = $unified_info{rename}->{libcrypto} // "libcrypto"; my $libssl_idx = $unified_info{rename}->{libssl} // "libssl"; @@ -35,4 +35,6 @@ ok(run(test(["shlibloadtest", "-ssl_first", $libcrypto, $libssl])), "running shlibloadtest -ssl_first"); ok(run(test(["shlibloadtest", "-just_crypto", $libcrypto, $libssl])), "running shlibloadtest -just_crypto"); +ok(run(test(["shlibloadtest", "-dso_ref", $libcrypto, $libssl])), + "running shlibloadtest -dso_ref"); diff --git a/test/shlibloadtest.c b/test/shlibloadtest.c index 25df363..919bf7c 100644 --- a/test/shlibloadtest.c +++ b/test/shlibloadtest.c @@ -40,6 +40,16 @@ static OpenSSL_version_num_t OpenSSL_version_num; #ifdef DSO_DLFCN +# define DSO_DSOBYADDR "DSO_dsobyaddr" +# define DSO_FREE "DSO_free" + +typedef void DSO; +typedef DSO * (*DSO_dsobyaddr_t)(void (*addr)(), int flags); +typedef int (*DSO_free_t)(DSO *dso); + +static DSO_dsobyaddr_t DSO_dsobyaddr; +static DSO_free_t DSO_free; + # include typedef void * SHLIB; @@ -108,11 +118,13 @@ static int shlib_close(SHLIB lib) # define CRYPTO_FIRST_OPT "-crypto_first" # define SSL_FIRST_OPT "-ssl_first" # define JUST_CRYPTO_OPT "-just_crypto" +# define DSO_REFTEST_OPT "-dso_ref" enum test_types_en { CRYPTO_FIRST, SSL_FIRST, - JUST_CRYPTO + JUST_CRYPTO, + DSO_REFTEST }; int main(int argc, char **argv) @@ -123,7 +135,7 @@ int main(int argc, char **argv) void (*func) (void); SHLIB_SYM sym; } tls_method_sym, ssl_ctx_new_sym, ssl_ctx_free_sym, err_get_error_sym, - openssl_version_num_sym; + openssl_version_num_sym, dso_dsobyaddr_sym, dso_free_sym; enum test_types_en test_type; int i; @@ -138,6 +150,8 @@ int main(int argc, char **argv) test_type = SSL_FIRST; } else if (strcmp(argv[1], JUST_CRYPTO_OPT) == 0) { test_type = JUST_CRYPTO; + } else if (strcmp(argv[1], DSO_REFTEST_OPT) == 0) { + test_type = DSO_REFTEST; } else { printf("Unrecognised argument\n"); return 1; @@ -145,7 +159,8 @@ int main(int argc, char **argv) for (i = 0; i < 2; i++) { if ((i == 0 && (test_type == CRYPTO_FIRST - || test_type == JUST_CRYPTO)) + || test_type == JUST_CRYPTO + || test_type == DSO_REFTEST)) || (i == 1 && test_type == SSL_FIRST)) { if (!shlib_load(argv[2], &cryptolib)) { printf("Unable to load libcrypto\n"); @@ -161,7 +176,7 @@ int main(int argc, char **argv) } } - if (test_type != JUST_CRYPTO) { + if (test_type != JUST_CRYPTO && test_type != DSO_REFTEST) { if (!shlib_sym(ssllib, TLS_METHOD, &tls_method_sym.sym) || !shlib_sym(ssllib, SSL_CTX_NEW, &ssl_ctx_new_sym.sym) || !shlib_sym(ssllib, SSL_CTX_FREE, &ssl_ctx_free_sym.sym)) { @@ -215,6 +230,38 @@ int main(int argc, char **argv) return 1; } + if (test_type == DSO_REFTEST) { +# ifdef DSO_DLFCN + /* + * This is resembling the code used in ossl_init_base() and + * OPENSSL_atexit() to block unloading the library after dlclose(). + * We are not testing this on Windows, because it is done there in a + * completely different way. Especially as a call to DSO_dsobyaddr() + * will always return an error, because DSO_pathbyaddr() is not + * implemented there. + */ + if (!shlib_sym(cryptolib, DSO_DSOBYADDR, &dso_dsobyaddr_sym.sym) + || !shlib_sym(cryptolib, DSO_FREE, &dso_free_sym.sym)) { + printf("Unable to load crypto dso symbols\n"); + return 1; + } + + DSO_dsobyaddr = (DSO_dsobyaddr_t)dso_dsobyaddr_sym.func; + DSO_free = (DSO_free_t)dso_free_sym.func; + + { + DSO *hndl; + /* use known symbol from crypto module */ + if ((hndl = DSO_dsobyaddr((void (*)())ERR_get_error, 0)) != NULL) { + DSO_free(hndl); + } else { + printf("Unable to obtain DSO reference from crypto symbol\n"); + return 1; + } + } +# endif /* DSO_DLFCN */ + } + for (i = 0; i < 2; i++) { if ((i == 0 && test_type == CRYPTO_FIRST) || (i == 1 && test_type == SSL_FIRST)) { @@ -224,7 +271,8 @@ int main(int argc, char **argv) } } if ((i == 0 && (test_type == SSL_FIRST - || test_type == JUST_CRYPTO)) + || test_type == JUST_CRYPTO + || test_type == DSO_REFTEST)) || (i == 1 && test_type == CRYPTO_FIRST)) { if (!shlib_close(cryptolib)) { printf("Unable to close libcrypto\n"); From appro at openssl.org Sat Apr 14 18:00:24 2018 From: appro at openssl.org (Andy Polyakov) Date: Sat, 14 Apr 2018 18:00:24 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523728824.433572.12313.nullmailer@dev.openssl.org> The branch master has been updated via 4442061532fb1a98c22609bf37303b77716df624 (commit) via de5b3a8645a3b2dd22fa8866e64488eb2b69777d (commit) from d47eb76cd5fef2495c23705733d7034370063556 (commit) - Log ----------------------------------------------------------------- commit 4442061532fb1a98c22609bf37303b77716df624 Author: Andy Polyakov Date: Thu Apr 12 10:05:22 2018 +0200 TLSProxy/Proxy.pm: straighten inner loop termination logic. Original condition was susceptible to race condition... Reviewed-by: Bernd Edlinger Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5933) commit de5b3a8645a3b2dd22fa8866e64488eb2b69777d Author: Andy Polyakov Date: Wed Apr 11 23:16:52 2018 +0200 TLSProxy/Proxy.pm: bind s_server to loopback interface. Bind even test/ssltest_old.c to loopback interface. This allows to avoid unnecessary alerts from Windows and Mac OS X firewalls. Reviewed-by: Bernd Edlinger Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5933) ----------------------------------------------------------------------- Summary of changes: test/ssltest_old.c | 3 +- util/perl/TLSProxy/Proxy.pm | 126 +++++++++++++++++++++++--------------------- 2 files changed, 69 insertions(+), 60 deletions(-) diff --git a/test/ssltest_old.c b/test/ssltest_old.c index 9469485..34705c3 100644 --- a/test/ssltest_old.c +++ b/test/ssltest_old.c @@ -1836,7 +1836,8 @@ int doit_localhost(SSL *s_ssl, SSL *c_ssl, int family, long count, int err_in_client = 0; int err_in_server = 0; - acpt = BIO_new_accept("0"); + acpt = BIO_new_accept(family == BIO_FAMILY_IPV4 ? "127.0.0.1:0" + : "[::1]:0"); if (acpt == NULL) goto err; BIO_set_accept_ip_family(acpt, family); diff --git a/util/perl/TLSProxy/Proxy.pm b/util/perl/TLSProxy/Proxy.pm index 752b572..9e9764d 100644 --- a/util/perl/TLSProxy/Proxy.pm +++ b/util/perl/TLSProxy/Proxy.pm @@ -23,9 +23,50 @@ use TLSProxy::CertificateVerify; use TLSProxy::ServerKeyExchange; use TLSProxy::NewSessionTicket; -my $have_IPv6 = 0; +my $have_IPv6; my $IP_factory; +BEGIN +{ + # IO::Socket::IP is on the core module list, IO::Socket::INET6 isn't. + # However, IO::Socket::INET6 is older and is said to be more widely + # deployed for the moment, and may have less bugs, so we try the latter + # first, then fall back on the core modules. Worst case scenario, we + # fall back to IO::Socket::INET, only supports IPv4. + eval { + require IO::Socket::INET6; + my $s = IO::Socket::INET6->new( + LocalAddr => "::1", + LocalPort => 0, + Listen=>1, + ); + $s or die "\n"; + $s->close(); + }; + if ($@ eq "") { + $IP_factory = sub { IO::Socket::INET6->new(@_); }; + $have_IPv6 = 1; + } else { + eval { + require IO::Socket::IP; + my $s = IO::Socket::IP->new( + LocalAddr => "::1", + LocalPort => 0, + Listen=>1, + ); + $s or die "\n"; + $s->close(); + }; + if ($@ eq "") { + $IP_factory = sub { IO::Socket::IP->new(@_); }; + $have_IPv6 = 1; + } else { + $IP_factory = sub { IO::Socket::INET->new(@_); }; + $have_IPv6 = 0; + } + } +} + my $is_tls13 = 0; my $ciphersuite = undef; @@ -39,8 +80,7 @@ sub new my $self = { #Public read/write - proxy_addr => "localhost", - server_addr => "localhost", + proxy_addr => $have_IPv6 ? "[::1]" : "127.0.0.1", filter => $filter, serverflags => "", clientflags => "", @@ -67,43 +107,6 @@ sub new message_list => [], }; - # IO::Socket::IP is on the core module list, IO::Socket::INET6 isn't. - # However, IO::Socket::INET6 is older and is said to be more widely - # deployed for the moment, and may have less bugs, so we try the latter - # first, then fall back on the code modules. Worst case scenario, we - # fall back to IO::Socket::INET, only supports IPv4. - eval { - require IO::Socket::INET6; - my $s = IO::Socket::INET6->new( - LocalAddr => "::1", - LocalPort => 0, - Listen=>1, - ); - $s or die "\n"; - $s->close(); - }; - if ($@ eq "") { - $IP_factory = sub { IO::Socket::INET6->new(@_); }; - $have_IPv6 = 1; - } else { - eval { - require IO::Socket::IP; - my $s = IO::Socket::IP->new( - LocalAddr => "::1", - LocalPort => 0, - Listen=>1, - ); - $s or die "\n"; - $s->close(); - }; - if ($@ eq "") { - $IP_factory = sub { IO::Socket::IP->new(@_); }; - $have_IPv6 = 1; - } else { - $IP_factory = sub { IO::Socket::INET->new(@_); }; - } - } - # Create the Proxy socket my $proxaddr = $self->{proxy_addr}; $proxaddr =~ s/[\[\]]//g; # Remove [ and ] @@ -113,11 +116,16 @@ sub new Proto => "tcp", Listen => SOMAXCONN, ); - $self->{proxy_sock} = $IP_factory->(@proxyargs); - if ($self->{proxy_sock}) { - $self->{proxy_port} = $self->{proxy_sock}->sockport(); - print "Proxy started on port ".$self->{proxy_port}."\n"; + if (my $sock = $IP_factory->(@proxyargs)) { + $self->{proxy_sock} = $sock; + $self->{proxy_port} = $sock->sockport(); + $self->{proxy_addr} = $sock->sockhost(); + $self->{proxy_addr} =~ s/(.*:.*)/[$1]/; + print "Proxy started on port ", + "$self->{proxy_addr}:$self->{proxy_port}\n"; + # use same address for s_server + $self->{server_addr} = $self->{proxy_addr}; } else { warn "Failed creating proxy socket (".$proxaddr.",0): $!\n"; } @@ -212,11 +220,9 @@ sub start my $execcmd = $self->execute ." s_server -max_protocol TLSv1.3 -no_comp -rev -engine ossltest" - ." -accept 0 -cert ".$self->cert." -cert2 ".$self->cert + ." -accept $self->{server_addr}:0" + ." -cert ".$self->cert." -cert2 ".$self->cert ." -naccept ".$self->serverconnects; - unless ($self->supports_IPv6) { - $execcmd .= " -4"; - } if ($self->ciphers ne "") { $execcmd .= " -cipher ".$self->ciphers; } @@ -286,7 +292,7 @@ sub start $self->{serverpid} = $pid; print STDERR "Server responds on ", - $self->{server_addr}, ":", $self->{server_port}, "\n"; + "$self->{server_addr}:$self->{server_port}\n"; # Connect right away... $self->connect_to_server(); @@ -301,11 +307,8 @@ sub clientstart if ($self->execute) { my $pid; my $execcmd = $self->execute - ." s_client -max_protocol TLSv1.3 -engine ossltest -connect " - .($self->proxy_addr).":".($self->proxy_port); - unless ($self->supports_IPv6) { - $execcmd .= " -4"; - } + ." s_client -max_protocol TLSv1.3 -engine ossltest" + ." -connect $self->{proxy_addr}:$self->{proxy_port}"; if ($self->cipherc ne "") { $execcmd .= " -cipher ".$self->cipherc; } @@ -315,6 +318,9 @@ sub clientstart if ($self->clientflags ne "") { $execcmd .= " ".$self->clientflags; } + if ($self->clientflags !~ m/-(no)?servername/) { + $execcmd .= " -servername localhost"; + } if (defined $self->sessionfile) { $execcmd .= " -ign_eof"; } @@ -363,12 +369,14 @@ sub clientstart $fdset = IO::Select->new($server_sock, $client_sock); my @ready; my $ctr = 0; + my $sessionfile = $self->{sessionfile}; local $SIG{PIPE} = "IGNORE"; - while($fdset->count - && (!(TLSProxy::Message->end) - || (defined $self->sessionfile() - && (-s $self->sessionfile()) == 0)) - && $ctr < 10) { + while($fdset->count && $ctr < 10) { + if (defined($sessionfile)) { + # s_client got -ign_eof and won't be exiting voluntarily, so we + # look for data *and* check on session file... + last if TLSProxy::Message->success() && -s $sessionfile; + } if (!(@ready = $fdset->can_read(1))) { $ctr++; next; From bernd.edlinger at hotmail.de Sun Apr 15 06:14:32 2018 From: bernd.edlinger at hotmail.de (bernd.edlinger at hotmail.de) Date: Sun, 15 Apr 2018 06:14:32 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523772872.026365.23743.nullmailer@dev.openssl.org> The branch master has been updated via b0a97931fbfd5c84e1ac031cb8a8d213d437fec5 (commit) via 49bb4dd0499e93c43e1408ebbf0f58f357eeae38 (commit) from 4442061532fb1a98c22609bf37303b77716df624 (commit) - Log ----------------------------------------------------------------- commit b0a97931fbfd5c84e1ac031cb8a8d213d437fec5 Author: Bernd Edlinger Date: Fri Apr 13 23:24:01 2018 +0200 Remove mandatory generated files too Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5951) commit 49bb4dd0499e93c43e1408ebbf0f58f357eeae38 Author: Bernd Edlinger Date: Fri Apr 13 21:41:14 2018 +0200 Fix cygwin make dependencies Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5951) ----------------------------------------------------------------------- Summary of changes: Configurations/unix-Makefile.tmpl | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl index 39df5cd..f23dff4 100644 --- a/Configurations/unix-Makefile.tmpl +++ b/Configurations/unix-Makefile.tmpl @@ -390,9 +390,13 @@ uninstall: uninstall_docs uninstall_sw libclean: @set -e; for s in $(SHLIB_INFO); do \ + if [ "$$s" = ";" ]; then continue; fi; \ s1=`echo "$$s" | cut -f1 -d";"`; \ s2=`echo "$$s" | cut -f2 -d";"`; \ - $(ECHO) $(RM) $$s1; \ + $(ECHO) $(RM) $$s1; {- output_off() unless windowsdll(); "" -}\ + $(RM) apps/$$s1; \ + $(RM) test/$$s1; \ + $(RM) fuzz/$$s1; {- output_on() unless windowsdll(); "" -}\ $(RM) $$s1; \ if [ "$$s1" != "$$s2" ]; then \ $(ECHO) $(RM) $$s2; \ @@ -404,7 +408,7 @@ libclean: clean: libclean $(RM) $(PROGRAMS) $(TESTPROGS) $(ENGINES) $(SCRIPTS) - $(RM) $(GENERATED) + $(RM) $(GENERATED_MANDATORY) $(GENERATED) -$(RM) `find . -name '*{- $depext -}' -a \! -path "./.git/*"` -$(RM) `find . -name '*{- $objext -}' -a \! -path "./.git/*"` $(RM) core @@ -979,7 +983,6 @@ EOF $cmd = '$(RC)'; $cmdflags = '$(RCFLAGS)'; $cmdcompile = ''; - $makedepprog = undef; } elsif (grep /\.(cc|cpp)$/, @srcs) { $cmd = '$(CXX)'; $cmdcompile = ' -c'; @@ -1014,7 +1017,8 @@ EOF $obj$objext: $deps $cmd $incs $cmdflags -c -o \$\@ $srcs EOF - } elsif (defined $makedepprog && $makedepprog !~ /\/makedepend/) { + } elsif (defined $makedepprog && $makedepprog !~ /\/makedepend/ + && !grep /\.rc$/, @srcs) { $recipe .= <<"EOF"; $obj$objext: $deps $cmd $incs $cmdflags -MMD -MF $obj$depext.tmp -MT \$\@ -c -o \$\@ $srcs From scan-admin at coverity.com Sun Apr 15 07:50:53 2018 From: scan-admin at coverity.com (scan-admin at coverity.com) Date: Sun, 15 Apr 2018 07:50:53 +0000 (UTC) Subject: [openssl-commits] Coverity Scan: Analysis completed for openssl/openssl Message-ID: <5ad3045d18e46_7a92ab1dd750f58714fe@node1.mail> Your request for analysis of openssl/openssl has been completed successfully. The results are available at https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRakUl6QyjujEohY7rPpoYUEcf-2B75FkFkxwwFKGZV8c1xA-3D-3D_19DGMz38yO7VfzGQuXkecdlEmzBoDG4v8Dvyanv-2F1I0HC03nSv2XwI5b-2F5MyhXzDi0gvin-2FVIn84IKzi02xOZfOxVNO0oVhSxvMbsZrJxYUamqcPxesqHsslHSzDoUJenL9j7RBZ2f5IbmyaqihmkujG5QHfT3DW-2FENOSG2NAPH36-2B5wBdWXgDOnh2pGAJ7hib7X7gKwOmNHLIk-2Fslpc7IT47A5nacG-2B2q2BkxF3a6M-3D Build ID: 206480 Analysis Summary: New defects found: 5 Defects eliminated: 4 If you have difficulty understanding any defects, email us at scan-admin at coverity.com, or post your question to StackOverflow at https://u2389337.ct.sendgrid.net/wf/click?upn=OgIsEqWzmIl4S-2FzEUMxLXL-2BukuZt9UUdRZhgmgzAKchwAzH1nH3073xDEXNRgHN6q227lMNIWoOb8ZgSjAjKcg-3D-3D_19DGMz38yO7VfzGQuXkecdlEmzBoDG4v8Dvyanv-2F1I0HC03nSv2XwI5b-2F5MyhXzDi0gvin-2FVIn84IKzi02xOZaieHZuOWZy-2BiV4GETHRrjHEvangMYDXB8QdQ1xTBynxueEHzaH09RgVfjDhWIHggtt-2B8jBJv3ek7ojIaPhBkJ4qSkKx8Ex7a1DVQGJEjlEKyAR2FBMdkFgsNlTG6rmkOcJMkJXE4w2hY0XCVJ8-2FRLk-3D From scan-admin at coverity.com Sun Apr 15 08:15:41 2018 From: scan-admin at coverity.com (scan-admin at coverity.com) Date: Sun, 15 Apr 2018 08:15:41 +0000 (UTC) Subject: [openssl-commits] Coverity Scan: Analysis completed for OpenSSL-1.0.2 Message-ID: <5ad30a2cb645e_1bfc2ab1dd750f58714c@node1.mail> Your request for analysis of OpenSSL-1.0.2 has been completed successfully. The results are available at https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRakUl6QyjujEohY7rPpoYUEeuRTZVWU4ku8PUBnVPw8PQ-3D-3D_19DGMz38yO7VfzGQuXkecdlEmzBoDG4v8Dvyanv-2F1I1Aa4ZsnBfh9EISztpVj5KFXC2zBbjAjyFtPcbhkK0Gl8bslFocpgQS2y-2F3FxiSMT9uXms8-2BZVPN3vXdxK8EBy6TzvvnruvicSvYBy5hP5uwTgYFJJbYVGdqrfriY8THeKE2wUTXBgwEue4znjVD3xTgvnmAODc5yaWU8NhqZg-2Fd8F6qd5s-2FisjWzmHAkQyDNI-3D Build ID: 206487 Analysis Summary: New defects found: 0 Defects eliminated: 0 From no-reply at appveyor.com Sun Apr 15 22:14:01 2018 From: no-reply at appveyor.com (AppVeyor) Date: Sun, 15 Apr 2018 22:14:01 +0000 Subject: [openssl-commits] Build failed: openssl master.17269 Message-ID: <20180415221401.1.3741913086015CE8@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Mon Apr 16 10:17:52 2018 From: no-reply at appveyor.com (AppVeyor) Date: Mon, 16 Apr 2018 10:17:52 +0000 Subject: [openssl-commits] Build completed: openssl master.17270 Message-ID: <20180416101752.1.1CD87999683C1C68@appveyor.com> An HTML attachment was scrubbed... URL: From matt at openssl.org Mon Apr 16 15:24:21 2018 From: matt at openssl.org (Matt Caswell) Date: Mon, 16 Apr 2018 15:24:21 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523892261.245962.13139.nullmailer@dev.openssl.org> The branch master has been updated via 54f007af94b8924a46786b34665223c127c19081 (commit) from b0a97931fbfd5c84e1ac031cb8a8d213d437fec5 (commit) - Log ----------------------------------------------------------------- commit 54f007af94b8924a46786b34665223c127c19081 Author: Matt Caswell Date: Thu Apr 12 12:07:53 2018 +0100 RSA key generation: ensure BN_mod_inverse and BN_mod_exp_mont both get called with BN_FLG_CONSTTIME flag set. Based on an original patch by Billy Brumley CVE-2018-0737 Reviewed-by: Rich Salz ----------------------------------------------------------------------- Summary of changes: crypto/rsa/rsa_gen.c | 1 + 1 file changed, 1 insertion(+) diff --git a/crypto/rsa/rsa_gen.c b/crypto/rsa/rsa_gen.c index d8ef3c7..7f0a256 100644 --- a/crypto/rsa/rsa_gen.c +++ b/crypto/rsa/rsa_gen.c @@ -157,6 +157,7 @@ static int rsa_builtin_keygen(RSA *rsa, int bits, int primes, BIGNUM *e_value, pinfo = sk_RSA_PRIME_INFO_value(prime_infos, i - 2); prime = pinfo->r; } + BN_set_flags(prime, BN_FLG_CONSTTIME); for (;;) { redo: From matt at openssl.org Mon Apr 16 15:24:42 2018 From: matt at openssl.org (Matt Caswell) Date: Mon, 16 Apr 2018 15:24:42 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1523892282.011803.13964.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via 6939eab03a6e23d2bd2c3f5e34fe1d48e542e787 (commit) from e4fa7cc3fb9909c6aee411de15a06f918687b8e2 (commit) - Log ----------------------------------------------------------------- commit 6939eab03a6e23d2bd2c3f5e34fe1d48e542e787 Author: Billy Brumley Date: Wed Apr 11 10:10:58 2018 +0300 RSA key generation: ensure BN_mod_inverse and BN_mod_exp_mont both get called with BN_FLG_CONSTTIME flag set. CVE-2018-0737 Reviewed-by: Rich Salz Reviewed-by: Matt Caswell ----------------------------------------------------------------------- Summary of changes: crypto/rsa/rsa_gen.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crypto/rsa/rsa_gen.c b/crypto/rsa/rsa_gen.c index 9af43e0..79f77e3 100644 --- a/crypto/rsa/rsa_gen.c +++ b/crypto/rsa/rsa_gen.c @@ -89,6 +89,8 @@ static int rsa_builtin_keygen(RSA *rsa, int bits, BIGNUM *e_value, if (BN_copy(rsa->e, e_value) == NULL) goto err; + BN_set_flags(rsa->p, BN_FLG_CONSTTIME); + BN_set_flags(rsa->q, BN_FLG_CONSTTIME); BN_set_flags(r2, BN_FLG_CONSTTIME); /* generate p and q */ for (;;) { From matt at openssl.org Mon Apr 16 15:24:57 2018 From: matt at openssl.org (Matt Caswell) Date: Mon, 16 Apr 2018 15:24:57 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_0_2-stable update Message-ID: <1523892297.106286.14775.nullmailer@dev.openssl.org> The branch OpenSSL_1_0_2-stable has been updated via 349a41da1ad88ad87825414752a8ff5fdd6a6c3f (commit) from d1a64149b061172d120559aea289498ec680b497 (commit) - Log ----------------------------------------------------------------- commit 349a41da1ad88ad87825414752a8ff5fdd6a6c3f Author: Billy Brumley Date: Wed Apr 11 10:10:58 2018 +0300 RSA key generation: ensure BN_mod_inverse and BN_mod_exp_mont both get called with BN_FLG_CONSTTIME flag set. CVE-2018-0737 Reviewed-by: Rich Salz Reviewed-by: Matt Caswell (cherry picked from commit 6939eab03a6e23d2bd2c3f5e34fe1d48e542e787) ----------------------------------------------------------------------- Summary of changes: crypto/rsa/rsa_gen.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crypto/rsa/rsa_gen.c b/crypto/rsa/rsa_gen.c index 9ca5dfe..42b89a8 100644 --- a/crypto/rsa/rsa_gen.c +++ b/crypto/rsa/rsa_gen.c @@ -156,6 +156,8 @@ static int rsa_builtin_keygen(RSA *rsa, int bits, BIGNUM *e_value, if (BN_copy(rsa->e, e_value) == NULL) goto err; + BN_set_flags(rsa->p, BN_FLG_CONSTTIME); + BN_set_flags(rsa->q, BN_FLG_CONSTTIME); BN_set_flags(r2, BN_FLG_CONSTTIME); /* generate p and q */ for (;;) { From matt at openssl.org Mon Apr 16 15:30:57 2018 From: matt at openssl.org (Matt Caswell) Date: Mon, 16 Apr 2018 15:30:57 +0000 Subject: [openssl-commits] [web] master update Message-ID: <1523892657.390594.17780.nullmailer@dev.openssl.org> The branch master has been updated via 5d178ddbeb5943d800ecf261449b139971d6743a (commit) from e73e4460aa47e8cb6c694625584c26e9298d0bb5 (commit) - Log ----------------------------------------------------------------- commit 5d178ddbeb5943d800ecf261449b139971d6743a Author: Matt Caswell Date: Mon Apr 16 16:30:00 2018 +0100 Updates for CVE-2018-0737 ----------------------------------------------------------------------- Summary of changes: news/secadv/20180416.txt | 35 +++++++++++++++++++++++++++++++++++ news/vulnerabilities.xml | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 news/secadv/20180416.txt diff --git a/news/secadv/20180416.txt b/news/secadv/20180416.txt new file mode 100644 index 0000000..700beb6 --- /dev/null +++ b/news/secadv/20180416.txt @@ -0,0 +1,35 @@ + +OpenSSL Security Advisory [16 Apr 2018] +======================================== + +Cache timing vulnerability in RSA Key Generation (CVE-2018-0737) +================================================================ + +Severity: Low + +The OpenSSL RSA Key generation algorithm has been shown to be vulnerable to a +cache timing side channel attack. An attacker with sufficient access to mount +cache timing attacks during the RSA key generation process could recover the +private key. + +Due to the low severity of this issue we are not issuing a new release of +OpenSSL 1.1.0 or 1.0.2 at this time. The fix will be included in OpenSSL 1.1.0i +and OpenSSL 1.0.2p when they become available. The fix is also available in +commit 6939eab03 (for 1.1.0) and commit 349a41da1 (for 1.0.2) in the OpenSSL git +repository. + +This issue was reported to OpenSSL on 4th April 2018 by Alejandro Cabrera +Aldaya, Billy Brumley, Cesar Pereida Garcia and Luis Manuel Alvarez Tapia. +The fix was developed by Billy Brumley. + +References +========== + +URL for this Security Advisory: +https://www.openssl.org/news/secadv/20180416.txt + +Note: the online version of the advisory may be updated with additional details +over time. + +For details of OpenSSL severity classifications please see: +https://www.openssl.org/policies/secpolicy.html diff --git a/news/vulnerabilities.xml b/news/vulnerabilities.xml index b565e18..684eb33 100644 --- a/news/vulnerabilities.xml +++ b/news/vulnerabilities.xml @@ -8,6 +8,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Constant time issue + Cache timing vulnerability in RSA Key Generation + + The OpenSSL RSA Key generation algorithm has been shown to be vulnerable + to a cache timing side channel attack. An attacker with sufficient access + to mount cache timing attacks during the RSA key generation process could + recover the private key. + + + + From bernd.edlinger at hotmail.de Mon Apr 16 15:31:56 2018 From: bernd.edlinger at hotmail.de (bernd.edlinger at hotmail.de) Date: Mon, 16 Apr 2018 15:31:56 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523892716.975809.18451.nullmailer@dev.openssl.org> The branch master has been updated via 90b3a620f56da8d8ef9c4c76919d0dca51150685 (commit) via cf54d00aa82302d2570531b4bd7841230ced0555 (commit) from 54f007af94b8924a46786b34665223c127c19081 (commit) - Log ----------------------------------------------------------------- commit 90b3a620f56da8d8ef9c4c76919d0dca51150685 Author: Bernd Edlinger Date: Sun Apr 15 15:51:07 2018 +0200 Remove mandatory generated files on VMS too Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5958) commit cf54d00aa82302d2570531b4bd7841230ced0555 Author: Bernd Edlinger Date: Sun Apr 15 12:07:17 2018 +0200 Remove mandatory generated files on windows too Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5958) ----------------------------------------------------------------------- Summary of changes: Configurations/descrip.mms.tmpl | 1 + Configurations/windows-makefile.tmpl | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Configurations/descrip.mms.tmpl b/Configurations/descrip.mms.tmpl index bbd9b0e..70e566e 100644 --- a/Configurations/descrip.mms.tmpl +++ b/Configurations/descrip.mms.tmpl @@ -491,6 +491,7 @@ clean : libclean {- join("\n\t", map { "- DELETE $_.EXE;*,$_.OPT;*" } @{$unified_info{programs}}) || "@ !" -} {- join("\n\t", map { "- DELETE $_.EXE;*,$_.OPT;*" } @{$unified_info{engines}}) || "@ !" -} {- join("\n\t", map { "- DELETE $_;*" } @{$unified_info{scripts}}) || "@ !" -} + {- join("\n\t", map { "- DELETE $_;*" } @{$unified_info{depends}->{""}}) || "@ !" -} {- join("\n\t", map { "- DELETE $_;*" } @generated) || "@ !" -} - DELETE [...]*.MAP;* - DELETE [...]*.D;* diff --git a/Configurations/windows-makefile.tmpl b/Configurations/windows-makefile.tmpl index c51e4c7..0fe6ca2 100644 --- a/Configurations/windows-makefile.tmpl +++ b/Configurations/windows-makefile.tmpl @@ -360,10 +360,12 @@ clean: libclean {- join("\n\t", map { "-del /Q /F $_" } @PROGRAMS) -} -del /Q /F $(ENGINES) -del /Q /F $(SCRIPTS) + -del /Q /F $(GENERATED_MANDATORY) -del /Q /F $(GENERATED) -del /Q /S /F *.d *.obj *.pdb *.exp *.ilk *.manifest -del /Q /S /F engines\*.lib -del /Q /S /F apps\*.lib apps\*.rc apps\*.res + -rmdir /Q /S test\test-runs distclean: clean -del /Q /F configdata.pm From matt at openssl.org Mon Apr 16 15:33:22 2018 From: matt at openssl.org (Matt Caswell) Date: Mon, 16 Apr 2018 15:33:22 +0000 Subject: [openssl-commits] [web] master update Message-ID: <1523892802.401881.20178.nullmailer@dev.openssl.org> The branch master has been updated via 58fdfb2faa17a780294c693bc5c8f08149bd3d2c (commit) from 5d178ddbeb5943d800ecf261449b139971d6743a (commit) - Log ----------------------------------------------------------------- commit 58fdfb2faa17a780294c693bc5c8f08149bd3d2c Author: Matt Caswell Date: Mon Apr 16 16:33:11 2018 +0100 Update newsflash for security advisory ----------------------------------------------------------------------- Summary of changes: news/newsflash.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/news/newsflash.txt b/news/newsflash.txt index fe25c29..e4ecaef 100644 --- a/news/newsflash.txt +++ b/news/newsflash.txt @@ -4,6 +4,7 @@ # Format is two fields, colon-separated; the first line is the column # headings. URL paths must all be absolute. Date: Item +16-Apr-2018: Security Advisory: one low severity fix 03-Apr-2018: Beta 2 of OpenSSL 1.1.1 is now available: please download and test it 27-Mar-2018: Security Advisory: several security fixes 27-Mar-2018: OpenSSL 1.1.0h is now available, including bug and security fixes From rsalz at openssl.org Mon Apr 16 15:47:47 2018 From: rsalz at openssl.org (Rich Salz) Date: Mon, 16 Apr 2018 15:47:47 +0000 Subject: [openssl-commits] [web] master update Message-ID: <1523893667.795120.22979.nullmailer@dev.openssl.org> The branch master has been updated via 168a9472b41c33b508d82a167ec169482b854664 (commit) from 58fdfb2faa17a780294c693bc5c8f08149bd3d2c (commit) - Log ----------------------------------------------------------------- commit 168a9472b41c33b508d82a167ec169482b854664 Author: Rich Salz Date: Mon Apr 16 11:47:44 2018 -0400 1747 newsflash ----------------------------------------------------------------------- Summary of changes: news/newsflash.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/news/newsflash.txt b/news/newsflash.txt index e4ecaef..b0b7cf1 100644 --- a/news/newsflash.txt +++ b/news/newsflash.txt @@ -4,6 +4,7 @@ # Format is two fields, colon-separated; the first line is the column # headings. URL paths must all be absolute. Date: Item +16-Apr-2018: OpenSSL 1747 Validation not moved to historical 16-Apr-2018: Security Advisory: one low severity fix 03-Apr-2018: Beta 2 of OpenSSL 1.1.1 is now available: please download and test it 27-Mar-2018: Security Advisory: several security fixes From matthias.st.pierre at ncp-e.com Mon Apr 16 16:44:15 2018 From: matthias.st.pierre at ncp-e.com (matthias.st.pierre at ncp-e.com) Date: Mon, 16 Apr 2018 16:44:15 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523897055.005508.735.nullmailer@dev.openssl.org> The branch master has been updated via b7fb239438fb289a69e9420ad1edacf3bd1c5d69 (commit) from 90b3a620f56da8d8ef9c4c76919d0dca51150685 (commit) - Log ----------------------------------------------------------------- commit b7fb239438fb289a69e9420ad1edacf3bd1c5d69 Author: Dr. Matthias St. Pierre Date: Mon Apr 16 15:06:24 2018 +0200 Revert "Add OPENSSL_VERSION_AT_LEAST" Fixes #5961 This reverts commit 3c5a61dd0f9d9a9eac098419bcaf47d1c296ca81. The macros OPENSSL_MAKE_VERSION() and OPENSSL_VERSION_AT_LEAST() contain errors and don't work as designed. Apart from that, their introduction should be held back until a decision has been mad about the future versioning scheme. Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5968) ----------------------------------------------------------------------- Summary of changes: doc/man3/OPENSSL_VERSION_NUMBER.pod | 5 ----- doc/man7/ssl.pod | 6 ------ include/openssl/opensslv.h | 5 ----- 3 files changed, 16 deletions(-) diff --git a/doc/man3/OPENSSL_VERSION_NUMBER.pod b/doc/man3/OPENSSL_VERSION_NUMBER.pod index d5842c0..6eca113 100644 --- a/doc/man3/OPENSSL_VERSION_NUMBER.pod +++ b/doc/man3/OPENSSL_VERSION_NUMBER.pod @@ -47,11 +47,6 @@ number was therefore 0x0090581f. OpenSSL_version_num() returns the version number. -The macro OPENSSL_VERSION_AT_LEAST(major,minor) can be used at compile -time test if the current version is at least as new as the version provided. -The arguments major, minor and fix correspond to the version information -as given above. - OpenSSL_version() returns different strings depending on B: =over 4 diff --git a/doc/man7/ssl.pod b/doc/man7/ssl.pod index 03efc52..7cf7d61 100644 --- a/doc/man7/ssl.pod +++ b/doc/man7/ssl.pod @@ -89,12 +89,6 @@ includes both more private SSL headers and headers from the B library. Whenever you need hard-core details on the internals of the SSL API, look inside this header file. -OPENSSL_VERSION_AT_LEAST(major,minor) can be -used in C<#if> statements in order to determine which version of the library is -being used. This can be used to either enable optional features at compile -time, or work around issues with a previous version. -See L. - =item B Unused. Present for backwards compatibility only. diff --git a/include/openssl/opensslv.h b/include/openssl/opensslv.h index 06c8b7c..241856d 100644 --- a/include/openssl/opensslv.h +++ b/include/openssl/opensslv.h @@ -42,11 +42,6 @@ extern "C" { # define OPENSSL_VERSION_NUMBER 0x10101005L # define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1-pre5-dev xx XXX xxxx" -#define OPENSSL_MAKE_VERSION(maj,min,fix,patch) ((0x10000000L)+((maj&0xff)<<20)+((min&0xff)<<12)+((fix&0xff)<<4)+patch) - -/* use this for #if tests, should never depend upon fix/patch */ -#define OPENSSL_VERSION_AT_LEAST(maj,min) (OPENSSL_MAKE_VERSION(maj,min, 0, 0) >= OPENSSL_VERSION_NUMBER) - /*- * The macros below are to be used for shared library (.so, .dll, ...) * versioning. That kind of versioning works a bit differently between From matthias.st.pierre at ncp-e.com Mon Apr 16 16:44:57 2018 From: matthias.st.pierre at ncp-e.com (matthias.st.pierre at ncp-e.com) Date: Mon, 16 Apr 2018 16:44:57 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1523897097.668889.1832.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via dbbaeb8973d662ae0d009e0fb6c8975721991b63 (commit) from 6939eab03a6e23d2bd2c3f5e34fe1d48e542e787 (commit) - Log ----------------------------------------------------------------- commit dbbaeb8973d662ae0d009e0fb6c8975721991b63 Author: Dr. Matthias St. Pierre Date: Mon Apr 16 15:19:14 2018 +0200 Revert "Add OPENSSL_VERSION_AT_LEAST" Fixes #5961 This reverts commit d8adfdcd2e5de23f3e1d1a1d10c2fda6f4a65c4a. The macros OPENSSL_MAKE_VERSION() and OPENSSL_VERSION_AT_LEAST() contain errors and don't work as designed. Apart from that, their introduction should be held back until a decision has been mad about the future versioning scheme. Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5968) ----------------------------------------------------------------------- Summary of changes: doc/crypto/OPENSSL_VERSION_NUMBER.pod | 5 ----- doc/ssl/ssl.pod | 6 ------ include/openssl/opensslv.h | 5 ----- 3 files changed, 16 deletions(-) diff --git a/doc/crypto/OPENSSL_VERSION_NUMBER.pod b/doc/crypto/OPENSSL_VERSION_NUMBER.pod index f50faec..f5429d2 100644 --- a/doc/crypto/OPENSSL_VERSION_NUMBER.pod +++ b/doc/crypto/OPENSSL_VERSION_NUMBER.pod @@ -47,11 +47,6 @@ number was therefore 0x0090581f. OpenSSL_version_num() returns the version number. -The macro OPENSSL_VERSION_AT_LEAST(major,minor) can be used at compile -time test if the current version is at least as new as the version provided. -The arguments major, minor and fix correspond to the version information -as given above. - OpenSSL_version() returns different strings depending on B: =over 4 diff --git a/doc/ssl/ssl.pod b/doc/ssl/ssl.pod index 4d91907..7307a2b 100644 --- a/doc/ssl/ssl.pod +++ b/doc/ssl/ssl.pod @@ -91,12 +91,6 @@ includes both more private SSL headers and headers from the B library. Whenever you need hard-core details on the internals of the SSL API, look inside this header file. -OPENSSL_VERSION_AT_LEAST(major,minor) can be -used in C<#if> statements in order to determine which version of the library is -being used. This can be used to either enable optional features at compile -time, or work around issues with a previous version. -See L. - =item B Unused. Present for backwards compatibility only. diff --git a/include/openssl/opensslv.h b/include/openssl/opensslv.h index 3532521..7221a45 100644 --- a/include/openssl/opensslv.h +++ b/include/openssl/opensslv.h @@ -46,11 +46,6 @@ extern "C" { # define OPENSSL_VERSION_TEXT "OpenSSL 1.1.0i-dev xx XXX xxxx" # endif -#define OPENSSL_MAKE_VERSION(maj,min,fix,patch) ((0x10000000L)+((maj&0xff)<<20)+((min&0xff)<<12)+((fix&0xff)<<4)+patch) - -/* use this for #if tests, should never depend upon fix/patch */ -#define OPENSSL_VERSION_AT_LEAST(maj,min) (OPENSSL_MAKE_VERSION(maj,min, 0, 0) >= OPENSSL_VERSION_NUMBER) - /*- * The macros below are to be used for shared library (.so, .dll, ...) * versioning. That kind of versioning works a bit differently between From no-reply at appveyor.com Mon Apr 16 21:54:44 2018 From: no-reply at appveyor.com (AppVeyor) Date: Mon, 16 Apr 2018 21:54:44 +0000 Subject: [openssl-commits] Build failed: openssl master.17290 Message-ID: <20180416215444.1.827114E12C6C928D@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Mon Apr 16 22:16:25 2018 From: no-reply at appveyor.com (AppVeyor) Date: Mon, 16 Apr 2018 22:16:25 +0000 Subject: [openssl-commits] Build completed: openssl master.17291 Message-ID: <20180416221625.1.4BA59C2E29D3D1D1@appveyor.com> An HTML attachment was scrubbed... URL: From levitte at openssl.org Tue Apr 17 13:15:46 2018 From: levitte at openssl.org (Richard Levitte) Date: Tue, 17 Apr 2018 13:15:46 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523970946.144022.28453.nullmailer@dev.openssl.org> The branch master has been updated via 6761890195526c28ff82a9e763fc9a86158832ce (commit) from b7fb239438fb289a69e9420ad1edacf3bd1c5d69 (commit) - Log ----------------------------------------------------------------- commit 6761890195526c28ff82a9e763fc9a86158832ce Author: Richard Levitte Date: Tue Apr 17 15:06:00 2018 +0200 OpenSSL 1.1.1-pre5: update CHANGES with recent user visible changes Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/5989) ----------------------------------------------------------------------- Summary of changes: CHANGES | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/CHANGES b/CHANGES index e5f6cb6..00b5c40 100644 --- a/CHANGES +++ b/CHANGES @@ -9,6 +9,38 @@ Changes between 1.1.0h and 1.1.1 [xx XXX xxxx] + *) Updated CONTRIBUTING + [Rich Salz] + + *) Updated DRBG / RAND to request nonce and additional low entropy + randomness from the system. + [Matthias St. Pierre] + + *) Updated 'openssl rehash' to use OpenSSL consistent default. + [Richard Levitte] + + *) Moved the load of the ssl_conf module to libcrypto, which helps + loading engines that libssl uses before libssl is initialised. + [Matt Caswell] + + *) Added EVP_PKEY_sign() and EVP_PKEY_verify() for EdDSA + [Matt Caswell] + + *) Fixed X509_NAME_ENTRY_set to get multi-valued RDNs right in all cases. + [Ingo Schwarze, Rich Salz] + + *) Added output of accepting IP address and port for 'openssl s_server' + [Richard Levitte] + + *) Added a new API for TLSv1.3 ciphersuites: + SSL_CTX_set_ciphersuites() + SSL_set_ciphersuites() + [Matt Caswell] + + *) Memory allocation failures consistenly add an error to the error + stack. + [Rich Salz] + *) Don't use OPENSSL_ENGINES and OPENSSL_CONF environment values in libcrypto when run as setuid/setgid. [Bernd Edlinger] From levitte at openssl.org Tue Apr 17 13:28:24 2018 From: levitte at openssl.org (Richard Levitte) Date: Tue, 17 Apr 2018 13:28:24 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523971704.959518.32677.nullmailer@dev.openssl.org> The branch master has been updated via 28428130db13fe5d1b956a622747db2e0e0b1458 (commit) from 6761890195526c28ff82a9e763fc9a86158832ce (commit) - Log ----------------------------------------------------------------- commit 28428130db13fe5d1b956a622747db2e0e0b1458 Author: Richard Levitte Date: Tue Apr 17 15:18:40 2018 +0200 Update copyright year Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/5990) ----------------------------------------------------------------------- Summary of changes: crypto/asn1/a_object.c | 2 +- crypto/asn1/a_strex.c | 2 +- crypto/asn1/a_strnid.c | 2 +- crypto/asn1/asn_moid.c | 2 +- crypto/asn1/bio_asn1.c | 2 +- crypto/asn1/bio_ndef.c | 2 +- crypto/asn1/tasn_new.c | 2 +- crypto/asn1/tasn_utl.c | 2 +- crypto/asn1/x_int64.c | 2 +- crypto/async/async_wait.c | 2 +- crypto/bio/b_print.c | 2 +- crypto/bn/bn_ctx.c | 2 +- crypto/cmac/cmac.c | 2 +- crypto/cms/cms_enc.c | 2 +- crypto/cms/cms_pwri.c | 2 +- crypto/conf/conf_mall.c | 2 +- crypto/conf/conf_mod.c | 2 +- crypto/dh/dh_pmeth.c | 2 +- crypto/dsa/dsa_gen.c | 2 +- crypto/dsa/dsa_pmeth.c | 2 +- crypto/ec/ec_key.c | 2 +- crypto/ec/ec_oct.c | 2 +- crypto/ec/ec_print.c | 2 +- crypto/engine/eng_openssl.c | 2 +- crypto/evp/bio_enc.c | 2 +- crypto/evp/bio_ok.c | 2 +- crypto/evp/encode.c | 2 +- crypto/evp/evp_locl.h | 2 +- crypto/hmac/hm_pmeth.c | 2 +- crypto/kdf/hkdf.c | 2 +- crypto/modes/ocb128.c | 2 +- crypto/objects/obj_xref.c | 2 +- crypto/poly1305/poly1305_pmeth.c | 2 +- crypto/rsa/rsa_pmeth.c | 2 +- crypto/siphash/siphash_pmeth.c | 2 +- crypto/stack/stack.c | 2 +- crypto/threads_none.c | 2 +- crypto/threads_pthread.c | 2 +- crypto/threads_win.c | 2 +- crypto/ui/ui_lib.c | 2 +- crypto/x509/x509name.c | 2 +- doc/man1/dgst.pod | 2 +- doc/man1/rehash.pod | 2 +- doc/man3/EVP_DigestSignInit.pod | 2 +- doc/man3/EVP_DigestVerifyInit.pod | 2 +- doc/man3/OPENSSL_config.pod | 2 +- doc/man3/OPENSSL_init_crypto.pod | 2 +- doc/man3/OPENSSL_malloc.pod | 2 +- ssl/packet.c | 2 +- ssl/pqueue.c | 2 +- ssl/ssl_init.c | 2 +- test/recipes/15-test_genrsa.t | 2 +- test/recipes/90-test_sslapi.t | 2 +- 53 files changed, 53 insertions(+), 53 deletions(-) diff --git a/crypto/asn1/a_object.c b/crypto/asn1/a_object.c index 2d3877b..42c138c 100644 --- a/crypto/asn1/a_object.c +++ b/crypto/asn1/a_object.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/asn1/a_strex.c b/crypto/asn1/a_strex.c index 7539553..db9fa80 100644 --- a/crypto/asn1/a_strex.c +++ b/crypto/asn1/a_strex.c @@ -1,5 +1,5 @@ /* - * Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/asn1/a_strnid.c b/crypto/asn1/a_strnid.c index 948fc1f..f19a9de 100644 --- a/crypto/asn1/a_strnid.c +++ b/crypto/asn1/a_strnid.c @@ -1,5 +1,5 @@ /* - * Copyright 1999-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1999-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/asn1/asn_moid.c b/crypto/asn1/asn_moid.c index e1bf1a1..f0b4dab 100644 --- a/crypto/asn1/asn_moid.c +++ b/crypto/asn1/asn_moid.c @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2002-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/asn1/bio_asn1.c b/crypto/asn1/bio_asn1.c index b88b2e5..86ee566 100644 --- a/crypto/asn1/bio_asn1.c +++ b/crypto/asn1/bio_asn1.c @@ -1,5 +1,5 @@ /* - * Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2006-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/asn1/bio_ndef.c b/crypto/asn1/bio_ndef.c index 686b6f7..6222c99 100644 --- a/crypto/asn1/bio_ndef.c +++ b/crypto/asn1/bio_ndef.c @@ -1,5 +1,5 @@ /* - * Copyright 2008-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2008-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/asn1/tasn_new.c b/crypto/asn1/tasn_new.c index ed66fb0..6b8ea8d 100644 --- a/crypto/asn1/tasn_new.c +++ b/crypto/asn1/tasn_new.c @@ -1,5 +1,5 @@ /* - * Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/asn1/tasn_utl.c b/crypto/asn1/tasn_utl.c index 11e3a34..a93fd87 100644 --- a/crypto/asn1/tasn_utl.c +++ b/crypto/asn1/tasn_utl.c @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/asn1/x_int64.c b/crypto/asn1/x_int64.c index d9a91be..f07ca3c 100644 --- a/crypto/asn1/x_int64.c +++ b/crypto/asn1/x_int64.c @@ -1,5 +1,5 @@ /* - * Copyright 2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/async/async_wait.c b/crypto/async/async_wait.c index 788c7cd..b23e43e 100644 --- a/crypto/async/async_wait.c +++ b/crypto/async/async_wait.c @@ -1,5 +1,5 @@ /* - * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/bio/b_print.c b/crypto/bio/b_print.c index 03ee45a..9e907fc 100644 --- a/crypto/bio/b_print.c +++ b/crypto/bio/b_print.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/bn/bn_ctx.c b/crypto/bn/bn_ctx.c index 703e4b7..aa08b31 100644 --- a/crypto/bn/bn_ctx.c +++ b/crypto/bn/bn_ctx.c @@ -1,5 +1,5 @@ /* - * Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/cmac/cmac.c b/crypto/cmac/cmac.c index 0c59659..6989c32 100644 --- a/crypto/cmac/cmac.c +++ b/crypto/cmac/cmac.c @@ -1,5 +1,5 @@ /* - * Copyright 2010-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2010-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/cms/cms_enc.c b/crypto/cms/cms_enc.c index 853e2f1..a171983 100644 --- a/crypto/cms/cms_enc.c +++ b/crypto/cms/cms_enc.c @@ -1,5 +1,5 @@ /* - * Copyright 2008-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2008-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/cms/cms_pwri.c b/crypto/cms/cms_pwri.c index 28f2a1c..a7e63c7 100644 --- a/crypto/cms/cms_pwri.c +++ b/crypto/cms/cms_pwri.c @@ -1,5 +1,5 @@ /* - * Copyright 2009-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2009-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/conf/conf_mall.c b/crypto/conf/conf_mall.c index 5aab429..7e86948 100644 --- a/crypto/conf/conf_mall.c +++ b/crypto/conf/conf_mall.c @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2002-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/conf/conf_mod.c b/crypto/conf/conf_mod.c index 4a848b8..df53609 100644 --- a/crypto/conf/conf_mod.c +++ b/crypto/conf/conf_mod.c @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2002-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/dh/dh_pmeth.c b/crypto/dh/dh_pmeth.c index 7137196..cce2d9e 100644 --- a/crypto/dh/dh_pmeth.c +++ b/crypto/dh/dh_pmeth.c @@ -1,5 +1,5 @@ /* - * Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2006-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/dsa/dsa_gen.c b/crypto/dsa/dsa_gen.c index dc61660..46f4f01 100644 --- a/crypto/dsa/dsa_gen.c +++ b/crypto/dsa/dsa_gen.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/dsa/dsa_pmeth.c b/crypto/dsa/dsa_pmeth.c index 4934276..f66317b 100644 --- a/crypto/dsa/dsa_pmeth.c +++ b/crypto/dsa/dsa_pmeth.c @@ -1,5 +1,5 @@ /* - * Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2006-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/ec/ec_key.c b/crypto/ec/ec_key.c index 1352cbe..c841236 100644 --- a/crypto/ec/ec_key.c +++ b/crypto/ec/ec_key.c @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2002-2018 The OpenSSL Project Authors. All Rights Reserved. * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved * * Licensed under the OpenSSL license (the "License"). You may not use diff --git a/crypto/ec/ec_oct.c b/crypto/ec/ec_oct.c index 32a88fb..a21906e 100644 --- a/crypto/ec/ec_oct.c +++ b/crypto/ec/ec_oct.c @@ -1,5 +1,5 @@ /* - * Copyright 2011-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2011-2018 The OpenSSL Project Authors. All Rights Reserved. * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved * * Licensed under the OpenSSL license (the "License"). You may not use diff --git a/crypto/ec/ec_print.c b/crypto/ec/ec_print.c index 3cd6b6b..027a519 100644 --- a/crypto/ec/ec_print.c +++ b/crypto/ec/ec_print.c @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2002-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/engine/eng_openssl.c b/crypto/engine/eng_openssl.c index 2a1dc93..f7ad7a5 100644 --- a/crypto/engine/eng_openssl.c +++ b/crypto/engine/eng_openssl.c @@ -1,5 +1,5 @@ /* - * Copyright 2001-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2001-2018 The OpenSSL Project Authors. All Rights Reserved. * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved * * Licensed under the OpenSSL license (the "License"). You may not use diff --git a/crypto/evp/bio_enc.c b/crypto/evp/bio_enc.c index d48c826..6639061 100644 --- a/crypto/evp/bio_enc.c +++ b/crypto/evp/bio_enc.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/evp/bio_ok.c b/crypto/evp/bio_ok.c index 05fc1a2..a046221 100644 --- a/crypto/evp/bio_ok.c +++ b/crypto/evp/bio_ok.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/evp/encode.c b/crypto/evp/encode.c index 88e5a17..da32d4f 100644 --- a/crypto/evp/encode.c +++ b/crypto/evp/encode.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/evp/evp_locl.h b/crypto/evp/evp_locl.h index d5dbbeb..f1589d6 100644 --- a/crypto/evp/evp_locl.h +++ b/crypto/evp/evp_locl.h @@ -1,5 +1,5 @@ /* - * Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/hmac/hm_pmeth.c b/crypto/hmac/hm_pmeth.c index ceca6f7..55dd27d 100644 --- a/crypto/hmac/hm_pmeth.c +++ b/crypto/hmac/hm_pmeth.c @@ -1,5 +1,5 @@ /* - * Copyright 2007-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2007-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/kdf/hkdf.c b/crypto/kdf/hkdf.c index 16514a8..baaa16f 100644 --- a/crypto/kdf/hkdf.c +++ b/crypto/kdf/hkdf.c @@ -1,5 +1,5 @@ /* - * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/modes/ocb128.c b/crypto/modes/ocb128.c index 350c41f..96f21f6 100644 --- a/crypto/modes/ocb128.c +++ b/crypto/modes/ocb128.c @@ -1,5 +1,5 @@ /* - * Copyright 2014-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2014-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/objects/obj_xref.c b/crypto/objects/obj_xref.c index 166bf36..42d204c 100644 --- a/crypto/objects/obj_xref.c +++ b/crypto/objects/obj_xref.c @@ -1,5 +1,5 @@ /* - * Copyright 2006-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2006-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/poly1305/poly1305_pmeth.c b/crypto/poly1305/poly1305_pmeth.c index 1459a32..3bc24c9 100644 --- a/crypto/poly1305/poly1305_pmeth.c +++ b/crypto/poly1305/poly1305_pmeth.c @@ -1,5 +1,5 @@ /* - * Copyright 2007-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2007-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/rsa/rsa_pmeth.c b/crypto/rsa/rsa_pmeth.c index 1d305a6..c10669f 100644 --- a/crypto/rsa/rsa_pmeth.c +++ b/crypto/rsa/rsa_pmeth.c @@ -1,5 +1,5 @@ /* - * Copyright 2006-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2006-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/siphash/siphash_pmeth.c b/crypto/siphash/siphash_pmeth.c index a5211f2..a635260 100644 --- a/crypto/siphash/siphash_pmeth.c +++ b/crypto/siphash/siphash_pmeth.c @@ -1,5 +1,5 @@ /* - * Copyright 2007-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2007-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/stack/stack.c b/crypto/stack/stack.c index 97c3e87..5fc4eb8 100644 --- a/crypto/stack/stack.c +++ b/crypto/stack/stack.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/threads_none.c b/crypto/threads_none.c index 35c985b..ab6db8e 100644 --- a/crypto/threads_none.c +++ b/crypto/threads_none.c @@ -1,5 +1,5 @@ /* - * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/threads_pthread.c b/crypto/threads_pthread.c index a2c1707..8d30e1c 100644 --- a/crypto/threads_pthread.c +++ b/crypto/threads_pthread.c @@ -1,5 +1,5 @@ /* - * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/threads_win.c b/crypto/threads_win.c index ad4f5e1..1e5cf82 100644 --- a/crypto/threads_win.c +++ b/crypto/threads_win.c @@ -1,5 +1,5 @@ /* - * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/ui/ui_lib.c b/crypto/ui/ui_lib.c index 533dc07..139485d 100644 --- a/crypto/ui/ui_lib.c +++ b/crypto/ui/ui_lib.c @@ -1,5 +1,5 @@ /* - * Copyright 2001-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2001-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/x509/x509name.c b/crypto/x509/x509name.c index 8b08cae..4666824 100644 --- a/crypto/x509/x509name.c +++ b/crypto/x509/x509name.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/doc/man1/dgst.pod b/doc/man1/dgst.pod index 3d546f0..47e163b 100644 --- a/doc/man1/dgst.pod +++ b/doc/man1/dgst.pod @@ -235,7 +235,7 @@ The FIPS-related options were removed in OpenSSL 1.1.0 =head1 COPYRIGHT -Copyright 2000-2017 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/doc/man1/rehash.pod b/doc/man1/rehash.pod index 0a192e9..22f3b7a 100644 --- a/doc/man1/rehash.pod +++ b/doc/man1/rehash.pod @@ -136,7 +136,7 @@ L. =head1 COPYRIGHT -Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/doc/man3/EVP_DigestSignInit.pod b/doc/man3/EVP_DigestSignInit.pod index 176872d..0c339fe 100644 --- a/doc/man3/EVP_DigestSignInit.pod +++ b/doc/man3/EVP_DigestSignInit.pod @@ -100,7 +100,7 @@ were first added to OpenSSL 1.0.0. =head1 COPYRIGHT -Copyright 2006-2017 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2006-2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/doc/man3/EVP_DigestVerifyInit.pod b/doc/man3/EVP_DigestVerifyInit.pod index 603e2cd..352ab84 100644 --- a/doc/man3/EVP_DigestVerifyInit.pod +++ b/doc/man3/EVP_DigestVerifyInit.pod @@ -94,7 +94,7 @@ were first added to OpenSSL 1.0.0. =head1 COPYRIGHT -Copyright 2006-2017 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2006-2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/doc/man3/OPENSSL_config.pod b/doc/man3/OPENSSL_config.pod index ac686e6..6294ee1 100644 --- a/doc/man3/OPENSSL_config.pod +++ b/doc/man3/OPENSSL_config.pod @@ -75,7 +75,7 @@ deprecated in OpenSSL 1.1.0 by OPENSSL_init_crypto(). =head1 COPYRIGHT -Copyright 2004-2016 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2004-2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/doc/man3/OPENSSL_init_crypto.pod b/doc/man3/OPENSSL_init_crypto.pod index b979c25..606885b 100644 --- a/doc/man3/OPENSSL_init_crypto.pod +++ b/doc/man3/OPENSSL_init_crypto.pod @@ -242,7 +242,7 @@ and OPENSSL_INIT_free() functions were added in OpenSSL 1.1.0. =head1 COPYRIGHT -Copyright 2016-2017 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/doc/man3/OPENSSL_malloc.pod b/doc/man3/OPENSSL_malloc.pod index b746016..049a125 100644 --- a/doc/man3/OPENSSL_malloc.pod +++ b/doc/man3/OPENSSL_malloc.pod @@ -247,7 +247,7 @@ only, say, the malloc() implementation is outright dangerous.> =head1 COPYRIGHT -Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/ssl/packet.c b/ssl/packet.c index 1819800..9503143 100644 --- a/ssl/packet.c +++ b/ssl/packet.c @@ -1,5 +1,5 @@ /* - * Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/ssl/pqueue.c b/ssl/pqueue.c index 3787d26..29804ec 100644 --- a/ssl/pqueue.c +++ b/ssl/pqueue.c @@ -1,5 +1,5 @@ /* - * Copyright 2005-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2005-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/ssl/ssl_init.c b/ssl/ssl_init.c index bc84aa8..6073556 100644 --- a/ssl/ssl_init.c +++ b/ssl/ssl_init.c @@ -1,5 +1,5 @@ /* - * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/test/recipes/15-test_genrsa.t b/test/recipes/15-test_genrsa.t index c497533..e16a9a4 100644 --- a/test/recipes/15-test_genrsa.t +++ b/test/recipes/15-test_genrsa.t @@ -1,5 +1,5 @@ #! /usr/bin/env perl -# Copyright 2017 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy diff --git a/test/recipes/90-test_sslapi.t b/test/recipes/90-test_sslapi.t index 08af52d..633df47 100644 --- a/test/recipes/90-test_sslapi.t +++ b/test/recipes/90-test_sslapi.t @@ -1,5 +1,5 @@ #! /usr/bin/env perl -# Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy From levitte at openssl.org Tue Apr 17 13:52:34 2018 From: levitte at openssl.org (Richard Levitte) Date: Tue, 17 Apr 2018 13:52:34 +0000 Subject: [openssl-commits] [web] master update Message-ID: <1523973154.528665.10914.nullmailer@dev.openssl.org> The branch master has been updated via fd21e3cd9ca7c7b7a8465d47e2bfbb728a4865e2 (commit) from 168a9472b41c33b508d82a167ec169482b854664 (commit) - Log ----------------------------------------------------------------- commit fd21e3cd9ca7c7b7a8465d47e2bfbb728a4865e2 Author: Richard Levitte Date: Tue Apr 17 15:46:22 2018 +0200 Update newsflash for release of OpenSSL 1.1.1-pre5 (beta 3) ----------------------------------------------------------------------- Summary of changes: news/newsflash.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/news/newsflash.txt b/news/newsflash.txt index b0b7cf1..00f1aff 100644 --- a/news/newsflash.txt +++ b/news/newsflash.txt @@ -4,6 +4,7 @@ # Format is two fields, colon-separated; the first line is the column # headings. URL paths must all be absolute. Date: Item +17-Apr-2018: Beta 3 of OpenSSL 1.1.1 is now available: please download and test it 16-Apr-2018: OpenSSL 1747 Validation not moved to historical 16-Apr-2018: Security Advisory: one low severity fix 03-Apr-2018: Beta 2 of OpenSSL 1.1.1 is now available: please download and test it From levitte at openssl.org Tue Apr 17 13:55:17 2018 From: levitte at openssl.org (Richard Levitte) Date: Tue, 17 Apr 2018 13:55:17 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_1-pre5 create Message-ID: <1523973317.435431.11751.nullmailer@dev.openssl.org> The annotated tag OpenSSL_1_1_1-pre5 has been created at 1a7c70caec83e52b03df96e83d937eb39ae7424d (tag) tagging 4ff3df161c8b0caf0acac2e0a19980ccd4173a66 (commit) replaces OpenSSL_1_1_1-pre4 tagged by Richard Levitte on Tue Apr 17 15:32:02 2018 +0200 - Log ----------------------------------------------------------------- OpenSSL 1.1.1-pre5 release tag -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQTEyrdJw09/TMBP2smnr5549wlFOwUCWtX3UgAKCRCnr5549wlF O+kJAJsEDSfdwIpV5FeVhjVlGVVoQd1zCwCfdVRdBfQX4n5y/dQD6zehIUBDiSQ= =8lqD -----END PGP SIGNATURE----- Andy Polyakov (18): TLSProxy/Proxy.pm: switch to dynamic ports and overhaul. rand/randfile.c: fix potential resource leak in RAND_load_file. test/asn1_time_test.c: make it work on 64-bit HP-UX. config: fix hpux64-parisc2-gcc detection. Configurations/10-main.conf: clean up HP-UX targets and add magic macros. TLSProxy/Proxy.pm: harmonize inner loop with the way sockets are. apps/s_socket.c: disable the Nagle algorithm. apps/{s_client.c|s_socket}.c: omit usleep calls. TLSProxy/Proxy.pm: refine partial packet handling. TLSProxy/Record.pm: remove dead condition and improve readability. Configurations/10-main.conf: further HP-UX cleanups/unifications. bio/b_addr.c: resolve HP-UX compiler warnings. appveyor.yml: exercise build_all_generated. Configurations/*.tmpl: refine build_all_generated. TLSProxy/Proxy.pm: handle -1 as return value from waitpid. TLSProxy/Proxy.pm: handle "impossible" failure to connect to s_server. TLSProxy/Proxy.pm: bind s_server to loopback interface. TLSProxy/Proxy.pm: straighten inner loop termination logic. Bernd Edlinger (15): Use gnu_printf format attribute to minimise MinGW warnings Fix a crash in the asn1parse command Improve diagnostics for invalid arguments in asn1parse -strparse Use strtol instead of atoi in asn1parse Fix range checks with -offset and -length in asn1parse Remove an unnecessary cast in the param to BUF_MEM_grow Change the "offset too large" message to more generic wording Don't use getenv for critical functions when run as setuid/setgid Prevent a possible recursion in ERR_get_state and fix the problem that was pointed out in commit aef84bb4efbddfd95d042f3f5f1d362ed7d4faeb differently. Fix the build_all_generated rule to include generated .map, .def and .opt files Rework partial packet handling once more Fix cygwin make dependencies Remove mandatory generated files too Remove mandatory generated files on windows too Remove mandatory generated files on VMS too Daniel Bevenius (2): Fix minor typos in Configurations/README Clarify default section in config.pod David Benjamin (1): Fix a bug in ecp_nistp224.c. Dr. Matthias St. Pierre (5): Fix false positives of IS_*() macros for 8-bit ASCII characters DRBG: fix memory leak on error in rand_drbg_get_entropy() Minor corrections for the RAND_DRBG API documentation DRBG: implement a get_nonce() callback Revert "Add OPENSSL_VERSION_AT_LEAST" Kaoru Toda (1): Duplicate code refactored Kunxian Xia (1): Correct the equation for Y' in the comment of point_double function Matt Caswell (17): Prepare for 1.1.1-pre5-dev Fix a text canonicalisation bug in CMS Fix some errors in the mem leaks docs Add some tests for configuring the TLSv1.3 ciphersuites Fix configuration of TLSv1.3 ciphersuites Add test/versions to gitignore Move the loading of the ssl_conf module to libcrypto Document the change in the previous commit about loading the config file Don't crash if an unrecognised digest is used with dsa_paramgen_md Pick a q size consistent with the digest for DSA param generation Update the genpkey documentation Support EVP_PKEY_sign() and EVP_PKEY_verify() for EdDSA Add a note and better error if using Ed25519/Ed448 in dgst Change SRP functions to use EVP_EncodeUpdate/EVP_DecodeUpdate functions Add support for the SRP base64 alphabet Add a test for SRP RSA key generation: ensure BN_mod_inverse and BN_mod_exp_mont both get called with BN_FLG_CONSTTIME flag set. Matthias Kraft (1): openssl#5668: corrections after compiling with -qinfo=all:als. Pecio (1): Enabled OneCore Conf for Console Apps (removed nonUniversal API) Rich Salz (4): Set error code on alloc failures Set error code if alloc returns NULL Fix bugs in X509_NAME_ENTRY_set Updated to CONTRIBUTING to reflect GitHub, etc. Richard Levitte (17): VMS: stricter acquisition of entropy for the pool Don't use CPP in Configurations/unix-Makefile.tmpl Remove ambiguity in rand_pool_add[_end] return value openssl s_server: print the accepting address and socket Change rand_pool_add[_end] prototypes to match OpenSSL::Test: add data_dir() Configuration: Simplify generating list of generated files in build file templates .travis.yml: exercise build_all_generated openssl rehash: document -compat openssl rehash: use libcrypto variables for default dir Docs for OpenSSL_init_crypto: there is no way to specify another file Split the scrypt and RSA-PSS into man3 and man7 pages test/recipes/test_genrsa.t : don't fail because of size limit changes make update OpenSSL 1.1.1-pre5: update CHANGES with recent user visible changes Update copyright year Prepare for 1.1.1-pre5 release Theo Buehler (1): EVP_MD_CTX_cleanup replaced with EVP_MD_CTX_reset cedral (1): Visual Studio 2017 debug build warning error on 32 bit build ----------------------------------------------------------------------- From levitte at openssl.org Tue Apr 17 13:56:38 2018 From: levitte at openssl.org (Richard Levitte) Date: Tue, 17 Apr 2018 13:56:38 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523973398.633424.12904.nullmailer@dev.openssl.org> The branch master has been updated via a051af0e75bf717cc818db498d9b977953816f80 (commit) via 4ff3df161c8b0caf0acac2e0a19980ccd4173a66 (commit) from 28428130db13fe5d1b956a622747db2e0e0b1458 (commit) - Log ----------------------------------------------------------------- commit a051af0e75bf717cc818db498d9b977953816f80 Author: Richard Levitte Date: Tue Apr 17 15:32:41 2018 +0200 Prepare for 1.1.1-pre6-dev Reviewed-by: Matt Caswell commit 4ff3df161c8b0caf0acac2e0a19980ccd4173a66 Author: Richard Levitte Date: Tue Apr 17 15:32:02 2018 +0200 Prepare for 1.1.1-pre5 release Reviewed-by: Matt Caswell ----------------------------------------------------------------------- Summary of changes: README | 2 +- include/openssl/opensslv.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README b/README index 694411d..7484255 100644 --- a/README +++ b/README @@ -1,5 +1,5 @@ - OpenSSL 1.1.1-pre5-dev + OpenSSL 1.1.1-pre6-dev Copyright (c) 1998-2018 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson diff --git a/include/openssl/opensslv.h b/include/openssl/opensslv.h index 241856d..fc1e2b5 100644 --- a/include/openssl/opensslv.h +++ b/include/openssl/opensslv.h @@ -39,8 +39,8 @@ extern "C" { * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for * major minor fix final patch/beta) */ -# define OPENSSL_VERSION_NUMBER 0x10101005L -# define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1-pre5-dev xx XXX xxxx" +# define OPENSSL_VERSION_NUMBER 0x10101006L +# define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1-pre6-dev xx XXX xxxx" /*- * The macros below are to be used for shared library (.so, .dll, ...) From bernd.edlinger at hotmail.de Tue Apr 17 14:33:48 2018 From: bernd.edlinger at hotmail.de (bernd.edlinger at hotmail.de) Date: Tue, 17 Apr 2018 14:33:48 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523975628.487896.20444.nullmailer@dev.openssl.org> The branch master has been updated via dbabc862966b9afbcc55c59cc07ab643a14ffb31 (commit) from a051af0e75bf717cc818db498d9b977953816f80 (commit) - Log ----------------------------------------------------------------- commit dbabc862966b9afbcc55c59cc07ab643a14ffb31 Author: Bernd Edlinger Date: Sun Apr 15 12:02:25 2018 +0200 Add a config option to disable automatic config loading ./config no-autoload-config Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5959) ----------------------------------------------------------------------- Summary of changes: Configure | 3 ++- INSTALL | 4 ++++ ssl/ssl_init.c | 2 ++ test/ssl_test.c | 5 +++++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Configure b/Configure index 99ab26f..5703302 100755 --- a/Configure +++ b/Configure @@ -325,6 +325,7 @@ my @disablables = ( "async", "autoalginit", "autoerrinit", + "autoload-config", "bf", "blake2", "camellia", @@ -426,7 +427,7 @@ my %deprecated_disablables = ( # All of the following are disabled by default: our %disabled = ( # "what" => "comment" - "asan" => "default", + "asan" => "default", "crypto-mdebug" => "default", "crypto-mdebug-backtrace" => "default", "devcryptoeng" => "default", diff --git a/INSTALL b/INSTALL index 71d6b88..c0163a9 100644 --- a/INSTALL +++ b/INSTALL @@ -276,6 +276,10 @@ error strings. For a statically linked application this may be undesirable if small executable size is an objective. + no-autoload-config + Don't automatically load the default openssl.cnf file. + Typically OpenSSL will automatically load a system config + file which configures default ssl options. no-capieng Don't build the CAPI engine. This option will be forced if diff --git a/ssl/ssl_init.c b/ssl/ssl_init.c index 6073556..ed2bf84 100644 --- a/ssl/ssl_init.c +++ b/ssl/ssl_init.c @@ -195,7 +195,9 @@ int OPENSSL_init_ssl(uint64_t opts, const OPENSSL_INIT_SETTINGS * settings) } if (!OPENSSL_init_crypto(opts +#ifndef OPENSSL_NO_AUTOLOAD_CONFIG | OPENSSL_INIT_LOAD_CONFIG +#endif | OPENSSL_INIT_ADD_ALL_CIPHERS | OPENSSL_INIT_ADD_ALL_DIGESTS, settings)) diff --git a/test/ssl_test.c b/test/ssl_test.c index f2a1812..7453a9d 100644 --- a/test/ssl_test.c +++ b/test/ssl_test.c @@ -467,6 +467,11 @@ static int test_handshake(int idx) } } +#ifdef OPENSSL_NO_AUTOLOAD_CONFIG + if (!TEST_true(OPENSSL_init_ssl(OPENSSL_INIT_LOAD_CONFIG, NULL))) + goto err; +#endif + if (!TEST_ptr(server_ctx) || !TEST_ptr(client_ctx) || !TEST_int_gt(CONF_modules_load(conf, test_app, 0), 0)) From appro at openssl.org Tue Apr 17 14:41:17 2018 From: appro at openssl.org (Andy Polyakov) Date: Tue, 17 Apr 2018 14:41:17 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523976077.991920.22684.nullmailer@dev.openssl.org> The branch master has been updated via 826e154481e93413a79c37cb1bf4da6175a05875 (commit) from dbabc862966b9afbcc55c59cc07ab643a14ffb31 (commit) - Log ----------------------------------------------------------------- commit 826e154481e93413a79c37cb1bf4da6175a05875 Author: Andy Polyakov Date: Sat Apr 14 21:42:21 2018 +0200 apps/s_socket.c: print only dynamically allocated port in do_server. For formal backward compatibility print original "ACCEPT" message for fixed port and "ACCEPT host:port" for dynamically allocated. Reviewed-by: Bernd Edlinger Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5956) ----------------------------------------------------------------------- Summary of changes: apps/s_socket.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/s_socket.c b/apps/s_socket.c index ae62a13..d21bfc6 100644 --- a/apps/s_socket.c +++ b/apps/s_socket.c @@ -283,7 +283,8 @@ int do_server(int *accept_sock, const char *host, const char *port, BIO_ADDRINFO_free(res); res = NULL; - { + if (BIO_ADDR_rawport(sock_address) == 0) { + /* dynamically allocated port, report which one */ union BIO_sock_info_u info; char *hostname = NULL; char *service = NULL; @@ -309,6 +310,9 @@ int do_server(int *accept_sock, const char *host, const char *port, ERR_print_errors(bio_err); goto end; } + } else { + (void)BIO_printf(bio_s_out, "ACCEPT\n"); + (void)BIO_flush(bio_s_out); } if (accept_sock != NULL) From matthias.st.pierre at ncp-e.com Tue Apr 17 15:25:22 2018 From: matthias.st.pierre at ncp-e.com (matthias.st.pierre at ncp-e.com) Date: Tue, 17 Apr 2018 15:25:22 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523978722.237241.30224.nullmailer@dev.openssl.org> The branch master has been updated via 43687d685ffd71fc1cf0ea1079f6d4958dff5026 (commit) from 826e154481e93413a79c37cb1bf4da6175a05875 (commit) - Log ----------------------------------------------------------------- commit 43687d685ffd71fc1cf0ea1079f6d4958dff5026 Author: Dr. Matthias St. Pierre Date: Tue Apr 17 08:07:11 2018 +0200 DRBG: fix coverity issues - drbg_lib.c: Silence coverity warning: the comment preceding the RAND_DRBG_instantiate() call explicitely states that the error is ignored and explains the reason why. - drbgtest: Add checks for the return values of RAND_bytes() and RAND_priv_bytes() to run_multi_thread_test(). Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5976) ----------------------------------------------------------------------- Summary of changes: crypto/rand/drbg_lib.c | 8 ++++---- test/drbgtest.c | 16 +++++++++++++--- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/crypto/rand/drbg_lib.c b/crypto/rand/drbg_lib.c index cc59236..16ac03b 100644 --- a/crypto/rand/drbg_lib.c +++ b/crypto/rand/drbg_lib.c @@ -864,14 +864,14 @@ static RAND_DRBG *drbg_setup(RAND_DRBG *parent) drbg->reseed_counter = 1; /* - * Ignore instantiation error so support just-in-time instantiation. + * Ignore instantiation error to support just-in-time instantiation. * * The state of the drbg will be checked in RAND_DRBG_generate() and * an automatic recovery is attempted. */ - RAND_DRBG_instantiate(drbg, - (const unsigned char *) ossl_pers_string, - sizeof(ossl_pers_string) - 1); + (void)RAND_DRBG_instantiate(drbg, + (const unsigned char *) ossl_pers_string, + sizeof(ossl_pers_string) - 1); return drbg; err: diff --git a/test/drbgtest.c b/test/drbgtest.c index 5426046..d69456b 100644 --- a/test/drbgtest.c +++ b/test/drbgtest.c @@ -783,6 +783,8 @@ error: } #if defined(OPENSSL_THREADS) +static int multi_thread_rand_bytes_succeeded = 1; +static int multi_thread_rand_priv_bytes_succeeded = 1; static void run_multi_thread_test(void) { @@ -796,8 +798,10 @@ static void run_multi_thread_test(void) RAND_DRBG_set_reseed_time_interval(private, 1); do { - RAND_bytes(buf, sizeof(buf)); - RAND_priv_bytes(buf, sizeof(buf)); + if (RAND_bytes(buf, sizeof(buf)) <= 0) + multi_thread_rand_bytes_succeeded = 0; + if (RAND_priv_bytes(buf, sizeof(buf)) <= 0) + multi_thread_rand_priv_bytes_succeeded = 0; } while(time(NULL) - start < 5); } @@ -849,7 +853,7 @@ static int wait_for_thread(thread_t thread) * The main thread will also run the test, so we'll have THREADS+1 parallel * tests running */ -#define THREADS 3 +# define THREADS 3 static int test_multi_thread(void) { @@ -861,6 +865,12 @@ static int test_multi_thread(void) run_multi_thread_test(); for (i = 0; i < THREADS; i++) wait_for_thread(t[i]); + + if (!TEST_true(multi_thread_rand_bytes_succeeded)) + return 0; + if (!TEST_true(multi_thread_rand_priv_bytes_succeeded)) + return 0; + return 1; } #endif From matthias.st.pierre at ncp-e.com Tue Apr 17 15:28:31 2018 From: matthias.st.pierre at ncp-e.com (matthias.st.pierre at ncp-e.com) Date: Tue, 17 Apr 2018 15:28:31 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523978911.213723.31377.nullmailer@dev.openssl.org> The branch master has been updated via e62fb0d31bdf25854aa2c7cda8e1d03768984ab4 (commit) from 43687d685ffd71fc1cf0ea1079f6d4958dff5026 (commit) - Log ----------------------------------------------------------------- commit e62fb0d31bdf25854aa2c7cda8e1d03768984ab4 Author: Dr. Matthias St. Pierre Date: Tue Apr 17 08:39:42 2018 +0200 p5_scrypt.c: fix error check of RAND_bytes() call Reviewed-by: Kurt Roeckx (Merged from https://github.com/openssl/openssl/pull/5977) ----------------------------------------------------------------------- Summary of changes: crypto/asn1/p5_scrypt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/asn1/p5_scrypt.c b/crypto/asn1/p5_scrypt.c index c556d01..1daaa6f 100644 --- a/crypto/asn1/p5_scrypt.c +++ b/crypto/asn1/p5_scrypt.c @@ -82,7 +82,7 @@ X509_ALGOR *PKCS5_pbe2_set_scrypt(const EVP_CIPHER *cipher, if (EVP_CIPHER_iv_length(cipher)) { if (aiv) memcpy(iv, aiv, EVP_CIPHER_iv_length(cipher)); - else if (RAND_bytes(iv, EVP_CIPHER_iv_length(cipher)) < 0) + else if (RAND_bytes(iv, EVP_CIPHER_iv_length(cipher)) <= 0) goto err; } From matthias.st.pierre at ncp-e.com Tue Apr 17 15:28:49 2018 From: matthias.st.pierre at ncp-e.com (matthias.st.pierre at ncp-e.com) Date: Tue, 17 Apr 2018 15:28:49 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1523978929.085495.32188.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via 69712507e73437553790ccac6f19a9ded996c0cd (commit) from dbbaeb8973d662ae0d009e0fb6c8975721991b63 (commit) - Log ----------------------------------------------------------------- commit 69712507e73437553790ccac6f19a9ded996c0cd Author: Dr. Matthias St. Pierre Date: Tue Apr 17 08:39:42 2018 +0200 p5_scrypt.c: fix error check of RAND_bytes() call Reviewed-by: Kurt Roeckx (Merged from https://github.com/openssl/openssl/pull/5977) ----------------------------------------------------------------------- Summary of changes: crypto/asn1/p5_scrypt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/asn1/p5_scrypt.c b/crypto/asn1/p5_scrypt.c index 4cb7837..a5232fe 100644 --- a/crypto/asn1/p5_scrypt.c +++ b/crypto/asn1/p5_scrypt.c @@ -91,7 +91,7 @@ X509_ALGOR *PKCS5_pbe2_set_scrypt(const EVP_CIPHER *cipher, if (EVP_CIPHER_iv_length(cipher)) { if (aiv) memcpy(iv, aiv, EVP_CIPHER_iv_length(cipher)); - else if (RAND_bytes(iv, EVP_CIPHER_iv_length(cipher)) < 0) + else if (RAND_bytes(iv, EVP_CIPHER_iv_length(cipher)) <= 0) goto err; } From matthias.st.pierre at ncp-e.com Tue Apr 17 15:31:49 2018 From: matthias.st.pierre at ncp-e.com (matthias.st.pierre at ncp-e.com) Date: Tue, 17 Apr 2018 15:31:49 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523979109.371257.970.nullmailer@dev.openssl.org> The branch master has been updated via a12de2cba83273b2a553f988716c231af7c9ba68 (commit) from e62fb0d31bdf25854aa2c7cda8e1d03768984ab4 (commit) - Log ----------------------------------------------------------------- commit a12de2cba83273b2a553f988716c231af7c9ba68 Author: Dr. Matthias St. Pierre Date: Tue Apr 17 08:54:26 2018 +0200 SSL_CTX_set_tlsext_ticket_key_cb.pod: fix error check of RAND_bytes() call Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5977) ----------------------------------------------------------------------- Summary of changes: doc/man3/SSL_CTX_set_tlsext_ticket_key_cb.pod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/man3/SSL_CTX_set_tlsext_ticket_key_cb.pod b/doc/man3/SSL_CTX_set_tlsext_ticket_key_cb.pod index 3cf0717..7782ea7 100644 --- a/doc/man3/SSL_CTX_set_tlsext_ticket_key_cb.pod +++ b/doc/man3/SSL_CTX_set_tlsext_ticket_key_cb.pod @@ -133,7 +133,7 @@ Reference Implementation: HMAC_CTX *hctx, int enc) { if (enc) { /* create new session */ - if (RAND_bytes(iv, EVP_MAX_IV_LENGTH)) + if (RAND_bytes(iv, EVP_MAX_IV_LENGTH) <= 0) return -1; /* insufficient random */ key = currentkey(); /* something that you need to implement */ From matt at openssl.org Tue Apr 17 15:44:26 2018 From: matt at openssl.org (Matt Caswell) Date: Tue, 17 Apr 2018 15:44:26 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523979866.071560.4298.nullmailer@dev.openssl.org> The branch master has been updated via ded4a83d31f8271e5a74e6fbf357f9975d4878ec (commit) from a12de2cba83273b2a553f988716c231af7c9ba68 (commit) - Log ----------------------------------------------------------------- commit ded4a83d31f8271e5a74e6fbf357f9975d4878ec Author: Matt Caswell Date: Fri Apr 6 14:53:05 2018 +0100 Ignore the status_request extension in a resumption handshake We cannot provide a certificate status on a resumption so we should ignore this extension in that case. Fixes #1662 Reviewed-by: Rich Salz Reviewed-by: Ben Kaduk (Merged from https://github.com/openssl/openssl/pull/5896) ----------------------------------------------------------------------- Summary of changes: ssl/statem/extensions_srvr.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ssl/statem/extensions_srvr.c b/ssl/statem/extensions_srvr.c index 90142eb..adf63d8 100644 --- a/ssl/statem/extensions_srvr.c +++ b/ssl/statem/extensions_srvr.c @@ -324,6 +324,10 @@ int tls_parse_ctos_status_request(SSL *s, PACKET *pkt, unsigned int context, { PACKET responder_id_list, exts; + /* We ignore this in a resumption handshake */ + if (s->hit) + return 1; + /* Not defined if we get one of these in a client Certificate */ if (x != NULL) return 1; From matt at openssl.org Tue Apr 17 15:46:51 2018 From: matt at openssl.org (Matt Caswell) Date: Tue, 17 Apr 2018 15:46:51 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1523980011.542239.5445.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via af2d06d245cd97de891213bb4c9e0f4b6dbe3bfb (commit) from 69712507e73437553790ccac6f19a9ded996c0cd (commit) - Log ----------------------------------------------------------------- commit af2d06d245cd97de891213bb4c9e0f4b6dbe3bfb Author: Matt Caswell Date: Fri Apr 6 14:33:07 2018 +0100 Ignore the status_request extension in a resumption handshake We cannot provide a certificate status on a resumption so we should ignore this extension in that case. Fixes #1662 Reviewed-by: Rich Salz Reviewed-by: Ben Kaduk (Merged from https://github.com/openssl/openssl/pull/5897) ----------------------------------------------------------------------- Summary of changes: ssl/t1_lib.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index dc4e652..5ba7377 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -2156,6 +2156,10 @@ static int ssl_scan_clienthello_tlsext(SSL *s, PACKET *pkt, int *al) } } } else if (type == TLSEXT_TYPE_status_request) { + /* Ignore this if resuming */ + if (s->hit) + continue; + if (!PACKET_get_1(&extension, (unsigned int *)&s->tlsext_status_type)) { return 0; From matt at openssl.org Tue Apr 17 15:50:11 2018 From: matt at openssl.org (Matt Caswell) Date: Tue, 17 Apr 2018 15:50:11 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_0_2-stable update Message-ID: <1523980211.087611.7124.nullmailer@dev.openssl.org> The branch OpenSSL_1_0_2-stable has been updated via 1084fc8f0086cece8ae1a1e9f484d30fdff25192 (commit) from 349a41da1ad88ad87825414752a8ff5fdd6a6c3f (commit) - Log ----------------------------------------------------------------- commit 1084fc8f0086cece8ae1a1e9f484d30fdff25192 Author: Matt Caswell Date: Fri Apr 6 14:33:07 2018 +0100 Ignore the status_request extension in a resumption handshake We cannot provide a certificate status on a resumption so we should ignore this extension in that case. Fixes #1662 Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5898) ----------------------------------------------------------------------- Summary of changes: ssl/t1_lib.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index 75c2f41..179802c 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -2408,8 +2408,7 @@ static int ssl_scan_clienthello_tlsext(SSL *s, unsigned char **p, goto err; if (!tls1_save_sigalgs(s, data, dsize)) goto err; - } else if (type == TLSEXT_TYPE_status_request) { - + } else if (type == TLSEXT_TYPE_status_request && !s->hit) { if (size < 5) goto err; From matt at openssl.org Tue Apr 17 15:54:56 2018 From: matt at openssl.org (Matt Caswell) Date: Tue, 17 Apr 2018 15:54:56 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523980496.027105.8754.nullmailer@dev.openssl.org> The branch master has been updated via 5bbf42a519c9fb70bfc13c2e4ad0044016c6f1ae (commit) via 5718fe45605681c4d33e43e689491172af0b46c1 (commit) via 7f9f5f71e48b12b6029871cbf8542f21c7883c6c (commit) via c2c1d8a495d540e0b1b61f20c2c14f0c7ab7a8f0 (commit) from ded4a83d31f8271e5a74e6fbf357f9975d4878ec (commit) - Log ----------------------------------------------------------------- commit 5bbf42a519c9fb70bfc13c2e4ad0044016c6f1ae Author: Matt Caswell Date: Wed Apr 4 15:02:30 2018 +0100 Update the info callback documentation for TLSv1.3 Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5874) commit 5718fe45605681c4d33e43e689491172af0b46c1 Author: Matt Caswell Date: Wed Apr 4 14:16:28 2018 +0100 Add a test for the info callback Make sure the info callback gets called in all the places we expect it to. Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5874) commit 7f9f5f71e48b12b6029871cbf8542f21c7883c6c Author: Matt Caswell Date: Wed Apr 4 14:28:23 2018 +0100 Make sure info callback knows about all handshake start events The first session ticket sent by the server is actually tacked onto the end of the first handshake from a state machine perspective. However in reality this is a post-handshake message, and should be preceeded by a handshake start event from an info callback perspective. Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5874) commit c2c1d8a495d540e0b1b61f20c2c14f0c7ab7a8f0 Author: Matt Caswell Date: Wed Apr 4 14:17:10 2018 +0100 Call the info callback on all handshake done events Fixes #5721 Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5874) ----------------------------------------------------------------------- Summary of changes: doc/man3/SSL_CTX_set_info_callback.pod | 28 +++- ssl/statem/statem_lib.c | 17 ++- ssl/statem/statem_srvr.c | 17 +++ test/sslapitest.c | 257 +++++++++++++++++++++++++++++++++ 4 files changed, 307 insertions(+), 12 deletions(-) diff --git a/doc/man3/SSL_CTX_set_info_callback.pod b/doc/man3/SSL_CTX_set_info_callback.pod index f4d9128..85187cf 100644 --- a/doc/man3/SSL_CTX_set_info_callback.pod +++ b/doc/man3/SSL_CTX_set_info_callback.pod @@ -2,7 +2,11 @@ =head1 NAME -SSL_CTX_set_info_callback, SSL_CTX_get_info_callback, SSL_set_info_callback, SSL_get_info_callback - handle information callback for SSL connections +SSL_CTX_set_info_callback, +SSL_CTX_get_info_callback, +SSL_set_info_callback, +SSL_get_info_callback +- handle information callback for SSL connections =head1 SYNOPSIS @@ -37,7 +41,8 @@ callback function for B. When setting up a connection and during use, it is possible to obtain state information from the SSL/TLS engine. When set, an information callback function -is called whenever the state changes, an alert appears, or an error occurs. +is called whenever a significant event occurs such as: the state changes, +an alert appears, or an error occurs. The callback function is called as B. The B argument specifies information about where (in which context) @@ -51,12 +56,15 @@ B is a bitmask made up of the following bits: =item SSL_CB_LOOP -Callback has been called to indicate state change inside a loop. +Callback has been called to indicate state change or some other significant +state machine event. This may mean that the callback gets invoked more than once +per state in some situations. =item SSL_CB_EXIT -Callback has been called to indicate error exit of a handshake function. -(May be soft error with retry option for non-blocking setups.) +Callback has been called to indicate exit of a handshake function. This will +happen after the end of a handshake, but may happen at other times too such as +on error or when IO might otherwise block and non-blocking is being used. =item SSL_CB_READ @@ -84,11 +92,17 @@ Callback has been called due to an alert being sent or received. =item SSL_CB_HANDSHAKE_START -Callback has been called because a new handshake is started. +Callback has been called because a new handshake is started. In TLSv1.3 this is +also used for the start of post-handshake message exchanges such as for the +exchange of session tickets, or for key updates. It also occurs when resuming a +handshake following a pause to handle early data. =item SSL_CB_HANDSHAKE_DONE 0x20 -Callback has been called because a handshake is finished. +Callback has been called because a handshake is finished. In TLSv1.3 this is +also used at the end of an exchange of post-handshake messages such as for +session tickets or key updates. It also occurs if the handshake is paused to +allow the exchange of early data. =back diff --git a/ssl/statem/statem_lib.c b/ssl/statem/statem_lib.c index 44c9c2c..a17dec9 100644 --- a/ssl/statem/statem_lib.c +++ b/ssl/statem/statem_lib.c @@ -1033,6 +1033,10 @@ WORK_STATE tls_finish_handshake(SSL *s, WORK_STATE wst, int clearbufs, int stop) && s->post_handshake_auth == SSL_PHA_REQUESTED) s->post_handshake_auth = SSL_PHA_EXT_SENT; + /* + * Only set if there was a Finished message and this isn't after a TLSv1.3 + * post handshake exchange + */ if (s->statem.cleanuphand) { /* skipped if we just sent a HelloRequest */ s->renegotiate = 0; @@ -1069,11 +1073,6 @@ WORK_STATE tls_finish_handshake(SSL *s, WORK_STATE wst, int clearbufs, int stop) &discard, s->session_ctx->lock); } - if (s->info_callback != NULL) - cb = s->info_callback; - else if (s->ctx->info_callback != NULL) - cb = s->ctx->info_callback; - if (cb != NULL) cb(s, SSL_CB_HANDSHAKE_DONE, 1); @@ -1086,6 +1085,14 @@ WORK_STATE tls_finish_handshake(SSL *s, WORK_STATE wst, int clearbufs, int stop) } } + if (s->info_callback != NULL) + cb = s->info_callback; + else if (s->ctx->info_callback != NULL) + cb = s->ctx->info_callback; + + if (cb != NULL) + cb(s, SSL_CB_HANDSHAKE_DONE, 1); + if (!stop) return WORK_FINISHED_CONTINUE; diff --git a/ssl/statem/statem_srvr.c b/ssl/statem/statem_srvr.c index 60e0bc7..7e033ce 100644 --- a/ssl/statem/statem_srvr.c +++ b/ssl/statem/statem_srvr.c @@ -3716,6 +3716,23 @@ int tls_construct_new_session_ticket(SSL *s, WPACKET *pkt) } age_add_u; if (SSL_IS_TLS13(s)) { + if (s->post_handshake_auth != SSL_PHA_EXT_RECEIVED) { + void (*cb) (const SSL *ssl, int type, int val) = NULL; + + /* + * This is the first session ticket we've sent. In the state + * machine we "cheated" and tacked this onto the end of the first + * handshake. From an info callback perspective this should appear + * like the start of a new handshake. + */ + if (s->info_callback != NULL) + cb = s->info_callback; + else if (s->ctx->info_callback != NULL) + cb = s->ctx->info_callback; + if (cb != NULL) + cb(s, SSL_CB_HANDSHAKE_START, 1); + } + if (!ssl_generate_session_id(s, s->session)) { /* SSLfatal() already called */ goto err; diff --git a/test/sslapitest.c b/test/sslapitest.c index 74ee897..1c9f294 100644 --- a/test/sslapitest.c +++ b/test/sslapitest.c @@ -4009,6 +4009,262 @@ static int test_srp(int tst) } #endif +static int info_cb_failed = 0; +static int info_cb_offset = 0; +static int info_cb_this_state = -1; + +static struct info_cb_states_st { + int where; + const char *statestr; +} info_cb_states[][60] = { + { + /* TLSv1.2 server followed by resumption */ + {SSL_CB_HANDSHAKE_START, NULL}, {SSL_CB_LOOP, "PINIT "}, + {SSL_CB_LOOP, "PINIT "}, {SSL_CB_LOOP, "TRCH"}, {SSL_CB_LOOP, "TWSH"}, + {SSL_CB_LOOP, "TWSC"}, {SSL_CB_LOOP, "TWSKE"}, {SSL_CB_LOOP, "TWSD"}, + {SSL_CB_EXIT, NULL}, {SSL_CB_LOOP, "TWSD"}, {SSL_CB_LOOP, "TRCKE"}, + {SSL_CB_LOOP, "TRCCS"}, {SSL_CB_LOOP, "TRFIN"}, {SSL_CB_LOOP, "TWST"}, + {SSL_CB_LOOP, "TWCCS"}, {SSL_CB_LOOP, "TWFIN"}, + {SSL_CB_HANDSHAKE_DONE, NULL}, {SSL_CB_EXIT, NULL}, + {SSL_CB_ALERT, NULL}, {SSL_CB_HANDSHAKE_START, NULL}, + {SSL_CB_LOOP, "PINIT "}, {SSL_CB_LOOP, "PINIT "}, {SSL_CB_LOOP, "TRCH"}, + {SSL_CB_LOOP, "TWSH"}, {SSL_CB_LOOP, "TWCCS"}, {SSL_CB_LOOP, "TWFIN"}, + {SSL_CB_EXIT, NULL}, {SSL_CB_LOOP, "TWFIN"}, {SSL_CB_LOOP, "TRCCS"}, + {SSL_CB_LOOP, "TRFIN"}, {SSL_CB_HANDSHAKE_DONE, NULL}, + {SSL_CB_EXIT, NULL}, {0, NULL}, + }, { + /* TLSv1.2 client followed by resumption */ + {SSL_CB_HANDSHAKE_START, NULL}, {SSL_CB_LOOP, "PINIT "}, + {SSL_CB_LOOP, "TWCH"}, {SSL_CB_EXIT, NULL}, {SSL_CB_LOOP, "TWCH"}, + {SSL_CB_LOOP, "TRSH"}, {SSL_CB_LOOP, "TRSC"}, {SSL_CB_LOOP, "TRSKE"}, + {SSL_CB_LOOP, "TRSD"}, {SSL_CB_LOOP, "TWCKE"}, {SSL_CB_LOOP, "TWCCS"}, + {SSL_CB_LOOP, "TWFIN"}, {SSL_CB_EXIT, NULL}, {SSL_CB_LOOP, "TWFIN"}, + {SSL_CB_LOOP, "TRST"}, {SSL_CB_LOOP, "TRCCS"}, {SSL_CB_LOOP, "TRFIN"}, + {SSL_CB_HANDSHAKE_DONE, NULL}, {SSL_CB_EXIT, NULL}, {SSL_CB_ALERT, NULL}, + {SSL_CB_HANDSHAKE_START, NULL}, {SSL_CB_LOOP, "PINIT "}, + {SSL_CB_LOOP, "TWCH"}, {SSL_CB_EXIT, NULL}, {SSL_CB_LOOP, "TWCH"}, + {SSL_CB_LOOP, "TRSH"}, {SSL_CB_LOOP, "TRCCS"}, {SSL_CB_LOOP, "TRFIN"}, + {SSL_CB_LOOP, "TWCCS"}, {SSL_CB_LOOP, "TWFIN"}, + {SSL_CB_HANDSHAKE_DONE, NULL}, {SSL_CB_EXIT, NULL}, {0, NULL}, + }, { + /* TLSv1.3 server followed by resumption */ + {SSL_CB_HANDSHAKE_START, NULL}, {SSL_CB_LOOP, "PINIT "}, + {SSL_CB_LOOP, "PINIT "}, {SSL_CB_LOOP, "TRCH"}, {SSL_CB_LOOP, "TWSH"}, + {SSL_CB_LOOP, "TWCCS"}, {SSL_CB_LOOP, "TWEE"}, {SSL_CB_LOOP, "TWSC"}, + {SSL_CB_LOOP, "TRSCV"}, {SSL_CB_LOOP, "TWFIN"}, {SSL_CB_LOOP, "TED"}, + {SSL_CB_EXIT, NULL}, {SSL_CB_LOOP, "TED"}, {SSL_CB_LOOP, "TRFIN"}, + {SSL_CB_HANDSHAKE_DONE, NULL}, {SSL_CB_HANDSHAKE_START, NULL}, + {SSL_CB_LOOP, "TWST"}, {SSL_CB_HANDSHAKE_DONE, NULL}, + {SSL_CB_EXIT, NULL}, {SSL_CB_ALERT, NULL}, + {SSL_CB_HANDSHAKE_START, NULL}, {SSL_CB_LOOP, "PINIT "}, + {SSL_CB_LOOP, "PINIT "}, {SSL_CB_LOOP, "TRCH"}, {SSL_CB_LOOP, "TWSH"}, + {SSL_CB_LOOP, "TWCCS"}, {SSL_CB_LOOP, "TWEE"}, {SSL_CB_LOOP, "TWFIN"}, + {SSL_CB_LOOP, "TED"}, {SSL_CB_EXIT, NULL}, {SSL_CB_LOOP, "TED"}, + {SSL_CB_LOOP, "TRFIN"}, {SSL_CB_HANDSHAKE_DONE, NULL}, + {SSL_CB_HANDSHAKE_START, NULL}, {SSL_CB_LOOP, "TWST"}, + {SSL_CB_HANDSHAKE_DONE, NULL}, {SSL_CB_EXIT, NULL}, {0, NULL}, + }, { + /* TLSv1.3 client followed by resumption */ + {SSL_CB_HANDSHAKE_START, NULL}, {SSL_CB_LOOP, "PINIT "}, + {SSL_CB_LOOP, "TWCH"}, {SSL_CB_EXIT, NULL}, {SSL_CB_LOOP, "TWCH"}, + {SSL_CB_LOOP, "TRSH"}, {SSL_CB_LOOP, "TREE"}, {SSL_CB_LOOP, "TRSC"}, + {SSL_CB_LOOP, "TRSCV"}, {SSL_CB_LOOP, "TRFIN"}, {SSL_CB_LOOP, "TWCCS"}, + {SSL_CB_LOOP, "TWFIN"}, {SSL_CB_HANDSHAKE_DONE, NULL}, + {SSL_CB_EXIT, NULL}, {SSL_CB_HANDSHAKE_START, NULL}, + {SSL_CB_LOOP, "SSLOK "}, {SSL_CB_LOOP, "SSLOK "}, {SSL_CB_LOOP, "TRST"}, + {SSL_CB_HANDSHAKE_DONE, NULL}, {SSL_CB_EXIT, NULL}, + {SSL_CB_ALERT, NULL}, {SSL_CB_HANDSHAKE_START, NULL}, + {SSL_CB_LOOP, "PINIT "}, {SSL_CB_LOOP, "TWCH"}, {SSL_CB_EXIT, NULL}, + {SSL_CB_LOOP, "TWCH"}, {SSL_CB_LOOP, "TRSH"}, {SSL_CB_LOOP, "TREE"}, + {SSL_CB_LOOP, "TRFIN"}, {SSL_CB_LOOP, "TWCCS"}, {SSL_CB_LOOP, "TWFIN"}, + {SSL_CB_HANDSHAKE_DONE, NULL}, {SSL_CB_EXIT, NULL}, + {SSL_CB_HANDSHAKE_START, NULL}, {SSL_CB_LOOP, "SSLOK "}, + {SSL_CB_LOOP, "SSLOK "}, {SSL_CB_LOOP, "TRST"}, + {SSL_CB_HANDSHAKE_DONE, NULL}, {SSL_CB_EXIT, NULL}, {0, NULL}, + }, { + /* TLSv1.3 server, early_data */ + {SSL_CB_HANDSHAKE_START, NULL}, {SSL_CB_LOOP, "PINIT "}, + {SSL_CB_LOOP, "PINIT "}, {SSL_CB_LOOP, "TRCH"}, {SSL_CB_LOOP, "TWSH"}, + {SSL_CB_LOOP, "TWCCS"}, {SSL_CB_LOOP, "TWEE"}, {SSL_CB_LOOP, "TWFIN"}, + {SSL_CB_HANDSHAKE_DONE, NULL}, {SSL_CB_EXIT, NULL}, + {SSL_CB_HANDSHAKE_START, NULL}, {SSL_CB_LOOP, "TED"}, + {SSL_CB_LOOP, "TED"}, {SSL_CB_LOOP, "TWEOED"}, {SSL_CB_LOOP, "TRFIN"}, + {SSL_CB_HANDSHAKE_DONE, NULL}, {SSL_CB_HANDSHAKE_START, NULL}, + {SSL_CB_LOOP, "TWST"}, {SSL_CB_HANDSHAKE_DONE, NULL}, + {SSL_CB_EXIT, NULL}, {0, NULL}, + }, { + /* TLSv1.3 client, early_data */ + {SSL_CB_HANDSHAKE_START, NULL}, {SSL_CB_LOOP, "PINIT "}, + {SSL_CB_LOOP, "TWCH"}, {SSL_CB_LOOP, "TWCCS"}, + {SSL_CB_HANDSHAKE_DONE, NULL}, {SSL_CB_EXIT, NULL}, + {SSL_CB_HANDSHAKE_START, NULL}, {SSL_CB_LOOP, "TED"}, + {SSL_CB_LOOP, "TED"}, {SSL_CB_LOOP, "TRSH"}, {SSL_CB_LOOP, "TREE"}, + {SSL_CB_LOOP, "TRFIN"}, {SSL_CB_LOOP, "TPEDE"}, {SSL_CB_LOOP, "TWEOED"}, + {SSL_CB_LOOP, "TWFIN"}, {SSL_CB_HANDSHAKE_DONE, NULL}, + {SSL_CB_EXIT, NULL}, {SSL_CB_HANDSHAKE_START, NULL}, + {SSL_CB_LOOP, "SSLOK "}, {SSL_CB_LOOP, "SSLOK "}, {SSL_CB_LOOP, "TRST"}, + {SSL_CB_HANDSHAKE_DONE, NULL}, {SSL_CB_EXIT, NULL}, {0, NULL}, + }, { + {0, NULL}, + } +}; + +static void sslapi_info_callback(const SSL *s, int where, int ret) +{ + struct info_cb_states_st *state = info_cb_states[info_cb_offset]; + + /* We do not ever expect a connection to fail in this test */ + if (!TEST_false(ret == 0)) { + info_cb_failed = 1; + return; + } + + /* + * Do some sanity checks. We never expect these things to happen in this + * test + */ + if (!TEST_false((SSL_is_server(s) && (where & SSL_ST_CONNECT) != 0)) + || !TEST_false(!SSL_is_server(s) && (where & SSL_ST_ACCEPT) != 0) + || !TEST_int_ne(state[++info_cb_this_state].where, 0)) { + info_cb_failed = 1; + return; + } + + /* Now check we're in the right state */ + if (!TEST_true((where & state[info_cb_this_state].where) != 0)) { + info_cb_failed = 1; + return; + } + if ((where & SSL_CB_LOOP) != 0 + && !TEST_int_eq(strcmp(SSL_state_string(s), + state[info_cb_this_state].statestr), 0)) { + info_cb_failed = 1; + return; + } +} + +/* + * Test the info callback gets called when we expect it to. + * + * Test 0: TLSv1.2, server + * Test 1: TLSv1.2, client + * Test 2: TLSv1.3, server + * Test 3: TLSv1.3, client + * Test 4: TLSv1.3, server, early_data + * Test 5: TLSv1.3, client, early_data + */ +static int test_info_callback(int tst) +{ + SSL_CTX *cctx = NULL, *sctx = NULL; + SSL *clientssl = NULL, *serverssl = NULL; + SSL_SESSION *clntsess = NULL; + int testresult = 0; + int tlsvers; + + if (tst < 2) { +#ifndef OPENSSL_NO_TLS1_2 + tlsvers = TLS1_2_VERSION; +#else + return 1; +#endif + } else { +#ifndef OPENSSL_NO_TLS1_3 + tlsvers = TLS1_3_VERSION; +#else + return 1; +#endif + } + + /* Reset globals */ + info_cb_failed = 0; + info_cb_this_state = -1; + info_cb_offset = tst; + + if (tst >= 4) { + SSL_SESSION *sess = NULL; + size_t written, readbytes; + unsigned char buf[80]; + + /* early_data tests */ + if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, + &serverssl, &sess, 0))) + goto end; + + /* We don't actually need this reference */ + SSL_SESSION_free(sess); + + SSL_set_info_callback((tst % 2) == 0 ? serverssl : clientssl, + sslapi_info_callback); + + /* Write and read some early data and then complete the connection */ + if (!TEST_true(SSL_write_early_data(clientssl, MSG1, strlen(MSG1), + &written)) + || !TEST_size_t_eq(written, strlen(MSG1)) + || !TEST_int_eq(SSL_read_early_data(serverssl, buf, + sizeof(buf), &readbytes), + SSL_READ_EARLY_DATA_SUCCESS) + || !TEST_mem_eq(MSG1, readbytes, buf, strlen(MSG1)) + || !TEST_int_eq(SSL_get_early_data_status(serverssl), + SSL_EARLY_DATA_ACCEPTED) + || !TEST_true(create_ssl_connection(serverssl, clientssl, + SSL_ERROR_NONE)) + || !TEST_false(info_cb_failed)) + goto end; + + testresult = 1; + goto end; + } + + if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), + TLS_client_method(), + tlsvers, tlsvers, &sctx, &cctx, cert, + privkey))) + goto end; + + /* + * For even numbered tests we check the server callbacks. For odd numbers we + * check the client. + */ + SSL_CTX_set_info_callback((tst % 2) == 0 ? sctx : cctx, + sslapi_info_callback); + + if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, + &clientssl, NULL, NULL)) + || !TEST_true(create_ssl_connection(serverssl, clientssl, + SSL_ERROR_NONE)) + || !TEST_false(info_cb_failed)) + goto end; + + + + clntsess = SSL_get1_session(clientssl); + SSL_shutdown(clientssl); + SSL_shutdown(serverssl); + SSL_free(serverssl); + SSL_free(clientssl); + serverssl = clientssl = NULL; + + /* Now do a resumption */ + if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, NULL, + NULL)) + || !TEST_true(SSL_set_session(clientssl, clntsess)) + || !TEST_true(create_ssl_connection(serverssl, clientssl, + SSL_ERROR_NONE)) + || !TEST_true(SSL_session_reused(clientssl)) + || !TEST_false(info_cb_failed)) + goto end; + + testresult = 1; + + end: + SSL_free(serverssl); + SSL_free(clientssl); + SSL_SESSION_free(clntsess); + SSL_CTX_free(sctx); + SSL_CTX_free(cctx); + return testresult; +} + int setup_tests(void) { if (!TEST_ptr(cert = test_get_argument(0)) @@ -4099,6 +4355,7 @@ int setup_tests(void) #if !defined(OPENSSL_NO_SRP) && !defined(OPENSSL_NO_TLS1_2) ADD_ALL_TESTS(test_srp, 6); #endif + ADD_ALL_TESTS(test_info_callback, 6); return 1; } From matt at openssl.org Tue Apr 17 15:58:00 2018 From: matt at openssl.org (Matt Caswell) Date: Tue, 17 Apr 2018 15:58:00 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523980680.568242.10247.nullmailer@dev.openssl.org> The branch master has been updated via 2bdeffefddd8e8a65a51a7b020f8d51a4a3b1602 (commit) from 5bbf42a519c9fb70bfc13c2e4ad0044016c6f1ae (commit) - Log ----------------------------------------------------------------- commit 2bdeffefddd8e8a65a51a7b020f8d51a4a3b1602 Author: Matt Caswell Date: Tue Apr 17 13:40:07 2018 +0100 Update fingerprints.txt Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5987) ----------------------------------------------------------------------- Summary of changes: doc/fingerprints.txt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/doc/fingerprints.txt b/doc/fingerprints.txt index 1863224..2cb74ae 100644 --- a/doc/fingerprints.txt +++ b/doc/fingerprints.txt @@ -18,10 +18,7 @@ uid Richard Levitte uid Richard Levitte uid Richard Levitte -pub 4096R/FA40E9E2 2005-03-19 - Key fingerprint = 6260 5AA4 334A F9F0 DDE5 D349 D357 7507 FA40 E9E2 -uid Dr Stephen N Henson - pub 2048R/0E604491 2013-04-30 Key fingerprint = 8657 ABB2 60F0 56B1 E519 0839 D9C4 D26D 0E60 4491 +uid Matt Caswell uid Matt Caswell From matt at openssl.org Tue Apr 17 15:58:22 2018 From: matt at openssl.org (Matt Caswell) Date: Tue, 17 Apr 2018 15:58:22 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1523980702.412410.11324.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via 8917c8909ab0f63cf5812bfc9cba7cbb9ccb5210 (commit) from af2d06d245cd97de891213bb4c9e0f4b6dbe3bfb (commit) - Log ----------------------------------------------------------------- commit 8917c8909ab0f63cf5812bfc9cba7cbb9ccb5210 Author: Matt Caswell Date: Tue Apr 17 13:40:07 2018 +0100 Update fingerprints.txt Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5987) (cherry picked from commit 2bdeffefddd8e8a65a51a7b020f8d51a4a3b1602) ----------------------------------------------------------------------- Summary of changes: doc/fingerprints.txt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/doc/fingerprints.txt b/doc/fingerprints.txt index 1863224..2cb74ae 100644 --- a/doc/fingerprints.txt +++ b/doc/fingerprints.txt @@ -18,10 +18,7 @@ uid Richard Levitte uid Richard Levitte uid Richard Levitte -pub 4096R/FA40E9E2 2005-03-19 - Key fingerprint = 6260 5AA4 334A F9F0 DDE5 D349 D357 7507 FA40 E9E2 -uid Dr Stephen N Henson - pub 2048R/0E604491 2013-04-30 Key fingerprint = 8657 ABB2 60F0 56B1 E519 0839 D9C4 D26D 0E60 4491 +uid Matt Caswell uid Matt Caswell From matt at openssl.org Tue Apr 17 15:59:28 2018 From: matt at openssl.org (Matt Caswell) Date: Tue, 17 Apr 2018 15:59:28 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_0_2-stable update Message-ID: <1523980768.040662.12441.nullmailer@dev.openssl.org> The branch OpenSSL_1_0_2-stable has been updated via 363c9f0ba4973a3d7d4ce743fadbc252aa9f0d4c (commit) from 1084fc8f0086cece8ae1a1e9f484d30fdff25192 (commit) - Log ----------------------------------------------------------------- commit 363c9f0ba4973a3d7d4ce743fadbc252aa9f0d4c Author: Matt Caswell Date: Tue Apr 17 13:40:07 2018 +0100 Update fingerprints.txt Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5988) ----------------------------------------------------------------------- Summary of changes: doc/fingerprints.txt | 67 +++++++++++----------------------------------------- 1 file changed, 14 insertions(+), 53 deletions(-) diff --git a/doc/fingerprints.txt b/doc/fingerprints.txt index 373e90d..2cb74ae 100644 --- a/doc/fingerprints.txt +++ b/doc/fingerprints.txt @@ -1,63 +1,24 @@ - Fingerprints +Fingerprints for Signing Releases -OpenSSL releases are signed with PGP/GnuPG keys. You can find the -signatures in separate files in the same location you find the -distributions themselves. The normal file name is the same as the -distribution file, with '.asc' added. For example, the signature for -the distribution of OpenSSL 1.0.1h, openssl-1.0.1h.tar.gz, is found in -the file openssl-1.0.1h.tar.gz.asc. +OpenSSL releases are signed with PGP/GnuPG keys. This file contains +the fingerprints of team members who are "authorized" to sign the +next release. + +The signature is a detached cleartxt signature, with the same name +as the release but with ".asc" appended. For example, release +1.0.1h can be found in openssl-1.0.1h.tar.gz with the signature +in the file named openssl-1.0.1h.tar.gz.asc. The following is the list of fingerprints for the keys that are currently in use to sign OpenSSL distributions: -pub 1024D/F709453B 2003-10-20 - Key fingerprint = C4CA B749 C34F 7F4C C04F DAC9 A7AF 9E78 F709 453B -uid Richard Levitte +pub 4096R/7DF9EE8C 2014-10-04 + Key fingerprint = 7953 AC1F BC3D C8B3 B292 393E D5E9 E43F 7DF9 EE8C +uid Richard Levitte uid Richard Levitte -uid Richard Levitte - -pub 2048R/F295C759 1998-12-13 - Key fingerprint = D0 5D 8C 61 6E 27 E6 60 41 EC B1 B8 D5 7E E5 97 -uid Dr S N Henson - -pub 4096R/FA40E9E2 2005-03-19 - Key fingerprint = 6260 5AA4 334A F9F0 DDE5 D349 D357 7507 FA40 E9E2 -uid Dr Stephen Henson -uid Dr Stephen Henson -uid Dr Stephen N Henson -sub 4096R/8811F530 2005-03-19 - -pub 1024R/49A563D9 1997-02-24 - Key fingerprint = 7B 79 19 FA 71 6B 87 25 0E 77 21 E5 52 D9 83 BF -uid Mark Cox -uid Mark Cox -uid Mark Cox - -pub 1024R/9C58A66D 1997-04-03 - Key fingerprint = 13 D0 B8 9D 37 30 C3 ED AC 9C 24 7D 45 8C 17 67 -uid jaenicke at openssl.org -uid Lutz Jaenicke - -pub 1024D/2118CF83 1998-07-13 - Key fingerprint = 7656 55DE 62E3 96FF 2587 EB6C 4F6D E156 2118 CF83 -uid Ben Laurie -uid Ben Laurie -uid Ben Laurie -sub 4096g/1F5143E7 1998-07-13 - -pub 1024R/5A6A9B85 1994-03-22 - Key fingerprint = C7 AC 7E AD 56 6A 65 EC F6 16 66 83 7E 86 68 28 -uid Bodo Moeller <2005 at bmoeller.de> -uid Bodo Moeller <2003 at bmoeller.de> -uid Bodo Moeller <2004 at bmoeller.de> -uid Bodo Moeller -uid Bodo Moeller -uid Bodo Moeller -uid Bodo Moeller <3moeller at informatik.uni-hamburg.de> -uid Bodo Moeller -uid Bodo Moeller <3moeller at rzdspc5.informatik.uni-hamburg.de> +uid Richard Levitte pub 2048R/0E604491 2013-04-30 Key fingerprint = 8657 ABB2 60F0 56B1 E519 0839 D9C4 D26D 0E60 4491 +uid Matt Caswell uid Matt Caswell - From matt at openssl.org Tue Apr 17 16:05:49 2018 From: matt at openssl.org (Matt Caswell) Date: Tue, 17 Apr 2018 16:05:49 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523981149.895966.14770.nullmailer@dev.openssl.org> The branch master has been updated via 7d4488bbd7ac34fffb776cccbfff6b4ac0387e03 (commit) via bd7775e14a19c326d3720f2345c2ae324409e979 (commit) from 2bdeffefddd8e8a65a51a7b020f8d51a4a3b1602 (commit) - Log ----------------------------------------------------------------- commit 7d4488bbd7ac34fffb776cccbfff6b4ac0387e03 Author: Matt Caswell Date: Mon Apr 16 14:08:38 2018 +0100 Extend the SSL_set_bio() tests The SSL_set_bio() tests only did standalone testing without being in the context of an actual connection. We extend this to do additional tests following a successful or failed connection attempt. This would have caught the issue fixed in the previous commit. Reviewed-by: Viktor Dukhovni (Merged from https://github.com/openssl/openssl/pull/5966) commit bd7775e14a19c326d3720f2345c2ae324409e979 Author: Matt Caswell Date: Mon Apr 16 14:06:56 2018 +0100 Fix assertion failure in SSL_set_bio() If SSL_set_bio() is called with a NULL wbio after a failed connection then this can trigger an assertion failure. This should be valid behaviour and the assertion is in fact invalid and can simply be removed. Reviewed-by: Viktor Dukhovni (Merged from https://github.com/openssl/openssl/pull/5966) ----------------------------------------------------------------------- Summary of changes: ssl/ssl_lib.c | 2 - test/sslapitest.c | 127 ++++++++++++++++++++++++++++++++++++++++-------------- 2 files changed, 95 insertions(+), 34 deletions(-) diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index b1d78dc..1e24f84 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -3844,8 +3844,6 @@ int ssl_free_wbio_buffer(SSL *s) return 1; s->wbio = BIO_pop(s->wbio); - if (!ossl_assert(s->wbio != NULL)) - return 0; BIO_free(s->bbio); s->bbio = NULL; diff --git a/test/sslapitest.c b/test/sslapitest.c index 1c9f294..338c61c 100644 --- a/test/sslapitest.c +++ b/test/sslapitest.c @@ -1113,11 +1113,27 @@ static int test_session_with_both_cache(void) #endif } -#define USE_NULL 0 -#define USE_BIO_1 1 -#define USE_BIO_2 2 +#define USE_NULL 0 +#define USE_BIO_1 1 +#define USE_BIO_2 2 +#define USE_DEFAULT 3 + +#define CONNTYPE_CONNECTION_SUCCESS 0 +#define CONNTYPE_CONNECTION_FAIL 1 +#define CONNTYPE_NO_CONNECTION 2 + +#define TOTAL_NO_CONN_SSL_SET_BIO_TESTS (3 * 3 * 3 * 3) +#define TOTAL_CONN_SUCCESS_SSL_SET_BIO_TESTS (2 * 2) +#if !defined(OPENSSL_NO_TLS1_3) && !defined(OPENSSL_NO_TLS1_2) +# define TOTAL_CONN_FAIL_SSL_SET_BIO_TESTS (2 * 2) +#else +# define TOTAL_CONN_FAIL_SSL_SET_BIO_TESTS 0 +#endif + -#define TOTAL_SSL_SET_BIO_TESTS (3 * 3 * 3 * 3) +#define TOTAL_SSL_SET_BIO_TESTS TOTAL_NO_CONN_SSL_SET_BIO_TESTS \ + + TOTAL_CONN_SUCCESS_SSL_SET_BIO_TESTS \ + + TOTAL_CONN_FAIL_SSL_SET_BIO_TESTS static void setupbio(BIO **res, BIO *bio1, BIO *bio2, int type) { @@ -1134,28 +1150,65 @@ static void setupbio(BIO **res, BIO *bio1, BIO *bio2, int type) } } + +/* + * Tests calls to SSL_set_bio() under various conditions. + * + * For the first 3 * 3 * 3 * 3 = 81 tests we do 2 calls to SSL_set_bio() with + * various combinations of valid BIOs or NULL being set for the rbio/wbio. We + * then do more tests where we create a successful connection first using our + * standard connection setup functions, and then call SSL_set_bio() with + * various combinations of valid BIOs or NULL. We then repeat these tests + * following a failed connection. In this last case we are looking to check that + * SSL_set_bio() functions correctly in the case where s->bbio is not NULL. + */ static int test_ssl_set_bio(int idx) { - SSL_CTX *ctx; + SSL_CTX *sctx = NULL, *cctx = NULL; BIO *bio1 = NULL; BIO *bio2 = NULL; BIO *irbio = NULL, *iwbio = NULL, *nrbio = NULL, *nwbio = NULL; - SSL *ssl = NULL; - int initrbio, initwbio, newrbio, newwbio; + SSL *serverssl = NULL, *clientssl = NULL; + int initrbio, initwbio, newrbio, newwbio, conntype; int testresult = 0; - initrbio = idx % 3; - idx /= 3; - initwbio = idx % 3; - idx /= 3; - newrbio = idx % 3; - idx /= 3; - newwbio = idx; - if (!TEST_int_le(newwbio, 2)) - return 0; + if (idx < TOTAL_NO_CONN_SSL_SET_BIO_TESTS) { + initrbio = idx % 3; + idx /= 3; + initwbio = idx % 3; + idx /= 3; + newrbio = idx % 3; + idx /= 3; + newwbio = idx % 3; + conntype = CONNTYPE_NO_CONNECTION; + } else { + idx -= TOTAL_NO_CONN_SSL_SET_BIO_TESTS; + initrbio = initwbio = USE_DEFAULT; + newrbio = idx % 2; + idx /= 2; + newwbio = idx % 2; + idx /= 2; + conntype = idx % 2; + } - if (!TEST_ptr(ctx = SSL_CTX_new(TLS_method())) - || !TEST_ptr(ssl = SSL_new(ctx))) + if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), TLS_client_method(), + TLS1_VERSION, TLS_MAX_VERSION, + &sctx, &cctx, cert, privkey))) + goto end; + + if (conntype == CONNTYPE_CONNECTION_FAIL) { + /* + * We won't ever get here if either TLSv1.3 or TLSv1.2 is disabled + * because we reduced the number of tests in the definition of + * TOTAL_CONN_FAIL_SSL_SET_BIO_TESTS to avoid this scenario. By setting + * mismatched protocol versions we will force a connection failure. + */ + SSL_CTX_set_min_proto_version(sctx, TLS1_3_VERSION); + SSL_CTX_set_max_proto_version(cctx, TLS1_2_VERSION); + } + + if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, + NULL, NULL))) goto end; if (initrbio == USE_BIO_1 @@ -1174,19 +1227,27 @@ static int test_ssl_set_bio(int idx) goto end; } - setupbio(&irbio, bio1, bio2, initrbio); - setupbio(&iwbio, bio1, bio2, initwbio); + if (initrbio != USE_DEFAULT) { + setupbio(&irbio, bio1, bio2, initrbio); + setupbio(&iwbio, bio1, bio2, initwbio); + SSL_set_bio(clientssl, irbio, iwbio); - /* - * We want to maintain our own refs to these BIO, so do an up ref for each - * BIO that will have ownership transferred in the SSL_set_bio() call - */ - if (irbio != NULL) - BIO_up_ref(irbio); - if (iwbio != NULL && iwbio != irbio) - BIO_up_ref(iwbio); + /* + * We want to maintain our own refs to these BIO, so do an up ref for + * each BIO that will have ownership transferred in the SSL_set_bio() + * call + */ + if (irbio != NULL) + BIO_up_ref(irbio); + if (iwbio != NULL && iwbio != irbio) + BIO_up_ref(iwbio); + } - SSL_set_bio(ssl, irbio, iwbio); + if (conntype != CONNTYPE_NO_CONNECTION + && !TEST_true(create_ssl_connection(serverssl, clientssl, + SSL_ERROR_NONE) + == (conntype == CONNTYPE_CONNECTION_SUCCESS))) + goto end; setupbio(&nrbio, bio1, bio2, newrbio); setupbio(&nwbio, bio1, bio2, newwbio); @@ -1205,12 +1266,11 @@ static int test_ssl_set_bio(int idx) && (nwbio != iwbio || (nwbio == iwbio && irbio == iwbio))) BIO_up_ref(nwbio); - SSL_set_bio(ssl, nrbio, nwbio); + SSL_set_bio(clientssl, nrbio, nwbio); testresult = 1; end: - SSL_free(ssl); BIO_free(bio1); BIO_free(bio2); @@ -1220,7 +1280,10 @@ static int test_ssl_set_bio(int idx) * functions. If we haven't done enough then this will only be detected in * a crypto-mdebug build */ - SSL_CTX_free(ctx); + SSL_free(serverssl); + SSL_free(clientssl); + SSL_CTX_free(sctx); + SSL_CTX_free(cctx); return testresult; } From matt at openssl.org Tue Apr 17 16:08:28 2018 From: matt at openssl.org (Matt Caswell) Date: Tue, 17 Apr 2018 16:08:28 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1523981308.156529.16038.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via 1d015368ebe245c4468522d152edfd8a1069426e (commit) from 8917c8909ab0f63cf5812bfc9cba7cbb9ccb5210 (commit) - Log ----------------------------------------------------------------- commit 1d015368ebe245c4468522d152edfd8a1069426e Author: Matt Caswell Date: Mon Apr 16 14:06:56 2018 +0100 Fix assertion failure in SSL_set_bio() If SSL_set_bio() is called with a NULL wbio after a failed connection then this can trigger an assertion failure. This should be valid behaviour and the assertion is in fact invalid and can simply be removed. Reviewed-by: Viktor Dukhovni (Merged from https://github.com/openssl/openssl/pull/5966) (cherry picked from commit bd7775e14a19c326d3720f2345c2ae324409e979) ----------------------------------------------------------------------- Summary of changes: ssl/ssl_lib.c | 1 - 1 file changed, 1 deletion(-) diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 8a190d2..a1a514f 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -3519,7 +3519,6 @@ void ssl_free_wbio_buffer(SSL *s) return; s->wbio = BIO_pop(s->wbio); - assert(s->wbio != NULL); BIO_free(s->bbio); s->bbio = NULL; } From matt at openssl.org Tue Apr 17 16:12:48 2018 From: matt at openssl.org (Matt Caswell) Date: Tue, 17 Apr 2018 16:12:48 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523981568.674164.17386.nullmailer@dev.openssl.org> The branch master has been updated via a68236572850a1f50d5c40990b5a15a18ebea3bc (commit) from 7d4488bbd7ac34fffb776cccbfff6b4ac0387e03 (commit) - Log ----------------------------------------------------------------- commit a68236572850a1f50d5c40990b5a15a18ebea3bc Author: Matt Caswell Date: Tue Apr 17 11:32:20 2018 +0100 Check the return from EVP_PKEY_get0_DH() Fixes #5934 Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5983) ----------------------------------------------------------------------- Summary of changes: ssl/statem/statem_srvr.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ssl/statem/statem_srvr.c b/ssl/statem/statem_srvr.c index 7e033ce..aa38fad 100644 --- a/ssl/statem/statem_srvr.c +++ b/ssl/statem/statem_srvr.c @@ -2481,6 +2481,12 @@ int tls_construct_server_key_exchange(SSL *s, WPACKET *pkt) } dh = EVP_PKEY_get0_DH(s->s3->tmp.pkey); + if (dh == NULL) { + SSLfatal(s, SSL_AD_INTERNAL_ERROR, + SSL_F_TLS_CONSTRUCT_SERVER_KEY_EXCHANGE, + ERR_R_INTERNAL_ERROR); + goto err; + } EVP_PKEY_free(pkdh); pkdh = NULL; From matt at openssl.org Tue Apr 17 16:33:44 2018 From: matt at openssl.org (Matt Caswell) Date: Tue, 17 Apr 2018 16:33:44 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523982824.876994.21085.nullmailer@dev.openssl.org> The branch master has been updated via 9f2a3bb19d42e6942cbbb7ea0a41a342ce158b94 (commit) from a68236572850a1f50d5c40990b5a15a18ebea3bc (commit) - Log ----------------------------------------------------------------- commit 9f2a3bb19d42e6942cbbb7ea0a41a342ce158b94 Author: Matt Caswell Date: Mon Apr 16 18:41:01 2018 +0100 Fix a memory leak in an error path Found by Coverity. Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5970) ----------------------------------------------------------------------- Summary of changes: crypto/srp/srp_vfy.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/crypto/srp/srp_vfy.c b/crypto/srp/srp_vfy.c index 1bf2f26..b13c006 100644 --- a/crypto/srp/srp_vfy.c +++ b/crypto/srp/srp_vfy.c @@ -69,8 +69,10 @@ static int t_fromb64(unsigned char *a, size_t alen, const char *src) * 4 bytes unencoded = 6 bytes encoded * etc */ - if (padsize == 3) - return -1; + if (padsize == 3) { + outl = -1; + goto err; + } /* Valid padsize values are now 0, 1 or 2 */ @@ -80,12 +82,12 @@ static int t_fromb64(unsigned char *a, size_t alen, const char *src) /* Add any encoded padding that is required */ if (padsize != 0 && EVP_DecodeUpdate(ctx, a, &outl, pad, padsize) < 0) { - EVP_ENCODE_CTX_free(ctx); - return -1; + outl = -1; + goto err; } if (EVP_DecodeUpdate(ctx, a, &outl2, (const unsigned char *)src, size) < 0) { - EVP_ENCODE_CTX_free(ctx); - return -1; + outl = -1; + goto err; } outl += outl2; EVP_DecodeFinal(ctx, a + outl, &outl2); @@ -93,8 +95,11 @@ static int t_fromb64(unsigned char *a, size_t alen, const char *src) /* Strip off the leading padding */ if (padsize != 0) { - if ((int)padsize >= outl) - return -1; + if ((int)padsize >= outl) { + outl = -1; + goto err; + } + /* * If we added 1 byte of padding prior to encoding then we have 2 bytes * of "real" data which gets spread across 4 encoded bytes like this: @@ -112,6 +117,7 @@ static int t_fromb64(unsigned char *a, size_t alen, const char *src) outl -= padsize; } + err: EVP_ENCODE_CTX_free(ctx); return outl; From levitte at openssl.org Tue Apr 17 19:11:47 2018 From: levitte at openssl.org (Richard Levitte) Date: Tue, 17 Apr 2018 19:11:47 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_0_2-stable update Message-ID: <1523992307.288282.16621.nullmailer@dev.openssl.org> The branch OpenSSL_1_0_2-stable has been updated via 82d8cec06ae8af5dbe68c8e4be38ad32ce9fa594 (commit) from 363c9f0ba4973a3d7d4ce743fadbc252aa9f0d4c (commit) - Log ----------------------------------------------------------------- commit 82d8cec06ae8af5dbe68c8e4be38ad32ce9fa594 Author: John Eichenberger Date: Tue Apr 3 16:08:31 2018 -0700 Correct the check of RSA_FLAG_SIGN_VER The wrong flags were being tested. It is the rsa->meth flags not the rsa flags that should be tested. wpa_supplicant has a bit of code that 1. Allocates and defines a RSA_METHOD structure. 2. calls RSA_new(); 3. calls RSA_set_method(). In current versions of that code the rsa_sign and rsa_verify members of the RSA_METHOD structure are not defined, thus making it compatible with the really old versions of OpenSSL. But should one change it use the rsa_sign method one must set the RSA_FLAG_SIGN_VER bit of the RSA_METHOD structure to indicate that one or both of those new methods are required. In doing so, OpenSSL will not call the new methods, not without this change. CLA: trivial Change-Id: I6e65a80f21399f25e966466ff676e3b21f85f360 Reviewed-by: Rich Salz Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5971) ----------------------------------------------------------------------- Summary of changes: crypto/rsa/rsa_sign.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/rsa/rsa_sign.c b/crypto/rsa/rsa_sign.c index 82ca832..b7fff43 100644 --- a/crypto/rsa/rsa_sign.c +++ b/crypto/rsa/rsa_sign.c @@ -84,7 +84,7 @@ int RSA_sign(int type, const unsigned char *m, unsigned int m_len, return 0; } #endif - if ((rsa->flags & RSA_FLAG_SIGN_VER) && rsa->meth->rsa_sign) { + if ((rsa->meth->flags & RSA_FLAG_SIGN_VER) && rsa->meth->rsa_sign) { return rsa->meth->rsa_sign(type, m, m_len, sigret, siglen, rsa); } /* Special case: SSL signature, just check the length */ @@ -293,7 +293,7 @@ int RSA_verify(int dtype, const unsigned char *m, unsigned int m_len, const unsigned char *sigbuf, unsigned int siglen, RSA *rsa) { - if ((rsa->flags & RSA_FLAG_SIGN_VER) && rsa->meth->rsa_verify) { + if ((rsa->meth->flags & RSA_FLAG_SIGN_VER) && rsa->meth->rsa_verify) { return rsa->meth->rsa_verify(dtype, m, m_len, sigbuf, siglen, rsa); } From rsalz at openssl.org Tue Apr 17 21:09:59 2018 From: rsalz at openssl.org (Rich Salz) Date: Tue, 17 Apr 2018 21:09:59 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1523999399.542030.10090.nullmailer@dev.openssl.org> The branch master has been updated via 55442b8a5b719f54578083fae0fcc814b599cd84 (commit) from 9f2a3bb19d42e6942cbbb7ea0a41a342ce158b94 (commit) - Log ----------------------------------------------------------------- commit 55442b8a5b719f54578083fae0fcc814b599cd84 Author: Davide Galassi Date: Tue Apr 17 16:57:22 2018 -0400 BIGNUM signed add/sub routines refactory Old code replaced in favor of a clearer implementation. Performances are not penalized. Updated the copyright end date to 2018. Reviewed-by: David Benjamin Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5963) ----------------------------------------------------------------------- Summary of changes: crypto/bn/bn_add.c | 132 +++++++++++++++++++---------------------------------- 1 file changed, 47 insertions(+), 85 deletions(-) diff --git a/crypto/bn/bn_add.c b/crypto/bn/bn_add.c index 7cdefa7..f2736b8 100644 --- a/crypto/bn/bn_add.c +++ b/crypto/bn/bn_add.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -10,51 +10,69 @@ #include "internal/cryptlib.h" #include "bn_lcl.h" -/* r can == a or b */ +/* signed add of b to a. */ int BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b) { - int a_neg = a->neg, ret; + int ret, r_neg, cmp_res; bn_check_top(a); bn_check_top(b); - /*- - * a + b a+b - * a + -b a-b - * -a + b b-a - * -a + -b -(a+b) - */ - if (a_neg ^ b->neg) { - /* only one is negative */ - if (a_neg) { - const BIGNUM *tmp; - - tmp = a; - a = b; - b = tmp; + if (a->neg == b->neg) { + r_neg = a->neg; + ret = BN_uadd(r, a, b); + } else { + cmp_res = BN_ucmp(a, b); + if (cmp_res > 0) { + r_neg = a->neg; + ret = BN_usub(r, a, b); + } else if (cmp_res < 0) { + r_neg = b->neg; + ret = BN_usub(r, b, a); + } else { + r_neg = 0; + BN_zero(r); + ret = 1; } + } + + r->neg = r_neg; + bn_check_top(r); + return ret; +} + +/* signed sub of b from a. */ +int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b) +{ + int ret, r_neg, cmp_res; - /* we are now a - b */ + bn_check_top(a); + bn_check_top(b); - if (BN_ucmp(a, b) < 0) { - if (!BN_usub(r, b, a)) - return 0; - r->neg = 1; + if (a->neg != b->neg) { + r_neg = a->neg; + ret = BN_uadd(r, a, b); + } else { + cmp_res = BN_ucmp(a, b); + if (cmp_res > 0) { + r_neg = a->neg; + ret = BN_usub(r, a, b); + } else if (cmp_res < 0) { + r_neg = !b->neg; + ret = BN_usub(r, b, a); } else { - if (!BN_usub(r, a, b)) - return 0; - r->neg = 0; + r_neg = 0; + BN_zero(r); + ret = 1; } - return 1; } - ret = BN_uadd(r, a, b); - r->neg = a_neg; + r->neg = r_neg; bn_check_top(r); return ret; } -/* unsigned add of b to a */ +/* unsigned add of b to a, r can be equal to a or b. */ int BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b) { int max, min, dif; @@ -151,59 +169,3 @@ int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b) return 1; } -int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b) -{ - int max; - int add = 0, neg = 0; - - bn_check_top(a); - bn_check_top(b); - - /*- - * a - b a-b - * a - -b a+b - * -a - b -(a+b) - * -a - -b b-a - */ - if (a->neg) { - if (b->neg) { - const BIGNUM *tmp; - - tmp = a; - a = b; - b = tmp; - } else { - add = 1; - neg = 1; - } - } else { - if (b->neg) { - add = 1; - neg = 0; - } - } - - if (add) { - if (!BN_uadd(r, a, b)) - return 0; - r->neg = neg; - return 1; - } - - /* We are actually doing a - b :-) */ - - max = (a->top > b->top) ? a->top : b->top; - if (bn_wexpand(r, max) == NULL) - return 0; - if (BN_ucmp(a, b) < 0) { - if (!BN_usub(r, b, a)) - return 0; - r->neg = 1; - } else { - if (!BN_usub(r, a, b)) - return 0; - r->neg = 0; - } - bn_check_top(r); - return 1; -} From openssl at openssl.org Wed Apr 18 00:41:00 2018 From: openssl at openssl.org (OpenSSL run-checker) Date: Wed, 18 Apr 2018 00:41:00 +0000 Subject: [openssl-commits] FAILED build of OpenSSL branch master with options -d --strict-warnings no-ec Message-ID: <1524012060.316571.29051.nullmailer@run.openssl.org> Platform and configuration command: $ uname -a Linux run 4.4.0-119-generic #143-Ubuntu SMP Mon Apr 2 16:08:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux $ CC=clang ../openssl/config -d --strict-warnings no-ec Commit log since last time: 55442b8 BIGNUM signed add/sub routines refactory 9f2a3bb Fix a memory leak in an error path a682365 Check the return from EVP_PKEY_get0_DH() 7d4488b Extend the SSL_set_bio() tests bd7775e Fix assertion failure in SSL_set_bio() 2bdeffe Update fingerprints.txt 5bbf42a Update the info callback documentation for TLSv1.3 5718fe4 Add a test for the info callback 7f9f5f7 Make sure info callback knows about all handshake start events c2c1d8a Call the info callback on all handshake done events ded4a83 Ignore the status_request extension in a resumption handshake a12de2c SSL_CTX_set_tlsext_ticket_key_cb.pod: fix error check of RAND_bytes() call e62fb0d p5_scrypt.c: fix error check of RAND_bytes() call 43687d6 DRBG: fix coverity issues 826e154 apps/s_socket.c: print only dynamically allocated port in do_server. dbabc86 Add a config option to disable automatic config loading a051af0 Prepare for 1.1.1-pre6-dev 4ff3df1 Prepare for 1.1.1-pre5 release 2842813 Update copyright year 6761890 OpenSSL 1.1.1-pre5: update CHANGES with recent user visible changes Build log ended with (last 100 lines): /usr/bin/perl ../openssl/test/generate_buildtest.pl x509 > test/buildtest_x509.c /usr/bin/perl ../openssl/test/generate_buildtest.pl x509_vfy > test/buildtest_x509_vfy.c /usr/bin/perl ../openssl/test/generate_buildtest.pl x509v3 > test/buildtest_x509v3.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/casttest.d.tmp -MT test/casttest.o -c -o test/casttest.o ../openssl/test/casttest.c clang -I. -Iinclude -Icrypto/include -I../openssl -I../openssl/include -I../openssl/crypto/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/chacha_internal_test.d.tmp -MT test/chacha_internal_test.o -c -o test/chacha_internal_test.o ../openssl/test/chacha_internal_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/cipherbytes_test.d.tmp -MT test/cipherbytes_test.o -c -o test/cipherbytes_test.o ../openssl/test/cipherbytes_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/cipherlist_test.d.tmp -MT test/cipherlist_test.o -c -o test/cipherlist_test.o ../openssl/test/cipherlist_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ciphername_test.d.tmp -MT test/ciphername_test.o -c -o test/ciphername_test.o ../openssl/test/ciphername_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/clienthellotest.d.tmp -MT test/clienthellotest.o -c -o test/clienthellotest.o ../openssl/test/clienthellotest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/conf_include_test.d.tmp -MT test/conf_include_test.o -c -o test/conf_include_test.o ../openssl/test/conf_include_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/constant_time_test.d.tmp -MT test/constant_time_test.o -c -o test/constant_time_test.o ../openssl/test/constant_time_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/crltest.d.tmp -MT test/crltest.o -c -o test/crltest.o ../openssl/test/crltest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ct_test.d.tmp -MT test/ct_test.o -c -o test/ct_test.o ../openssl/test/ct_test.c clang -I. -Icrypto/include -Iinclude -I../openssl -I../openssl/crypto/include -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ctype_internal_test.d.tmp -MT test/ctype_internal_test.o -c -o test/ctype_internal_test.o ../openssl/test/ctype_internal_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/d2i_test.d.tmp -MT test/d2i_test.o -c -o test/d2i_test.o ../openssl/test/d2i_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/danetest.d.tmp -MT test/danetest.o -c -o test/danetest.o ../openssl/test/danetest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/destest.d.tmp -MT test/destest.o -c -o test/destest.o ../openssl/test/destest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/dhtest.d.tmp -MT test/dhtest.o -c -o test/dhtest.o ../openssl/test/dhtest.c clang -Iinclude -Itest -I. -I../openssl/include -I../openssl/test -I../openssl -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/drbg_cavs_data.d.tmp -MT test/drbg_cavs_data.o -c -o test/drbg_cavs_data.o ../openssl/test/drbg_cavs_data.c clang -Iinclude -Itest -I. -I../openssl/include -I../openssl/test -I../openssl -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/drbg_cavs_test.d.tmp -MT test/drbg_cavs_test.o -c -o test/drbg_cavs_test.o ../openssl/test/drbg_cavs_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/drbgtest.d.tmp -MT test/drbgtest.o -c -o test/drbgtest.o ../openssl/test/drbgtest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/dsatest.d.tmp -MT test/dsatest.o -c -o test/dsatest.o ../openssl/test/dsatest.c clang -I. -Iinclude -I../openssl -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/dtls_mtu_test.d.tmp -MT test/dtls_mtu_test.o -c -o test/dtls_mtu_test.o ../openssl/test/dtls_mtu_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/dtlstest.d.tmp -MT test/dtlstest.o -c -o test/dtlstest.o ../openssl/test/dtlstest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/dtlsv1listentest.d.tmp -MT test/dtlsv1listentest.o -c -o test/dtlsv1listentest.o ../openssl/test/dtlsv1listentest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ecdsatest.d.tmp -MT test/ecdsatest.o -c -o test/ecdsatest.o ../openssl/test/ecdsatest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ecstresstest.d.tmp -MT test/ecstresstest.o -c -o test/ecstresstest.o ../openssl/test/ecstresstest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ectest.d.tmp -MT test/ectest.o -c -o test/ectest.o ../openssl/test/ectest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/enginetest.d.tmp -MT test/enginetest.o -c -o test/enginetest.o ../openssl/test/enginetest.c clang -Iinclude -Icrypto/include -I../openssl/include -I../openssl/crypto/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/evp_extra_test.d.tmp -MT test/evp_extra_test.o -c -o test/evp_extra_test.o ../openssl/test/evp_extra_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/evp_test.d.tmp -MT test/evp_test.o -c -o test/evp_test.o ../openssl/test/evp_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/exdatatest.d.tmp -MT test/exdatatest.o -c -o test/exdatatest.o ../openssl/test/exdatatest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/exptest.d.tmp -MT test/exptest.o -c -o test/exptest.o ../openssl/test/exptest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/fatalerrtest.d.tmp -MT test/fatalerrtest.o -c -o test/fatalerrtest.o ../openssl/test/fatalerrtest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/gmdifftest.d.tmp -MT test/gmdifftest.o -c -o test/gmdifftest.o ../openssl/test/gmdifftest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/hmactest.d.tmp -MT test/hmactest.o -c -o test/hmactest.o ../openssl/test/hmactest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ideatest.d.tmp -MT test/ideatest.o -c -o test/ideatest.o ../openssl/test/ideatest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/igetest.d.tmp -MT test/igetest.o -c -o test/igetest.o ../openssl/test/igetest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/lhash_test.d.tmp -MT test/lhash_test.o -c -o test/lhash_test.o ../openssl/test/lhash_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/md2test.d.tmp -MT test/md2test.o -c -o test/md2test.o ../openssl/test/md2test.c clang -I. -Iinclude -I../openssl -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/mdc2_internal_test.d.tmp -MT test/mdc2_internal_test.o -c -o test/mdc2_internal_test.o ../openssl/test/mdc2_internal_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/mdc2test.d.tmp -MT test/mdc2test.o -c -o test/mdc2test.o ../openssl/test/mdc2test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/memleaktest.d.tmp -MT test/memleaktest.o -c -o test/memleaktest.o ../openssl/test/memleaktest.c clang -I. -Iinclude -I../openssl -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/modes_internal_test.d.tmp -MT test/modes_internal_test.o -c -o test/modes_internal_test.o ../openssl/test/modes_internal_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ocspapitest.d.tmp -MT test/ocspapitest.o -c -o test/ocspapitest.o ../openssl/test/ocspapitest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/packettest.d.tmp -MT test/packettest.o -c -o test/packettest.o ../openssl/test/packettest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/pbelutest.d.tmp -MT test/pbelutest.o -c -o test/pbelutest.o ../openssl/test/pbelutest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/pemtest.d.tmp -MT test/pemtest.o -c -o test/pemtest.o ../openssl/test/pemtest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/pkey_meth_kdf_test.d.tmp -MT test/pkey_meth_kdf_test.o -c -o test/pkey_meth_kdf_test.o ../openssl/test/pkey_meth_kdf_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/pkey_meth_test.d.tmp -MT test/pkey_meth_test.o -c -o test/pkey_meth_test.o ../openssl/test/pkey_meth_test.c clang -I. -Iinclude -Icrypto/include -I../openssl -I../openssl/include -I../openssl/crypto/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/poly1305_internal_test.d.tmp -MT test/poly1305_internal_test.o -c -o test/poly1305_internal_test.o ../openssl/test/poly1305_internal_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/rc2test.d.tmp -MT test/rc2test.o -c -o test/rc2test.o ../openssl/test/rc2test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/rc4test.d.tmp -MT test/rc4test.o -c -o test/rc4test.o ../openssl/test/rc4test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/rc5test.d.tmp -MT test/rc5test.o -c -o test/rc5test.o ../openssl/test/rc5test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/rdrand_sanitytest.d.tmp -MT test/rdrand_sanitytest.o -c -o test/rdrand_sanitytest.o ../openssl/test/rdrand_sanitytest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/recordlentest.d.tmp -MT test/recordlentest.o -c -o test/recordlentest.o ../openssl/test/recordlentest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/rsa_mp_test.d.tmp -MT test/rsa_mp_test.o -c -o test/rsa_mp_test.o ../openssl/test/rsa_mp_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/rsa_test.d.tmp -MT test/rsa_test.o -c -o test/rsa_test.o ../openssl/test/rsa_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/sanitytest.d.tmp -MT test/sanitytest.o -c -o test/sanitytest.o ../openssl/test/sanitytest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/secmemtest.d.tmp -MT test/secmemtest.o -c -o test/secmemtest.o ../openssl/test/secmemtest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/servername_test.d.tmp -MT test/servername_test.o -c -o test/servername_test.o ../openssl/test/servername_test.c clang -Iinclude -Icrypto/include -I../openssl/include -I../openssl/crypto/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/shlibloadtest.d.tmp -MT test/shlibloadtest.o -c -o test/shlibloadtest.o ../openssl/test/shlibloadtest.c clang -I. -Iinclude -Icrypto/include -I../openssl -I../openssl/include -I../openssl/crypto/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/siphash_internal_test.d.tmp -MT test/siphash_internal_test.o -c -o test/siphash_internal_test.o ../openssl/test/siphash_internal_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/sm2crypttest.d.tmp -MT test/sm2crypttest.o -c -o test/sm2crypttest.o ../openssl/test/sm2crypttest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/sm2sigtest.d.tmp -MT test/sm2sigtest.o -c -o test/sm2sigtest.o ../openssl/test/sm2sigtest.c clang -I. -Iinclude -Icrypto/include -I../openssl -I../openssl/include -I../openssl/crypto/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/sm4_internal_test.d.tmp -MT test/sm4_internal_test.o -c -o test/sm4_internal_test.o ../openssl/test/sm4_internal_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/srptest.d.tmp -MT test/srptest.o -c -o test/srptest.o ../openssl/test/srptest.c clang -I. -Iinclude -I../openssl -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ssl_cert_table_internal_test.d.tmp -MT test/ssl_cert_table_internal_test.o -c -o test/ssl_cert_table_internal_test.o ../openssl/test/ssl_cert_table_internal_test.c clang -I. -Iinclude -I../openssl -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/handshake_helper.d.tmp -MT test/handshake_helper.o -c -o test/handshake_helper.o ../openssl/test/handshake_helper.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ssl_test.d.tmp -MT test/ssl_test.o -c -o test/ssl_test.o ../openssl/test/ssl_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ssl_test_ctx.d.tmp -MT test/ssl_test_ctx.o -c -o test/ssl_test_ctx.o ../openssl/test/ssl_test_ctx.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ssl_test_ctx_test.d.tmp -MT test/ssl_test_ctx_test.o -c -o test/ssl_test_ctx_test.o ../openssl/test/ssl_test_ctx_test.c clang -Iinclude -I. -I../openssl/include -I../openssl -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/sslapitest.d.tmp -MT test/sslapitest.o -c -o test/sslapitest.o ../openssl/test/sslapitest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/sslbuffertest.d.tmp -MT test/sslbuffertest.o -c -o test/sslbuffertest.o ../openssl/test/sslbuffertest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/sslcorrupttest.d.tmp -MT test/sslcorrupttest.o -c -o test/sslcorrupttest.o ../openssl/test/sslcorrupttest.c ../openssl/test/sslapitest.c:4252:24: error: implicit declaration of function 'setupearly_data_test' is invalid in C99 [-Werror,-Wimplicit-function-declaration] if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, ^ ../openssl/test/sslapitest.c:4263:69: error: use of undeclared identifier 'MSG1' if (!TEST_true(SSL_write_early_data(clientssl, MSG1, strlen(MSG1), ^ ../openssl/test/sslapitest.c:4263:56: error: use of undeclared identifier 'MSG1' if (!TEST_true(SSL_write_early_data(clientssl, MSG1, strlen(MSG1), ^ ../openssl/test/sslapitest.c:4265:52: error: use of undeclared identifier 'MSG1' || !TEST_size_t_eq(written, strlen(MSG1)) ^ ../openssl/test/sslapitest.c:4269:62: error: use of undeclared identifier 'MSG1' || !TEST_mem_eq(MSG1, readbytes, buf, strlen(MSG1)) ^ ../openssl/test/sslapitest.c:4269:33: error: use of undeclared identifier 'MSG1' || !TEST_mem_eq(MSG1, readbytes, buf, strlen(MSG1)) ^ 6 errors generated. Makefile:8709: recipe for target 'test/sslapitest.o' failed make[1]: *** [test/sslapitest.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory '/home/openssl/run-checker/no-ec' Makefile:171: recipe for target 'all' failed make: *** [all] Error 2 From matt at openssl.org Wed Apr 18 07:18:28 2018 From: matt at openssl.org (Matt Caswell) Date: Wed, 18 Apr 2018 07:18:28 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524035908.889005.5707.nullmailer@dev.openssl.org> The branch master has been updated via d4da95a7736e9e74ec47f9e0077ad0ef18a4faf6 (commit) via 01a2a65488e18b8b566bd4aa1b4a8b9adb9ecdf8 (commit) via cffe973c45491b14d980e3b578da28e4a79a8705 (commit) via 6329ce8fd8af653fb8fdde6d3fc09bdb0ec94031 (commit) from 55442b8a5b719f54578083fae0fcc814b599cd84 (commit) - Log ----------------------------------------------------------------- commit d4da95a7736e9e74ec47f9e0077ad0ef18a4faf6 Author: Peter Wu Date: Wed Mar 21 19:44:44 2018 +0100 test: Remove redundant SSL_CTX_set_max_early_data Client can only send early data if the PSK allows for it, the max_early_data_size field can only be configured for the server side. Reviewed-by: Rich Salz Reviewed-by: Richard Levitte Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/5702) commit 01a2a65488e18b8b566bd4aa1b4a8b9adb9ecdf8 Author: Peter Wu Date: Wed Mar 21 14:03:15 2018 +0100 Add support for logging early exporter secret This will be necessary to enable Wireshark to decrypt QUIC 0-RTT data. Reviewed-by: Rich Salz Reviewed-by: Richard Levitte Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/5702) commit cffe973c45491b14d980e3b578da28e4a79a8705 Author: Peter Wu Date: Wed Mar 21 14:00:42 2018 +0100 Add test for CLIENT_EARLY_TRAFFIC_SECRET key logging Reviewed-by: Rich Salz Reviewed-by: Richard Levitte Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/5702) commit 6329ce8fd8af653fb8fdde6d3fc09bdb0ec94031 Author: Peter Wu Date: Tue Mar 20 21:16:38 2018 +0100 Add support for logging TLS 1.3 exporter secret NSS 3.34 and boringssl have support for "EXPORTER_SECRET" (https://bugzilla.mozilla.org/show_bug.cgi?id=1287711) which is needed for QUIC 1-RTT decryption support in Wireshark. Reviewed-by: Rich Salz Reviewed-by: Richard Levitte Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/5702) ----------------------------------------------------------------------- Summary of changes: ssl/ssl_locl.h | 2 ++ ssl/tls13_enc.c | 12 ++++++++ test/sslapitest.c | 81 +++++++++++++++++++++++++++++++++++++++++++++++------ test/tls13ccstest.c | 2 -- 4 files changed, 87 insertions(+), 10 deletions(-) diff --git a/ssl/ssl_locl.h b/ssl/ssl_locl.h index b1d6e40..d881458 100644 --- a/ssl/ssl_locl.h +++ b/ssl/ssl_locl.h @@ -2554,6 +2554,8 @@ __owur int ssl_log_secret(SSL *ssl, const char *label, #define SERVER_HANDSHAKE_LABEL "SERVER_HANDSHAKE_TRAFFIC_SECRET" #define CLIENT_APPLICATION_LABEL "CLIENT_TRAFFIC_SECRET_0" #define SERVER_APPLICATION_LABEL "SERVER_TRAFFIC_SECRET_0" +#define EARLY_EXPORTER_SECRET_LABEL "EARLY_EXPORTER_SECRET" +#define EXPORTER_SECRET_LABEL "EXPORTER_SECRET" /* s3_cbc.c */ __owur char ssl3_cbc_record_digest_supported(const EVP_MD_CTX *ctx); diff --git a/ssl/tls13_enc.c b/ssl/tls13_enc.c index a793e0c..1613004 100644 --- a/ssl/tls13_enc.c +++ b/ssl/tls13_enc.c @@ -493,6 +493,12 @@ int tls13_change_cipher_state(SSL *s, int which) SSL_F_TLS13_CHANGE_CIPHER_STATE, ERR_R_INTERNAL_ERROR); goto err; } + + if (!ssl_log_secret(s, EARLY_EXPORTER_SECRET_LABEL, + s->early_exporter_master_secret, hashlen)) { + /* SSLfatal() already called */ + goto err; + } } else if (which & SSL3_CC_HANDSHAKE) { insecret = s->handshake_secret; finsecret = s->client_finished_secret; @@ -594,6 +600,12 @@ int tls13_change_cipher_state(SSL *s, int which) /* SSLfatal() already called */ goto err; } + + if (!ssl_log_secret(s, EXPORTER_SECRET_LABEL, s->exporter_master_secret, + hashlen)) { + /* SSLfatal() already called */ + goto err; + } } else if (label == client_application_traffic) memcpy(s->client_app_traffic_secret, secret, hashlen); diff --git a/test/sslapitest.c b/test/sslapitest.c index 338c61c..5fef058 100644 --- a/test/sslapitest.c +++ b/test/sslapitest.c @@ -28,7 +28,7 @@ static char *privkey = NULL; static char *srpvfile = NULL; static char *tmpfilename = NULL; -#define LOG_BUFFER_SIZE 1024 +#define LOG_BUFFER_SIZE 2048 static char server_log_buffer[LOG_BUFFER_SIZE + 1] = {0}; static size_t server_log_buffer_index = 0; static char client_log_buffer[LOG_BUFFER_SIZE + 1] = {0}; @@ -54,10 +54,13 @@ static X509 *ocspcert = NULL; struct sslapitest_log_counts { unsigned int rsa_key_exchange_count; unsigned int master_secret_count; + unsigned int client_early_secret_count; unsigned int client_handshake_secret_count; unsigned int server_handshake_secret_count; unsigned int client_application_secret_count; unsigned int server_application_secret_count; + unsigned int early_exporter_secret_count; + unsigned int exporter_secret_count; }; @@ -139,10 +142,13 @@ static int test_keylog_output(char *buffer, const SSL *ssl, size_t master_key_size = SSL_MAX_MASTER_KEY_LENGTH; unsigned int rsa_key_exchange_count = 0; unsigned int master_secret_count = 0; + unsigned int client_early_secret_count = 0; unsigned int client_handshake_secret_count = 0; unsigned int server_handshake_secret_count = 0; unsigned int client_application_secret_count = 0; unsigned int server_application_secret_count = 0; + unsigned int early_exporter_secret_count = 0; + unsigned int exporter_secret_count = 0; for (token = strtok(buffer, " \n"); token != NULL; token = strtok(NULL, " \n")) { @@ -196,17 +202,22 @@ static int test_keylog_output(char *buffer, const SSL *ssl, master_key_size))) return 0; master_secret_count++; - } else if (strcmp(token, "CLIENT_HANDSHAKE_TRAFFIC_SECRET") == 0 + } else if (strcmp(token, "CLIENT_EARLY_TRAFFIC_SECRET") == 0 + || strcmp(token, "CLIENT_HANDSHAKE_TRAFFIC_SECRET") == 0 || strcmp(token, "SERVER_HANDSHAKE_TRAFFIC_SECRET") == 0 || strcmp(token, "CLIENT_TRAFFIC_SECRET_0") == 0 - || strcmp(token, "SERVER_TRAFFIC_SECRET_0") == 0) { + || strcmp(token, "SERVER_TRAFFIC_SECRET_0") == 0 + || strcmp(token, "EARLY_EXPORTER_SECRET") == 0 + || strcmp(token, "EXPORTER_SECRET") == 0) { /* * TLSv1.3 secret. Tokens should be: 64 ASCII bytes of hex-encoded * client random, and then the hex-encoded secret. In this case, * we treat all of these secrets identically and then just * distinguish between them when counting what we saw. */ - if (strcmp(token, "CLIENT_HANDSHAKE_TRAFFIC_SECRET") == 0) + if (strcmp(token, "CLIENT_EARLY_TRAFFIC_SECRET") == 0) + client_early_secret_count++; + else if (strcmp(token, "CLIENT_HANDSHAKE_TRAFFIC_SECRET") == 0) client_handshake_secret_count++; else if (strcmp(token, "SERVER_HANDSHAKE_TRAFFIC_SECRET") == 0) server_handshake_secret_count++; @@ -214,6 +225,10 @@ static int test_keylog_output(char *buffer, const SSL *ssl, client_application_secret_count++; else if (strcmp(token, "SERVER_TRAFFIC_SECRET_0") == 0) server_application_secret_count++; + else if (strcmp(token, "EARLY_EXPORTER_SECRET") == 0) + early_exporter_secret_count++; + else if (strcmp(token, "EXPORTER_SECRET") == 0) + exporter_secret_count++; client_random_size = SSL_get_client_random(ssl, actual_client_random, @@ -247,6 +262,8 @@ static int test_keylog_output(char *buffer, const SSL *ssl, expected->rsa_key_exchange_count) || !TEST_size_t_eq(master_secret_count, expected->master_secret_count) + || !TEST_size_t_eq(client_early_secret_count, + expected->client_early_secret_count) || !TEST_size_t_eq(client_handshake_secret_count, expected->client_handshake_secret_count) || !TEST_size_t_eq(server_handshake_secret_count, @@ -254,7 +271,11 @@ static int test_keylog_output(char *buffer, const SSL *ssl, || !TEST_size_t_eq(client_application_secret_count, expected->client_application_secret_count) || !TEST_size_t_eq(server_application_secret_count, - expected->server_application_secret_count)) + expected->server_application_secret_count) + || !TEST_size_t_eq(early_exporter_secret_count, + expected->early_exporter_secret_count) + || !TEST_size_t_eq(exporter_secret_count, + expected->exporter_secret_count)) return 0; return 1; } @@ -344,8 +365,11 @@ static int test_keylog_no_master_key(void) { SSL_CTX *cctx = NULL, *sctx = NULL; SSL *clientssl = NULL, *serverssl = NULL; + SSL_SESSION *sess = NULL; int testresult = 0; struct sslapitest_log_counts expected = {0}; + unsigned char buf[1]; + size_t readbytes, written; /* Clean up logging space */ memset(client_log_buffer, 0, sizeof(client_log_buffer)); @@ -356,7 +380,9 @@ static int test_keylog_no_master_key(void) if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), TLS_client_method(), TLS1_VERSION, TLS_MAX_VERSION, - &sctx, &cctx, cert, privkey))) + &sctx, &cctx, cert, privkey)) + || !TEST_true(SSL_CTX_set_max_early_data(sctx, + SSL3_RT_MAX_PLAIN_LENGTH))) return 0; if (!TEST_true(SSL_CTX_get_keylog_callback(cctx) == NULL) @@ -390,6 +416,46 @@ static int test_keylog_no_master_key(void) expected.server_handshake_secret_count = 1; expected.client_application_secret_count = 1; expected.server_application_secret_count = 1; + expected.exporter_secret_count = 1; + if (!TEST_true(test_keylog_output(client_log_buffer, clientssl, + SSL_get_session(clientssl), &expected)) + || !TEST_true(test_keylog_output(server_log_buffer, serverssl, + SSL_get_session(serverssl), + &expected))) + goto end; + + /* Terminate old session and resume with early data. */ + sess = SSL_get1_session(clientssl); + SSL_shutdown(clientssl); + SSL_shutdown(serverssl); + SSL_free(serverssl); + SSL_free(clientssl); + serverssl = clientssl = NULL; + + /* Reset key log */ + memset(client_log_buffer, 0, sizeof(client_log_buffer)); + memset(server_log_buffer, 0, sizeof(server_log_buffer)); + client_log_buffer_index = 0; + server_log_buffer_index = 0; + + if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, + &clientssl, NULL, NULL)) + || !TEST_true(SSL_set_session(clientssl, sess)) + /* Here writing 0 length early data is enough. */ + || !TEST_true(SSL_write_early_data(clientssl, NULL, 0, &written)) + || !TEST_int_eq(SSL_read_early_data(serverssl, buf, sizeof(buf), + &readbytes), + SSL_READ_EARLY_DATA_ERROR) + || !TEST_int_eq(SSL_get_early_data_status(serverssl), + SSL_EARLY_DATA_ACCEPTED) + || !TEST_true(create_ssl_connection(serverssl, clientssl, + SSL_ERROR_NONE)) + || !TEST_true(SSL_session_reused(clientssl))) + goto end; + + /* In addition to the previous entries, expect early secrets. */ + expected.client_early_secret_count = 1; + expected.early_exporter_secret_count = 1; if (!TEST_true(test_keylog_output(client_log_buffer, clientssl, SSL_get_session(clientssl), &expected)) || !TEST_true(test_keylog_output(server_log_buffer, serverssl, @@ -400,6 +466,7 @@ static int test_keylog_no_master_key(void) testresult = 1; end: + SSL_SESSION_free(sess); SSL_free(serverssl); SSL_free(clientssl); SSL_CTX_free(sctx); @@ -1637,8 +1704,6 @@ static int setupearly_data_test(SSL_CTX **cctx, SSL_CTX **sctx, SSL **clientssl, TLS1_VERSION, TLS_MAX_VERSION, sctx, cctx, cert, privkey)) || !TEST_true(SSL_CTX_set_max_early_data(*sctx, - SSL3_RT_MAX_PLAIN_LENGTH)) - || !TEST_true(SSL_CTX_set_max_early_data(*cctx, SSL3_RT_MAX_PLAIN_LENGTH))) return 0; diff --git a/test/tls13ccstest.c b/test/tls13ccstest.c index 41e4896..25dc819 100644 --- a/test/tls13ccstest.c +++ b/test/tls13ccstest.c @@ -258,8 +258,6 @@ static int test_tls13ccs(int tst) TLS1_VERSION, TLS_MAX_VERSION, &sctx, &cctx, cert, privkey)) || !TEST_true(SSL_CTX_set_max_early_data(sctx, - SSL3_RT_MAX_PLAIN_LENGTH)) - || !TEST_true(SSL_CTX_set_max_early_data(cctx, SSL3_RT_MAX_PLAIN_LENGTH))) goto err; From matt at openssl.org Wed Apr 18 07:22:09 2018 From: matt at openssl.org (Matt Caswell) Date: Wed, 18 Apr 2018 07:22:09 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1524036129.668821.6991.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via 87b315965296273750ab69728648bbff331e1687 (commit) from 1d015368ebe245c4468522d152edfd8a1069426e (commit) - Log ----------------------------------------------------------------- commit 87b315965296273750ab69728648bbff331e1687 Author: Matt Caswell Date: Tue Apr 17 11:32:20 2018 +0100 Check the return from EVP_PKEY_get0_DH() Fixes #5934 Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5993) ----------------------------------------------------------------------- Summary of changes: ssl/statem/statem_srvr.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ssl/statem/statem_srvr.c b/ssl/statem/statem_srvr.c index c7cd9eb..f216db7 100644 --- a/ssl/statem/statem_srvr.c +++ b/ssl/statem/statem_srvr.c @@ -1698,6 +1698,12 @@ int tls_construct_server_key_exchange(SSL *s) } dh = EVP_PKEY_get0_DH(s->s3->tmp.pkey); + if (dh == NULL) { + al = SSL_AD_INTERNAL_ERROR; + SSLerr(SSL_F_TLS_CONSTRUCT_SERVER_KEY_EXCHANGE, + ERR_R_INTERNAL_ERROR); + goto err; + } EVP_PKEY_free(pkdh); pkdh = NULL; From matt at openssl.org Wed Apr 18 07:26:41 2018 From: matt at openssl.org (Matt Caswell) Date: Wed, 18 Apr 2018 07:26:41 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524036401.976943.8555.nullmailer@dev.openssl.org> The branch master has been updated via be93b0e8638287bfaa8239ef64ee1c4a7cd818cb (commit) from d4da95a7736e9e74ec47f9e0077ad0ef18a4faf6 (commit) - Log ----------------------------------------------------------------- commit be93b0e8638287bfaa8239ef64ee1c4a7cd818cb Author: Matt Caswell Date: Tue Apr 17 15:33:17 2018 +0100 Update EVP_DigestSignInit() docs Explicitly state which digests can be used with which algorithms. Fixes #5854 Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5992) ----------------------------------------------------------------------- Summary of changes: doc/man3/EVP_DigestSignInit.pod | 49 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/doc/man3/EVP_DigestSignInit.pod b/doc/man3/EVP_DigestSignInit.pod index 0c339fe..fc19c01 100644 --- a/doc/man3/EVP_DigestSignInit.pod +++ b/doc/man3/EVP_DigestSignInit.pod @@ -26,7 +26,54 @@ EVP_DigestSignInit() sets up signing context B to use digest B from ENGINE B and private key B. B must be created with EVP_MD_CTX_new() before calling this function. If B is not NULL the EVP_PKEY_CTX of the signing operation will be written to B<*pctx>: this can -be used to set alternative signing options. +be used to set alternative signing options. The digest B may be NULL if +the signing algorithm supports it. + +Only EVP_PKEY types that support signing can be used with these functions. This +includes MAC algorithms where the MAC generation is considered as a form of +"signing." Built-in EVP_PKEY types supported by these functions are CMAC, +Poly1305, DSA, HMAC, RSA, SipHash, Ed25519 and Ed448. + +Not all digests can be used for all key types. The following combinations apply. + +=over 4 + +=item DSA + +Supports SHA1, SHA224, SHA256, SHA384 and SHA512 + +=item ECDSA + +Supports SHA1, SHA224, SHA256, SHA384, SHA512 and SM3 + +=item RSA with no padding + +Supports no digests (the digest B must be NULL) + +=item RSA with X931 padding + +Supports SHA1, SHA256, SHA384 and SHA512 + +=item All other RSA padding types + +Support SHA1, SHA224, SHA256, SHA384, SHA512, MD5, MD5_SHA1, MD2, MD4, MDC2, +SHA3-224, SHA3-256, SHA3-384, SHA3-512 + +=item Ed25519 and Ed448 + +Support no digests (the digest B must be NULL) + +=item HMAC + +Supports any digest + +=item CMAC, Poly1305 and SipHash + +Will ignore any digest provided. + +=back + +If RSA-PSS is used and restrictions apply then the digest must match. EVP_DigestSignUpdate() hashes B bytes of data at B into the signature context B. This function can be called several times on the From matt at openssl.org Wed Apr 18 08:06:13 2018 From: matt at openssl.org (Matt Caswell) Date: Wed, 18 Apr 2018 08:06:13 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524038773.971323.15716.nullmailer@dev.openssl.org> The branch master has been updated via 2f8271ebcae747e3f69f940c7c9079c476a84174 (commit) from be93b0e8638287bfaa8239ef64ee1c4a7cd818cb (commit) - Log ----------------------------------------------------------------- commit 2f8271ebcae747e3f69f940c7c9079c476a84174 Author: FdaSilvaYY Date: Fri Sep 15 21:30:20 2017 +0200 Style: ssl.h fix some indents, and restrict to 80 cols some lines. Reviewed-by: Ben Kaduk Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/4466) ----------------------------------------------------------------------- Summary of changes: include/openssl/ssl.h | 306 ++++++++++++++++++++++++++------------------------ util/indent.pro | 1 + 2 files changed, 158 insertions(+), 149 deletions(-) diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h index bb64fe0..5acf77c 100644 --- a/include/openssl/ssl.h +++ b/include/openssl/ssl.h @@ -227,13 +227,11 @@ typedef struct srtp_protection_profile_st { DEFINE_STACK_OF(SRTP_PROTECTION_PROFILE) -typedef int (*tls_session_ticket_ext_cb_fn) (SSL *s, - const unsigned char *data, - int len, void *arg); -typedef int (*tls_session_secret_cb_fn) (SSL *s, void *secret, - int *secret_len, - STACK_OF(SSL_CIPHER) *peer_ciphers, - const SSL_CIPHER **cipher, void *arg); +typedef int (*tls_session_ticket_ext_cb_fn)(SSL *s, const unsigned char *data, + int len, void *arg); +typedef int (*tls_session_secret_cb_fn)(SSL *s, void *secret, int *secret_len, + STACK_OF(SSL_CIPHER) *peer_ciphers, + const SSL_CIPHER **cipher, void *arg); /* Extension context codes */ /* This extension is only allowed in TLS */ @@ -262,36 +260,36 @@ typedef int (*tls_session_secret_cb_fn) (SSL *s, void *secret, /* Typedefs for handling custom extensions */ -typedef int (*custom_ext_add_cb) (SSL *s, unsigned int ext_type, - const unsigned char **out, - size_t *outlen, int *al, void *add_arg); +typedef int (*custom_ext_add_cb)(SSL *s, unsigned int ext_type, + const unsigned char **out, size_t *outlen, + int *al, void *add_arg); -typedef void (*custom_ext_free_cb) (SSL *s, unsigned int ext_type, - const unsigned char *out, void *add_arg); +typedef void (*custom_ext_free_cb)(SSL *s, unsigned int ext_type, + const unsigned char *out, void *add_arg); -typedef int (*custom_ext_parse_cb) (SSL *s, unsigned int ext_type, - const unsigned char *in, - size_t inlen, int *al, void *parse_arg); +typedef int (*custom_ext_parse_cb)(SSL *s, unsigned int ext_type, + const unsigned char *in, size_t inlen, + int *al, void *parse_arg); -typedef int (*SSL_custom_ext_add_cb_ex) (SSL *s, unsigned int ext_type, - unsigned int context, - const unsigned char **out, - size_t *outlen, X509 *x, - size_t chainidx, - int *al, void *add_arg); +typedef int (*SSL_custom_ext_add_cb_ex)(SSL *s, unsigned int ext_type, + unsigned int context, + const unsigned char **out, + size_t *outlen, X509 *x, + size_t chainidx, + int *al, void *add_arg); -typedef void (*SSL_custom_ext_free_cb_ex) (SSL *s, unsigned int ext_type, - unsigned int context, - const unsigned char *out, - void *add_arg); +typedef void (*SSL_custom_ext_free_cb_ex)(SSL *s, unsigned int ext_type, + unsigned int context, + const unsigned char *out, + void *add_arg); -typedef int (*SSL_custom_ext_parse_cb_ex) (SSL *s, unsigned int ext_type, - unsigned int context, - const unsigned char *in, - size_t inlen, X509 *x, - size_t chainidx, - int *al, void *parse_arg); +typedef int (*SSL_custom_ext_parse_cb_ex)(SSL *s, unsigned int ext_type, + unsigned int context, + const unsigned char *in, + size_t inlen, X509 *x, + size_t chainidx, + int *al, void *parse_arg); /* Typedef for verification callback */ typedef int (*SSL_verify_cb)(int preverify_ok, X509_STORE_CTX *x509_ctx); @@ -565,7 +563,7 @@ typedef int (*SSL_verify_cb)(int preverify_ok, X509_STORE_CTX *x509_ctx); */ unsigned long SSL_CTX_get_options(const SSL_CTX *ctx); -unsigned long SSL_get_options(const SSL* s); +unsigned long SSL_get_options(const SSL *s); unsigned long SSL_CTX_clear_options(SSL_CTX *ctx, unsigned long op); unsigned long SSL_clear_options(SSL *s, unsigned long op); unsigned long SSL_CTX_set_options(SSL_CTX *ctx, unsigned long op); @@ -698,8 +696,7 @@ int (*SSL_CTX_sess_get_new_cb(SSL_CTX *ctx)) (struct ssl_st *ssl, void SSL_CTX_sess_set_remove_cb(SSL_CTX *ctx, void (*remove_session_cb) (struct ssl_ctx_st *ctx, - SSL_SESSION - *sess)); + SSL_SESSION *sess)); void (*SSL_CTX_sess_get_remove_cb(SSL_CTX *ctx)) (struct ssl_ctx_st *ctx, SSL_SESSION *sess); void SSL_CTX_sess_set_get_cb(SSL_CTX *ctx, @@ -712,8 +709,7 @@ SSL_SESSION *(*SSL_CTX_sess_get_get_cb(SSL_CTX *ctx)) (struct ssl_st *ssl, const unsigned char *data, int len, int *copy); void SSL_CTX_set_info_callback(SSL_CTX *ctx, - void (*cb) (const SSL *ssl, int type, - int val)); + void (*cb) (const SSL *ssl, int type, int val)); void (*SSL_CTX_get_info_callback(SSL_CTX *ctx)) (const SSL *ssl, int type, int val); void SSL_CTX_set_client_cert_cb(SSL_CTX *ctx, @@ -732,8 +728,8 @@ void SSL_CTX_set_cookie_generate_cb(SSL_CTX *ctx, *cookie_len)); void SSL_CTX_set_cookie_verify_cb(SSL_CTX *ctx, int (*app_verify_cookie_cb) (SSL *ssl, - const unsigned char - *cookie, + const unsigned + char *cookie, unsigned int cookie_len)); @@ -754,8 +750,8 @@ typedef int (*SSL_CTX_npn_advertised_cb_func)(SSL *ssl, unsigned int *outlen, void *arg); void SSL_CTX_set_next_protos_advertised_cb(SSL_CTX *s, - SSL_CTX_npn_advertised_cb_func cb, - void *arg); + SSL_CTX_npn_advertised_cb_func cb, + void *arg); # define SSL_CTX_set_npn_advertised_cb SSL_CTX_set_next_protos_advertised_cb typedef int (*SSL_CTX_npn_select_cb_func)(SSL *s, @@ -775,9 +771,9 @@ void SSL_get0_next_proto_negotiated(const SSL *s, const unsigned char **data, # endif __owur int SSL_select_next_proto(unsigned char **out, unsigned char *outlen, - const unsigned char *in, unsigned int inlen, - const unsigned char *client, - unsigned int client_len); + const unsigned char *in, unsigned int inlen, + const unsigned char *client, + unsigned int client_len); # define OPENSSL_NPN_UNSUPPORTED 0 # define OPENSSL_NPN_NEGOTIATED 1 @@ -849,19 +845,21 @@ void SSL_CTX_set_psk_use_session_callback(SSL_CTX *ctx, __owur int SSL_CTX_has_client_custom_ext(const SSL_CTX *ctx, unsigned int ext_type); -__owur int SSL_CTX_add_client_custom_ext(SSL_CTX *ctx, unsigned int ext_type, - custom_ext_add_cb add_cb, - custom_ext_free_cb free_cb, - void *add_arg, - custom_ext_parse_cb parse_cb, - void *parse_arg); - -__owur int SSL_CTX_add_server_custom_ext(SSL_CTX *ctx, unsigned int ext_type, - custom_ext_add_cb add_cb, - custom_ext_free_cb free_cb, - void *add_arg, - custom_ext_parse_cb parse_cb, - void *parse_arg); +__owur int SSL_CTX_add_client_custom_ext(SSL_CTX *ctx, + unsigned int ext_type, + custom_ext_add_cb add_cb, + custom_ext_free_cb free_cb, + void *add_arg, + custom_ext_parse_cb parse_cb, + void *parse_arg); + +__owur int SSL_CTX_add_server_custom_ext(SSL_CTX *ctx, + unsigned int ext_type, + custom_ext_add_cb add_cb, + custom_ext_free_cb free_cb, + void *add_arg, + custom_ext_parse_cb parse_cb, + void *parse_arg); __owur int SSL_CTX_add_custom_ext(SSL_CTX *ctx, unsigned int ext_type, unsigned int context, @@ -1423,39 +1421,38 @@ DECLARE_PEM_rw(SSL_SESSION, SSL_SESSION) SSL_ctrl(s,SSL_CTRL_GET_RAW_CIPHERLIST,0,plst) # define SSL_get0_ec_point_formats(s, plst) \ SSL_ctrl(s,SSL_CTRL_GET_EC_POINT_FORMATS,0,plst) -#define SSL_CTX_set_min_proto_version(ctx, version) \ +# define SSL_CTX_set_min_proto_version(ctx, version) \ SSL_CTX_ctrl(ctx, SSL_CTRL_SET_MIN_PROTO_VERSION, version, NULL) -#define SSL_CTX_set_max_proto_version(ctx, version) \ +# define SSL_CTX_set_max_proto_version(ctx, version) \ SSL_CTX_ctrl(ctx, SSL_CTRL_SET_MAX_PROTO_VERSION, version, NULL) -#define SSL_CTX_get_min_proto_version(ctx) \ +# define SSL_CTX_get_min_proto_version(ctx) \ SSL_CTX_ctrl(ctx, SSL_CTRL_GET_MIN_PROTO_VERSION, 0, NULL) -#define SSL_CTX_get_max_proto_version(ctx) \ +# define SSL_CTX_get_max_proto_version(ctx) \ SSL_CTX_ctrl(ctx, SSL_CTRL_GET_MAX_PROTO_VERSION, 0, NULL) -#define SSL_set_min_proto_version(s, version) \ +# define SSL_set_min_proto_version(s, version) \ SSL_ctrl(s, SSL_CTRL_SET_MIN_PROTO_VERSION, version, NULL) -#define SSL_set_max_proto_version(s, version) \ +# define SSL_set_max_proto_version(s, version) \ SSL_ctrl(s, SSL_CTRL_SET_MAX_PROTO_VERSION, version, NULL) -#define SSL_get_min_proto_version(s) \ +# define SSL_get_min_proto_version(s) \ SSL_ctrl(s, SSL_CTRL_GET_MIN_PROTO_VERSION, 0, NULL) -#define SSL_get_max_proto_version(s) \ +# define SSL_get_max_proto_version(s) \ SSL_ctrl(s, SSL_CTRL_GET_MAX_PROTO_VERSION, 0, NULL) -#if OPENSSL_API_COMPAT < 0x10100000L +# if OPENSSL_API_COMPAT < 0x10100000L /* Provide some compatibility macros for removed functionality. */ -# define SSL_CTX_need_tmp_RSA(ctx) 0 -# define SSL_CTX_set_tmp_rsa(ctx,rsa) 1 -# define SSL_need_tmp_RSA(ssl) 0 -# define SSL_set_tmp_rsa(ssl,rsa) 1 -# define SSL_CTX_set_ecdh_auto(dummy, onoff) ((onoff) != 0) -# define SSL_set_ecdh_auto(dummy, onoff) ((onoff) != 0) +# define SSL_CTX_need_tmp_RSA(ctx) 0 +# define SSL_CTX_set_tmp_rsa(ctx,rsa) 1 +# define SSL_need_tmp_RSA(ssl) 0 +# define SSL_set_tmp_rsa(ssl,rsa) 1 +# define SSL_CTX_set_ecdh_auto(dummy, onoff) ((onoff) != 0) +# define SSL_set_ecdh_auto(dummy, onoff) ((onoff) != 0) /* * We "pretend" to call the callback to avoid warnings about unused static * functions. */ -# define SSL_CTX_set_tmp_rsa_callback(ctx, cb) while(0) (cb)(NULL, 0, 0) -# define SSL_set_tmp_rsa_callback(ssl, cb) while(0) (cb)(NULL, 0, 0) -#endif - +# define SSL_CTX_set_tmp_rsa_callback(ctx, cb) while(0) (cb)(NULL, 0, 0) +# define SSL_set_tmp_rsa_callback(ssl, cb) while(0) (cb)(NULL, 0, 0) +# endif __owur const BIO_METHOD *BIO_f_ssl(void); __owur BIO *BIO_new_ssl(SSL_CTX *ctx, int client); __owur BIO *BIO_new_ssl_connect(SSL_CTX *ctx); @@ -1521,11 +1518,12 @@ void SSL_set_verify_depth(SSL *s, int depth); void SSL_set_cert_cb(SSL *s, int (*cb) (SSL *ssl, void *arg), void *arg); # ifndef OPENSSL_NO_RSA __owur int SSL_use_RSAPrivateKey(SSL *ssl, RSA *rsa); -__owur int SSL_use_RSAPrivateKey_ASN1(SSL *ssl, const unsigned char *d, long len); +__owur int SSL_use_RSAPrivateKey_ASN1(SSL *ssl, const unsigned char *d, + long len); # endif __owur int SSL_use_PrivateKey(SSL *ssl, EVP_PKEY *pkey); __owur int SSL_use_PrivateKey_ASN1(int pk, SSL *ssl, const unsigned char *d, - long len); + long len); __owur int SSL_use_certificate(SSL *ssl, X509 *x); __owur int SSL_use_certificate_ASN1(SSL *ssl, const unsigned char *d, int len); __owur int SSL_use_cert_and_key(SSL *ssl, X509 *x509, EVP_PKEY *privatekey, @@ -1538,7 +1536,7 @@ __owur int SSL_use_cert_and_key(SSL *ssl, X509 *x509, EVP_PKEY *privatekey, /* Set serverinfo data for the current active cert. */ __owur int SSL_CTX_use_serverinfo(SSL_CTX *ctx, const unsigned char *serverinfo, - size_t serverinfo_length); + size_t serverinfo_length); __owur int SSL_CTX_use_serverinfo_ex(SSL_CTX *ctx, unsigned int version, const unsigned char *serverinfo, size_t serverinfo_length); @@ -1552,24 +1550,27 @@ __owur int SSL_use_PrivateKey_file(SSL *ssl, const char *file, int type); __owur int SSL_use_certificate_file(SSL *ssl, const char *file, int type); #ifndef OPENSSL_NO_RSA -__owur int SSL_CTX_use_RSAPrivateKey_file(SSL_CTX *ctx, const char *file, int type); +__owur int SSL_CTX_use_RSAPrivateKey_file(SSL_CTX *ctx, const char *file, + int type); #endif -__owur int SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, const char *file, int type); -__owur int SSL_CTX_use_certificate_file(SSL_CTX *ctx, const char *file, int type); +__owur int SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, const char *file, + int type); +__owur int SSL_CTX_use_certificate_file(SSL_CTX *ctx, const char *file, + int type); /* PEM type */ __owur int SSL_CTX_use_certificate_chain_file(SSL_CTX *ctx, const char *file); __owur int SSL_use_certificate_chain_file(SSL *ssl, const char *file); __owur STACK_OF(X509_NAME) *SSL_load_client_CA_file(const char *file); __owur int SSL_add_file_cert_subjects_to_stack(STACK_OF(X509_NAME) *stackCAs, - const char *file); + const char *file); int SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stackCAs, const char *dir); -#if OPENSSL_API_COMPAT < 0x10100000L -# define SSL_load_error_strings() \ +# if OPENSSL_API_COMPAT < 0x10100000L +# define SSL_load_error_strings() \ OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS \ | OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL) -#endif +# endif __owur const char *SSL_state_string(const SSL *s); __owur const char *SSL_rstate_string(const SSL *s); @@ -1595,14 +1596,15 @@ __owur int SSL_SESSION_set_cipher(SSL_SESSION *s, const SSL_CIPHER *cipher); __owur int SSL_SESSION_has_ticket(const SSL_SESSION *s); __owur unsigned long SSL_SESSION_get_ticket_lifetime_hint(const SSL_SESSION *s); void SSL_SESSION_get0_ticket(const SSL_SESSION *s, const unsigned char **tick, - size_t *len); + size_t *len); __owur uint32_t SSL_SESSION_get_max_early_data(const SSL_SESSION *s); __owur int SSL_SESSION_set_max_early_data(SSL_SESSION *s, uint32_t max_early_data); __owur int SSL_copy_session_id(SSL *to, const SSL *from); __owur X509 *SSL_SESSION_get0_peer(SSL_SESSION *s); -__owur int SSL_SESSION_set1_id_context(SSL_SESSION *s, const unsigned char *sid_ctx, - unsigned int sid_ctx_len); +__owur int SSL_SESSION_set1_id_context(SSL_SESSION *s, + const unsigned char *sid_ctx, + unsigned int sid_ctx_len); __owur int SSL_SESSION_set1_id(SSL_SESSION *s, const unsigned char *sid, unsigned int sid_len); __owur int SSL_SESSION_is_resumable(const SSL_SESSION *s); @@ -1612,7 +1614,7 @@ __owur SSL_SESSION *SSL_SESSION_dup(SSL_SESSION *src); const unsigned char *SSL_SESSION_get_id(const SSL_SESSION *s, unsigned int *len); const unsigned char *SSL_SESSION_get0_id_context(const SSL_SESSION *s, - unsigned int *len); + unsigned int *len); __owur unsigned int SSL_SESSION_get_compress_id(const SSL_SESSION *s); # ifndef OPENSSL_NO_STDIO int SSL_SESSION_print_fp(FILE *fp, const SSL_SESSION *ses); @@ -1623,12 +1625,13 @@ int SSL_SESSION_up_ref(SSL_SESSION *ses); void SSL_SESSION_free(SSL_SESSION *ses); __owur int i2d_SSL_SESSION(SSL_SESSION *in, unsigned char **pp); __owur int SSL_set_session(SSL *to, SSL_SESSION *session); -int SSL_CTX_add_session(SSL_CTX *s, SSL_SESSION *c); -int SSL_CTX_remove_session(SSL_CTX *, SSL_SESSION *c); -__owur int SSL_CTX_set_generate_session_id(SSL_CTX *, GEN_SESSION_CB); -__owur int SSL_set_generate_session_id(SSL *, GEN_SESSION_CB); -__owur int SSL_has_matching_session_id(const SSL *ssl, const unsigned char *id, - unsigned int id_len); +int SSL_CTX_add_session(SSL_CTX *ctx, SSL_SESSION *session); +int SSL_CTX_remove_session(SSL_CTX *ctx, SSL_SESSION *session); +__owur int SSL_CTX_set_generate_session_id(SSL_CTX *ctx, GEN_SESSION_CB cb); +__owur int SSL_set_generate_session_id(SSL *s, GEN_SESSION_CB cb); +__owur int SSL_has_matching_session_id(const SSL *s, + const unsigned char *id, + unsigned int id_len); SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp, long length); @@ -1651,14 +1654,14 @@ void SSL_CTX_set_cert_cb(SSL_CTX *c, int (*cb) (SSL *ssl, void *arg), # ifndef OPENSSL_NO_RSA __owur int SSL_CTX_use_RSAPrivateKey(SSL_CTX *ctx, RSA *rsa); __owur int SSL_CTX_use_RSAPrivateKey_ASN1(SSL_CTX *ctx, const unsigned char *d, - long len); + long len); # endif __owur int SSL_CTX_use_PrivateKey(SSL_CTX *ctx, EVP_PKEY *pkey); __owur int SSL_CTX_use_PrivateKey_ASN1(int pk, SSL_CTX *ctx, - const unsigned char *d, long len); + const unsigned char *d, long len); __owur int SSL_CTX_use_certificate(SSL_CTX *ctx, X509 *x); __owur int SSL_CTX_use_certificate_ASN1(SSL_CTX *ctx, int len, - const unsigned char *d); + const unsigned char *d); __owur int SSL_CTX_use_cert_and_key(SSL_CTX *ctx, X509 *x509, EVP_PKEY *privatekey, STACK_OF(X509) *chain, int override); @@ -1674,19 +1677,20 @@ void *SSL_get_default_passwd_cb_userdata(SSL *s); __owur int SSL_CTX_check_private_key(const SSL_CTX *ctx); __owur int SSL_check_private_key(const SSL *ctx); -__owur int SSL_CTX_set_session_id_context(SSL_CTX *ctx, const unsigned char *sid_ctx, - unsigned int sid_ctx_len); +__owur int SSL_CTX_set_session_id_context(SSL_CTX *ctx, + const unsigned char *sid_ctx, + unsigned int sid_ctx_len); SSL *SSL_new(SSL_CTX *ctx); int SSL_up_ref(SSL *s); int SSL_is_dtls(const SSL *s); __owur int SSL_set_session_id_context(SSL *ssl, const unsigned char *sid_ctx, - unsigned int sid_ctx_len); + unsigned int sid_ctx_len); -__owur int SSL_CTX_set_purpose(SSL_CTX *s, int purpose); -__owur int SSL_set_purpose(SSL *s, int purpose); -__owur int SSL_CTX_set_trust(SSL_CTX *s, int trust); -__owur int SSL_set_trust(SSL *s, int trust); +__owur int SSL_CTX_set_purpose(SSL_CTX *ctx, int purpose); +__owur int SSL_set_purpose(SSL *ssl, int purpose); +__owur int SSL_CTX_set_trust(SSL_CTX *ctx, int trust); +__owur int SSL_set_trust(SSL *ssl, int trust); __owur int SSL_set1_host(SSL *s, const char *hostname); __owur int SSL_add1_host(SSL *s, const char *hostname); @@ -1817,8 +1821,8 @@ __owur int SSL_CTX_set_ssl_version(SSL_CTX *ctx, const SSL_METHOD *meth); # ifndef OPENSSL_NO_SSL3_METHOD DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *SSLv3_method(void)) /* SSLv3 */ -DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *SSLv3_server_method(void)) /* SSLv3 */ -DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *SSLv3_client_method(void)) /* SSLv3 */ +DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *SSLv3_server_method(void)) +DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *SSLv3_client_method(void)) # endif #define SSLv23_method TLS_method @@ -1832,33 +1836,34 @@ __owur const SSL_METHOD *TLS_client_method(void); # ifndef OPENSSL_NO_TLS1_METHOD DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_method(void)) /* TLSv1.0 */ -DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_server_method(void)) /* TLSv1.0 */ -DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_client_method(void)) /* TLSv1.0 */ +DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_server_method(void)) +DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_client_method(void)) # endif # ifndef OPENSSL_NO_TLS1_1_METHOD DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_1_method(void)) /* TLSv1.1 */ -DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_1_server_method(void)) /* TLSv1.1 */ -DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_1_client_method(void)) /* TLSv1.1 */ +DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_1_server_method(void)) +DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_1_client_method(void)) # endif # ifndef OPENSSL_NO_TLS1_2_METHOD DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_2_method(void)) /* TLSv1.2 */ -DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_2_server_method(void)) /* TLSv1.2 */ -DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_2_client_method(void)) /* TLSv1.2 */ +DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_2_server_method(void)) +DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_2_client_method(void)) # endif # ifndef OPENSSL_NO_DTLS1_METHOD DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *DTLSv1_method(void)) /* DTLSv1.0 */ -DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *DTLSv1_server_method(void)) /* DTLSv1.0 */ -DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *DTLSv1_client_method(void)) /* DTLSv1.0 */ +DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *DTLSv1_server_method(void)) +DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *DTLSv1_client_method(void)) # endif # ifndef OPENSSL_NO_DTLS1_2_METHOD -DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *DTLSv1_2_method(void)) /* DTLSv1.2 */ -DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *DTLSv1_2_server_method(void)) /* DTLSv1.2 */ -DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *DTLSv1_2_client_method(void)) /* DTLSv1.2 */ -#endif +/* DTLSv1.2 */ +DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *DTLSv1_2_method(void)) +DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *DTLSv1_2_server_method(void)) +DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *DTLSv1_2_client_method(void)) +# endif __owur const SSL_METHOD *DTLS_method(void); /* DTLS 1.0 and 1.2 */ __owur const SSL_METHOD *DTLS_server_method(void); /* DTLS 1.0 and 1.2 */ @@ -1909,9 +1914,9 @@ void SSL_set_accept_state(SSL *s); __owur long SSL_get_default_timeout(const SSL *s); -#if OPENSSL_API_COMPAT < 0x10100000L -# define SSL_library_init() OPENSSL_init_ssl(0, NULL) -#endif +# if OPENSSL_API_COMPAT < 0x10100000L +# define SSL_library_init() OPENSSL_init_ssl(0, NULL) +# endif __owur char *SSL_CIPHER_description(const SSL_CIPHER *, char *buf, int size); __owur STACK_OF(X509_NAME) *SSL_dup_CA_list(const STACK_OF(X509_NAME) *sk); @@ -1921,7 +1926,8 @@ __owur SSL *SSL_dup(SSL *ssl); __owur X509 *SSL_get_certificate(const SSL *ssl); /* * EVP_PKEY - */ struct evp_pkey_st *SSL_get_privatekey(const SSL *ssl); + */ +struct evp_pkey_st *SSL_get_privatekey(const SSL *ssl); __owur X509 *SSL_CTX_get0_certificate(const SSL_CTX *ctx); __owur EVP_PKEY *SSL_CTX_get0_privatekey(const SSL_CTX *ctx); @@ -1938,7 +1944,7 @@ __owur int SSL_CTX_set_default_verify_paths(SSL_CTX *ctx); __owur int SSL_CTX_set_default_verify_dir(SSL_CTX *ctx); __owur int SSL_CTX_set_default_verify_file(SSL_CTX *ctx); __owur int SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile, - const char *CApath); + const char *CApath); # define SSL_get0_session SSL_get_session/* just peek at pointer */ __owur SSL_SESSION *SSL_get_session(const SSL *ssl); __owur SSL_SESSION *SSL_get1_session(SSL *ssl); /* obtain a reference count */ @@ -2036,10 +2042,10 @@ __owur const char *SSL_COMP_get0_name(const SSL_COMP *comp); __owur int SSL_COMP_get_id(const SSL_COMP *comp); STACK_OF(SSL_COMP) *SSL_COMP_get_compression_methods(void); __owur STACK_OF(SSL_COMP) *SSL_COMP_set0_compression_methods(STACK_OF(SSL_COMP) - *meths); -#if OPENSSL_API_COMPAT < 0x10100000L -# define SSL_COMP_free_compression_methods() while(0) continue -#endif + *meths); +# if OPENSSL_API_COMPAT < 0x10100000L +# define SSL_COMP_free_compression_methods() while(0) continue +# endif __owur int SSL_COMP_add_compression_method(int id, COMP_METHOD *cm); const SSL_CIPHER *SSL_CIPHER_find(SSL *ssl, const unsigned char *ptr); @@ -2052,13 +2058,14 @@ int SSL_bytes_to_cipher_list(SSL *s, const unsigned char *bytes, size_t len, /* TLS extensions functions */ __owur int SSL_set_session_ticket_ext(SSL *s, void *ext_data, int ext_len); -__owur int SSL_set_session_ticket_ext_cb(SSL *s, tls_session_ticket_ext_cb_fn cb, - void *arg); +__owur int SSL_set_session_ticket_ext_cb(SSL *s, + tls_session_ticket_ext_cb_fn cb, + void *arg); /* Pre-shared secret session resumption functions */ __owur int SSL_set_session_secret_cb(SSL *s, - tls_session_secret_cb_fn tls_session_secret_cb, - void *arg); + tls_session_secret_cb_fn session_secret_cb, + void *arg); void SSL_CTX_set_not_resumable_session_callback(SSL_CTX *ctx, int (*cb) (SSL *ssl, @@ -2067,8 +2074,7 @@ void SSL_CTX_set_not_resumable_session_callback(SSL_CTX *ctx, void SSL_set_not_resumable_session_callback(SSL *ssl, int (*cb) (SSL *ssl, - int - is_forward_secure)); + int is_forward_secure)); void SSL_CTX_set_record_padding_callback(SSL_CTX *ctx, size_t (*cb) (SSL *ssl, int type, @@ -2095,7 +2101,8 @@ __owur __owur SSL_CONF_CTX *SSL_CONF_CTX_new(void); int SSL_CONF_CTX_finish(SSL_CONF_CTX *cctx); void SSL_CONF_CTX_free(SSL_CONF_CTX *cctx); unsigned int SSL_CONF_CTX_set_flags(SSL_CONF_CTX *cctx, unsigned int flags); -__owur unsigned int SSL_CONF_CTX_clear_flags(SSL_CONF_CTX *cctx, unsigned int flags); +__owur unsigned int SSL_CONF_CTX_clear_flags(SSL_CONF_CTX *cctx, + unsigned int flags); __owur int SSL_CONF_CTX_set1_prefix(SSL_CONF_CTX *cctx, const char *pre); void SSL_CONF_CTX_set_ssl(SSL_CONF_CTX *cctx, SSL *ssl); @@ -2126,8 +2133,8 @@ int DTLSv1_listen(SSL *s, BIO_ADDR *client); * May return a negative integer if an error occurs. * A connection should be aborted if the SCTs are deemed insufficient. */ -typedef int(*ssl_ct_validation_cb)(const CT_POLICY_EVAL_CTX *ctx, - const STACK_OF(SCT) *scts, void *arg); +typedef int (*ssl_ct_validation_cb)(const CT_POLICY_EVAL_CTX *ctx, + const STACK_OF(SCT) *scts, void *arg); /* * Sets a |callback| that is invoked upon receipt of ServerHelloDone to validate @@ -2277,21 +2284,22 @@ const CTLOG_STORE *SSL_CTX_get0_ctlog_store(const SSL_CTX *ctx); void SSL_set_security_level(SSL *s, int level); __owur int SSL_get_security_level(const SSL *s); void SSL_set_security_callback(SSL *s, - int (*cb) (const SSL *s, const SSL_CTX *ctx, int op, - int bits, int nid, void *other, - void *ex)); -int (*SSL_get_security_callback(const SSL *s)) (const SSL *s, const SSL_CTX *ctx, int op, - int bits, int nid, - void *other, void *ex); + int (*cb) (const SSL *s, const SSL_CTX *ctx, + int op, int bits, int nid, + void *other, void *ex)); +int (*SSL_get_security_callback(const SSL *s)) (const SSL *s, + const SSL_CTX *ctx, int op, + int bits, int nid, void *other, + void *ex); void SSL_set0_security_ex_data(SSL *s, void *ex); __owur void *SSL_get0_security_ex_data(const SSL *s); void SSL_CTX_set_security_level(SSL_CTX *ctx, int level); __owur int SSL_CTX_get_security_level(const SSL_CTX *ctx); void SSL_CTX_set_security_callback(SSL_CTX *ctx, - int (*cb) (const SSL *s, const SSL_CTX *ctx, int op, - int bits, int nid, void *other, - void *ex)); + int (*cb) (const SSL *s, const SSL_CTX *ctx, + int op, int bits, int nid, + void *other, void *ex)); int (*SSL_CTX_get_security_callback(const SSL_CTX *ctx)) (const SSL *s, const SSL_CTX *ctx, int op, int bits, @@ -2302,10 +2310,10 @@ void SSL_CTX_set0_security_ex_data(SSL_CTX *ctx, void *ex); __owur void *SSL_CTX_get0_security_ex_data(const SSL_CTX *ctx); /* OPENSSL_INIT flag 0x010000 reserved for internal use */ -#define OPENSSL_INIT_NO_LOAD_SSL_STRINGS 0x00100000L -#define OPENSSL_INIT_LOAD_SSL_STRINGS 0x00200000L +# define OPENSSL_INIT_NO_LOAD_SSL_STRINGS 0x00100000L +# define OPENSSL_INIT_LOAD_SSL_STRINGS 0x00200000L -#define OPENSSL_INIT_SSL_DEFAULT \ +# define OPENSSL_INIT_SSL_DEFAULT \ (OPENSSL_INIT_LOAD_SSL_STRINGS | OPENSSL_INIT_LOAD_CRYPTO_STRINGS) int OPENSSL_init_ssl(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings); diff --git a/util/indent.pro b/util/indent.pro index 7bb7bcd..1802646 100644 --- a/util/indent.pro +++ b/util/indent.pro @@ -636,3 +636,4 @@ -T ossl_intmax_t -T ossl_uintmax_t -T ossl_uintmax_t +-T CT_POLICY_EVAL_CTX From openssl at openssl.org Wed Apr 18 08:29:50 2018 From: openssl at openssl.org (OpenSSL run-checker) Date: Wed, 18 Apr 2018 08:29:50 +0000 Subject: [openssl-commits] FAILED build of OpenSSL branch master with options -d --strict-warnings no-tls Message-ID: <1524040190.446885.14018.nullmailer@run.openssl.org> Platform and configuration command: $ uname -a Linux run 4.4.0-119-generic #143-Ubuntu SMP Mon Apr 2 16:08:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux $ CC=clang ../openssl/config -d --strict-warnings no-tls Commit log since last time: 55442b8 BIGNUM signed add/sub routines refactory 9f2a3bb Fix a memory leak in an error path a682365 Check the return from EVP_PKEY_get0_DH() 7d4488b Extend the SSL_set_bio() tests bd7775e Fix assertion failure in SSL_set_bio() 2bdeffe Update fingerprints.txt 5bbf42a Update the info callback documentation for TLSv1.3 5718fe4 Add a test for the info callback 7f9f5f7 Make sure info callback knows about all handshake start events c2c1d8a Call the info callback on all handshake done events ded4a83 Ignore the status_request extension in a resumption handshake a12de2c SSL_CTX_set_tlsext_ticket_key_cb.pod: fix error check of RAND_bytes() call e62fb0d p5_scrypt.c: fix error check of RAND_bytes() call 43687d6 DRBG: fix coverity issues 826e154 apps/s_socket.c: print only dynamically allocated port in do_server. dbabc86 Add a config option to disable automatic config loading a051af0 Prepare for 1.1.1-pre6-dev 4ff3df1 Prepare for 1.1.1-pre5 release 2842813 Update copyright year 6761890 OpenSSL 1.1.1-pre5: update CHANGES with recent user visible changes Build log ended with (last 100 lines): /usr/bin/perl ../openssl/test/generate_buildtest.pl x509_vfy > test/buildtest_x509_vfy.c /usr/bin/perl ../openssl/test/generate_buildtest.pl x509v3 > test/buildtest_x509v3.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/casttest.d.tmp -MT test/casttest.o -c -o test/casttest.o ../openssl/test/casttest.c clang -I. -Iinclude -Icrypto/include -I../openssl -I../openssl/include -I../openssl/crypto/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/chacha_internal_test.d.tmp -MT test/chacha_internal_test.o -c -o test/chacha_internal_test.o ../openssl/test/chacha_internal_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/cipherbytes_test.d.tmp -MT test/cipherbytes_test.o -c -o test/cipherbytes_test.o ../openssl/test/cipherbytes_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/cipherlist_test.d.tmp -MT test/cipherlist_test.o -c -o test/cipherlist_test.o ../openssl/test/cipherlist_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ciphername_test.d.tmp -MT test/ciphername_test.o -c -o test/ciphername_test.o ../openssl/test/ciphername_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/clienthellotest.d.tmp -MT test/clienthellotest.o -c -o test/clienthellotest.o ../openssl/test/clienthellotest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/conf_include_test.d.tmp -MT test/conf_include_test.o -c -o test/conf_include_test.o ../openssl/test/conf_include_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/constant_time_test.d.tmp -MT test/constant_time_test.o -c -o test/constant_time_test.o ../openssl/test/constant_time_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/crltest.d.tmp -MT test/crltest.o -c -o test/crltest.o ../openssl/test/crltest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ct_test.d.tmp -MT test/ct_test.o -c -o test/ct_test.o ../openssl/test/ct_test.c clang -I. -Icrypto/include -Iinclude -I../openssl -I../openssl/crypto/include -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ctype_internal_test.d.tmp -MT test/ctype_internal_test.o -c -o test/ctype_internal_test.o ../openssl/test/ctype_internal_test.c clang -I. -Iinclude -Icrypto/ec/curve448 -I../openssl -I../openssl/include -I../openssl/crypto/ec/curve448 -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/curve448_internal_test.d.tmp -MT test/curve448_internal_test.o -c -o test/curve448_internal_test.o ../openssl/test/curve448_internal_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/d2i_test.d.tmp -MT test/d2i_test.o -c -o test/d2i_test.o ../openssl/test/d2i_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/danetest.d.tmp -MT test/danetest.o -c -o test/danetest.o ../openssl/test/danetest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/destest.d.tmp -MT test/destest.o -c -o test/destest.o ../openssl/test/destest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/dhtest.d.tmp -MT test/dhtest.o -c -o test/dhtest.o ../openssl/test/dhtest.c clang -Iinclude -Itest -I. -I../openssl/include -I../openssl/test -I../openssl -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/drbg_cavs_data.d.tmp -MT test/drbg_cavs_data.o -c -o test/drbg_cavs_data.o ../openssl/test/drbg_cavs_data.c clang -Iinclude -Itest -I. -I../openssl/include -I../openssl/test -I../openssl -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/drbg_cavs_test.d.tmp -MT test/drbg_cavs_test.o -c -o test/drbg_cavs_test.o ../openssl/test/drbg_cavs_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/drbgtest.d.tmp -MT test/drbgtest.o -c -o test/drbgtest.o ../openssl/test/drbgtest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/dsatest.d.tmp -MT test/dsatest.o -c -o test/dsatest.o ../openssl/test/dsatest.c clang -I. -Iinclude -I../openssl -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/dtls_mtu_test.d.tmp -MT test/dtls_mtu_test.o -c -o test/dtls_mtu_test.o ../openssl/test/dtls_mtu_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/dtlstest.d.tmp -MT test/dtlstest.o -c -o test/dtlstest.o ../openssl/test/dtlstest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/dtlsv1listentest.d.tmp -MT test/dtlsv1listentest.o -c -o test/dtlsv1listentest.o ../openssl/test/dtlsv1listentest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ecdsatest.d.tmp -MT test/ecdsatest.o -c -o test/ecdsatest.o ../openssl/test/ecdsatest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ecstresstest.d.tmp -MT test/ecstresstest.o -c -o test/ecstresstest.o ../openssl/test/ecstresstest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ectest.d.tmp -MT test/ectest.o -c -o test/ectest.o ../openssl/test/ectest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/enginetest.d.tmp -MT test/enginetest.o -c -o test/enginetest.o ../openssl/test/enginetest.c clang -Iinclude -Icrypto/include -I../openssl/include -I../openssl/crypto/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/evp_extra_test.d.tmp -MT test/evp_extra_test.o -c -o test/evp_extra_test.o ../openssl/test/evp_extra_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/evp_test.d.tmp -MT test/evp_test.o -c -o test/evp_test.o ../openssl/test/evp_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/exdatatest.d.tmp -MT test/exdatatest.o -c -o test/exdatatest.o ../openssl/test/exdatatest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/exptest.d.tmp -MT test/exptest.o -c -o test/exptest.o ../openssl/test/exptest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/fatalerrtest.d.tmp -MT test/fatalerrtest.o -c -o test/fatalerrtest.o ../openssl/test/fatalerrtest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/gmdifftest.d.tmp -MT test/gmdifftest.o -c -o test/gmdifftest.o ../openssl/test/gmdifftest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/hmactest.d.tmp -MT test/hmactest.o -c -o test/hmactest.o ../openssl/test/hmactest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ideatest.d.tmp -MT test/ideatest.o -c -o test/ideatest.o ../openssl/test/ideatest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/igetest.d.tmp -MT test/igetest.o -c -o test/igetest.o ../openssl/test/igetest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/lhash_test.d.tmp -MT test/lhash_test.o -c -o test/lhash_test.o ../openssl/test/lhash_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/md2test.d.tmp -MT test/md2test.o -c -o test/md2test.o ../openssl/test/md2test.c clang -I. -Iinclude -I../openssl -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/mdc2_internal_test.d.tmp -MT test/mdc2_internal_test.o -c -o test/mdc2_internal_test.o ../openssl/test/mdc2_internal_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/mdc2test.d.tmp -MT test/mdc2test.o -c -o test/mdc2test.o ../openssl/test/mdc2test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/memleaktest.d.tmp -MT test/memleaktest.o -c -o test/memleaktest.o ../openssl/test/memleaktest.c clang -I. -Iinclude -I../openssl -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/modes_internal_test.d.tmp -MT test/modes_internal_test.o -c -o test/modes_internal_test.o ../openssl/test/modes_internal_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ocspapitest.d.tmp -MT test/ocspapitest.o -c -o test/ocspapitest.o ../openssl/test/ocspapitest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/packettest.d.tmp -MT test/packettest.o -c -o test/packettest.o ../openssl/test/packettest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/pbelutest.d.tmp -MT test/pbelutest.o -c -o test/pbelutest.o ../openssl/test/pbelutest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/pemtest.d.tmp -MT test/pemtest.o -c -o test/pemtest.o ../openssl/test/pemtest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/pkey_meth_kdf_test.d.tmp -MT test/pkey_meth_kdf_test.o -c -o test/pkey_meth_kdf_test.o ../openssl/test/pkey_meth_kdf_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/pkey_meth_test.d.tmp -MT test/pkey_meth_test.o -c -o test/pkey_meth_test.o ../openssl/test/pkey_meth_test.c clang -I. -Iinclude -Icrypto/include -I../openssl -I../openssl/include -I../openssl/crypto/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/poly1305_internal_test.d.tmp -MT test/poly1305_internal_test.o -c -o test/poly1305_internal_test.o ../openssl/test/poly1305_internal_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/rc2test.d.tmp -MT test/rc2test.o -c -o test/rc2test.o ../openssl/test/rc2test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/rc4test.d.tmp -MT test/rc4test.o -c -o test/rc4test.o ../openssl/test/rc4test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/rc5test.d.tmp -MT test/rc5test.o -c -o test/rc5test.o ../openssl/test/rc5test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/rdrand_sanitytest.d.tmp -MT test/rdrand_sanitytest.o -c -o test/rdrand_sanitytest.o ../openssl/test/rdrand_sanitytest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/recordlentest.d.tmp -MT test/recordlentest.o -c -o test/recordlentest.o ../openssl/test/recordlentest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/rsa_mp_test.d.tmp -MT test/rsa_mp_test.o -c -o test/rsa_mp_test.o ../openssl/test/rsa_mp_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/rsa_test.d.tmp -MT test/rsa_test.o -c -o test/rsa_test.o ../openssl/test/rsa_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/sanitytest.d.tmp -MT test/sanitytest.o -c -o test/sanitytest.o ../openssl/test/sanitytest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/secmemtest.d.tmp -MT test/secmemtest.o -c -o test/secmemtest.o ../openssl/test/secmemtest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/servername_test.d.tmp -MT test/servername_test.o -c -o test/servername_test.o ../openssl/test/servername_test.c clang -Iinclude -Icrypto/include -I../openssl/include -I../openssl/crypto/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/shlibloadtest.d.tmp -MT test/shlibloadtest.o -c -o test/shlibloadtest.o ../openssl/test/shlibloadtest.c clang -I. -Iinclude -Icrypto/include -I../openssl -I../openssl/include -I../openssl/crypto/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/siphash_internal_test.d.tmp -MT test/siphash_internal_test.o -c -o test/siphash_internal_test.o ../openssl/test/siphash_internal_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/sm2crypttest.d.tmp -MT test/sm2crypttest.o -c -o test/sm2crypttest.o ../openssl/test/sm2crypttest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/sm2sigtest.d.tmp -MT test/sm2sigtest.o -c -o test/sm2sigtest.o ../openssl/test/sm2sigtest.c clang -I. -Iinclude -Icrypto/include -I../openssl -I../openssl/include -I../openssl/crypto/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/sm4_internal_test.d.tmp -MT test/sm4_internal_test.o -c -o test/sm4_internal_test.o ../openssl/test/sm4_internal_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/srptest.d.tmp -MT test/srptest.o -c -o test/srptest.o ../openssl/test/srptest.c clang -I. -Iinclude -I../openssl -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ssl_cert_table_internal_test.d.tmp -MT test/ssl_cert_table_internal_test.o -c -o test/ssl_cert_table_internal_test.o ../openssl/test/ssl_cert_table_internal_test.c clang -I. -Iinclude -I../openssl -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/handshake_helper.d.tmp -MT test/handshake_helper.o -c -o test/handshake_helper.o ../openssl/test/handshake_helper.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ssl_test.d.tmp -MT test/ssl_test.o -c -o test/ssl_test.o ../openssl/test/ssl_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ssl_test_ctx.d.tmp -MT test/ssl_test_ctx.o -c -o test/ssl_test_ctx.o ../openssl/test/ssl_test_ctx.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ssl_test_ctx_test.d.tmp -MT test/ssl_test_ctx_test.o -c -o test/ssl_test_ctx_test.o ../openssl/test/ssl_test_ctx_test.c clang -Iinclude -I. -I../openssl/include -I../openssl -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/sslapitest.d.tmp -MT test/sslapitest.o -c -o test/sslapitest.o ../openssl/test/sslapitest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/sslbuffertest.d.tmp -MT test/sslbuffertest.o -c -o test/sslbuffertest.o ../openssl/test/sslbuffertest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/sslcorrupttest.d.tmp -MT test/sslcorrupttest.o -c -o test/sslcorrupttest.o ../openssl/test/sslcorrupttest.c ../openssl/test/sslapitest.c:4252:24: error: implicit declaration of function 'setupearly_data_test' is invalid in C99 [-Werror,-Wimplicit-function-declaration] if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, ^ ../openssl/test/sslapitest.c:4263:69: error: use of undeclared identifier 'MSG1' if (!TEST_true(SSL_write_early_data(clientssl, MSG1, strlen(MSG1), ^ ../openssl/test/sslapitest.c:4263:56: error: use of undeclared identifier 'MSG1' if (!TEST_true(SSL_write_early_data(clientssl, MSG1, strlen(MSG1), ^ ../openssl/test/sslapitest.c:4265:52: error: use of undeclared identifier 'MSG1' || !TEST_size_t_eq(written, strlen(MSG1)) ^ ../openssl/test/sslapitest.c:4269:62: error: use of undeclared identifier 'MSG1' || !TEST_mem_eq(MSG1, readbytes, buf, strlen(MSG1)) ^ ../openssl/test/sslapitest.c:4269:33: error: use of undeclared identifier 'MSG1' || !TEST_mem_eq(MSG1, readbytes, buf, strlen(MSG1)) ^ 6 errors generated. Makefile:9119: recipe for target 'test/sslapitest.o' failed make[1]: *** [test/sslapitest.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory '/home/openssl/run-checker/no-tls' Makefile:171: recipe for target 'all' failed make: *** [all] Error 2 From osslsanity at gmail.com Wed Apr 18 09:24:20 2018 From: osslsanity at gmail.com (osslsanity at gmail.com) Date: Wed, 18 Apr 2018 09:24:20 +0000 (UTC) Subject: [openssl-commits] Build failed in Jenkins: master_noec #488 Message-ID: <134779348.445.1524043460895.JavaMail.jenkins@ip-172-31-34-99> See Changes: [Matthias.St.Pierre] DRBG: fix coverity issues [Matthias.St.Pierre] p5_scrypt.c: fix error check of RAND_bytes() call [Matthias.St.Pierre] SSL_CTX_set_tlsext_ticket_key_cb.pod: fix error check of RAND_bytes() [matt] Ignore the status_request extension in a resumption handshake [matt] Call the info callback on all handshake done events [matt] Make sure info callback knows about all handshake start events [matt] Add a test for the info callback [matt] Update the info callback documentation for TLSv1.3 [matt] Update fingerprints.txt [matt] Fix assertion failure in SSL_set_bio() [matt] Extend the SSL_set_bio() tests [matt] Check the return from EVP_PKEY_get0_DH() [matt] Fix a memory leak in an error path [rsalz] BIGNUM signed add/sub routines refactory [matt] Add support for logging TLS 1.3 exporter secret [matt] Add test for CLIENT_EARLY_TRAFFIC_SECRET key logging [matt] Add support for logging early exporter secret [matt] test: Remove redundant SSL_CTX_set_max_early_data [matt] Update EVP_DigestSignInit() docs [matt] Style: ssl.h ------------------------------------------ [...truncated 475.16 KB...] gcc -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/dtlsv1listentest.d.tmp -MT test/dtlsv1listentest.o -c -o test/dtlsv1listentest.o test/dtlsv1listentest.c rm -f test/dtlsv1listentest ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/dtlsv1listentest test/dtlsv1listentest.o \ -lssl test/libtestutil.a -lcrypto -ldl -pthread gcc -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/ecdsatest.d.tmp -MT test/ecdsatest.o -c -o test/ecdsatest.o test/ecdsatest.c rm -f test/ecdsatest ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/ecdsatest test/ecdsatest.o \ test/libtestutil.a -lcrypto -ldl -pthread gcc -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/ecstresstest.d.tmp -MT test/ecstresstest.o -c -o test/ecstresstest.o test/ecstresstest.c rm -f test/ecstresstest ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/ecstresstest test/ecstresstest.o \ test/libtestutil.a -lcrypto -ldl -pthread gcc -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/ectest.d.tmp -MT test/ectest.o -c -o test/ectest.o test/ectest.c rm -f test/ectest ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/ectest test/ectest.o \ test/libtestutil.a -lcrypto -ldl -pthread gcc -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/enginetest.d.tmp -MT test/enginetest.o -c -o test/enginetest.o test/enginetest.c rm -f test/enginetest ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/enginetest test/enginetest.o \ test/libtestutil.a -lcrypto -ldl -pthread gcc -Iinclude -Icrypto/include -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/evp_extra_test.d.tmp -MT test/evp_extra_test.o -c -o test/evp_extra_test.o test/evp_extra_test.c rm -f test/evp_extra_test ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/evp_extra_test test/evp_extra_test.o \ test/libtestutil.a -lcrypto -ldl -pthread gcc -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/evp_test.d.tmp -MT test/evp_test.o -c -o test/evp_test.o test/evp_test.c rm -f test/evp_test ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/evp_test test/evp_test.o \ test/libtestutil.a -lcrypto -ldl -pthread gcc -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/exdatatest.d.tmp -MT test/exdatatest.o -c -o test/exdatatest.o test/exdatatest.c rm -f test/exdatatest ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/exdatatest test/exdatatest.o \ test/libtestutil.a -lcrypto -ldl -pthread gcc -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/exptest.d.tmp -MT test/exptest.o -c -o test/exptest.o test/exptest.c rm -f test/exptest ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/exptest test/exptest.o \ test/libtestutil.a -lcrypto -ldl -pthread gcc -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/fatalerrtest.d.tmp -MT test/fatalerrtest.o -c -o test/fatalerrtest.o test/fatalerrtest.c rm -f test/fatalerrtest ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/fatalerrtest test/fatalerrtest.o test/ssltestlib.o \ -lssl test/libtestutil.a -lcrypto -ldl -pthread gcc -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/gmdifftest.d.tmp -MT test/gmdifftest.o -c -o test/gmdifftest.o test/gmdifftest.c rm -f test/gmdifftest ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/gmdifftest test/gmdifftest.o \ test/libtestutil.a -lcrypto -ldl -pthread gcc -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/hmactest.d.tmp -MT test/hmactest.o -c -o test/hmactest.o test/hmactest.c rm -f test/hmactest ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/hmactest test/hmactest.o \ test/libtestutil.a -lcrypto -ldl -pthread gcc -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/ideatest.d.tmp -MT test/ideatest.o -c -o test/ideatest.o test/ideatest.c rm -f test/ideatest ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/ideatest test/ideatest.o \ test/libtestutil.a -lcrypto -ldl -pthread gcc -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/igetest.d.tmp -MT test/igetest.o -c -o test/igetest.o test/igetest.c rm -f test/igetest ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/igetest test/igetest.o \ test/libtestutil.a -lcrypto -ldl -pthread gcc -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/lhash_test.d.tmp -MT test/lhash_test.o -c -o test/lhash_test.o test/lhash_test.c rm -f test/lhash_test ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/lhash_test test/lhash_test.o \ test/libtestutil.a -lcrypto -ldl -pthread gcc -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/md2test.d.tmp -MT test/md2test.o -c -o test/md2test.o test/md2test.c rm -f test/md2test ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/md2test test/md2test.o \ test/libtestutil.a -lcrypto -ldl -pthread gcc -I. -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/mdc2_internal_test.d.tmp -MT test/mdc2_internal_test.o -c -o test/mdc2_internal_test.o test/mdc2_internal_test.c rm -f test/mdc2_internal_test ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/mdc2_internal_test test/mdc2_internal_test.o \ test/libtestutil.a -lcrypto -ldl -pthread gcc -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/mdc2test.d.tmp -MT test/mdc2test.o -c -o test/mdc2test.o test/mdc2test.c rm -f test/mdc2test ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/mdc2test test/mdc2test.o \ test/libtestutil.a -lcrypto -ldl -pthread gcc -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/memleaktest.d.tmp -MT test/memleaktest.o -c -o test/memleaktest.o test/memleaktest.c rm -f test/memleaktest ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/memleaktest test/memleaktest.o \ test/libtestutil.a -lcrypto -ldl -pthread gcc -I. -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/modes_internal_test.d.tmp -MT test/modes_internal_test.o -c -o test/modes_internal_test.o test/modes_internal_test.c rm -f test/modes_internal_test ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/modes_internal_test test/modes_internal_test.o \ test/libtestutil.a libcrypto.a -ldl -pthread gcc -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/ocspapitest.d.tmp -MT test/ocspapitest.o -c -o test/ocspapitest.o test/ocspapitest.c rm -f test/ocspapitest ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/ocspapitest test/ocspapitest.o \ test/libtestutil.a -lcrypto -ldl -pthread gcc -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/packettest.d.tmp -MT test/packettest.o -c -o test/packettest.o test/packettest.c rm -f test/packettest ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/packettest test/packettest.o \ test/libtestutil.a -lcrypto -ldl -pthread gcc -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/pbelutest.d.tmp -MT test/pbelutest.o -c -o test/pbelutest.o test/pbelutest.c rm -f test/pbelutest ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/pbelutest test/pbelutest.o \ test/libtestutil.a -lcrypto -ldl -pthread gcc -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/pemtest.d.tmp -MT test/pemtest.o -c -o test/pemtest.o test/pemtest.c rm -f test/pemtest ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/pemtest test/pemtest.o \ test/libtestutil.a -lcrypto -ldl -pthread gcc -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/pkey_meth_kdf_test.d.tmp -MT test/pkey_meth_kdf_test.o -c -o test/pkey_meth_kdf_test.o test/pkey_meth_kdf_test.c rm -f test/pkey_meth_kdf_test ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/pkey_meth_kdf_test test/pkey_meth_kdf_test.o \ test/libtestutil.a -lcrypto -ldl -pthread gcc -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/pkey_meth_test.d.tmp -MT test/pkey_meth_test.o -c -o test/pkey_meth_test.o test/pkey_meth_test.c rm -f test/pkey_meth_test ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/pkey_meth_test test/pkey_meth_test.o \ test/libtestutil.a -lcrypto -ldl -pthread gcc -I. -Iinclude -Icrypto/include -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/poly1305_internal_test.d.tmp -MT test/poly1305_internal_test.o -c -o test/poly1305_internal_test.o test/poly1305_internal_test.c rm -f test/poly1305_internal_test ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/poly1305_internal_test test/poly1305_internal_test.o \ test/libtestutil.a libcrypto.a -ldl -pthread gcc -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/rc2test.d.tmp -MT test/rc2test.o -c -o test/rc2test.o test/rc2test.c rm -f test/rc2test ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/rc2test test/rc2test.o \ test/libtestutil.a -lcrypto -ldl -pthread gcc -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/rc4test.d.tmp -MT test/rc4test.o -c -o test/rc4test.o test/rc4test.c rm -f test/rc4test ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/rc4test test/rc4test.o \ test/libtestutil.a -lcrypto -ldl -pthread gcc -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/rc5test.d.tmp -MT test/rc5test.o -c -o test/rc5test.o test/rc5test.c rm -f test/rc5test ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/rc5test test/rc5test.o \ test/libtestutil.a -lcrypto -ldl -pthread gcc -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/rdrand_sanitytest.d.tmp -MT test/rdrand_sanitytest.o -c -o test/rdrand_sanitytest.o test/rdrand_sanitytest.c rm -f test/rdrand_sanitytest ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/rdrand_sanitytest test/rdrand_sanitytest.o \ test/libtestutil.a libcrypto.a -ldl -pthread gcc -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/recordlentest.d.tmp -MT test/recordlentest.o -c -o test/recordlentest.o test/recordlentest.c rm -f test/recordlentest ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/recordlentest test/recordlentest.o test/ssltestlib.o \ -lssl test/libtestutil.a -lcrypto -ldl -pthread gcc -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/rsa_mp_test.d.tmp -MT test/rsa_mp_test.o -c -o test/rsa_mp_test.o test/rsa_mp_test.c rm -f test/rsa_mp_test ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/rsa_mp_test test/rsa_mp_test.o \ test/libtestutil.a -lcrypto -ldl -pthread gcc -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/rsa_test.d.tmp -MT test/rsa_test.o -c -o test/rsa_test.o test/rsa_test.c rm -f test/rsa_test ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/rsa_test test/rsa_test.o \ test/libtestutil.a -lcrypto -ldl -pthread gcc -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/sanitytest.d.tmp -MT test/sanitytest.o -c -o test/sanitytest.o test/sanitytest.c rm -f test/sanitytest ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/sanitytest test/sanitytest.o \ test/libtestutil.a -lcrypto -ldl -pthread gcc -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/secmemtest.d.tmp -MT test/secmemtest.o -c -o test/secmemtest.o test/secmemtest.c rm -f test/secmemtest ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/secmemtest test/secmemtest.o \ test/libtestutil.a -lcrypto -ldl -pthread gcc -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/servername_test.d.tmp -MT test/servername_test.o -c -o test/servername_test.o test/servername_test.c rm -f test/servername_test ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/servername_test test/servername_test.o \ -lssl test/libtestutil.a -lcrypto -ldl -pthread gcc -I. -Iinclude -Icrypto/include -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/siphash_internal_test.d.tmp -MT test/siphash_internal_test.o -c -o test/siphash_internal_test.o test/siphash_internal_test.c rm -f test/siphash_internal_test ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/siphash_internal_test test/siphash_internal_test.o \ test/libtestutil.a libcrypto.a -ldl -pthread gcc -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/sm2crypttest.d.tmp -MT test/sm2crypttest.o -c -o test/sm2crypttest.o test/sm2crypttest.c rm -f test/sm2crypttest ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/sm2crypttest test/sm2crypttest.o \ test/libtestutil.a -lcrypto -ldl -pthread gcc -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/sm2sigtest.d.tmp -MT test/sm2sigtest.o -c -o test/sm2sigtest.o test/sm2sigtest.c rm -f test/sm2sigtest ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/sm2sigtest test/sm2sigtest.o \ test/libtestutil.a -lcrypto -ldl -pthread gcc -I. -Iinclude -Icrypto/include -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/sm4_internal_test.d.tmp -MT test/sm4_internal_test.o -c -o test/sm4_internal_test.o test/sm4_internal_test.c rm -f test/sm4_internal_test ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/sm4_internal_test test/sm4_internal_test.o \ test/libtestutil.a libcrypto.a -ldl -pthread gcc -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/srptest.d.tmp -MT test/srptest.o -c -o test/srptest.o test/srptest.c rm -f test/srptest ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/srptest test/srptest.o \ test/libtestutil.a -lcrypto -ldl -pthread gcc -I. -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/ssl_cert_table_internal_test.d.tmp -MT test/ssl_cert_table_internal_test.o -c -o test/ssl_cert_table_internal_test.o test/ssl_cert_table_internal_test.c rm -f test/ssl_cert_table_internal_test ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/ssl_cert_table_internal_test test/ssl_cert_table_internal_test.o \ test/libtestutil.a -lcrypto -ldl -pthread gcc -I. -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/handshake_helper.d.tmp -MT test/handshake_helper.o -c -o test/handshake_helper.o test/handshake_helper.c gcc -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/ssl_test.d.tmp -MT test/ssl_test.o -c -o test/ssl_test.o test/ssl_test.c gcc -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/ssl_test_ctx.d.tmp -MT test/ssl_test_ctx.o -c -o test/ssl_test_ctx.o test/ssl_test_ctx.c rm -f test/ssl_test ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/ssl_test test/handshake_helper.o test/ssl_test.o test/ssl_test_ctx.o \ -lssl test/libtestutil.a -lcrypto -ldl -pthread gcc -Iinclude -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/ssl_test_ctx_test.d.tmp -MT test/ssl_test_ctx_test.o -c -o test/ssl_test_ctx_test.o test/ssl_test_ctx_test.c rm -f test/ssl_test_ctx_test ${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \ -o test/ssl_test_ctx_test test/ssl_test_ctx.o test/ssl_test_ctx_test.o \ -lssl test/libtestutil.a -lcrypto -ldl -pthread gcc -Iinclude -I. -pthread -m64 -Wa,--noexecstack -Wall -O3 -DNDEBUG -MMD -MF test/sslapitest.d.tmp -MT test/sslapitest.o -c -o test/sslapitest.o test/sslapitest.c test/sslapitest.c: In function 'test_info_callback': test/sslapitest.c:4317:9: warning: implicit declaration of function 'setupearly_data_test' [-Wimplicit-function-declaration] if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, ^ In file included from test/sslapitest.c:21:0: test/sslapitest.c:4328:56: error: 'MSG1' undeclared (first use in this function) if (!TEST_true(SSL_write_early_data(clientssl, MSG1, strlen(MSG1), ^ test/testutil.h:360:66: note: in definition of macro 'TEST_true' # define TEST_true(a) test_true(__FILE__, __LINE__, #a, (a) != 0) ^ test/sslapitest.c:4328:56: note: each undeclared identifier is reported only once for each function it appears in if (!TEST_true(SSL_write_early_data(clientssl, MSG1, strlen(MSG1), ^ test/testutil.h:360:66: note: in definition of macro 'TEST_true' # define TEST_true(a) test_true(__FILE__, __LINE__, #a, (a) != 0) ^ make[1]: *** [test/sslapitest.o] Error 1 make[1]: Leaving directory ` make: *** [all] Error 2 Build step 'Execute shell' marked build as failure From rsalz at openssl.org Wed Apr 18 12:50:51 2018 From: rsalz at openssl.org (Rich Salz) Date: Wed, 18 Apr 2018 12:50:51 +0000 Subject: [openssl-commits] [web] master update Message-ID: <1524055851.883331.20419.nullmailer@dev.openssl.org> The branch master has been updated via f8a362841bcc696786c5faa1dcfc8d0c274f92e7 (commit) from fd21e3cd9ca7c7b7a8465d47e2bfbb728a4865e2 (commit) - Log ----------------------------------------------------------------- commit f8a362841bcc696786c5faa1dcfc8d0c274f92e7 Author: Rich Salz Date: Wed Apr 18 08:50:48 2018 -0400 Add bug bounty reference ----------------------------------------------------------------------- Summary of changes: docs/faq-5-misc.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/faq-5-misc.txt b/docs/faq-5-misc.txt index b84b595..f2810e5 100644 --- a/docs/faq-5-misc.txt +++ b/docs/faq-5-misc.txt @@ -103,3 +103,13 @@ in the next minor release. It was decided after the release of OpenSSL 0.9.8y the next version should be 0.9.8za then 0.9.8zb and so on. + +* Do you have a bug bounty program? + +The project does not. Google runs a program +@@@https://www.google.com/about/appsecurity/patch-rewards/@@@; so does +HackerOne, @@@https://hackerone.com/ibb-openssl@@@. In general, if you +have found a security issue, send email to openssl-security at openssl.org. +Please note that we do not consider DNS configurations or Website +configuration to be security issues. + From no-reply at appveyor.com Wed Apr 18 15:47:44 2018 From: no-reply at appveyor.com (AppVeyor) Date: Wed, 18 Apr 2018 15:47:44 +0000 Subject: [openssl-commits] Build failed: openssl master.17360 Message-ID: <20180418154744.1.EC4638850AF694EF@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Wed Apr 18 16:57:24 2018 From: no-reply at appveyor.com (AppVeyor) Date: Wed, 18 Apr 2018 16:57:24 +0000 Subject: [openssl-commits] Build failed: openssl master.17362 Message-ID: <20180418165724.1.6B89CB13A66C9A05@appveyor.com> An HTML attachment was scrubbed... URL: From appro at openssl.org Wed Apr 18 17:49:05 2018 From: appro at openssl.org (Andy Polyakov) Date: Wed, 18 Apr 2018 17:49:05 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524073745.066884.31148.nullmailer@dev.openssl.org> The branch master has been updated via 5bb1cd2292b388263a0cc05392bb99141212aa53 (commit) from 2f8271ebcae747e3f69f940c7c9079c476a84174 (commit) - Log ----------------------------------------------------------------- commit 5bb1cd2292b388263a0cc05392bb99141212aa53 Author: Rahul Chaudhry Date: Fri Apr 13 10:42:13 2018 -0700 poly1305/asm/poly1305-armv4.pl: remove unintentional relocation. Branch to global symbol results in reference to PLT, and when compiling for THUMB-2 - in a R_ARM_THM_JUMP19 relocation. Some linkers don't support this relocation (ld.gold), while others can end up truncating the relocation to fit (ld.bfd). Convert this branch through PLT into a direct branch that the assembler can resolve locally. See https://github.com/android-ndk/ndk/issues/337 for background. The current workaround is to disable poly1305 optimization assembly, which is not optimal and can be reverted after this patch: https://github.com/freedesktop/gstreamer-cerbero/commit/beab607d2b1ff23c41b7e01aa9c64be5e247d1e6 CLA: trivial Reviewed-by: Andy Polyakov Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5949) ----------------------------------------------------------------------- Summary of changes: crypto/poly1305/asm/poly1305-armv4.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crypto/poly1305/asm/poly1305-armv4.pl b/crypto/poly1305/asm/poly1305-armv4.pl index fc899ce..699021f 100755 --- a/crypto/poly1305/asm/poly1305-armv4.pl +++ b/crypto/poly1305/asm/poly1305-armv4.pl @@ -186,6 +186,7 @@ $code.=<<___; .type poly1305_blocks,%function .align 5 poly1305_blocks: +.Lpoly1305_blocks: stmdb sp!,{r3-r11,lr} ands $len,$len,#-16 @@ -677,7 +678,7 @@ poly1305_blocks_neon: cmp $len,#64 bhs .Lenter_neon tst ip,ip @ is_base2_26? - beq poly1305_blocks + beq .Lpoly1305_blocks .Lenter_neon: stmdb sp!,{r4-r7} From appro at openssl.org Wed Apr 18 17:49:48 2018 From: appro at openssl.org (Andy Polyakov) Date: Wed, 18 Apr 2018 17:49:48 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1524073788.202088.32023.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via e88f5d57efa5031e4863d455e2b5a9f7f4096c8b (commit) from 87b315965296273750ab69728648bbff331e1687 (commit) - Log ----------------------------------------------------------------- commit e88f5d57efa5031e4863d455e2b5a9f7f4096c8b Author: Rahul Chaudhry Date: Fri Apr 13 10:42:13 2018 -0700 poly1305/asm/poly1305-armv4.pl: remove unintentional relocation. Branch to global symbol results in reference to PLT, and when compiling for THUMB-2 - in a R_ARM_THM_JUMP19 relocation. Some linkers don't support this relocation (ld.gold), while others can end up truncating the relocation to fit (ld.bfd). Convert this branch through PLT into a direct branch that the assembler can resolve locally. See https://github.com/android-ndk/ndk/issues/337 for background. The current workaround is to disable poly1305 optimization assembly, which is not optimal and can be reverted after this patch: https://github.com/freedesktop/gstreamer-cerbero/commit/beab607d2b1ff23c41b7e01aa9c64be5e247d1e6 CLA: trivial Reviewed-by: Andy Polyakov Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5949) (cherry picked from commit 5bb1cd2292b388263a0cc05392bb99141212aa53) ----------------------------------------------------------------------- Summary of changes: crypto/poly1305/asm/poly1305-armv4.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crypto/poly1305/asm/poly1305-armv4.pl b/crypto/poly1305/asm/poly1305-armv4.pl index fc899ce..699021f 100755 --- a/crypto/poly1305/asm/poly1305-armv4.pl +++ b/crypto/poly1305/asm/poly1305-armv4.pl @@ -186,6 +186,7 @@ $code.=<<___; .type poly1305_blocks,%function .align 5 poly1305_blocks: +.Lpoly1305_blocks: stmdb sp!,{r3-r11,lr} ands $len,$len,#-16 @@ -677,7 +678,7 @@ poly1305_blocks_neon: cmp $len,#64 bhs .Lenter_neon tst ip,ip @ is_base2_26? - beq poly1305_blocks + beq .Lpoly1305_blocks .Lenter_neon: stmdb sp!,{r4-r7} From appro at openssl.org Wed Apr 18 18:03:23 2018 From: appro at openssl.org (Andy Polyakov) Date: Wed, 18 Apr 2018 18:03:23 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524074603.216593.2321.nullmailer@dev.openssl.org> The branch master has been updated via f3d3b362553d95047d93608edd15d20aa6e6e0fd (commit) via c4220c0f9a8c944c31450b0cd6e01014687f28db (commit) via 3f1f62b97b795d973d40c32735eedee70140731c (commit) via 17cde9c2e404a0ada05601fb726dbaed6c532112 (commit) via 3f473b936a292262a020353e99f896cabfedc947 (commit) from 5bb1cd2292b388263a0cc05392bb99141212aa53 (commit) - Log ----------------------------------------------------------------- commit f3d3b362553d95047d93608edd15d20aa6e6e0fd Author: Andy Polyakov Date: Wed Apr 18 10:42:23 2018 +0200 TLSProxy/Proxy.pm: preclude output intermix. s_server -rev emits info output on stderr, i.e. unbufferred, which risks intermixing with output from TLSProxy itself on non-line boundaries, which in turn is confusing to TAP parser. Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5975) commit c4220c0f9a8c944c31450b0cd6e01014687f28db Author: Andy Polyakov Date: Mon Apr 16 22:32:10 2018 +0200 recipes/70-test_ssl{cbcpadding,extension,records}: make it work w/fragmentation. This fixes only those tests that were failing when network data was fragmented. Remaining ones might succeed for "wrong reasons". Bunch of tests have to fail to be considered successful and when data is fragmented they might fail for reasons other than originally intended. Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5975) commit 3f1f62b97b795d973d40c32735eedee70140731c Author: Andy Polyakov Date: Mon Apr 16 14:08:35 2018 +0200 TLSProxy/Record.pm: add is_fatal_alert method. (resolve uninitialized variable warning and harmonize output). Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5975) commit 17cde9c2e404a0ada05601fb726dbaed6c532112 Author: Andy Polyakov Date: Mon Apr 16 14:13:07 2018 +0200 TLSProxy/Proxy.pm: refine NewSessionTicket detection. Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5975) commit 3f473b936a292262a020353e99f896cabfedc947 Author: Andy Polyakov Date: Mon Apr 16 14:10:39 2018 +0200 TLSProxy/Message.pm: refine end-of-conversation detection logic. Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5975) ----------------------------------------------------------------------- Summary of changes: test/recipes/70-test_sslcbcpadding.t | 31 +++++++-- test/recipes/70-test_sslextension.t | 49 +++++++++++--- test/recipes/70-test_sslrecords.t | 126 ++++++++++++++++++++++++----------- util/perl/TLSProxy/Message.pm | 7 +- util/perl/TLSProxy/Proxy.pm | 21 ++++-- util/perl/TLSProxy/Record.pm | 22 ++++-- 6 files changed, 184 insertions(+), 72 deletions(-) diff --git a/test/recipes/70-test_sslcbcpadding.t b/test/recipes/70-test_sslcbcpadding.t index 85b26b8..5594376 100644 --- a/test/recipes/70-test_sslcbcpadding.t +++ b/test/recipes/70-test_sslcbcpadding.t @@ -7,6 +7,8 @@ # https://www.openssl.org/source/license.html use strict; +use feature 'state'; + use OpenSSL::Test qw/:DEFAULT cmdstr srctop_file bldtop_dir/; use OpenSSL::Test::Utils; use TLSProxy::Proxy; @@ -41,26 +43,31 @@ my @test_offsets = (0, 128, 254, 255); # Test that maximally-padded records are accepted. my $bad_padding_offset = -1; $proxy->serverflags("-tls1_2"); +$proxy->serverconnects(1 + scalar(@test_offsets)); $proxy->start() or plan skip_all => "Unable to start up Proxy for tests"; plan tests => 1 + scalar(@test_offsets); ok(TLSProxy::Message->success(), "Maximally-padded record test"); # Test that invalid padding is rejected. +my $fatal_alert; # set by add_maximal_padding_filter on client's fatal alert + foreach my $offset (@test_offsets) { - $proxy->clear(); - $proxy->serverflags("-tls1_2"); $bad_padding_offset = $offset; - $proxy->start(); - ok(TLSProxy::Message->fail(), "Invalid padding byte $bad_padding_offset"); + $fatal_alert = 0; + $proxy->clearClient(); + $proxy->clientstart(); + ok($fatal_alert, "Invalid padding byte $bad_padding_offset"); } sub add_maximal_padding_filter { my $proxy = shift; + my $messages = $proxy->message_list; + state $sent_corrupted_payload; if ($proxy->flight == 0) { # Disable Encrypt-then-MAC. - foreach my $message (@{$proxy->message_list}) { + foreach my $message (@{$messages}) { if ($message->mt != TLSProxy::Message::MT_CLIENT_HELLO) { next; } @@ -69,9 +76,16 @@ sub add_maximal_padding_filter $message->process_extensions(); $message->repack(); } + $sent_corrupted_payload = 0; + return; } - if ($proxy->flight == 3) { + my $last_message = @{$messages}[-1]; + if (defined($last_message) + && $last_message->server + && $last_message->mt == TLSProxy::Message::MT_FINISHED + && !@{$last_message->records}[0]->{sent}) { + # Insert a maximally-padded record. Assume a block size of 16 (AES) and # a MAC length of 20 (SHA-1). my $block_size = 16; @@ -88,6 +102,7 @@ sub add_maximal_padding_filter # Add padding. for (my $i = 0; $i < 256; $i++) { if ($i == $bad_padding_offset) { + $sent_corrupted_payload = 1; $data .= "\xfe"; } else { $data .= "\xff"; @@ -108,5 +123,9 @@ sub add_maximal_padding_filter # Send the record immediately after the server Finished. push @{$proxy->record_list}, $record; + } elsif ($sent_corrupted_payload) { + # Check for bad_record_mac from client + my $last_record = @{$proxy->record_list}[-1]; + $fatal_alert = 1 if $last_record->is_fatal_alert(0) == 20; } } diff --git a/test/recipes/70-test_sslextension.t b/test/recipes/70-test_sslextension.t index 142ce0e..20e1933 100644 --- a/test/recipes/70-test_sslextension.t +++ b/test/recipes/70-test_sslextension.t @@ -7,6 +7,8 @@ # https://www.openssl.org/source/license.html use strict; +use feature 'state'; + use OpenSSL::Test qw/:DEFAULT cmdstr srctop_file bldtop_dir/; use OpenSSL::Test::Utils; use TLSProxy::Proxy; @@ -37,6 +39,7 @@ use constant { }; my $testtype; +my $fatal_alert = 0; # set by filter on fatal alert $ENV{OPENSSL_ia32cap} = '~0x200000200000000'; my $proxy = TLSProxy::Proxy->new( @@ -98,11 +101,13 @@ sub inject_duplicate_extension_clienthello my $proxy = shift; # We're only interested in the initial ClientHello - if ($proxy->flight != 0) { + if ($proxy->flight == 0) { + inject_duplicate_extension($proxy, TLSProxy::Message::MT_CLIENT_HELLO); return; } - inject_duplicate_extension($proxy, TLSProxy::Message::MT_CLIENT_HELLO); + my $last_record = @{$proxy->{record_list}}[-1]; + $fatal_alert = 1 if $last_record->is_fatal_alert(1); } sub inject_duplicate_extension_serverhello @@ -110,26 +115,43 @@ sub inject_duplicate_extension_serverhello my $proxy = shift; # We're only interested in the initial ServerHello - if ($proxy->flight != 1) { + if ($proxy->flight == 0) { + return; + } elsif ($proxy->flight == 1) { + inject_duplicate_extension($proxy, TLSProxy::Message::MT_SERVER_HELLO); return; } - inject_duplicate_extension($proxy, TLSProxy::Message::MT_SERVER_HELLO); + my $last_record = @{$proxy->{record_list}}[-1]; + $fatal_alert = 1 if $last_record->is_fatal_alert(0); } sub inject_unsolicited_extension { my $proxy = shift; my $message; + state $sent_unsolisited_extension; + + if ($proxy->flight == 0) { + $sent_unsolisited_extension = 0; + return; + } # We're only interested in the initial ServerHello/EncryptedExtensions if ($proxy->flight != 1) { + if ($sent_unsolisited_extension) { + my $last_record = @{$proxy->record_list}[-1]; + $fatal_alert = 1 if $last_record->is_fatal_alert(0); + } return; } if ($testtype == UNSOLICITED_SERVER_NAME_TLS13) { - $message = ${$proxy->message_list}[2]; - die "Expecting EE message ".($message->mt).", ".${$proxy->message_list}[1]->mt.", ".${$proxy->message_list}[3]->mt if $message->mt != TLSProxy::Message::MT_ENCRYPTED_EXTENSIONS; + return if (!defined($message = ${$proxy->message_list}[2])); + die "Expecting EE message ".($message->mt)."," + .${$proxy->message_list}[1]->mt.", " + .${$proxy->message_list}[3]->mt + if $message->mt != TLSProxy::Message::MT_ENCRYPTED_EXTENSIONS; } else { $message = ${$proxy->message_list}[1]; } @@ -148,17 +170,19 @@ sub inject_unsolicited_extension } $message->set_extension($type, $ext); $message->repack(); + $sent_unsolisited_extension = 1; } # Test 1-2: Sending a duplicate extension should fail. $proxy->start() or plan skip_all => "Unable to start up Proxy for tests"; plan tests => 7; -ok(TLSProxy::Message->fail(), "Duplicate ClientHello extension"); +ok($fatal_alert, "Duplicate ClientHello extension"); +$fatal_alert = 0; $proxy->clear(); $proxy->filter(\&inject_duplicate_extension_serverhello); $proxy->start(); -ok(TLSProxy::Message->fail(), "Duplicate ServerHello extension"); +ok($fatal_alert, "Duplicate ServerHello extension"); SKIP: { skip "TLS <= 1.2 disabled", 3 if $no_below_tls13; @@ -170,12 +194,13 @@ SKIP: { ok(TLSProxy::Message->success, "Zero extension length test"); #Test 4: Inject an unsolicited extension (<= TLSv1.2) + $fatal_alert = 0; $proxy->clear(); $proxy->filter(\&inject_unsolicited_extension); $testtype = UNSOLICITED_SERVER_NAME; $proxy->clientflags("-no_tls1_3 -noservername"); $proxy->start(); - ok(TLSProxy::Message->fail(), "Unsolicited server name extension"); + ok($fatal_alert, "Unsolicited server name extension"); #Test 5: Inject a noncompliant supported_groups extension (<= TLSv1.2) $proxy->clear(); @@ -190,20 +215,22 @@ SKIP: { skip "TLS <= 1.2 or CT disabled", 1 if $no_below_tls13 || disabled("ct"); #Test 6: Same as above for the SCT extension which has special handling + $fatal_alert = 0; $proxy->clear(); $testtype = UNSOLICITED_SCT; $proxy->clientflags("-no_tls1_3"); $proxy->start(); - ok(TLSProxy::Message->fail(), "Unsolicited sct extension"); + ok($fatal_alert, "Unsolicited sct extension"); } SKIP: { skip "TLS 1.3 disabled", 1 if disabled("tls1_3"); #Test 7: Inject an unsolicited extension (TLSv1.3) + $fatal_alert = 0; $proxy->clear(); $proxy->filter(\&inject_unsolicited_extension); $testtype = UNSOLICITED_SERVER_NAME_TLS13; $proxy->clientflags("-noservername"); $proxy->start(); - ok(TLSProxy::Message->fail(), "Unsolicited server name extension (TLSv1.3)"); + ok($fatal_alert, "Unsolicited server name extension (TLSv1.3)"); } diff --git a/test/recipes/70-test_sslrecords.t b/test/recipes/70-test_sslrecords.t index 88cb022..1233028 100644 --- a/test/recipes/70-test_sslrecords.t +++ b/test/recipes/70-test_sslrecords.t @@ -7,6 +7,8 @@ # https://www.openssl.org/source/license.html use strict; +use feature 'state'; + use OpenSSL::Test qw/:DEFAULT cmdstr srctop_file bldtop_dir/; use OpenSSL::Test::Utils; use TLSProxy::Proxy; @@ -35,6 +37,7 @@ my $proxy = TLSProxy::Proxy->new( ); my $boundary_test_type; +my $fatal_alert = 0; # set by filters at expected fatal alerts #Test 1: Injecting out of context empty records should fail my $content_type = TLSProxy::Record::RT_APPLICATION_DATA; @@ -42,7 +45,7 @@ my $inject_recs_num = 1; $proxy->serverflags("-tls1_2"); $proxy->start() or plan skip_all => "Unable to start up Proxy for tests"; plan tests => 18; -ok(TLSProxy::Message->fail(), "Out of context empty records test"); +ok($fatal_alert, "Out of context empty records test"); #Test 2: Injecting in context empty records should succeed $proxy->clear(); @@ -52,21 +55,23 @@ $proxy->start(); ok(TLSProxy::Message->success(), "In context empty records test"); #Test 3: Injecting too many in context empty records should fail +$fatal_alert = 0; $proxy->clear(); #We allow 32 consecutive in context empty records $inject_recs_num = 33; $proxy->serverflags("-tls1_2"); $proxy->start(); -ok(TLSProxy::Message->fail(), "Too many in context empty records test"); +ok($fatal_alert, "Too many in context empty records test"); #Test 4: Injecting a fragmented fatal alert should fail. We expect the server to # send back an alert of its own because it cannot handle fragmented # alerts +$fatal_alert = 0; $proxy->clear(); $proxy->filter(\&add_frag_alert_filter); $proxy->serverflags("-tls1_2"); $proxy->start(); -ok(TLSProxy::Message->fail(), "Fragmented alert records test"); +ok($fatal_alert, "Fragmented alert records test"); #Run some SSLv2 ClientHello tests @@ -122,28 +127,31 @@ ok(TLSProxy::Message->fail(), "Alert before SSLv2 ClientHello test"); #Unrecognised record type tests #Test 10: Sending an unrecognised record type in TLS1.2 should fail +$fatal_alert = 0; $proxy->clear(); $proxy->serverflags("-tls1_2"); $proxy->filter(\&add_unknown_record_type); $proxy->start(); -ok(TLSProxy::Message->fail(), "Unrecognised record type in TLS1.2"); +ok($fatal_alert, "Unrecognised record type in TLS1.2"); SKIP: { skip "TLSv1.1 disabled", 1 if disabled("tls1_1"); #Test 11: Sending an unrecognised record type in TLS1.1 should fail + $fatal_alert = 0; $proxy->clear(); $proxy->clientflags("-tls1_1"); $proxy->start(); - ok(TLSProxy::Message->fail(), "Unrecognised record type in TLS1.1"); + ok($fatal_alert, "Unrecognised record type in TLS1.1"); } #Test 12: Sending a different record version in TLS1.2 should fail +$fatal_alert = 0; $proxy->clear(); $proxy->clientflags("-tls1_2"); $proxy->filter(\&change_version); $proxy->start(); -ok(TLSProxy::Message->fail(), "Changed record version in TLS1.2"); +ok($fatal_alert, "Changed record version in TLS1.2"); #TLS1.3 specific tests SKIP: { @@ -156,17 +164,19 @@ SKIP: { ok(TLSProxy::Message->fail(), "Changed record version in TLS1.3"); #Test 14: Sending an unrecognised record type in TLS1.3 should fail + $fatal_alert = 0; $proxy->clear(); $proxy->filter(\&add_unknown_record_type); $proxy->start(); - ok(TLSProxy::Message->fail(), "Unrecognised record type in TLS1.3"); + ok($fatal_alert, "Unrecognised record type in TLS1.3"); #Test 15: Sending an outer record type other than app data once encrypted #should fail + $fatal_alert = 0; $proxy->clear(); $proxy->filter(\&change_outer_record_type); $proxy->start(); - ok(TLSProxy::Message->fail(), "Wrong outer record type in TLS1.3"); + ok($fatal_alert, "Wrong outer record type in TLS1.3"); use constant { DATA_AFTER_SERVER_HELLO => 0, @@ -176,36 +186,41 @@ SKIP: { #Test 16: Sending a ServerHello which doesn't end on a record boundary # should fail + $fatal_alert = 0; $proxy->clear(); $boundary_test_type = DATA_AFTER_SERVER_HELLO; $proxy->filter(\¬_on_record_boundary); $proxy->start(); - ok(TLSProxy::Message->fail(), "Record not on boundary in TLS1.3 (ServerHello)"); + ok($fatal_alert, "Record not on boundary in TLS1.3 (ServerHello)"); #Test 17: Sending a Finished which doesn't end on a record boundary # should fail + $fatal_alert = 0; $proxy->clear(); $boundary_test_type = DATA_AFTER_FINISHED; $proxy->filter(\¬_on_record_boundary); $proxy->start(); - ok(TLSProxy::Message->fail(), "Record not on boundary in TLS1.3 (Finished)"); + ok($fatal_alert, "Record not on boundary in TLS1.3 (Finished)"); #Test 18: Sending a KeyUpdate which doesn't end on a record boundary # should fail + $fatal_alert = 0; $proxy->clear(); $boundary_test_type = DATA_AFTER_KEY_UPDATE; $proxy->filter(\¬_on_record_boundary); $proxy->start(); - ok(TLSProxy::Message->fail(), "Record not on boundary in TLS1.3 (KeyUpdate)"); + ok($fatal_alert, "Record not on boundary in TLS1.3 (KeyUpdate)"); } sub add_empty_recs_filter { my $proxy = shift; + my $records = $proxy->record_list; # We're only interested in the initial ClientHello if ($proxy->flight != 0) { + $fatal_alert = 1 if @{$records}[-1]->is_fatal_alert(1) == 10; return; } @@ -221,18 +236,19 @@ sub add_empty_recs_filter "", "" ); - - push @{$proxy->record_list}, $record; + push @{$records}, $record; } } sub add_frag_alert_filter { my $proxy = shift; + my $records = $proxy->record_list; my $byte; # We're only interested in the initial ClientHello if ($proxy->flight != 0) { + $fatal_alert = 1 if @{$records}[-1]->is_fatal_alert(1) == 10; return; } @@ -262,7 +278,7 @@ sub add_frag_alert_filter $byte, $byte ); - push @{$proxy->record_list}, $record; + push @{$records}, $record; # And finally the description (Unexpected message) in a third record $byte = pack('C', TLSProxy::Message::AL_DESC_UNEXPECTED_MESSAGE); @@ -277,7 +293,7 @@ sub add_frag_alert_filter $byte, $byte ); - push @{$proxy->record_list}, $record; + push @{$records}, $record; } sub add_sslv2_filter @@ -430,17 +446,22 @@ sub add_sslv2_filter sub add_unknown_record_type { my $proxy = shift; + my $records = $proxy->record_list; + state $added_record; # We'll change a record after the initial version neg has taken place - if ($proxy->flight != 1) { + if ($proxy->flight == 0) { + $added_record = 0; + return; + } elsif ($proxy->flight != 1 || $added_record) { + $fatal_alert = 1 if @{$records}[-1]->is_fatal_alert(0) == 10; return; } - my $lastrec = ${$proxy->record_list}[-1]; my $record = TLSProxy::Record->new( 1, TLSProxy::Record::RT_UNKNOWN, - $lastrec->version(), + @{$records}[-1]->version(), 1, 0, 1, @@ -457,64 +478,86 @@ sub add_unknown_record_type $i++; splice @{$proxy->record_list}, $i, 0, $record; + $added_record = 1; } sub change_version { my $proxy = shift; + my $records = $proxy->record_list; # We'll change a version after the initial version neg has taken place if ($proxy->flight != 1) { + $fatal_alert = 1 if @{$records}[-1]->is_fatal_alert(0) == 70; return; } - (${$proxy->record_list}[-1])->version(TLSProxy::Record::VERS_TLS_1_1); + if ($#{$records} > 1) { + # ... typically in ServerHelloDone + @{$records}[-1]->version(TLSProxy::Record::VERS_TLS_1_1); + } } sub change_outer_record_type { my $proxy = shift; + my $records = $proxy->record_list; # We'll change a record after the initial version neg has taken place if ($proxy->flight != 1) { + $fatal_alert = 1 if @{$records}[-1]->is_fatal_alert(0) == 10; return; } - #Find ServerHello record and change record after that - my $i; - for ($i = 0; ${$proxy->record_list}[$i]->flight() < 1; $i++) { - next; + # Find CCS record and change record after that + my $i = 0; + foreach my $record (@{$records}) { + last if $record->content_type == TLSProxy::Record::RT_CCS; + $i++; + } + if (defined(${$records}[++$i])) { + ${$records}[$i]->outer_content_type(TLSProxy::Record::RT_HANDSHAKE); } - #Skip CCS and ServerHello - $i += 2; - ${$proxy->record_list}[$i]->outer_content_type(TLSProxy::Record::RT_HANDSHAKE); } sub not_on_record_boundary { my $proxy = shift; + my $records = $proxy->record_list; my $data; #Find server's first flight if ($proxy->flight != 1) { + $fatal_alert = 1 if @{$records}[-1]->is_fatal_alert(0) == 10; return; } if ($boundary_test_type == DATA_AFTER_SERVER_HELLO) { #Merge the ServerHello and EncryptedExtensions records into one - my $i; - for ($i = 0; ${$proxy->record_list}[$i]->flight() < 1; $i++) { - next; + my $i = 0; + foreach my $record (@{$records}) { + if ($record->content_type == TLSProxy::Record::RT_HANDSHAKE) { + $record->{sent} = 1; # pretend it's sent already + last; + } + $i++; } - $data = ${$proxy->record_list}[$i]->data(); - $data .= ${$proxy->record_list}[$i + 1]->decrypt_data(); - ${$proxy->record_list}[$i]->data($data); - ${$proxy->record_list}[$i]->len(length $data); - #Delete the old EncryptedExtensions record - splice @{$proxy->record_list}, $i + 1, 1; + if (defined(${$records}[$i+1])) { + $data = ${$records}[$i]->data(); + $data .= ${$records}[$i+1]->decrypt_data(); + ${$records}[$i+1]->data($data); + ${$records}[$i+1]->len(length $data); + + #Delete the old ServerHello record + splice @{$records}, $i, 1; + } } elsif ($boundary_test_type == DATA_AFTER_FINISHED) { - $data = ${$proxy->record_list}[-1]->decrypt_data; + return if @{$proxy->{message_list}}[-1]->{mt} + != TLSProxy::Message::MT_FINISHED; + + my $last_record = @{$records}[-1]; + $data = $last_record->decrypt_data; #Add a KeyUpdate message onto the end of the Finished record my $keyupdate = pack "C5", @@ -528,15 +571,18 @@ sub not_on_record_boundary $data .= pack("C", TLSProxy::Record::RT_HANDSHAKE).("\0"x16); #Update the record - ${$proxy->record_list}[-1]->data($data); - ${$proxy->record_list}[-1]->len(length $data); + $last_record->data($data); + $last_record->len(length $data); } else { + return if @{$proxy->{message_list}}[-1]->{mt} + != TLSProxy::Message::MT_FINISHED; + #KeyUpdates must end on a record boundary my $record = TLSProxy::Record->new( 1, TLSProxy::Record::RT_APPLICATION_DATA, - TLSProxy::Record::VERS_TLS_1_0, + TLSProxy::Record::VERS_TLS_1_2, 0, 0, 0, @@ -558,6 +604,6 @@ sub not_on_record_boundary $record->data($data); $record->len(length $data); - push @{$proxy->record_list}, $record; + push @{$records}, $record; } } diff --git a/util/perl/TLSProxy/Message.pm b/util/perl/TLSProxy/Message.pm index 68179d9..4a60ba0 100644 --- a/util/perl/TLSProxy/Message.pm +++ b/util/perl/TLSProxy/Message.pm @@ -267,14 +267,17 @@ sub get_messages } } elsif ($record->content_type == TLSProxy::Record::RT_ALERT) { my ($alertlev, $alertdesc) = unpack('CC', $record->decrypt_data); + print " [$alertlev, $alertdesc]\n"; #A CloseNotify from the client indicates we have finished successfully #(we assume) if (!$end && !$server && $alertlev == AL_LEVEL_WARN && $alertdesc == AL_DESC_CLOSE_NOTIFY) { $success = 1; } - #All alerts end the test - $end = 1; + #Fatal or close notify alerts end the test + if ($alertlev == AL_LEVEL_FATAL || $alertdesc == AL_DESC_CLOSE_NOTIFY) { + $end = 1; + } } return @messages; diff --git a/util/perl/TLSProxy/Proxy.pm b/util/perl/TLSProxy/Proxy.pm index 9e9764d..de6d2fd 100644 --- a/util/perl/TLSProxy/Proxy.pm +++ b/util/perl/TLSProxy/Proxy.pm @@ -239,7 +239,7 @@ sub start open(my $savedin, "<&STDIN"); # Temporarily replace STDIN so that sink process can inherit it... - $pid = open(STDIN, "$execcmd |") or die "Failed to $execcmd: $!\n"; + $pid = open(STDIN, "$execcmd 2>&1 |") or die "Failed to $execcmd: $!\n"; $self->{real_serverpid} = $pid; # Process the output from s_server until we find the ACCEPT line, which @@ -369,13 +369,14 @@ sub clientstart $fdset = IO::Select->new($server_sock, $client_sock); my @ready; my $ctr = 0; - my $sessionfile = $self->{sessionfile}; local $SIG{PIPE} = "IGNORE"; + $self->{saw_session_ticket} = undef; while($fdset->count && $ctr < 10) { - if (defined($sessionfile)) { + if (defined($self->{sessionfile})) { # s_client got -ign_eof and won't be exiting voluntarily, so we - # look for data *and* check on session file... - last if TLSProxy::Message->success() && -s $sessionfile; + # look for data *and* session ticket... + last if TLSProxy::Message->success() + && $self->{saw_session_ticket}; } if (!(@ready = $fdset->can_read(1))) { $ctr++; @@ -449,7 +450,7 @@ sub clientstart $self->connect_to_server(); } $pid = $self->{clientpid}; - print "Waiting for client process to close: $pid...\n"; + print "Waiting for s_client process to close: $pid...\n"; waitpid($pid, 0); return 1; @@ -496,6 +497,14 @@ sub process_packet $self->filter->($self); } + #Take a note on NewSessionTicket + foreach my $message (reverse @{$self->{message_list}}) { + if ($message->{mt} == TLSProxy::Message::MT_NEW_SESSION_TICKET) { + $self->{saw_session_ticket} = 1; + last; + } + } + #Reconstruct the packet $packet = ""; foreach my $record (@{$self->record_list}) { diff --git a/util/perl/TLSProxy/Record.pm b/util/perl/TLSProxy/Record.pm index 49a0084..8ff948b 100644 --- a/util/perl/TLSProxy/Record.pm +++ b/util/perl/TLSProxy/Record.pm @@ -67,17 +67,13 @@ sub get_records my $recnum = 1; while (length ($packet) > 0) { - print " Record $recnum"; - if ($server) { - print " (server -> client)\n"; - } else { - print " (client -> server)\n"; - } + print " Record $recnum ", $server ? "(server -> client)\n" + : "(client -> server)\n"; #Get the record header (unpack can't fail if $packet is too short) my ($content_type, $version, $len) = unpack('Cnn', $packet); - if (length($packet) < TLS_RECORD_HEADER_LENGTH + $len) { + if (length($packet) < TLS_RECORD_HEADER_LENGTH + ($len // 0)) { print "Partial data : ".length($packet)." bytes\n"; $partial = $packet; last; @@ -389,4 +385,16 @@ sub outer_content_type } return $self->{outer_content_type}; } +sub is_fatal_alert +{ + my $self = shift; + my $server = shift; + + if (($self->{flight} & 1) == $server + && $self->{content_type} == TLSProxy::Record::RT_ALERT) { + my ($level, $alert) = unpack('CC', $self->decrypt_data); + return $alert if ($level == 2); + } + return 0; +} 1; From appro at openssl.org Wed Apr 18 18:08:46 2018 From: appro at openssl.org (Andy Polyakov) Date: Wed, 18 Apr 2018 18:08:46 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524074926.307915.3919.nullmailer@dev.openssl.org> The branch master has been updated via b3199e54d65f25c5ef6e54e129e228831a1fb363 (commit) from f3d3b362553d95047d93608edd15d20aa6e6e0fd (commit) - Log ----------------------------------------------------------------- commit b3199e54d65f25c5ef6e54e129e228831a1fb363 Author: Andy Polyakov Date: Tue Apr 17 21:30:22 2018 +0200 apps/s_socket.c: fix memory sanitizer problem in ACCEPT printout. Reviewed-by: Rich Salz Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5994) ----------------------------------------------------------------------- Summary of changes: apps/s_socket.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/s_socket.c b/apps/s_socket.c index d21bfc6..69f0f4f 100644 --- a/apps/s_socket.c +++ b/apps/s_socket.c @@ -211,7 +211,7 @@ int do_server(int *accept_sock, const char *host, const char *port, int i; BIO_ADDRINFO *res = NULL; const BIO_ADDRINFO *next; - int sock_family, sock_type, sock_protocol; + int sock_family, sock_type, sock_protocol, sock_port; const BIO_ADDR *sock_address; int sock_options = BIO_SOCK_REUSEADDR; int ret = 0; @@ -280,10 +280,12 @@ int do_server(int *accept_sock, const char *host, const char *port, } #endif + sock_port = BIO_ADDR_rawport(sock_address); + BIO_ADDRINFO_free(res); res = NULL; - if (BIO_ADDR_rawport(sock_address) == 0) { + if (sock_port == 0) { /* dynamically allocated port, report which one */ union BIO_sock_info_u info; char *hostname = NULL; From no-reply at appveyor.com Wed Apr 18 18:10:28 2018 From: no-reply at appveyor.com (AppVeyor) Date: Wed, 18 Apr 2018 18:10:28 +0000 Subject: [openssl-commits] Build completed: openssl master.17363 Message-ID: <20180418181028.1.FF5BAA3ED2BB298C@appveyor.com> An HTML attachment was scrubbed... URL: From rsalz at openssl.org Wed Apr 18 20:42:59 2018 From: rsalz at openssl.org (Rich Salz) Date: Wed, 18 Apr 2018 20:42:59 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524084179.218209.29693.nullmailer@dev.openssl.org> The branch master has been updated via cb1b2cafe11f2008b0acc91726a6a6760f16fe28 (commit) from b3199e54d65f25c5ef6e54e129e228831a1fb363 (commit) - Log ----------------------------------------------------------------- commit cb1b2cafe11f2008b0acc91726a6a6760f16fe28 Author: Beat Bolli Date: Wed Apr 18 16:42:11 2018 -0400 Clarify the configuration module in config.pod Similar to 0652e8a7 ("Clarify default section in config.pod", 2018-04-12), reword a sentence to make it easier to parse. Reviewed-by: Andy Polyakov Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5794) ----------------------------------------------------------------------- Summary of changes: doc/man5/config.pod | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/man5/config.pod b/doc/man5/config.pod index c930ddd..3e110b0 100644 --- a/doc/man5/config.pod +++ b/doc/man5/config.pod @@ -88,9 +88,9 @@ of the configuration file. The configuration section should consist of a set of name value pairs which contain specific module configuration information. The B represents -the name of the I the meaning of the B is +the name of the I. The meaning of the B is module specific: it may, for example, represent a further configuration -section containing configuration module specific information. E.g. +section containing configuration module specific information. E.g.: # This must be in the default section openssl_conf = openssl_init From openssl at openssl.org Thu Apr 19 00:40:31 2018 From: openssl at openssl.org (OpenSSL run-checker) Date: Thu, 19 Apr 2018 00:40:31 +0000 Subject: [openssl-commits] Still FAILED build of OpenSSL branch master with options -d --strict-warnings no-ec Message-ID: <1524098431.476132.16442.nullmailer@run.openssl.org> Platform and configuration command: $ uname -a Linux run 4.4.0-119-generic #143-Ubuntu SMP Mon Apr 2 16:08:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux $ CC=clang ../openssl/config -d --strict-warnings no-ec Commit log since last time: cb1b2ca Clarify the configuration module in config.pod b3199e5 apps/s_socket.c: fix memory sanitizer problem in ACCEPT printout. f3d3b36 TLSProxy/Proxy.pm: preclude output intermix. c4220c0 recipes/70-test_ssl{cbcpadding,extension,records}: make it work w/fragmentation. 3f1f62b TLSProxy/Record.pm: add is_fatal_alert method. 17cde9c TLSProxy/Proxy.pm: refine NewSessionTicket detection. 3f473b9 TLSProxy/Message.pm: refine end-of-conversation detection logic. 5bb1cd2 poly1305/asm/poly1305-armv4.pl: remove unintentional relocation. 2f8271e Style: ssl.h be93b0e Update EVP_DigestSignInit() docs d4da95a test: Remove redundant SSL_CTX_set_max_early_data 01a2a65 Add support for logging early exporter secret cffe973 Add test for CLIENT_EARLY_TRAFFIC_SECRET key logging 6329ce8 Add support for logging TLS 1.3 exporter secret Build log ended with (last 100 lines): /usr/bin/perl ../openssl/test/generate_buildtest.pl x509_vfy > test/buildtest_x509_vfy.c /usr/bin/perl ../openssl/test/generate_buildtest.pl x509v3 > test/buildtest_x509v3.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/casttest.d.tmp -MT test/casttest.o -c -o test/casttest.o ../openssl/test/casttest.c clang -I. -Iinclude -Icrypto/include -I../openssl -I../openssl/include -I../openssl/crypto/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/chacha_internal_test.d.tmp -MT test/chacha_internal_test.o -c -o test/chacha_internal_test.o ../openssl/test/chacha_internal_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/cipherbytes_test.d.tmp -MT test/cipherbytes_test.o -c -o test/cipherbytes_test.o ../openssl/test/cipherbytes_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/cipherlist_test.d.tmp -MT test/cipherlist_test.o -c -o test/cipherlist_test.o ../openssl/test/cipherlist_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ciphername_test.d.tmp -MT test/ciphername_test.o -c -o test/ciphername_test.o ../openssl/test/ciphername_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/clienthellotest.d.tmp -MT test/clienthellotest.o -c -o test/clienthellotest.o ../openssl/test/clienthellotest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/conf_include_test.d.tmp -MT test/conf_include_test.o -c -o test/conf_include_test.o ../openssl/test/conf_include_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/constant_time_test.d.tmp -MT test/constant_time_test.o -c -o test/constant_time_test.o ../openssl/test/constant_time_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/crltest.d.tmp -MT test/crltest.o -c -o test/crltest.o ../openssl/test/crltest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ct_test.d.tmp -MT test/ct_test.o -c -o test/ct_test.o ../openssl/test/ct_test.c clang -I. -Icrypto/include -Iinclude -I../openssl -I../openssl/crypto/include -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ctype_internal_test.d.tmp -MT test/ctype_internal_test.o -c -o test/ctype_internal_test.o ../openssl/test/ctype_internal_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/d2i_test.d.tmp -MT test/d2i_test.o -c -o test/d2i_test.o ../openssl/test/d2i_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/danetest.d.tmp -MT test/danetest.o -c -o test/danetest.o ../openssl/test/danetest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/destest.d.tmp -MT test/destest.o -c -o test/destest.o ../openssl/test/destest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/dhtest.d.tmp -MT test/dhtest.o -c -o test/dhtest.o ../openssl/test/dhtest.c clang -Iinclude -Itest -I. -I../openssl/include -I../openssl/test -I../openssl -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/drbg_cavs_data.d.tmp -MT test/drbg_cavs_data.o -c -o test/drbg_cavs_data.o ../openssl/test/drbg_cavs_data.c clang -Iinclude -Itest -I. -I../openssl/include -I../openssl/test -I../openssl -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/drbg_cavs_test.d.tmp -MT test/drbg_cavs_test.o -c -o test/drbg_cavs_test.o ../openssl/test/drbg_cavs_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/drbgtest.d.tmp -MT test/drbgtest.o -c -o test/drbgtest.o ../openssl/test/drbgtest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/dsatest.d.tmp -MT test/dsatest.o -c -o test/dsatest.o ../openssl/test/dsatest.c clang -I. -Iinclude -I../openssl -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/dtls_mtu_test.d.tmp -MT test/dtls_mtu_test.o -c -o test/dtls_mtu_test.o ../openssl/test/dtls_mtu_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/dtlstest.d.tmp -MT test/dtlstest.o -c -o test/dtlstest.o ../openssl/test/dtlstest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/dtlsv1listentest.d.tmp -MT test/dtlsv1listentest.o -c -o test/dtlsv1listentest.o ../openssl/test/dtlsv1listentest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ecdsatest.d.tmp -MT test/ecdsatest.o -c -o test/ecdsatest.o ../openssl/test/ecdsatest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ecstresstest.d.tmp -MT test/ecstresstest.o -c -o test/ecstresstest.o ../openssl/test/ecstresstest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ectest.d.tmp -MT test/ectest.o -c -o test/ectest.o ../openssl/test/ectest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/enginetest.d.tmp -MT test/enginetest.o -c -o test/enginetest.o ../openssl/test/enginetest.c clang -Iinclude -Icrypto/include -I../openssl/include -I../openssl/crypto/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/evp_extra_test.d.tmp -MT test/evp_extra_test.o -c -o test/evp_extra_test.o ../openssl/test/evp_extra_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/evp_test.d.tmp -MT test/evp_test.o -c -o test/evp_test.o ../openssl/test/evp_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/exdatatest.d.tmp -MT test/exdatatest.o -c -o test/exdatatest.o ../openssl/test/exdatatest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/exptest.d.tmp -MT test/exptest.o -c -o test/exptest.o ../openssl/test/exptest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/fatalerrtest.d.tmp -MT test/fatalerrtest.o -c -o test/fatalerrtest.o ../openssl/test/fatalerrtest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/gmdifftest.d.tmp -MT test/gmdifftest.o -c -o test/gmdifftest.o ../openssl/test/gmdifftest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/hmactest.d.tmp -MT test/hmactest.o -c -o test/hmactest.o ../openssl/test/hmactest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ideatest.d.tmp -MT test/ideatest.o -c -o test/ideatest.o ../openssl/test/ideatest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/igetest.d.tmp -MT test/igetest.o -c -o test/igetest.o ../openssl/test/igetest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/lhash_test.d.tmp -MT test/lhash_test.o -c -o test/lhash_test.o ../openssl/test/lhash_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/md2test.d.tmp -MT test/md2test.o -c -o test/md2test.o ../openssl/test/md2test.c clang -I. -Iinclude -I../openssl -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/mdc2_internal_test.d.tmp -MT test/mdc2_internal_test.o -c -o test/mdc2_internal_test.o ../openssl/test/mdc2_internal_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/mdc2test.d.tmp -MT test/mdc2test.o -c -o test/mdc2test.o ../openssl/test/mdc2test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/memleaktest.d.tmp -MT test/memleaktest.o -c -o test/memleaktest.o ../openssl/test/memleaktest.c clang -I. -Iinclude -I../openssl -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/modes_internal_test.d.tmp -MT test/modes_internal_test.o -c -o test/modes_internal_test.o ../openssl/test/modes_internal_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ocspapitest.d.tmp -MT test/ocspapitest.o -c -o test/ocspapitest.o ../openssl/test/ocspapitest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/packettest.d.tmp -MT test/packettest.o -c -o test/packettest.o ../openssl/test/packettest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/pbelutest.d.tmp -MT test/pbelutest.o -c -o test/pbelutest.o ../openssl/test/pbelutest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/pemtest.d.tmp -MT test/pemtest.o -c -o test/pemtest.o ../openssl/test/pemtest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/pkey_meth_kdf_test.d.tmp -MT test/pkey_meth_kdf_test.o -c -o test/pkey_meth_kdf_test.o ../openssl/test/pkey_meth_kdf_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/pkey_meth_test.d.tmp -MT test/pkey_meth_test.o -c -o test/pkey_meth_test.o ../openssl/test/pkey_meth_test.c clang -I. -Iinclude -Icrypto/include -I../openssl -I../openssl/include -I../openssl/crypto/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/poly1305_internal_test.d.tmp -MT test/poly1305_internal_test.o -c -o test/poly1305_internal_test.o ../openssl/test/poly1305_internal_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/rc2test.d.tmp -MT test/rc2test.o -c -o test/rc2test.o ../openssl/test/rc2test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/rc4test.d.tmp -MT test/rc4test.o -c -o test/rc4test.o ../openssl/test/rc4test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/rc5test.d.tmp -MT test/rc5test.o -c -o test/rc5test.o ../openssl/test/rc5test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/rdrand_sanitytest.d.tmp -MT test/rdrand_sanitytest.o -c -o test/rdrand_sanitytest.o ../openssl/test/rdrand_sanitytest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/recordlentest.d.tmp -MT test/recordlentest.o -c -o test/recordlentest.o ../openssl/test/recordlentest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/rsa_mp_test.d.tmp -MT test/rsa_mp_test.o -c -o test/rsa_mp_test.o ../openssl/test/rsa_mp_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/rsa_test.d.tmp -MT test/rsa_test.o -c -o test/rsa_test.o ../openssl/test/rsa_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/sanitytest.d.tmp -MT test/sanitytest.o -c -o test/sanitytest.o ../openssl/test/sanitytest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/secmemtest.d.tmp -MT test/secmemtest.o -c -o test/secmemtest.o ../openssl/test/secmemtest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/servername_test.d.tmp -MT test/servername_test.o -c -o test/servername_test.o ../openssl/test/servername_test.c clang -Iinclude -Icrypto/include -I../openssl/include -I../openssl/crypto/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/shlibloadtest.d.tmp -MT test/shlibloadtest.o -c -o test/shlibloadtest.o ../openssl/test/shlibloadtest.c clang -I. -Iinclude -Icrypto/include -I../openssl -I../openssl/include -I../openssl/crypto/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/siphash_internal_test.d.tmp -MT test/siphash_internal_test.o -c -o test/siphash_internal_test.o ../openssl/test/siphash_internal_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/sm2crypttest.d.tmp -MT test/sm2crypttest.o -c -o test/sm2crypttest.o ../openssl/test/sm2crypttest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/sm2sigtest.d.tmp -MT test/sm2sigtest.o -c -o test/sm2sigtest.o ../openssl/test/sm2sigtest.c clang -I. -Iinclude -Icrypto/include -I../openssl -I../openssl/include -I../openssl/crypto/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/sm4_internal_test.d.tmp -MT test/sm4_internal_test.o -c -o test/sm4_internal_test.o ../openssl/test/sm4_internal_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/srptest.d.tmp -MT test/srptest.o -c -o test/srptest.o ../openssl/test/srptest.c clang -I. -Iinclude -I../openssl -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ssl_cert_table_internal_test.d.tmp -MT test/ssl_cert_table_internal_test.o -c -o test/ssl_cert_table_internal_test.o ../openssl/test/ssl_cert_table_internal_test.c clang -I. -Iinclude -I../openssl -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/handshake_helper.d.tmp -MT test/handshake_helper.o -c -o test/handshake_helper.o ../openssl/test/handshake_helper.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ssl_test.d.tmp -MT test/ssl_test.o -c -o test/ssl_test.o ../openssl/test/ssl_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ssl_test_ctx.d.tmp -MT test/ssl_test_ctx.o -c -o test/ssl_test_ctx.o ../openssl/test/ssl_test_ctx.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ssl_test_ctx_test.d.tmp -MT test/ssl_test_ctx_test.o -c -o test/ssl_test_ctx_test.o ../openssl/test/ssl_test_ctx_test.c clang -Iinclude -I. -I../openssl/include -I../openssl -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/sslapitest.d.tmp -MT test/sslapitest.o -c -o test/sslapitest.o ../openssl/test/sslapitest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/sslbuffertest.d.tmp -MT test/sslbuffertest.o -c -o test/sslbuffertest.o ../openssl/test/sslbuffertest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/sslcorrupttest.d.tmp -MT test/sslcorrupttest.o -c -o test/sslcorrupttest.o ../openssl/test/sslcorrupttest.c ../openssl/test/sslapitest.c:4317:24: error: implicit declaration of function 'setupearly_data_test' is invalid in C99 [-Werror,-Wimplicit-function-declaration] if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, ^ clang -I. -Iinclude -I../openssl -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ssltest_old.d.tmp -MT test/ssltest_old.o -c -o test/ssltest_old.o ../openssl/test/ssltest_old.c ../openssl/test/sslapitest.c:4328:69: error: use of undeclared identifier 'MSG1' if (!TEST_true(SSL_write_early_data(clientssl, MSG1, strlen(MSG1), ^ ../openssl/test/sslapitest.c:4328:56: error: use of undeclared identifier 'MSG1' if (!TEST_true(SSL_write_early_data(clientssl, MSG1, strlen(MSG1), ^ ../openssl/test/sslapitest.c:4330:52: error: use of undeclared identifier 'MSG1' || !TEST_size_t_eq(written, strlen(MSG1)) ^ ../openssl/test/sslapitest.c:4334:62: error: use of undeclared identifier 'MSG1' || !TEST_mem_eq(MSG1, readbytes, buf, strlen(MSG1)) ^ ../openssl/test/sslapitest.c:4334:33: error: use of undeclared identifier 'MSG1' || !TEST_mem_eq(MSG1, readbytes, buf, strlen(MSG1)) ^ 6 errors generated. Makefile:8709: recipe for target 'test/sslapitest.o' failed make[1]: *** [test/sslapitest.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory '/home/openssl/run-checker/no-ec' Makefile:171: recipe for target 'all' failed make: *** [all] Error 2 From viktor at openssl.org Thu Apr 19 02:30:35 2018 From: viktor at openssl.org (Viktor Dukhovni) Date: Thu, 19 Apr 2018 02:30:35 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524105035.456437.20703.nullmailer@dev.openssl.org> The branch master has been updated via a4107d73d597a6f8754f7cf5c8c53d2097bea652 (commit) from cb1b2cafe11f2008b0acc91726a6a6760f16fe28 (commit) - Log ----------------------------------------------------------------- commit a4107d73d597a6f8754f7cf5c8c53d2097bea652 Author: Viktor Dukhovni Date: Wed Apr 18 19:52:26 2018 -0400 Add missing index_index() when reloading OCSP responder Also, future-proof index_index() return codes by requiring success to return a positive value. Reviewed-by: Rich Salz ----------------------------------------------------------------------- Summary of changes: apps/apps.c | 3 +++ apps/ca.c | 4 ++-- apps/ocsp.c | 5 +++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/apps/apps.c b/apps/apps.c index 5a32dc0..6ae8523 100644 --- a/apps/apps.c +++ b/apps/apps.c @@ -1597,6 +1597,9 @@ CA_DB *load_index(const char *dbfile, DB_ATTR *db_attr) return retdb; } +/* + * Returns > 0 on success, <= 0 on error + */ int index_index(CA_DB *db) { if (!TXT_DB_create_index(db->db, DB_serial, NULL, diff --git a/apps/ca.c b/apps/ca.c index d530cf5..1c053b5 100644 --- a/apps/ca.c +++ b/apps/ca.c @@ -498,7 +498,7 @@ end_of_options: if (db == NULL) goto end; - if (!index_index(db)) + if (index_index(db) <= 0) goto end; if (get_certificate_status(ser_status, db) != 1) @@ -672,7 +672,7 @@ end_of_options: BIO_printf(bio_err, "generating index\n"); } - if (!index_index(db)) + if (index_index(db) <= 0) goto end; /*****************************************************************/ diff --git a/apps/ocsp.c b/apps/ocsp.c index 3c5534a..83461c7 100644 --- a/apps/ocsp.c +++ b/apps/ocsp.c @@ -559,7 +559,7 @@ int ocsp_main(int argc, char **argv) if (ridx_filename != NULL) { rdb = load_index(ridx_filename, NULL); - if (rdb == NULL || !index_index(rdb)) { + if (rdb == NULL || index_index(rdb) <= 0) { ret = 1; goto end; } @@ -582,10 +582,11 @@ redo_accept: if (index_changed(rdb)) { CA_DB *newrdb = load_index(ridx_filename, NULL); - if (newrdb != NULL) { + if (newrdb != NULL && index_index(newrdb) > 0) { free_index(rdb); rdb = newrdb; } else { + free_index(newrdb); log_message(LOG_ERR, "error reloading updated index: %s", ridx_filename); } From no-reply at appveyor.com Thu Apr 19 06:12:52 2018 From: no-reply at appveyor.com (AppVeyor) Date: Thu, 19 Apr 2018 06:12:52 +0000 Subject: [openssl-commits] Build failed: openssl master.17373 Message-ID: <20180419061252.1.2446DD7D0BEB55AB@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Thu Apr 19 07:23:16 2018 From: no-reply at appveyor.com (AppVeyor) Date: Thu, 19 Apr 2018 07:23:16 +0000 Subject: [openssl-commits] Build completed: openssl master.17374 Message-ID: <20180419072316.1.05F7901E2BA2D9CC@appveyor.com> An HTML attachment was scrubbed... URL: From matt at openssl.org Thu Apr 19 07:35:03 2018 From: matt at openssl.org (Matt Caswell) Date: Thu, 19 Apr 2018 07:35:03 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1524123303.646083.9996.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via b6d6b4cd37bf92fded03a0babb80a639b95e96c8 (commit) from e88f5d57efa5031e4863d455e2b5a9f7f4096c8b (commit) - Log ----------------------------------------------------------------- commit b6d6b4cd37bf92fded03a0babb80a639b95e96c8 Author: Matt Caswell Date: Tue Apr 17 15:33:17 2018 +0100 Update EVP_DigestSignInit() docs Explicitly state which digests can be used with which algorithms. Fixes #5854 Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5995) ----------------------------------------------------------------------- Summary of changes: doc/crypto/EVP_DigestSignInit.pod | 43 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/doc/crypto/EVP_DigestSignInit.pod b/doc/crypto/EVP_DigestSignInit.pod index 7ec06b7..a3d7a35 100644 --- a/doc/crypto/EVP_DigestSignInit.pod +++ b/doc/crypto/EVP_DigestSignInit.pod @@ -21,7 +21,48 @@ EVP_DigestSignInit() sets up signing context B to use digest B from ENGINE B and private key B. B must be created with EVP_MD_CTX_new() before calling this function. If B is not NULL the EVP_PKEY_CTX of the signing operation will be written to B<*pctx>: this can -be used to set alternative signing options. +be used to set alternative signing options. The digest B may be NULL if +the signing algorithm supports it. + +Only EVP_PKEY types that support signing can be used with these functions. This +includes MAC algorithms where the MAC generation is considered as a form of +"signing." Built-in EVP_PKEY types supported by these functions are CMAC, DSA, +ECDSA, HMAC and RSA. + +Not all digests can be used for all key types. The following combinations apply. + +=over 4 + +=item DSA + +Supports SHA1, SHA224, SHA256, SHA384 and SHA512 + +=item ECDSA + +Supports SHA1, SHA224, SHA256, SHA384 and SHA512 + +=item RSA with no padding + +Supports no digests (the digest B must be NULL) + +=item RSA with X931 padding + +Supports SHA1, SHA256, SHA384 and SHA512 + +=item All other RSA padding types + +Support SHA1, SHA224, SHA256, SHA384, SHA512, MD5, MD5_SHA1, MD2, MD4, MDC2, +RIPEMD160 + +=item HMAC + +Supports any digest + +=item CMAC + +Will ignore any digest provided. + +=back EVP_DigestSignUpdate() hashes B bytes of data at B into the signature context B. This function can be called several times on the From matt at openssl.org Thu Apr 19 07:36:19 2018 From: matt at openssl.org (Matt Caswell) Date: Thu, 19 Apr 2018 07:36:19 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524123379.909213.11199.nullmailer@dev.openssl.org> The branch master has been updated via c637891310ecfa9b3568da52a813cdf4a9872cf1 (commit) from a4107d73d597a6f8754f7cf5c8c53d2097bea652 (commit) - Log ----------------------------------------------------------------- commit c637891310ecfa9b3568da52a813cdf4a9872cf1 Author: Matt Caswell Date: Wed Apr 18 08:48:26 2018 +0100 Correct an ommission in the EVP_DigestSignInit docs Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5996) ----------------------------------------------------------------------- Summary of changes: doc/man3/EVP_DigestSignInit.pod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/man3/EVP_DigestSignInit.pod b/doc/man3/EVP_DigestSignInit.pod index fc19c01..400e89d 100644 --- a/doc/man3/EVP_DigestSignInit.pod +++ b/doc/man3/EVP_DigestSignInit.pod @@ -32,7 +32,7 @@ the signing algorithm supports it. Only EVP_PKEY types that support signing can be used with these functions. This includes MAC algorithms where the MAC generation is considered as a form of "signing." Built-in EVP_PKEY types supported by these functions are CMAC, -Poly1305, DSA, HMAC, RSA, SipHash, Ed25519 and Ed448. +Poly1305, DSA, ECDSA, HMAC, RSA, SipHash, Ed25519 and Ed448. Not all digests can be used for all key types. The following combinations apply. From matt at openssl.org Thu Apr 19 07:39:08 2018 From: matt at openssl.org (Matt Caswell) Date: Thu, 19 Apr 2018 07:39:08 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524123548.680961.12502.nullmailer@dev.openssl.org> The branch master has been updated via 6e07834ca0eaeb38da2696e74c16082efd45bbe2 (commit) from c637891310ecfa9b3568da52a813cdf4a9872cf1 (commit) - Log ----------------------------------------------------------------- commit 6e07834ca0eaeb38da2696e74c16082efd45bbe2 Author: Matt Caswell Date: Wed Apr 18 09:29:18 2018 +0100 Fix no-ec Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5997) ----------------------------------------------------------------------- Summary of changes: test/sslapitest.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/sslapitest.c b/test/sslapitest.c index 5fef058..c4c0868 100644 --- a/test/sslapitest.c +++ b/test/sslapitest.c @@ -4308,6 +4308,7 @@ static int test_info_callback(int tst) info_cb_this_state = -1; info_cb_offset = tst; +#ifndef OPENSSL_NO_TLS1_3 if (tst >= 4) { SSL_SESSION *sess = NULL; size_t written, readbytes; @@ -4342,6 +4343,7 @@ static int test_info_callback(int tst) testresult = 1; goto end; } +#endif if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), TLS_client_method(), From levitte at openssl.org Thu Apr 19 07:41:17 2018 From: levitte at openssl.org (Richard Levitte) Date: Thu, 19 Apr 2018 07:41:17 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1524123677.190887.13570.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via 48345917747a34feea3da2936994a265c7f2ca11 (commit) from b6d6b4cd37bf92fded03a0babb80a639b95e96c8 (commit) - Log ----------------------------------------------------------------- commit 48345917747a34feea3da2936994a265c7f2ca11 Author: Emilia Kasper Date: Mon Dec 18 18:41:05 2017 +0100 X509_cmp_time: only return 1, 0, -1. The behaviour of X509_cmp_time used to be undocumented. The new behaviour, documented in master, is to return only 0, 1, or -1. Make the code in the other branches to adhere to this behaviour too, to reduce confusion. There is nothing to be gained from returning other values. Fixes GH#4954 Reviewed-by: Rich Salz Reviewed-by: Tim Hudson Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/4955) ----------------------------------------------------------------------- Summary of changes: crypto/x509/x509_vfy.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/crypto/x509/x509_vfy.c b/crypto/x509/x509_vfy.c index 3018c69..b9b36c4 100644 --- a/crypto/x509/x509_vfy.c +++ b/crypto/x509/x509_vfy.c @@ -1865,10 +1865,11 @@ int X509_cmp_time(const ASN1_TIME *ctm, time_t *cmp_time) return 1; } i = strcmp(buff1, buff2); - if (i == 0) /* wait a second then return younger :-) */ - return -1; - else - return i; + /* + * X509_cmp_time comparison is <=. + * The return value 0 is reserved for errors. + */ + return i > 0 ? 1 : -1; } ASN1_TIME *X509_gmtime_adj(ASN1_TIME *s, long adj) From levitte at openssl.org Thu Apr 19 07:42:33 2018 From: levitte at openssl.org (Richard Levitte) Date: Thu, 19 Apr 2018 07:42:33 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_0_2-stable update Message-ID: <1524123753.848671.14496.nullmailer@dev.openssl.org> The branch OpenSSL_1_0_2-stable has been updated via 67567b221bd06aca1719c926fadc5ce1a0452e9a (commit) from 82d8cec06ae8af5dbe68c8e4be38ad32ce9fa594 (commit) - Log ----------------------------------------------------------------- commit 67567b221bd06aca1719c926fadc5ce1a0452e9a Author: Emilia Kasper Date: Mon Dec 18 18:41:05 2017 +0100 X509_cmp_time: only return 1, 0, -1. The behaviour of X509_cmp_time used to be undocumented. The new behaviour, documented in master, is to return only 0, 1, or -1. Make the code in the other branches to adhere to this behaviour too, to reduce confusion. There is nothing to be gained from returning other values. Fixes GH#4954 Reviewed-by: Rich Salz Reviewed-by: Tim Hudson Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/4955) (cherry picked from commit 48345917747a34feea3da2936994a265c7f2ca11) ----------------------------------------------------------------------- Summary of changes: crypto/x509/x509_vfy.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/crypto/x509/x509_vfy.c b/crypto/x509/x509_vfy.c index b147201..ff23833 100644 --- a/crypto/x509/x509_vfy.c +++ b/crypto/x509/x509_vfy.c @@ -2046,10 +2046,11 @@ int X509_cmp_time(const ASN1_TIME *ctm, time_t *cmp_time) return 1; } i = strcmp(buff1, buff2); - if (i == 0) /* wait a second then return younger :-) */ - return -1; - else - return i; + /* + * X509_cmp_time comparison is <=. + * The return value 0 is reserved for errors. + */ + return i > 0 ? 1 : -1; } ASN1_TIME *X509_gmtime_adj(ASN1_TIME *s, long adj) From matt at openssl.org Thu Apr 19 07:43:29 2018 From: matt at openssl.org (Matt Caswell) Date: Thu, 19 Apr 2018 07:43:29 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524123809.419903.15498.nullmailer@dev.openssl.org> The branch master has been updated via c324ecfb2d4a6608d7a5f848968180c7995fc9a6 (commit) from 6e07834ca0eaeb38da2696e74c16082efd45bbe2 (commit) - Log ----------------------------------------------------------------- commit c324ecfb2d4a6608d7a5f848968180c7995fc9a6 Author: Matt Caswell Date: Wed Apr 18 11:07:18 2018 +0100 Fix ocsp app exit code If we run the ocsp command line app and the responder returns a non-successful status code then the app should exit with a failure code. Based on an original patch by Tatsuhiro Tsujikawa. Fixes #2387 Reviewed-by: Rich Salz Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5998) ----------------------------------------------------------------------- Summary of changes: apps/ocsp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/ocsp.c b/apps/ocsp.c index 83461c7..eb822c2 100644 --- a/apps/ocsp.c +++ b/apps/ocsp.c @@ -697,10 +697,8 @@ redo_accept: if (i != OCSP_RESPONSE_STATUS_SUCCESSFUL) { BIO_printf(out, "Responder Error: %s (%d)\n", OCSP_response_status_str(i), i); - if (!ignore_err) { - ret = 0; + if (!ignore_err) goto end; - } } if (resp_text) From matt at openssl.org Thu Apr 19 07:46:24 2018 From: matt at openssl.org (Matt Caswell) Date: Thu, 19 Apr 2018 07:46:24 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1524123984.790582.16650.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via 2add645dfc364cfc609e6138de1bf43c217bb557 (commit) from 48345917747a34feea3da2936994a265c7f2ca11 (commit) - Log ----------------------------------------------------------------- commit 2add645dfc364cfc609e6138de1bf43c217bb557 Author: Matt Caswell Date: Wed Apr 18 11:07:18 2018 +0100 Fix ocsp app exit code If we run the ocsp command line app and the responder returns a non-successful status code then the app should exit with a failure code. Based on an original patch by Tatsuhiro Tsujikawa. Fixes #2387 Reviewed-by: Rich Salz Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5999) ----------------------------------------------------------------------- Summary of changes: apps/ocsp.c | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/ocsp.c b/apps/ocsp.c index 4b53334..511f9d4 100644 --- a/apps/ocsp.c +++ b/apps/ocsp.c @@ -639,7 +639,6 @@ int ocsp_main(int argc, char **argv) OCSP_response_status_str(i), i); if (ignore_err) goto redo_accept; - ret = 0; goto end; } From matt at openssl.org Thu Apr 19 07:49:00 2018 From: matt at openssl.org (Matt Caswell) Date: Thu, 19 Apr 2018 07:49:00 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_0_2-stable update Message-ID: <1524124140.958574.18004.nullmailer@dev.openssl.org> The branch OpenSSL_1_0_2-stable has been updated via 4571b3c8e06dc8d9fba003a3c9b9fb680f1bf223 (commit) from 67567b221bd06aca1719c926fadc5ce1a0452e9a (commit) - Log ----------------------------------------------------------------- commit 4571b3c8e06dc8d9fba003a3c9b9fb680f1bf223 Author: Matt Caswell Date: Wed Apr 18 11:07:18 2018 +0100 Fix ocsp app exit code If we run the ocsp command line app and the responder returns a non-successful status code then the app should exit with a failure code. Based on an original patch by Tatsuhiro Tsujikawa. Fixes #2387 Reviewed-by: Rich Salz Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5999) (cherry picked from commit 2add645dfc364cfc609e6138de1bf43c217bb557) ----------------------------------------------------------------------- Summary of changes: apps/ocsp.c | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/ocsp.c b/apps/ocsp.c index 654eebc..352bdf1 100644 --- a/apps/ocsp.c +++ b/apps/ocsp.c @@ -787,7 +787,6 @@ int MAIN(int argc, char **argv) OCSP_response_status_str(i), i); if (ignore_err) goto redo_accept; - ret = 0; goto end; } From matt at openssl.org Thu Apr 19 07:52:10 2018 From: matt at openssl.org (Matt Caswell) Date: Thu, 19 Apr 2018 07:52:10 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_0_2-stable update Message-ID: <1524124330.495107.19811.nullmailer@dev.openssl.org> The branch OpenSSL_1_0_2-stable has been updated via c6c7bb010770cbf7d818d0ef8f5628decaa7e037 (commit) from 4571b3c8e06dc8d9fba003a3c9b9fb680f1bf223 (commit) - Log ----------------------------------------------------------------- commit c6c7bb010770cbf7d818d0ef8f5628decaa7e037 Author: Matt Caswell Date: Wed Apr 18 12:03:41 2018 +0100 Return 0 on a non-matching kdf_type If we have a non-matching kdf_type then pkey_dh_derive silently succeeds. It should fail. This is a "should not happen" condition anyway so the impact is negligible. Fixes #2440 Reviewed-by: Rich Salz Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/6000) ----------------------------------------------------------------------- Summary of changes: crypto/dh/dh_pmeth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/dh/dh_pmeth.c b/crypto/dh/dh_pmeth.c index 6452482..926be98 100644 --- a/crypto/dh/dh_pmeth.c +++ b/crypto/dh/dh_pmeth.c @@ -486,7 +486,7 @@ static int pkey_dh_derive(EVP_PKEY_CTX *ctx, unsigned char *key, return ret; } #endif - return 1; + return 0; } const EVP_PKEY_METHOD dh_pkey_meth = { From matt at openssl.org Thu Apr 19 07:56:55 2018 From: matt at openssl.org (Matt Caswell) Date: Thu, 19 Apr 2018 07:56:55 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524124615.093081.21918.nullmailer@dev.openssl.org> The branch master has been updated via 7f6dfa19dfbd1d009bf3ab36805b8d132d4ecd56 (commit) via 1c705121af8a0f8095d7cb36419e1166f42cc1e6 (commit) from c324ecfb2d4a6608d7a5f848968180c7995fc9a6 (commit) - Log ----------------------------------------------------------------- commit 7f6dfa19dfbd1d009bf3ab36805b8d132d4ecd56 Author: Matt Caswell Date: Wed Apr 18 14:22:36 2018 +0100 Add a test for a NULL X509_STORE in X509_STORE_CTX_init Reviewed-by: Richard Levitte Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6001) commit 1c705121af8a0f8095d7cb36419e1166f42cc1e6 Author: Matt Caswell Date: Wed Apr 18 14:20:29 2018 +0100 Don't crash if there are no trusted certs The X509_STORE_CTX_init() docs explicitly allow a NULL parameter for the X509_STORE. Therefore we shouldn't crash if we subsequently call X509_verify_cert() and no X509_STORE has been set. Fixes #2462 Reviewed-by: Richard Levitte Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6001) ----------------------------------------------------------------------- Summary of changes: crypto/x509/x509_lu.c | 15 +++++++++++++-- test/verify_extra_test.c | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 2 deletions(-) diff --git a/crypto/x509/x509_lu.c b/crypto/x509/x509_lu.c index a7da7d2..7407005 100644 --- a/crypto/x509/x509_lu.c +++ b/crypto/x509/x509_lu.c @@ -264,6 +264,9 @@ int X509_STORE_CTX_get_by_subject(X509_STORE_CTX *vs, X509_LOOKUP_TYPE type, X509_OBJECT stmp, *tmp; int i, j; + if (ctx == NULL) + return 0; + CRYPTO_THREAD_write_lock(ctx->lock); tmp = X509_OBJECT_retrieve_by_subject(ctx->objs, type, name); CRYPTO_THREAD_unlock(ctx->lock); @@ -473,6 +476,9 @@ STACK_OF(X509) *X509_STORE_CTX_get1_certs(X509_STORE_CTX *ctx, X509_NAME *nm) X509 *x; X509_OBJECT *obj; + if (ctx->ctx == NULL) + return NULL; + CRYPTO_THREAD_write_lock(ctx->ctx->lock); idx = x509_object_idx_cnt(ctx->ctx->objs, X509_LU_X509, nm, &cnt); if (idx < 0) { @@ -522,8 +528,10 @@ STACK_OF(X509_CRL) *X509_STORE_CTX_get1_crls(X509_STORE_CTX *ctx, X509_NAME *nm) X509_OBJECT *obj, *xobj = X509_OBJECT_new(); /* Always do lookup to possibly add new CRLs to cache */ - if (sk == NULL || xobj == NULL || - !X509_STORE_CTX_get_by_subject(ctx, X509_LU_CRL, nm, xobj)) { + if (sk == NULL + || xobj == NULL + || ctx->ctx == NULL + || !X509_STORE_CTX_get_by_subject(ctx, X509_LU_CRL, nm, xobj)) { X509_OBJECT_free(xobj); sk_X509_CRL_free(sk); return NULL; @@ -617,6 +625,9 @@ int X509_STORE_CTX_get1_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *x) } X509_OBJECT_free(obj); + if (ctx->ctx == NULL) + return 0; + /* Else find index of first cert accepted by 'check_issued' */ ret = 0; CRYPTO_THREAD_write_lock(ctx->ctx->lock); diff --git a/test/verify_extra_test.c b/test/verify_extra_test.c index 83d93cd..5d46542 100644 --- a/test/verify_extra_test.c +++ b/test/verify_extra_test.c @@ -138,6 +138,43 @@ static int test_alt_chains_cert_forgery(void) return ret; } +static int test_store_ctx(void) +{ + X509_STORE_CTX *sctx = NULL; + X509 *x = NULL; + BIO *bio = NULL; + int testresult = 0, ret; + + bio = BIO_new_file(bad_f, "r"); + if (bio == NULL) + goto err; + + x = PEM_read_bio_X509(bio, NULL, 0, NULL); + if (x == NULL) + goto err; + + sctx = X509_STORE_CTX_new(); + if (sctx == NULL) + goto err; + + if (!X509_STORE_CTX_init(sctx, NULL, x, NULL)) + goto err; + + /* Verifying a cert where we have no trusted certs should fail */ + ret = X509_verify_cert(sctx); + + if (ret == 0) { + /* This is the result we were expecting: Test passed */ + testresult = 1; + } + + err: + X509_STORE_CTX_free(sctx); + X509_free(x); + BIO_free(bio); + return testresult; +} + int setup_tests(void) { if (!TEST_ptr(roots_f = test_get_argument(0)) @@ -148,5 +185,6 @@ int setup_tests(void) } ADD_TEST(test_alt_chains_cert_forgery); + ADD_TEST(test_store_ctx); return 1; } From matt at openssl.org Thu Apr 19 08:00:26 2018 From: matt at openssl.org (Matt Caswell) Date: Thu, 19 Apr 2018 08:00:26 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1524124826.852007.23992.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via 0e80714fb8175a7c059668e9fab25e4b26a3dae6 (commit) via c02a03bff851cd17c51812643cd1964b7da007f3 (commit) from 2add645dfc364cfc609e6138de1bf43c217bb557 (commit) - Log ----------------------------------------------------------------- commit 0e80714fb8175a7c059668e9fab25e4b26a3dae6 Author: Matt Caswell Date: Wed Apr 18 14:22:36 2018 +0100 Add a test for a NULL X509_STORE in X509_STORE_CTX_init Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/6002) commit c02a03bff851cd17c51812643cd1964b7da007f3 Author: Matt Caswell Date: Wed Apr 18 14:20:29 2018 +0100 Don't crash if there are no trusted certs The X509_STORE_CTX_init() docs explicitly allow a NULL parameter for the X509_STORE. Therefore we shouldn't crash if we subsequently call X509_verify_cert() and no X509_STORE has been set. Fixes #2462 Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/6002) ----------------------------------------------------------------------- Summary of changes: crypto/x509/x509_lu.c | 15 +++++++++++++-- test/verify_extra_test.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 2 deletions(-) diff --git a/crypto/x509/x509_lu.c b/crypto/x509/x509_lu.c index 90f2352..db0365c 100644 --- a/crypto/x509/x509_lu.c +++ b/crypto/x509/x509_lu.c @@ -265,6 +265,9 @@ int X509_STORE_CTX_get_by_subject(X509_STORE_CTX *vs, X509_LOOKUP_TYPE type, X509_OBJECT stmp, *tmp; int i, j; + if (ctx == NULL) + return 0; + CRYPTO_THREAD_write_lock(ctx->lock); tmp = X509_OBJECT_retrieve_by_subject(ctx->objs, type, name); CRYPTO_THREAD_unlock(ctx->lock); @@ -489,6 +492,9 @@ STACK_OF(X509) *X509_STORE_CTX_get1_certs(X509_STORE_CTX *ctx, X509_NAME *nm) X509 *x; X509_OBJECT *obj; + if (ctx->ctx == NULL) + return NULL; + CRYPTO_THREAD_write_lock(ctx->ctx->lock); idx = x509_object_idx_cnt(ctx->ctx->objs, X509_LU_X509, nm, &cnt); if (idx < 0) { @@ -538,8 +544,10 @@ STACK_OF(X509_CRL) *X509_STORE_CTX_get1_crls(X509_STORE_CTX *ctx, X509_NAME *nm) X509_OBJECT *obj, *xobj = X509_OBJECT_new(); /* Always do lookup to possibly add new CRLs to cache */ - if (sk == NULL || xobj == NULL || - !X509_STORE_CTX_get_by_subject(ctx, X509_LU_CRL, nm, xobj)) { + if (sk == NULL + || xobj == NULL + || ctx->ctx == NULL + || !X509_STORE_CTX_get_by_subject(ctx, X509_LU_CRL, nm, xobj)) { X509_OBJECT_free(xobj); sk_X509_CRL_free(sk); return NULL; @@ -633,6 +641,9 @@ int X509_STORE_CTX_get1_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *x) } X509_OBJECT_free(obj); + if (ctx->ctx == NULL) + return 0; + /* Else find index of first cert accepted by 'check_issued' */ ret = 0; CRYPTO_THREAD_write_lock(ctx->ctx->lock); diff --git a/test/verify_extra_test.c b/test/verify_extra_test.c index cc05bc2..e0dccfb 100644 --- a/test/verify_extra_test.c +++ b/test/verify_extra_test.c @@ -137,6 +137,43 @@ static int test_alt_chains_cert_forgery(const char *roots_f, return ret; } +static int test_store_ctx(const char *bad_f) +{ + X509_STORE_CTX *sctx = NULL; + X509 *x = NULL; + BIO *bio = NULL; + int testresult = 0, ret; + + bio = BIO_new_file(bad_f, "r"); + if (bio == NULL) + goto err; + + x = PEM_read_bio_X509(bio, NULL, 0, NULL); + if (x == NULL) + goto err; + + sctx = X509_STORE_CTX_new(); + if (sctx == NULL) + goto err; + + if (!X509_STORE_CTX_init(sctx, NULL, x, NULL)) + goto err; + + /* Verifying a cert where we have no trusted certs should fail */ + ret = X509_verify_cert(sctx); + + if (ret == 0) { + /* This is the result we were expecting: Test passed */ + testresult = 1; + } + + err: + X509_STORE_CTX_free(sctx); + X509_free(x); + BIO_free(bio); + return testresult; +} + int main(int argc, char **argv) { CRYPTO_set_mem_debug(1); @@ -152,6 +189,11 @@ int main(int argc, char **argv) return 1; } + if (!test_store_ctx(argv[3])) { + fprintf(stderr, "Test X509_STORE_CTX failed\n"); + return 1; + } + #ifndef OPENSSL_NO_CRYPTO_MDEBUG if (CRYPTO_mem_leaks_fp(stderr) <= 0) return 1; From matt at openssl.org Thu Apr 19 08:03:33 2018 From: matt at openssl.org (Matt Caswell) Date: Thu, 19 Apr 2018 08:03:33 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_0_2-stable update Message-ID: <1524125013.117253.26294.nullmailer@dev.openssl.org> The branch OpenSSL_1_0_2-stable has been updated via 5e80a5da0320b90c6af29195e168ec6e22de2caf (commit) from c6c7bb010770cbf7d818d0ef8f5628decaa7e037 (commit) - Log ----------------------------------------------------------------- commit 5e80a5da0320b90c6af29195e168ec6e22de2caf Author: Matt Caswell Date: Wed Apr 18 14:20:29 2018 +0100 Don't crash if there are no trusted certs The X509_STORE_CTX_init() docs explicitly allow a NULL parameter for the X509_STORE. Therefore we shouldn't crash if we subsequently call X509_verify_cert() and no X509_STORE has been set. Fixes #2462 Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/6003) ----------------------------------------------------------------------- Summary of changes: crypto/x509/x509_lu.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/crypto/x509/x509_lu.c b/crypto/x509/x509_lu.c index b742480..3d18ea9 100644 --- a/crypto/x509/x509_lu.c +++ b/crypto/x509/x509_lu.c @@ -311,7 +311,11 @@ int X509_STORE_get_by_subject(X509_STORE_CTX *vs, int type, X509_NAME *name, X509_OBJECT stmp, *tmp; int i, j; + if (ctx == NULL) + return 0; + CRYPTO_w_lock(CRYPTO_LOCK_X509_STORE); + tmp = X509_OBJECT_retrieve_by_subject(ctx->objs, type, name); CRYPTO_w_unlock(CRYPTO_LOCK_X509_STORE); @@ -506,6 +510,10 @@ STACK_OF(X509) *X509_STORE_get1_certs(X509_STORE_CTX *ctx, X509_NAME *nm) STACK_OF(X509) *sk; X509 *x; X509_OBJECT *obj; + + if (ctx->ctx == NULL) + return NULL; + sk = sk_X509_new_null(); CRYPTO_w_lock(CRYPTO_LOCK_X509_STORE); idx = x509_object_idx_cnt(ctx->ctx->objs, X509_LU_X509, nm, &cnt); @@ -551,6 +559,11 @@ STACK_OF(X509_CRL) *X509_STORE_get1_crls(X509_STORE_CTX *ctx, X509_NAME *nm) STACK_OF(X509_CRL) *sk; X509_CRL *x; X509_OBJECT *obj, xobj; + + + if (ctx->ctx == NULL) + return NULL; + sk = sk_X509_CRL_new_null(); CRYPTO_w_lock(CRYPTO_LOCK_X509_STORE); @@ -651,6 +664,9 @@ int X509_STORE_CTX_get1_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *x) } X509_OBJECT_free_contents(&obj); + if (ctx->ctx == NULL) + return 0; + /* Else find index of first cert accepted by 'check_issued' */ ret = 0; CRYPTO_w_lock(CRYPTO_LOCK_X509_STORE); From openssl at openssl.org Thu Apr 19 08:29:12 2018 From: openssl at openssl.org (OpenSSL run-checker) Date: Thu, 19 Apr 2018 08:29:12 +0000 Subject: [openssl-commits] Still FAILED build of OpenSSL branch master with options -d --strict-warnings no-tls Message-ID: <1524126552.902216.29729.nullmailer@run.openssl.org> Platform and configuration command: $ uname -a Linux run 4.4.0-119-generic #143-Ubuntu SMP Mon Apr 2 16:08:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux $ CC=clang ../openssl/config -d --strict-warnings no-tls Commit log since last time: cb1b2ca Clarify the configuration module in config.pod b3199e5 apps/s_socket.c: fix memory sanitizer problem in ACCEPT printout. f3d3b36 TLSProxy/Proxy.pm: preclude output intermix. c4220c0 recipes/70-test_ssl{cbcpadding,extension,records}: make it work w/fragmentation. 3f1f62b TLSProxy/Record.pm: add is_fatal_alert method. 17cde9c TLSProxy/Proxy.pm: refine NewSessionTicket detection. 3f473b9 TLSProxy/Message.pm: refine end-of-conversation detection logic. 5bb1cd2 poly1305/asm/poly1305-armv4.pl: remove unintentional relocation. 2f8271e Style: ssl.h be93b0e Update EVP_DigestSignInit() docs d4da95a test: Remove redundant SSL_CTX_set_max_early_data 01a2a65 Add support for logging early exporter secret cffe973 Add test for CLIENT_EARLY_TRAFFIC_SECRET key logging 6329ce8 Add support for logging TLS 1.3 exporter secret Build log ended with (last 100 lines): /usr/bin/perl ../openssl/test/generate_buildtest.pl x509v3 > test/buildtest_x509v3.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/casttest.d.tmp -MT test/casttest.o -c -o test/casttest.o ../openssl/test/casttest.c clang -I. -Iinclude -Icrypto/include -I../openssl -I../openssl/include -I../openssl/crypto/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/chacha_internal_test.d.tmp -MT test/chacha_internal_test.o -c -o test/chacha_internal_test.o ../openssl/test/chacha_internal_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/cipherbytes_test.d.tmp -MT test/cipherbytes_test.o -c -o test/cipherbytes_test.o ../openssl/test/cipherbytes_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/cipherlist_test.d.tmp -MT test/cipherlist_test.o -c -o test/cipherlist_test.o ../openssl/test/cipherlist_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ciphername_test.d.tmp -MT test/ciphername_test.o -c -o test/ciphername_test.o ../openssl/test/ciphername_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/clienthellotest.d.tmp -MT test/clienthellotest.o -c -o test/clienthellotest.o ../openssl/test/clienthellotest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/conf_include_test.d.tmp -MT test/conf_include_test.o -c -o test/conf_include_test.o ../openssl/test/conf_include_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/constant_time_test.d.tmp -MT test/constant_time_test.o -c -o test/constant_time_test.o ../openssl/test/constant_time_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/crltest.d.tmp -MT test/crltest.o -c -o test/crltest.o ../openssl/test/crltest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ct_test.d.tmp -MT test/ct_test.o -c -o test/ct_test.o ../openssl/test/ct_test.c clang -I. -Icrypto/include -Iinclude -I../openssl -I../openssl/crypto/include -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ctype_internal_test.d.tmp -MT test/ctype_internal_test.o -c -o test/ctype_internal_test.o ../openssl/test/ctype_internal_test.c clang -I. -Iinclude -Icrypto/ec/curve448 -I../openssl -I../openssl/include -I../openssl/crypto/ec/curve448 -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/curve448_internal_test.d.tmp -MT test/curve448_internal_test.o -c -o test/curve448_internal_test.o ../openssl/test/curve448_internal_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/d2i_test.d.tmp -MT test/d2i_test.o -c -o test/d2i_test.o ../openssl/test/d2i_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/danetest.d.tmp -MT test/danetest.o -c -o test/danetest.o ../openssl/test/danetest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/destest.d.tmp -MT test/destest.o -c -o test/destest.o ../openssl/test/destest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/dhtest.d.tmp -MT test/dhtest.o -c -o test/dhtest.o ../openssl/test/dhtest.c clang -Iinclude -Itest -I. -I../openssl/include -I../openssl/test -I../openssl -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/drbg_cavs_data.d.tmp -MT test/drbg_cavs_data.o -c -o test/drbg_cavs_data.o ../openssl/test/drbg_cavs_data.c clang -Iinclude -Itest -I. -I../openssl/include -I../openssl/test -I../openssl -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/drbg_cavs_test.d.tmp -MT test/drbg_cavs_test.o -c -o test/drbg_cavs_test.o ../openssl/test/drbg_cavs_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/drbgtest.d.tmp -MT test/drbgtest.o -c -o test/drbgtest.o ../openssl/test/drbgtest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/dsatest.d.tmp -MT test/dsatest.o -c -o test/dsatest.o ../openssl/test/dsatest.c clang -I. -Iinclude -I../openssl -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/dtls_mtu_test.d.tmp -MT test/dtls_mtu_test.o -c -o test/dtls_mtu_test.o ../openssl/test/dtls_mtu_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/dtlstest.d.tmp -MT test/dtlstest.o -c -o test/dtlstest.o ../openssl/test/dtlstest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/dtlsv1listentest.d.tmp -MT test/dtlsv1listentest.o -c -o test/dtlsv1listentest.o ../openssl/test/dtlsv1listentest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ecdsatest.d.tmp -MT test/ecdsatest.o -c -o test/ecdsatest.o ../openssl/test/ecdsatest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ecstresstest.d.tmp -MT test/ecstresstest.o -c -o test/ecstresstest.o ../openssl/test/ecstresstest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ectest.d.tmp -MT test/ectest.o -c -o test/ectest.o ../openssl/test/ectest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/enginetest.d.tmp -MT test/enginetest.o -c -o test/enginetest.o ../openssl/test/enginetest.c clang -Iinclude -Icrypto/include -I../openssl/include -I../openssl/crypto/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/evp_extra_test.d.tmp -MT test/evp_extra_test.o -c -o test/evp_extra_test.o ../openssl/test/evp_extra_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/evp_test.d.tmp -MT test/evp_test.o -c -o test/evp_test.o ../openssl/test/evp_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/exdatatest.d.tmp -MT test/exdatatest.o -c -o test/exdatatest.o ../openssl/test/exdatatest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/exptest.d.tmp -MT test/exptest.o -c -o test/exptest.o ../openssl/test/exptest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/fatalerrtest.d.tmp -MT test/fatalerrtest.o -c -o test/fatalerrtest.o ../openssl/test/fatalerrtest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/gmdifftest.d.tmp -MT test/gmdifftest.o -c -o test/gmdifftest.o ../openssl/test/gmdifftest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/hmactest.d.tmp -MT test/hmactest.o -c -o test/hmactest.o ../openssl/test/hmactest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ideatest.d.tmp -MT test/ideatest.o -c -o test/ideatest.o ../openssl/test/ideatest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/igetest.d.tmp -MT test/igetest.o -c -o test/igetest.o ../openssl/test/igetest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/lhash_test.d.tmp -MT test/lhash_test.o -c -o test/lhash_test.o ../openssl/test/lhash_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/md2test.d.tmp -MT test/md2test.o -c -o test/md2test.o ../openssl/test/md2test.c clang -I. -Iinclude -I../openssl -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/mdc2_internal_test.d.tmp -MT test/mdc2_internal_test.o -c -o test/mdc2_internal_test.o ../openssl/test/mdc2_internal_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/mdc2test.d.tmp -MT test/mdc2test.o -c -o test/mdc2test.o ../openssl/test/mdc2test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/memleaktest.d.tmp -MT test/memleaktest.o -c -o test/memleaktest.o ../openssl/test/memleaktest.c clang -I. -Iinclude -I../openssl -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/modes_internal_test.d.tmp -MT test/modes_internal_test.o -c -o test/modes_internal_test.o ../openssl/test/modes_internal_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ocspapitest.d.tmp -MT test/ocspapitest.o -c -o test/ocspapitest.o ../openssl/test/ocspapitest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/packettest.d.tmp -MT test/packettest.o -c -o test/packettest.o ../openssl/test/packettest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/pbelutest.d.tmp -MT test/pbelutest.o -c -o test/pbelutest.o ../openssl/test/pbelutest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/pemtest.d.tmp -MT test/pemtest.o -c -o test/pemtest.o ../openssl/test/pemtest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/pkey_meth_kdf_test.d.tmp -MT test/pkey_meth_kdf_test.o -c -o test/pkey_meth_kdf_test.o ../openssl/test/pkey_meth_kdf_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/pkey_meth_test.d.tmp -MT test/pkey_meth_test.o -c -o test/pkey_meth_test.o ../openssl/test/pkey_meth_test.c clang -I. -Iinclude -Icrypto/include -I../openssl -I../openssl/include -I../openssl/crypto/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/poly1305_internal_test.d.tmp -MT test/poly1305_internal_test.o -c -o test/poly1305_internal_test.o ../openssl/test/poly1305_internal_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/rc2test.d.tmp -MT test/rc2test.o -c -o test/rc2test.o ../openssl/test/rc2test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/rc4test.d.tmp -MT test/rc4test.o -c -o test/rc4test.o ../openssl/test/rc4test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/rc5test.d.tmp -MT test/rc5test.o -c -o test/rc5test.o ../openssl/test/rc5test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/rdrand_sanitytest.d.tmp -MT test/rdrand_sanitytest.o -c -o test/rdrand_sanitytest.o ../openssl/test/rdrand_sanitytest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/recordlentest.d.tmp -MT test/recordlentest.o -c -o test/recordlentest.o ../openssl/test/recordlentest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/rsa_mp_test.d.tmp -MT test/rsa_mp_test.o -c -o test/rsa_mp_test.o ../openssl/test/rsa_mp_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/rsa_test.d.tmp -MT test/rsa_test.o -c -o test/rsa_test.o ../openssl/test/rsa_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/sanitytest.d.tmp -MT test/sanitytest.o -c -o test/sanitytest.o ../openssl/test/sanitytest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/secmemtest.d.tmp -MT test/secmemtest.o -c -o test/secmemtest.o ../openssl/test/secmemtest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/servername_test.d.tmp -MT test/servername_test.o -c -o test/servername_test.o ../openssl/test/servername_test.c clang -Iinclude -Icrypto/include -I../openssl/include -I../openssl/crypto/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/shlibloadtest.d.tmp -MT test/shlibloadtest.o -c -o test/shlibloadtest.o ../openssl/test/shlibloadtest.c clang -I. -Iinclude -Icrypto/include -I../openssl -I../openssl/include -I../openssl/crypto/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/siphash_internal_test.d.tmp -MT test/siphash_internal_test.o -c -o test/siphash_internal_test.o ../openssl/test/siphash_internal_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/sm2crypttest.d.tmp -MT test/sm2crypttest.o -c -o test/sm2crypttest.o ../openssl/test/sm2crypttest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/sm2sigtest.d.tmp -MT test/sm2sigtest.o -c -o test/sm2sigtest.o ../openssl/test/sm2sigtest.c clang -I. -Iinclude -Icrypto/include -I../openssl -I../openssl/include -I../openssl/crypto/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/sm4_internal_test.d.tmp -MT test/sm4_internal_test.o -c -o test/sm4_internal_test.o ../openssl/test/sm4_internal_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/srptest.d.tmp -MT test/srptest.o -c -o test/srptest.o ../openssl/test/srptest.c clang -I. -Iinclude -I../openssl -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ssl_cert_table_internal_test.d.tmp -MT test/ssl_cert_table_internal_test.o -c -o test/ssl_cert_table_internal_test.o ../openssl/test/ssl_cert_table_internal_test.c clang -I. -Iinclude -I../openssl -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/handshake_helper.d.tmp -MT test/handshake_helper.o -c -o test/handshake_helper.o ../openssl/test/handshake_helper.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ssl_test.d.tmp -MT test/ssl_test.o -c -o test/ssl_test.o ../openssl/test/ssl_test.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ssl_test_ctx.d.tmp -MT test/ssl_test_ctx.o -c -o test/ssl_test_ctx.o ../openssl/test/ssl_test_ctx.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ssl_test_ctx_test.d.tmp -MT test/ssl_test_ctx_test.o -c -o test/ssl_test_ctx_test.o ../openssl/test/ssl_test_ctx_test.c clang -Iinclude -I. -I../openssl/include -I../openssl -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/sslapitest.d.tmp -MT test/sslapitest.o -c -o test/sslapitest.o ../openssl/test/sslapitest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/sslbuffertest.d.tmp -MT test/sslbuffertest.o -c -o test/sslbuffertest.o ../openssl/test/sslbuffertest.c clang -Iinclude -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/sslcorrupttest.d.tmp -MT test/sslcorrupttest.o -c -o test/sslcorrupttest.o ../openssl/test/sslcorrupttest.c ../openssl/test/sslapitest.c:4317:24: error: implicit declaration of function 'setupearly_data_test' is invalid in C99 [-Werror,-Wimplicit-function-declaration] if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, ^ clang -I. -Iinclude -I../openssl -I../openssl/include -pthread -m64 -Qunused-arguments -DDEBUG_UNUSED -DPEDANTIC -pedantic -Wno-long-long -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wswitch -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Wundef -Werror -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations -Wno-unknown-warning-option -Wall -O0 -g -MMD -MF test/ssltest_old.d.tmp -MT test/ssltest_old.o -c -o test/ssltest_old.o ../openssl/test/ssltest_old.c ../openssl/test/sslapitest.c:4328:69: error: use of undeclared identifier 'MSG1' if (!TEST_true(SSL_write_early_data(clientssl, MSG1, strlen(MSG1), ^ ../openssl/test/sslapitest.c:4328:56: error: use of undeclared identifier 'MSG1' if (!TEST_true(SSL_write_early_data(clientssl, MSG1, strlen(MSG1), ^ ../openssl/test/sslapitest.c:4330:52: error: use of undeclared identifier 'MSG1' || !TEST_size_t_eq(written, strlen(MSG1)) ^ ../openssl/test/sslapitest.c:4334:62: error: use of undeclared identifier 'MSG1' || !TEST_mem_eq(MSG1, readbytes, buf, strlen(MSG1)) ^ ../openssl/test/sslapitest.c:4334:33: error: use of undeclared identifier 'MSG1' || !TEST_mem_eq(MSG1, readbytes, buf, strlen(MSG1)) ^ 6 errors generated. Makefile:9119: recipe for target 'test/sslapitest.o' failed make[1]: *** [test/sslapitest.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory '/home/openssl/run-checker/no-tls' Makefile:171: recipe for target 'all' failed make: *** [all] Error 2 From levitte at openssl.org Thu Apr 19 09:10:25 2018 From: levitte at openssl.org (Richard Levitte) Date: Thu, 19 Apr 2018 09:10:25 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524129025.426047.11240.nullmailer@dev.openssl.org> The branch master has been updated via aa3b328541ff67dde7c40ae73dd11a296647ae3d (commit) from 7f6dfa19dfbd1d009bf3ab36805b8d132d4ecd56 (commit) - Log ----------------------------------------------------------------- commit aa3b328541ff67dde7c40ae73dd11a296647ae3d Author: A. Schulze Date: Thu Mar 29 22:10:26 2018 +0200 correct spelling errors detected by Debian lintian CLA: trivial Reviewed-by: Matthias St. Pierre Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5801) ----------------------------------------------------------------------- Summary of changes: CHANGES | 2 +- apps/req.c | 2 +- doc/man3/OPENSSL_fork_prepare.pod | 2 +- doc/man3/SSL_CTX_set_session_ticket_cb.pod | 2 +- doc/man3/SSL_CTX_use_certificate.pod | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGES b/CHANGES index 00b5c40..a13183f 100644 --- a/CHANGES +++ b/CHANGES @@ -65,7 +65,7 @@ below. Similarly TLSv1.2 ciphersuites are not compatible with TLSv1.3. In order to avoid issues where legacy TLSv1.2 ciphersuite configuration would otherwise inadvertently disable all TLSv1.3 ciphersuites the - configuraton has been separated out. See the ciphers man page or the + configuration has been separated out. See the ciphers man page or the SSL_CTX_set_ciphersuites() man page for more information. [Matt Caswell] diff --git a/apps/req.c b/apps/req.c index 4ab636e..ca4b7ec 100644 --- a/apps/req.c +++ b/apps/req.c @@ -370,7 +370,7 @@ int req_main(int argc, char **argv) if (addext_bio) { if (verbose) BIO_printf(bio_err, - "Using additional configuraton from command line\n"); + "Using additional configuration from command line\n"); addext_conf = app_load_config_bio(addext_bio, NULL); } if (template != default_config_file && !app_load_modules(req_conf)) diff --git a/doc/man3/OPENSSL_fork_prepare.pod b/doc/man3/OPENSSL_fork_prepare.pod index eda8360..7c4eb1d 100644 --- a/doc/man3/OPENSSL_fork_prepare.pod +++ b/doc/man3/OPENSSL_fork_prepare.pod @@ -30,7 +30,7 @@ such as Linux that have both functions will normally not need to call these functions as the OpenSSL library will do so automatically. L will register these functions with the appropriate -hander, when the B flag is used. For other +handler, when the B flag is used. For other applications, these functions can be called directly. They should be used according to the calling sequence described by the pthreads_atfork(3) documentation, which is summarized here. OPENSSL_fork_prepare() should diff --git a/doc/man3/SSL_CTX_set_session_ticket_cb.pod b/doc/man3/SSL_CTX_set_session_ticket_cb.pod index d0df021..c7b51dd 100644 --- a/doc/man3/SSL_CTX_set_session_ticket_cb.pod +++ b/doc/man3/SSL_CTX_set_session_ticket_cb.pod @@ -42,7 +42,7 @@ B is the application defined callback invoked after session ticket decryption has been attempted and any session ticket application data is available. The application can call SSL_SESSION_get_ticket_appdata() at this time to retrieve the application data. The value of B is the same as that given to -SSL_CTX_set_session_ticket_cb(). The B arguement is the result of the ticket +SSL_CTX_set_session_ticket_cb(). The B argument is the result of the ticket decryption. The B and B identify the key used to decrypt the session ticket. The B callback is defined as type B. diff --git a/doc/man3/SSL_CTX_use_certificate.pod b/doc/man3/SSL_CTX_use_certificate.pod index c553bf1..4dff79c 100644 --- a/doc/man3/SSL_CTX_use_certificate.pod +++ b/doc/man3/SSL_CTX_use_certificate.pod @@ -106,7 +106,7 @@ B, B and B are set only if all were not previously set. If B is non-0, then the certificate, private key and chain certs are always set. If B is NULL, then the public key of B is used as the private key. This is intended to be used with hardware (via the ENGINE -inteface) that stores the private key securely, such that it cannot be +interface) that stores the private key securely, such that it cannot be accessed by OpenSSL. The reference count of the public key is incremented (twice if there is no private key); it is not copied nor duplicated. This allows all private key validations checks to succeed without an actual From osslsanity at gmail.com Thu Apr 19 09:26:32 2018 From: osslsanity at gmail.com (osslsanity at gmail.com) Date: Thu, 19 Apr 2018 09:26:32 +0000 (UTC) Subject: [openssl-commits] Jenkins build is back to normal : master_noec #489 In-Reply-To: <134779348.445.1524043460895.JavaMail.jenkins@ip-172-31-34-99> References: <134779348.445.1524043460895.JavaMail.jenkins@ip-172-31-34-99> Message-ID: <1893896800.446.1524129992845.JavaMail.jenkins@ip-172-31-34-99> See From levitte at openssl.org Thu Apr 19 13:03:12 2018 From: levitte at openssl.org (Richard Levitte) Date: Thu, 19 Apr 2018 13:03:12 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524142992.947355.19159.nullmailer@dev.openssl.org> The branch master has been updated via 918388b5a02351ef2c5f560cd9369e928e8a1cd0 (commit) from aa3b328541ff67dde7c40ae73dd11a296647ae3d (commit) - Log ----------------------------------------------------------------- commit 918388b5a02351ef2c5f560cd9369e928e8a1cd0 Author: Richard Levitte Date: Mon Apr 2 10:24:33 2018 +0200 Don't distribute team internal config targets Configurations/90-team.conf isn't for public consumption, so we rename it to 90-team.norelease.conf and make sure 'make dist' and 'make tar' don't include it in the tarball. Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5836) ----------------------------------------------------------------------- Summary of changes: Configurations/{90-team.conf => 90-team.norelease.conf} | 6 ------ Configurations/dist.conf | 12 ++++++++++++ Configurations/unix-Makefile.tmpl | 2 +- 3 files changed, 13 insertions(+), 7 deletions(-) rename Configurations/{90-team.conf => 90-team.norelease.conf} (96%) create mode 100644 Configurations/dist.conf diff --git a/Configurations/90-team.conf b/Configurations/90-team.norelease.conf similarity index 96% rename from Configurations/90-team.conf rename to Configurations/90-team.norelease.conf index a5cc6da..a9ab98d 100644 --- a/Configurations/90-team.conf +++ b/Configurations/90-team.norelease.conf @@ -79,12 +79,6 @@ my %targets = ( shared_cflag => "-fPIC", shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", }, - "dist" => { - inherit_from => [ 'BASE_unix' ], - CC => "cc", - CFLAGS => "-O", - thread_scheme => "(unknown)", - }, "debug-test-64-clang" => { inherit_from => [ 'BASE_unix', "x86_64_asm" ], cc => "clang", diff --git a/Configurations/dist.conf b/Configurations/dist.conf new file mode 100644 index 0000000..2a458bc --- /dev/null +++ b/Configurations/dist.conf @@ -0,0 +1,12 @@ +## -*- mode: perl; -*- +## Build configuration targets for openssl-team members + +# This is to support 'make dist' +my %targets = ( + "dist" => { + inherit_from => [ 'BASE_unix' ], + CC => "cc", + CFLAGS => "-O", + thread_scheme => "(unknown)", + }, +); diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl index f23dff4..799eaa8 100644 --- a/Configurations/unix-Makefile.tmpl +++ b/Configurations/unix-Makefile.tmpl @@ -797,7 +797,7 @@ tar: mkdir -p $$TMPDIR/$$DISTDIR; \ (cd $(SRCDIR); \ excl_re=`git submodule status | sed -e 's/^.//' | cut -d' ' -f2`; \ - excl_re="^(fuzz/corpora|`echo $$excl_re | sed -e 's/ /$$|/g'`\$$)"; \ + excl_re="^(fuzz/corpora|Configurations/.*\.norelease\.conf|`echo $$excl_re | sed -e 's/ /$$|/g'`\$$)"; \ echo "$$excl_re"; \ git ls-tree -r --name-only --full-tree HEAD \ | egrep -v "$$excl_re" \ From levitte at openssl.org Thu Apr 19 13:36:33 2018 From: levitte at openssl.org (Richard Levitte) Date: Thu, 19 Apr 2018 13:36:33 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524144993.594128.29332.nullmailer@dev.openssl.org> The branch master has been updated via c190506cd827221a861c3207ae2496ea1ec7a1fd (commit) from 918388b5a02351ef2c5f560cd9369e928e8a1cd0 (commit) - Log ----------------------------------------------------------------- commit c190506cd827221a861c3207ae2496ea1ec7a1fd Author: Alois Mahdal Date: Wed Feb 21 16:49:33 2018 +0100 Reflect special `DEFAULT` behavior in ciphers(1) Actual behavior of DEFAULT is different than currently described. Rather than actinf as cipher string, DEFAULT cannot be combined using logical operators, etc. Fixes #5420. Reviewed-by: Rich Salz Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5428) ----------------------------------------------------------------------- Summary of changes: doc/man1/ciphers.pod | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/doc/man1/ciphers.pod b/doc/man1/ciphers.pod index 9616e8e..3786e9a 100644 --- a/doc/man1/ciphers.pod +++ b/doc/man1/ciphers.pod @@ -168,19 +168,20 @@ The cipher string B<@SECLEVEL=n> can be used at any point to set the security level to B, which should be a number between zero and five, inclusive. See L for a description of what each level means. +The cipher list can be prefixed with the B keyword, which enables +the default cipher list as defined below. Unlike cipher strings, +this prefix may not be combined with other strings using B<+> character. +For example, B is not valid. + +The content of the default list is determined at compile time and normally +corresponds to B. + =head1 CIPHER STRINGS The following is a list of all permitted cipher strings and their meanings. =over 4 -=item B - -The default cipher list. -This is determined at compile time and is normally -B. -When used, this must be the first cipherstring specified. - =item B The ciphers included in B, but not enabled by default. Currently From bernd.edlinger at hotmail.de Thu Apr 19 13:48:14 2018 From: bernd.edlinger at hotmail.de (bernd.edlinger at hotmail.de) Date: Thu, 19 Apr 2018 13:48:14 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524145694.724753.1020.nullmailer@dev.openssl.org> The branch master has been updated via c9c56ee50139a143797e12563a1668df02f99c5a (commit) from c190506cd827221a861c3207ae2496ea1ec7a1fd (commit) - Log ----------------------------------------------------------------- commit c9c56ee50139a143797e12563a1668df02f99c5a Author: Bernd Edlinger Date: Fri Mar 30 19:13:06 2018 +0200 Clear buffer in PEM_write_bio Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5814) ----------------------------------------------------------------------- Summary of changes: crypto/pem/pem_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/pem/pem_lib.c b/crypto/pem/pem_lib.c index 8300992..6e66e9d 100644 --- a/crypto/pem/pem_lib.c +++ b/crypto/pem/pem_lib.c @@ -661,7 +661,7 @@ int PEM_write_bio(BIO *bp, const char *name, const char *header, if (retval == 0) PEMerr(PEM_F_PEM_WRITE_BIO, reason); EVP_ENCODE_CTX_free(ctx); - OPENSSL_free(buf); + OPENSSL_clear_free(buf, PEM_BUFSIZE * 8); return retval; } From levitte at openssl.org Thu Apr 19 13:51:11 2018 From: levitte at openssl.org (Richard Levitte) Date: Thu, 19 Apr 2018 13:51:11 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1524145871.624078.2182.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via 544069175245b9826dc5f9ddf9e2f38f5b08e1c5 (commit) from 0e80714fb8175a7c059668e9fab25e4b26a3dae6 (commit) - Log ----------------------------------------------------------------- commit 544069175245b9826dc5f9ddf9e2f38f5b08e1c5 Author: Richard Levitte Date: Mon Apr 2 10:24:33 2018 +0200 Don't distribute team internal config targets Configurations/90-team.conf isn't for public consumption, so we rename it to 90-team.norelease.conf and make sure 'make dist' and 'make tar' don't include it in the tarball. Reviewed-by: Andy Polyakov (Merged from https://github.com/openssl/openssl/pull/6016) ----------------------------------------------------------------------- Summary of changes: Configurations/{90-team.conf => 90-team.norelease.conf} | 5 ----- Configurations/dist.conf | 12 ++++++++++++ Configurations/unix-Makefile.tmpl | 4 +++- 3 files changed, 15 insertions(+), 6 deletions(-) rename Configurations/{90-team.conf => 90-team.norelease.conf} (97%) create mode 100644 Configurations/dist.conf diff --git a/Configurations/90-team.conf b/Configurations/90-team.norelease.conf similarity index 97% rename from Configurations/90-team.conf rename to Configurations/90-team.norelease.conf index 0a83c22..c7f7095 100644 --- a/Configurations/90-team.conf +++ b/Configurations/90-team.norelease.conf @@ -76,11 +76,6 @@ shared_cflag => "-fPIC", shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", }, - "dist" => { - cc => "cc", - cflags => "-O", - thread_scheme => "(unknown)", - }, "debug-test-64-clang" => { inherit_from => [ "x86_64_asm" ], cc => "clang", diff --git a/Configurations/dist.conf b/Configurations/dist.conf new file mode 100644 index 0000000..4f58dad --- /dev/null +++ b/Configurations/dist.conf @@ -0,0 +1,12 @@ +## -*- mode: perl; -*- +## Build configuration targets for openssl-team members + +# This is to support 'make dist' +%targets = ( + "dist" => { + inherit_from => [ 'BASE_unix' ], + cc => "cc", + cflags => "-O", + thread_scheme => "(unknown)", + }, +); diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl index 1bfaa97..034d93e 100644 --- a/Configurations/unix-Makefile.tmpl +++ b/Configurations/unix-Makefile.tmpl @@ -664,8 +664,10 @@ tar: DISTDIR=$(NAME); \ mkdir -p $$TMPDIR/$$DISTDIR; \ (cd $(SRCDIR); \ + excl_re="^(fuzz/corpora|Configurations/.*\.norelease\.conf)"; \ + echo "$$excl_re"; \ git ls-tree -r --name-only --full-tree HEAD \ - | grep -v '^fuzz/corpora' \ + | egrep -v "$$excl_re" \ | while read F; do \ mkdir -p $$TMPDIR/$$DISTDIR/`dirname $$F`; \ cp $$F $$TMPDIR/$$DISTDIR/$$F; \ From no-reply at appveyor.com Thu Apr 19 13:55:50 2018 From: no-reply at appveyor.com (AppVeyor) Date: Thu, 19 Apr 2018 13:55:50 +0000 Subject: [openssl-commits] Build failed: openssl master.17397 Message-ID: <20180419135550.1.13ABB0096E0F3296@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Thu Apr 19 14:17:45 2018 From: no-reply at appveyor.com (AppVeyor) Date: Thu, 19 Apr 2018 14:17:45 +0000 Subject: [openssl-commits] Build completed: openssl master.17398 Message-ID: <20180419141745.1.676B728321840031@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Thu Apr 19 18:39:30 2018 From: no-reply at appveyor.com (AppVeyor) Date: Thu, 19 Apr 2018 18:39:30 +0000 Subject: [openssl-commits] Build failed: openssl master.17410 Message-ID: <20180419183930.1.DBD815C6BB4FC620@appveyor.com> An HTML attachment was scrubbed... URL: From levitte at openssl.org Thu Apr 19 19:03:59 2018 From: levitte at openssl.org (Richard Levitte) Date: Thu, 19 Apr 2018 19:03:59 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524164639.757651.2859.nullmailer@dev.openssl.org> The branch master has been updated via bd982b48dcb8952f51abad3040cee2c2354e6a54 (commit) from c9c56ee50139a143797e12563a1668df02f99c5a (commit) - Log ----------------------------------------------------------------- commit bd982b48dcb8952f51abad3040cee2c2354e6a54 Author: Richard Levitte Date: Thu Apr 19 20:15:41 2018 +0200 Enable all implemented digests Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6025) ----------------------------------------------------------------------- Summary of changes: apps/progs.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/progs.pl b/apps/progs.pl index 8b9a95b..5767140 100644 --- a/apps/progs.pl +++ b/apps/progs.pl @@ -111,7 +111,10 @@ my %md_disabler = ( foreach my $cmd ( "md2", "md4", "md5", "gost", - "sha1", "sha224", "sha256", "sha384", "sha512", + "sha1", "sha224", "sha256", "sha384", + "sha512", "sha512-224", "sha512-256", + "sha3-224", "sha3-256", "sha3-384", "sha3-512", + "shake128", "shake256", "mdc2", "rmd160", "blake2b512", "blake2s256", "sm3" ) { From levitte at openssl.org Thu Apr 19 19:05:43 2018 From: levitte at openssl.org (Richard Levitte) Date: Thu, 19 Apr 2018 19:05:43 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524164743.973882.3963.nullmailer@dev.openssl.org> The branch master has been updated via 4b7c6385f779e92ffcd76159b03b4dac301e93e7 (commit) from bd982b48dcb8952f51abad3040cee2c2354e6a54 (commit) - Log ----------------------------------------------------------------- commit 4b7c6385f779e92ffcd76159b03b4dac301e93e7 Author: Kurt Roeckx Date: Tue Dec 26 14:40:37 2017 +0100 Document supported digest functions Reviewed-by: Rich Salz Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/6024) ----------------------------------------------------------------------- Summary of changes: doc/man1/openssl.pod | 52 ++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 44 insertions(+), 8 deletions(-) diff --git a/doc/man1/openssl.pod b/doc/man1/openssl.pod index f4f52e2..03c07c0 100644 --- a/doc/man1/openssl.pod +++ b/doc/man1/openssl.pod @@ -290,10 +290,22 @@ X.509 Certificate Data Management. =over 4 +=item B + +BLAKE2b-512 Digest + +=item B + +BLAKE2s-256 Digest + =item B MD2 Digest +=item B + +MD4 Digest + =item B MD5 Digest @@ -306,29 +318,53 @@ MDC2 Digest RMD-160 Digest -=item B - -SHA Digest - =item B SHA-1 Digest =item B -SHA-224 Digest +SHA-2 224 Digest =item B -SHA-256 Digest +SHA-2 256 Digest =item B -SHA-384 Digest +SHA-2 384 Digest =item B -SHA-512 Digest +SHA-2 512 Digest + +=item B + +SHA-3 224 Digest + +=item B + +SHA-3 256 Digest + +=item B + +SHA-3 384 Digest + +=item B + +SHA-3 512 Digest + +=item B + +SHA-3 SHAKE128 Digest + +=item B + +SHA-3 SHAKE256 Digest + +=item B + +SM3 Digest =back From levitte at openssl.org Thu Apr 19 19:08:07 2018 From: levitte at openssl.org (Richard Levitte) Date: Thu, 19 Apr 2018 19:08:07 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_0_2-stable update Message-ID: <1524164887.988541.5388.nullmailer@dev.openssl.org> The branch OpenSSL_1_0_2-stable has been updated via b38999240954f7ca80abbf8064cc4c87e306a3b2 (commit) from 5e80a5da0320b90c6af29195e168ec6e22de2caf (commit) - Log ----------------------------------------------------------------- commit b38999240954f7ca80abbf8064cc4c87e306a3b2 Author: Richard Levitte Date: Thu Apr 19 16:35:37 2018 +0200 apps/s_socket.c: Fix do_accept do_accept() checked that the peer IP address had a PTR record, and would fail if not. The retrieved named was then never used, even though passed around. All this is unnecessary, so we remove it. Fixes #3407 Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6018) ----------------------------------------------------------------------- Summary of changes: apps/s_apps.h | 5 ++-- apps/s_server.c | 12 ++++----- apps/s_socket.c | 75 ++++++++------------------------------------------------- 3 files changed, 18 insertions(+), 74 deletions(-) diff --git a/apps/s_apps.h b/apps/s_apps.h index 5ba1e1d..bb0aba6 100644 --- a/apps/s_apps.h +++ b/apps/s_apps.h @@ -152,9 +152,8 @@ typedef fd_mask fd_set; #define PROTOCOL "tcp" int do_server(int port, int type, int *ret, - int (*cb) (char *hostname, int s, int stype, - unsigned char *context), unsigned char *context, - int naccept); + int (*cb) (int s, int stype, unsigned char *context), + unsigned char *context, int naccept); #ifdef HEADER_X509_H int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx); #endif diff --git a/apps/s_server.c b/apps/s_server.c index 83918fb..f1ab691 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -209,9 +209,9 @@ typedef unsigned int u_int; #ifndef OPENSSL_NO_RSA static RSA MS_CALLBACK *tmp_rsa_cb(SSL *s, int is_export, int keylength); #endif -static int sv_body(char *hostname, int s, int stype, unsigned char *context); -static int www_body(char *hostname, int s, int stype, unsigned char *context); -static int rev_body(char *hostname, int s, int stype, unsigned char *context); +static int sv_body(int s, int stype, unsigned char *context); +static int www_body(int s, int stype, unsigned char *context); +static int rev_body(int s, int stype, unsigned char *context); static void close_accept_socket(void); static void sv_usage(void); static int init_ssl_connection(SSL *s); @@ -2165,7 +2165,7 @@ static void print_stats(BIO *bio, SSL_CTX *ssl_ctx) SSL_CTX_sess_get_cache_size(ssl_ctx)); } -static int sv_body(char *hostname, int s, int stype, unsigned char *context) +static int sv_body(int s, int stype, unsigned char *context) { char *buf = NULL; fd_set readfds; @@ -2780,7 +2780,7 @@ static int load_CA(SSL_CTX *ctx, char *file) } #endif -static int www_body(char *hostname, int s, int stype, unsigned char *context) +static int www_body(int s, int stype, unsigned char *context) { char *buf = NULL; int ret = 1; @@ -3183,7 +3183,7 @@ static int www_body(char *hostname, int s, int stype, unsigned char *context) return (ret); } -static int rev_body(char *hostname, int s, int stype, unsigned char *context) +static int rev_body(int s, int stype, unsigned char *context) { char *buf = NULL; int i; diff --git a/apps/s_socket.c b/apps/s_socket.c index 83624ca..b3848dd 100644 --- a/apps/s_socket.c +++ b/apps/s_socket.c @@ -109,7 +109,7 @@ static int ssl_sock_init(void); static int init_client_ip(int *sock, unsigned char ip[4], int port, int type); static int init_server(int *sock, int port, int type); static int init_server_long(int *sock, int port, char *ip, int type); -static int do_accept(int acc_sock, int *sock, char **host); +static int do_accept(int acc_sock, int *sock); static int host_ip(char *str, unsigned char ip[4]); # ifdef OPENSSL_SYS_WIN16 @@ -290,12 +290,10 @@ static int init_client_ip(int *sock, unsigned char ip[4], int port, int type) } int do_server(int port, int type, int *ret, - int (*cb) (char *hostname, int s, int stype, - unsigned char *context), unsigned char *context, - int naccept) + int (*cb) (int s, int stype, unsigned char *context), + unsigned char *context, int naccept) { int sock; - char *name = NULL; int accept_socket = 0; int i; @@ -308,15 +306,13 @@ int do_server(int port, int type, int *ret, } for (;;) { if (type == SOCK_STREAM) { - if (do_accept(accept_socket, &sock, &name) == 0) { + if (do_accept(accept_socket, &sock) == 0) { SHUTDOWN(accept_socket); return (0); } } else sock = accept_socket; - i = (*cb) (name, sock, type, context); - if (name != NULL) - OPENSSL_free(name); + i = (*cb) (sock, type, context); if (type == SOCK_STREAM) SHUTDOWN2(sock); if (naccept != -1) @@ -386,30 +382,24 @@ static int init_server(int *sock, int port, int type) return (init_server_long(sock, port, NULL, type)); } -static int do_accept(int acc_sock, int *sock, char **host) +static int do_accept(int acc_sock, int *sock) { int ret; - struct hostent *h1, *h2; - static struct sockaddr_in from; - int len; -/* struct linger ling; */ if (!ssl_sock_init()) - return (0); + return 0; # ifndef OPENSSL_SYS_WINDOWS redoit: # endif - memset((char *)&from, 0, sizeof(from)); - len = sizeof(from); /* * Note: under VMS with SOCKETSHR the fourth parameter is currently of * type (int *) whereas under other systems it is (void *) if you don't * have a cast it will choke the compiler: if you do have a cast then you * can either go for (int *) or (void *). */ - ret = accept(acc_sock, (struct sockaddr *)&from, (void *)&len); + ret = accept(acc_sock, NULL, NULL); if (ret == INVALID_SOCKET) { # if defined(OPENSSL_SYS_WINDOWS) || (defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK)) int i; @@ -425,56 +415,11 @@ static int do_accept(int acc_sock, int *sock, char **host) fprintf(stderr, "errno=%d ", errno); perror("accept"); # endif - return (0); + return 0; } -/*- - ling.l_onoff=1; - ling.l_linger=0; - i=setsockopt(ret,SOL_SOCKET,SO_LINGER,(char *)&ling,sizeof(ling)); - if (i < 0) { perror("linger"); return(0); } - i=0; - i=setsockopt(ret,SOL_SOCKET,SO_KEEPALIVE,(char *)&i,sizeof(i)); - if (i < 0) { perror("keepalive"); return(0); } -*/ - - if (host == NULL) - goto end; -# ifndef BIT_FIELD_LIMITS - /* I should use WSAAsyncGetHostByName() under windows */ - h1 = gethostbyaddr((char *)&from.sin_addr.s_addr, - sizeof(from.sin_addr.s_addr), AF_INET); -# else - h1 = gethostbyaddr((char *)&from.sin_addr, - sizeof(struct in_addr), AF_INET); -# endif - if (h1 == NULL) { - BIO_printf(bio_err, "bad gethostbyaddr\n"); - *host = NULL; - /* return(0); */ - } else { - if ((*host = (char *)OPENSSL_malloc(strlen(h1->h_name) + 1)) == NULL) { - perror("OPENSSL_malloc"); - closesocket(ret); - return (0); - } - BUF_strlcpy(*host, h1->h_name, strlen(h1->h_name) + 1); - - h2 = GetHostByName(*host); - if (h2 == NULL) { - BIO_printf(bio_err, "gethostbyname failure\n"); - closesocket(ret); - return (0); - } - if (h2->h_addrtype != AF_INET) { - BIO_printf(bio_err, "gethostbyname addr is not AF_INET\n"); - closesocket(ret); - return (0); - } - } - end: *sock = ret; - return (1); + return 1; } int extract_host_port(char *str, char **host_ptr, unsigned char *ip, From openssl at openssl.org Fri Apr 20 00:42:08 2018 From: openssl at openssl.org (OpenSSL run-checker) Date: Fri, 20 Apr 2018 00:42:08 +0000 Subject: [openssl-commits] SUCCESSFUL build of OpenSSL branch master with options -d --strict-warnings no-ec Message-ID: <1524184928.441371.13930.nullmailer@run.openssl.org> Platform and configuration command: $ uname -a Linux run 4.4.0-119-generic #143-Ubuntu SMP Mon Apr 2 16:08:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux $ CC=clang ../openssl/config -d --strict-warnings no-ec Commit log since last time: 4b7c638 Document supported digest functions bd982b4 Enable all implemented digests c9c56ee Clear buffer in PEM_write_bio c190506 Reflect special `DEFAULT` behavior in ciphers(1) 918388b Don't distribute team internal config targets aa3b328 correct spelling errors detected by Debian lintian 7f6dfa1 Add a test for a NULL X509_STORE in X509_STORE_CTX_init 1c70512 Don't crash if there are no trusted certs c324ecf Fix ocsp app exit code 6e07834 Fix no-ec c637891 Correct an ommission in the EVP_DigestSignInit docs a4107d7 Add missing index_index() when reloading OCSP responder From openssl at openssl.org Fri Apr 20 08:30:24 2018 From: openssl at openssl.org (OpenSSL run-checker) Date: Fri, 20 Apr 2018 08:30:24 +0000 Subject: [openssl-commits] SUCCESSFUL build of OpenSSL branch master with options -d --strict-warnings no-tls Message-ID: <1524213024.324478.1011.nullmailer@run.openssl.org> Platform and configuration command: $ uname -a Linux run 4.4.0-119-generic #143-Ubuntu SMP Mon Apr 2 16:08:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux $ CC=clang ../openssl/config -d --strict-warnings no-tls Commit log since last time: 4b7c638 Document supported digest functions bd982b4 Enable all implemented digests c9c56ee Clear buffer in PEM_write_bio c190506 Reflect special `DEFAULT` behavior in ciphers(1) 918388b Don't distribute team internal config targets aa3b328 correct spelling errors detected by Debian lintian 7f6dfa1 Add a test for a NULL X509_STORE in X509_STORE_CTX_init 1c70512 Don't crash if there are no trusted certs c324ecf Fix ocsp app exit code 6e07834 Fix no-ec c637891 Correct an ommission in the EVP_DigestSignInit docs a4107d7 Add missing index_index() when reloading OCSP responder From matt at openssl.org Fri Apr 20 10:40:21 2018 From: matt at openssl.org (Matt Caswell) Date: Fri, 20 Apr 2018 10:40:21 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1524220821.362804.1395.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via f55e2fa7b9d4692b31ad7ad72e71915e853de384 (commit) from 544069175245b9826dc5f9ddf9e2f38f5b08e1c5 (commit) - Log ----------------------------------------------------------------- commit f55e2fa7b9d4692b31ad7ad72e71915e853de384 Author: Matt Caswell Date: Thu Apr 19 10:38:57 2018 +0100 Fix the alert sent if no shared sig algs We were sending illegal parameter. This isn't correct. The parameters are legal, we just don't have an overlap. A more appropriate alert is handshake failure. Fixes #2919 Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/6010) ----------------------------------------------------------------------- Summary of changes: ssl/t1_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index 5ba7377..6f4078e 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -2800,7 +2800,7 @@ int tls1_set_server_sigalgs(SSL *s) if (!s->cert->shared_sigalgs) { SSLerr(SSL_F_TLS1_SET_SERVER_SIGALGS, SSL_R_NO_SHARED_SIGNATURE_ALGORITHMS); - al = SSL_AD_ILLEGAL_PARAMETER; + al = SSL_AD_HANDSHAKE_FAILURE; goto err; } } else { From matt at openssl.org Fri Apr 20 10:43:43 2018 From: matt at openssl.org (Matt Caswell) Date: Fri, 20 Apr 2018 10:43:43 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_0_2-stable update Message-ID: <1524221023.366200.2742.nullmailer@dev.openssl.org> The branch OpenSSL_1_0_2-stable has been updated via 279bf3e0a07d6c84043a316ca8494cbc3b51f731 (commit) from b38999240954f7ca80abbf8064cc4c87e306a3b2 (commit) - Log ----------------------------------------------------------------- commit 279bf3e0a07d6c84043a316ca8494cbc3b51f731 Author: Matt Caswell Date: Thu Apr 19 10:38:57 2018 +0100 Fix the alert sent if no shared sig algs We were sending illegal parameter. This isn't correct. The parameters are legal, we just don't have an overlap. A more appropriate alert is handshake failure. Fixes #2919 Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/6011) ----------------------------------------------------------------------- Summary of changes: ssl/t1_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index 179802c..8cb8816 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -3165,7 +3165,7 @@ int tls1_set_server_sigalgs(SSL *s) if (!s->cert->shared_sigalgs) { SSLerr(SSL_F_TLS1_SET_SERVER_SIGALGS, SSL_R_NO_SHARED_SIGATURE_ALGORITHMS); - al = SSL_AD_ILLEGAL_PARAMETER; + al = SSL_AD_HANDSHAKE_FAILURE; goto err; } } else From matt at openssl.org Fri Apr 20 10:50:22 2018 From: matt at openssl.org (Matt Caswell) Date: Fri, 20 Apr 2018 10:50:22 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524221422.695867.4544.nullmailer@dev.openssl.org> The branch master has been updated via 033c181ba690ef234812c51d4c6cb7d8dd337cb7 (commit) via 4ce787b97aa66e1b4c1d48f6ec047141408056f7 (commit) from 4b7c6385f779e92ffcd76159b03b4dac301e93e7 (commit) - Log ----------------------------------------------------------------- commit 033c181ba690ef234812c51d4c6cb7d8dd337cb7 Author: Matt Caswell Date: Thu Apr 19 15:44:52 2018 +0100 Test the state of SSL_in_init() from the info_callback Check that in a handshake done event SSL_in_init() is 0 (see #4574) Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6019) commit 4ce787b97aa66e1b4c1d48f6ec047141408056f7 Author: Matt Caswell Date: Thu Apr 19 15:26:28 2018 +0100 Make sure SSL_in_init() returns 0 at SSL_CB_HANDSHAKE_DONE In 1.1.0 and before calling SSL_in_init() from the info_callback at SSL_CB_HANDSHAKE_DONE would return 0. This commit fixes it so that it does again for 1.1.1. This broke Node. Fixes #4574 Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6019) ----------------------------------------------------------------------- Summary of changes: ssl/statem/statem_lib.c | 9 +++++++-- test/sslapitest.c | 6 ++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ssl/statem/statem_lib.c b/ssl/statem/statem_lib.c index a17dec9..6d0778d 100644 --- a/ssl/statem/statem_lib.c +++ b/ssl/statem/statem_lib.c @@ -1090,13 +1090,18 @@ WORK_STATE tls_finish_handshake(SSL *s, WORK_STATE wst, int clearbufs, int stop) else if (s->ctx->info_callback != NULL) cb = s->ctx->info_callback; + /* The callback may expect us to not be in init at handshake done */ + ossl_statem_set_in_init(s, 0); + if (cb != NULL) cb(s, SSL_CB_HANDSHAKE_DONE, 1); - if (!stop) + if (!stop) { + /* If we've got more work to do we go back into init */ + ossl_statem_set_in_init(s, 1); return WORK_FINISHED_CONTINUE; + } - ossl_statem_set_in_init(s, 0); return WORK_FINISHED_STOP; } diff --git a/test/sslapitest.c b/test/sslapitest.c index c4c0868..25230c8 100644 --- a/test/sslapitest.c +++ b/test/sslapitest.c @@ -4269,6 +4269,12 @@ static void sslapi_info_callback(const SSL *s, int where, int ret) info_cb_failed = 1; return; } + + /* Check that, if we've got SSL_CB_HANDSHAKE_DONE we are not in init */ + if ((where & SSL_CB_HANDSHAKE_DONE) && SSL_in_init((SSL *)s) != 0) { + info_cb_failed = 1; + return; + } } /* From matt at openssl.org Fri Apr 20 10:55:43 2018 From: matt at openssl.org (Matt Caswell) Date: Fri, 20 Apr 2018 10:55:43 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524221743.751873.5866.nullmailer@dev.openssl.org> The branch master has been updated via 4a432af895f7c0928760e76e05dd269bfbc267e1 (commit) via 5b79813b23c02e79e3856ac526f0aab3b8c2e811 (commit) from 033c181ba690ef234812c51d4c6cb7d8dd337cb7 (commit) - Log ----------------------------------------------------------------- commit 4a432af895f7c0928760e76e05dd269bfbc267e1 Author: Matt Caswell Date: Thu Apr 19 16:44:17 2018 +0100 Add a test for SSL_pending() Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6020) commit 5b79813b23c02e79e3856ac526f0aab3b8c2e811 Author: Matt Caswell Date: Thu Apr 19 16:42:39 2018 +0100 Fix SSL_pending() for DTLS DTLS was not correctly returning the number of pending bytes left in a call to SSL_pending(). This makes the detection of truncated packets almost impossible. Fixes #5478 Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6020) ----------------------------------------------------------------------- Summary of changes: ssl/record/rec_layer_d1.c | 2 ++ test/sslapitest.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) diff --git a/ssl/record/rec_layer_d1.c b/ssl/record/rec_layer_d1.c index ddb3a61..90029a2 100644 --- a/ssl/record/rec_layer_d1.c +++ b/ssl/record/rec_layer_d1.c @@ -418,6 +418,7 @@ int dtls1_read_bytes(SSL *s, int type, int *recvd_type, unsigned char *buf, /* get new packet if necessary */ if ((SSL3_RECORD_get_length(rr) == 0) || (s->rlayer.rstate == SSL_ST_READ_BODY)) { + RECORD_LAYER_set_numrpipes(&s->rlayer, 0); iret = dtls1_get_record(s); if (iret <= 0) { iret = dtls1_read_failed(s, iret); @@ -430,6 +431,7 @@ int dtls1_read_bytes(SSL *s, int type, int *recvd_type, unsigned char *buf, else goto start; } + RECORD_LAYER_set_numrpipes(&s->rlayer, 1); } /* diff --git a/test/sslapitest.c b/test/sslapitest.c index 25230c8..832746c 100644 --- a/test/sslapitest.c +++ b/test/sslapitest.c @@ -4401,6 +4401,57 @@ static int test_info_callback(int tst) return testresult; } +static int test_ssl_pending(int tst) +{ + SSL_CTX *cctx = NULL, *sctx = NULL; + SSL *clientssl = NULL, *serverssl = NULL; + int testresult = 0; + char msg[] = "A test message"; + char buf[5]; + size_t written, readbytes; + + if (tst == 0) { + if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), + TLS_client_method(), + TLS1_VERSION, TLS_MAX_VERSION, + &sctx, &cctx, cert, privkey))) + goto end; + } else { +#ifndef OPENSSL_NO_DTLS + if (!TEST_true(create_ssl_ctx_pair(DTLS_server_method(), + DTLS_client_method(), + DTLS1_VERSION, DTLS_MAX_VERSION, + &sctx, &cctx, cert, privkey))) + goto end; +#else + return 1; +#endif + } + + if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, + NULL, NULL)) + || !TEST_true(create_ssl_connection(serverssl, clientssl, + SSL_ERROR_NONE))) + goto end; + + if (!TEST_true(SSL_write_ex(serverssl, msg, sizeof(msg), &written)) + || !TEST_size_t_eq(written, sizeof(msg)) + || !TEST_true(SSL_read_ex(clientssl, buf, sizeof(buf), &readbytes)) + || !TEST_size_t_eq(readbytes, sizeof(buf)) + || !TEST_int_eq(SSL_pending(clientssl), (int)(written - readbytes))) + goto end; + + testresult = 1; + + end: + SSL_free(serverssl); + SSL_free(clientssl); + SSL_CTX_free(sctx); + SSL_CTX_free(cctx); + + return testresult; +} + int setup_tests(void) { if (!TEST_ptr(cert = test_get_argument(0)) @@ -4492,6 +4543,7 @@ int setup_tests(void) ADD_ALL_TESTS(test_srp, 6); #endif ADD_ALL_TESTS(test_info_callback, 6); + ADD_ALL_TESTS(test_ssl_pending, 2); return 1; } From matt at openssl.org Fri Apr 20 10:58:21 2018 From: matt at openssl.org (Matt Caswell) Date: Fri, 20 Apr 2018 10:58:21 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1524221901.578444.7218.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via d2118367add0840df472f48e48be19f075a3dec0 (commit) via 71d52f1a8ebdf1d26b6b53e4e1f85f2ff1b0d9b8 (commit) from f55e2fa7b9d4692b31ad7ad72e71915e853de384 (commit) - Log ----------------------------------------------------------------- commit d2118367add0840df472f48e48be19f075a3dec0 Author: Matt Caswell Date: Thu Apr 19 16:44:17 2018 +0100 Add a test for SSL_pending() Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6021) commit 71d52f1a8ebdf1d26b6b53e4e1f85f2ff1b0d9b8 Author: Matt Caswell Date: Thu Apr 19 16:42:39 2018 +0100 Fix SSL_pending() for DTLS DTLS was not correctly returning the number of pending bytes left in a call to SSL_pending(). This makes the detection of truncated packets almost impossible. Fixes #5478 Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6021) ----------------------------------------------------------------------- Summary of changes: ssl/record/rec_layer_d1.c | 2 ++ test/sslapitest.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) diff --git a/ssl/record/rec_layer_d1.c b/ssl/record/rec_layer_d1.c index b3ff5f1..c753a54 100644 --- a/ssl/record/rec_layer_d1.c +++ b/ssl/record/rec_layer_d1.c @@ -423,6 +423,7 @@ int dtls1_read_bytes(SSL *s, int type, int *recvd_type, unsigned char *buf, /* get new packet if necessary */ if ((SSL3_RECORD_get_length(rr) == 0) || (s->rlayer.rstate == SSL_ST_READ_BODY)) { + RECORD_LAYER_set_numrpipes(&s->rlayer, 0); ret = dtls1_get_record(s); if (ret <= 0) { ret = dtls1_read_failed(s, ret); @@ -432,6 +433,7 @@ int dtls1_read_bytes(SSL *s, int type, int *recvd_type, unsigned char *buf, else goto start; } + RECORD_LAYER_set_numrpipes(&s->rlayer, 1); } /* diff --git a/test/sslapitest.c b/test/sslapitest.c index 77e8f2e..8badd28 100644 --- a/test/sslapitest.c +++ b/test/sslapitest.c @@ -1208,6 +1208,61 @@ end: return testresult; } +static int test_ssl_pending(int tst) +{ + SSL_CTX *cctx = NULL, *sctx = NULL; + SSL *clientssl = NULL, *serverssl = NULL; + int testresult = 0; + char msg[] = "A test message"; + char buf[5]; + size_t written; + + if (tst == 0) { + if (!create_ssl_ctx_pair(TLS_server_method(), TLS_client_method(), + TLS1_VERSION, TLS_MAX_VERSION, + &sctx, &cctx, cert, privkey)) { + printf("Failed creating SSL_CTX pair\n"); + goto end; + } + } else { +#ifndef OPENSSL_NO_DTLS + if (!create_ssl_ctx_pair(DTLS_server_method(), DTLS_client_method(), + DTLS1_VERSION, DTLS_MAX_VERSION, + &sctx, &cctx, cert, privkey)) { + printf("Failed creating SSL_CTX pair\n"); + goto end; + } +#else + return 1; +#endif + } + + if (!create_ssl_objects(sctx, cctx, &serverssl, &clientssl, NULL, NULL) + || !create_ssl_connection(serverssl, clientssl)) { + printf("Failed creating connection\n"); + goto end; + } + + written = SSL_write(serverssl, msg, sizeof(msg)); + if (written != sizeof(msg) + || SSL_read(clientssl, buf, sizeof(buf)) != sizeof(buf) + || SSL_pending(clientssl) != (int)(written - sizeof(buf))) { + printf("Failed checking SSL_pending\n"); + goto end; + } + + testresult = 1; + + end: + SSL_free(serverssl); + SSL_free(clientssl); + SSL_CTX_free(sctx); + SSL_CTX_free(cctx); + + return testresult; +} + + int main(int argc, char *argv[]) { BIO *err = NULL; @@ -1244,6 +1299,7 @@ int main(int argc, char *argv[]) ADD_TEST(test_ssl_bio_change_wbio); ADD_ALL_TESTS(test_set_sigalgs, OSSL_NELEM(testsigalgs) * 2); ADD_ALL_TESTS(test_custom_exts, 2); + ADD_ALL_TESTS(test_ssl_pending, 2); testresult = run_tests(argv[0]); From matthias.st.pierre at ncp-e.com Fri Apr 20 11:03:41 2018 From: matthias.st.pierre at ncp-e.com (matthias.st.pierre at ncp-e.com) Date: Fri, 20 Apr 2018 11:03:41 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524222221.178445.9169.nullmailer@dev.openssl.org> The branch master has been updated via 9d978ac3f304286be13fde228632c2739e00834c (commit) from 4a432af895f7c0928760e76e05dd269bfbc267e1 (commit) - Log ----------------------------------------------------------------- commit 9d978ac3f304286be13fde228632c2739e00834c Author: Dr. Matthias St. Pierre Date: Thu Apr 19 18:26:36 2018 +0200 openssl/ssl.h: restore some renamed public SSL_CTRL defines Fixes #6022 In commit de4d764e3271, the following SSL_CTRL #define's where renamed SSL_CTRL_GET_CURVES -> SSL_CTRL_GET_GROUPS SSL_CTRL_SET_CURVES -> SSL_CTRL_SET_GROUPS SSL_CTRL_SET_CURVES_LIST -> SSL_CTRL_SET_GROUPS_LIST SSL_CTRL_GET_SHARED_CURVE -> SSL_CTRL_GET_SHARED_GROUP The corresponding function-like macros (e.g, SSL_get1_curves(ctx, s)) were renamed, too, and compatibility #define's were added. This was overlooked for the above constants. Since the constants are part of the public interface, they must not be removed for a minor release. As a consequence the Qt5 configure check (and the build) fails. Reviewed-by: Matt Caswell Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/6023) ----------------------------------------------------------------------- Summary of changes: include/openssl/ssl.h | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h index 5acf77c..4b45ae7 100644 --- a/include/openssl/ssl.h +++ b/include/openssl/ssl.h @@ -1368,28 +1368,16 @@ DECLARE_PEM_rw(SSL_SESSION, SSL_SESSION) SSL_ctrl(s,SSL_CTRL_SET_CHAIN_CERT_STORE,1,(char *)(st)) # define SSL_get1_groups(ctx, s) \ SSL_ctrl(ctx,SSL_CTRL_GET_GROUPS,0,(char *)(s)) -# define SSL_get1_curves(ctx, s) \ - SSL_get1_groups((ctx), (s)) # define SSL_CTX_set1_groups(ctx, glist, glistlen) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SET_GROUPS,glistlen,(char *)(glist)) # define SSL_CTX_set1_groups_list(ctx, s) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SET_GROUPS_LIST,0,(char *)(s)) -# define SSL_CTX_set1_curves(ctx, clist, clistlen) \ - SSL_CTX_set1_groups((ctx), (clist), (clistlen)) -# define SSL_CTX_set1_curves_list(ctx, s) \ - SSL_CTX_set1_groups_list((ctx), (s)) # define SSL_set1_groups(ctx, glist, glistlen) \ SSL_ctrl(ctx,SSL_CTRL_SET_GROUPS,glistlen,(char *)(glist)) # define SSL_set1_groups_list(ctx, s) \ SSL_ctrl(ctx,SSL_CTRL_SET_GROUPS_LIST,0,(char *)(s)) -# define SSL_set1_curves(ctx, clist, clistlen) \ - SSL_set1_groups((ctx), (clist), (clistlen)) -# define SSL_set1_curves_list(ctx, s) \ - SSL_set1_groups_list((ctx), (s)) # define SSL_get_shared_group(s, n) \ SSL_ctrl(s,SSL_CTRL_GET_SHARED_GROUP,n,NULL) -# define SSL_get_shared_curve(s, n) \ - SSL_get_shared_group((s), (n)) # define SSL_CTX_set1_sigalgs(ctx, slist, slistlen) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SET_SIGALGS,slistlen,(int *)(slist)) # define SSL_CTX_set1_sigalgs_list(ctx, s) \ @@ -1438,6 +1426,23 @@ DECLARE_PEM_rw(SSL_SESSION, SSL_SESSION) # define SSL_get_max_proto_version(s) \ SSL_ctrl(s, SSL_CTRL_GET_MAX_PROTO_VERSION, 0, NULL) +/* + * The following symbol names are old and obsolete. They are kept + * for compatibility reasons only and should not be used anymore. + */ +# define SSL_CTRL_GET_CURVES SSL_CTRL_GET_GROUPS +# define SSL_CTRL_SET_CURVES SSL_CTRL_SET_GROUPS +# define SSL_CTRL_SET_CURVES_LIST SSL_CTRL_SET_GROUPS_LIST +# define SSL_CTRL_GET_SHARED_CURVE SSL_CTRL_GET_SHARED_GROUP + +# define SSL_get1_curves SSL_get1_groups +# define SSL_CTX_set1_curves SSL_CTX_set1_groups +# define SSL_CTX_set1_curves_list SSL_CTX_set1_groups_list +# define SSL_set1_curves SSL_set1_groups +# define SSL_set1_curves_list SSL_set1_groups_list +# define SSL_get_shared_curve SSL_get_shared_group + + # if OPENSSL_API_COMPAT < 0x10100000L /* Provide some compatibility macros for removed functionality. */ # define SSL_CTX_need_tmp_RSA(ctx) 0 From matthias.st.pierre at ncp-e.com Fri Apr 20 11:06:06 2018 From: matthias.st.pierre at ncp-e.com (matthias.st.pierre at ncp-e.com) Date: Fri, 20 Apr 2018 11:06:06 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524222366.350453.10287.nullmailer@dev.openssl.org> The branch master has been updated via e1c0348cc728cb37003ae411879bd23b6a84fcc8 (commit) from 9d978ac3f304286be13fde228632c2739e00834c (commit) - Log ----------------------------------------------------------------- commit e1c0348cc728cb37003ae411879bd23b6a84fcc8 Author: Dr. Matthias St. Pierre Date: Thu Apr 19 23:33:32 2018 +0200 openssl/err.h: remove duplicate OSSL_STOREerr() Two definitions in lines 127 and 136, introduced in 71a5516dcc8. Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6029) ----------------------------------------------------------------------- Summary of changes: include/openssl/err.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/openssl/err.h b/include/openssl/err.h index 524c542..6cae1a3 100644 --- a/include/openssl/err.h +++ b/include/openssl/err.h @@ -133,7 +133,6 @@ typedef struct err_state_st { # define ASYNCerr(f,r) ERR_PUT_error(ERR_LIB_ASYNC,(f),(r),OPENSSL_FILE,OPENSSL_LINE) # define KDFerr(f,r) ERR_PUT_error(ERR_LIB_KDF,(f),(r),OPENSSL_FILE,OPENSSL_LINE) # define SM2err(f,r) ERR_PUT_error(ERR_LIB_SM2,(f),(r),OPENSSL_FILE,OPENSSL_LINE) -# define OSSL_STOREerr(f,r) ERR_PUT_error(ERR_LIB_OSSL_STORE,(f),(r),OPENSSL_FILE,OPENSSL_LINE) # define ERR_PACK(l,f,r) ( \ (((unsigned int)(l) & 0x0FF) << 24L) | \ From no-reply at appveyor.com Fri Apr 20 11:28:06 2018 From: no-reply at appveyor.com (AppVeyor) Date: Fri, 20 Apr 2018 11:28:06 +0000 Subject: [openssl-commits] Build failed: openssl master.17438 Message-ID: <20180420112806.1.5E8184982072A84A@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Fri Apr 20 12:00:32 2018 From: no-reply at appveyor.com (AppVeyor) Date: Fri, 20 Apr 2018 12:00:32 +0000 Subject: [openssl-commits] Build failed: openssl master.17440 Message-ID: <20180420120032.1.C214E721C2910C5A@appveyor.com> An HTML attachment was scrubbed... URL: From bernd.edlinger at hotmail.de Fri Apr 20 13:45:42 2018 From: bernd.edlinger at hotmail.de (bernd.edlinger at hotmail.de) Date: Fri, 20 Apr 2018 13:45:42 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524231942.038151.19894.nullmailer@dev.openssl.org> The branch master has been updated via eb2b9892065cf5b69400b98ca82e4e99a525eb29 (commit) from e1c0348cc728cb37003ae411879bd23b6a84fcc8 (commit) - Log ----------------------------------------------------------------- commit eb2b9892065cf5b69400b98ca82e4e99a525eb29 Author: Bernd Edlinger Date: Fri Apr 20 15:45:06 2018 +0200 Ensure the thread keys are always allocated in the same order Fixes: #5899 Reviewed-by: Rich Salz Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5911) ----------------------------------------------------------------------- Summary of changes: crypto/bio/b_addr.c | 3 +- crypto/engine/eng_lib.c | 3 +- crypto/err/err.c | 49 ++++++++++++++++++++++++++--- crypto/ex_data.c | 3 +- crypto/include/internal/cryptlib_int.h | 1 + crypto/include/internal/err_int.h | 2 ++ crypto/init.c | 57 +++++++++++++++++++++++++--------- doc/man3/OPENSSL_init_crypto.pod | 6 ++-- include/openssl/crypto.h | 3 +- 9 files changed, 100 insertions(+), 27 deletions(-) diff --git a/crypto/bio/b_addr.c b/crypto/bio/b_addr.c index 9832c0c..abec7bb 100644 --- a/crypto/bio/b_addr.c +++ b/crypto/bio/b_addr.c @@ -603,7 +603,8 @@ static int addrinfo_wrap(int family, int socktype, DEFINE_RUN_ONCE_STATIC(do_bio_lookup_init) { - OPENSSL_init_crypto(0, NULL); + if (!OPENSSL_init_crypto(0, NULL)) + return 0; bio_lookup_lock = CRYPTO_THREAD_lock_new(); return bio_lookup_lock != NULL; } diff --git a/crypto/engine/eng_lib.c b/crypto/engine/eng_lib.c index f5031d3..95736ed 100644 --- a/crypto/engine/eng_lib.c +++ b/crypto/engine/eng_lib.c @@ -20,7 +20,8 @@ CRYPTO_ONCE engine_lock_init = CRYPTO_ONCE_STATIC_INIT; DEFINE_RUN_ONCE(do_engine_lock_init) { - OPENSSL_init_crypto(0, NULL); + if (!OPENSSL_init_crypto(0, NULL)) + return 0; global_engine_lock = CRYPTO_THREAD_lock_new(); return global_engine_lock != NULL; } diff --git a/crypto/err/err.c b/crypto/err/err.c index f55655c..03cbd73 100644 --- a/crypto/err/err.c +++ b/crypto/err/err.c @@ -265,11 +265,19 @@ static void ERR_STATE_free(ERR_STATE *s) DEFINE_RUN_ONCE_STATIC(do_err_strings_init) { - OPENSSL_init_crypto(0, NULL); + if (!OPENSSL_init_crypto(0, NULL)) + return 0; err_string_lock = CRYPTO_THREAD_lock_new(); + if (err_string_lock == NULL) + return 0; int_error_hash = lh_ERR_STRING_DATA_new(err_string_data_hash, err_string_data_cmp); - return err_string_lock != NULL && int_error_hash != NULL; + if (int_error_hash == NULL) { + CRYPTO_THREAD_lock_free(err_string_lock); + err_string_lock = NULL; + return 0; + } + return 1; } void err_cleanup(void) @@ -662,7 +670,10 @@ DEFINE_RUN_ONCE_STATIC(err_do_init) ERR_STATE *ERR_get_state(void) { - ERR_STATE *state = NULL; + ERR_STATE *state; + + if (!OPENSSL_init_crypto(OPENSSL_INIT_BASE_ONLY, NULL)) + return NULL; if (!RUN_ONCE(&err_init, err_do_init)) return NULL; @@ -694,13 +705,41 @@ ERR_STATE *ERR_get_state(void) return state; } +/* + * err_shelve_state returns the current thread local error state + * and freezes the error module until err_unshelve_state is called. + */ +int err_shelve_state(void **state) +{ + if (!OPENSSL_init_crypto(OPENSSL_INIT_BASE_ONLY, NULL)) + return 0; + + if (!RUN_ONCE(&err_init, err_do_init)) + return 0; + + *state = CRYPTO_THREAD_get_local(&err_thread_local); + if (!CRYPTO_THREAD_set_local(&err_thread_local, (ERR_STATE*)-1)) + return 0; + + return 1; +} + +/* + * err_unshelve_state restores the error state that was returned + * by err_shelve_state previously. + */ +void err_unshelve_state(void* state) +{ + if (state != (void*)-1) + CRYPTO_THREAD_set_local(&err_thread_local, (ERR_STATE*)state); +} + int ERR_get_next_error_library(void) { int ret; - if (!RUN_ONCE(&err_string_init, do_err_strings_init)) { + if (!RUN_ONCE(&err_string_init, do_err_strings_init)) return 0; - } CRYPTO_THREAD_write_lock(err_string_lock); ret = int_err_library_number++; diff --git a/crypto/ex_data.c b/crypto/ex_data.c index ed9820c..08dc7c4 100644 --- a/crypto/ex_data.c +++ b/crypto/ex_data.c @@ -37,7 +37,8 @@ static CRYPTO_ONCE ex_data_init = CRYPTO_ONCE_STATIC_INIT; DEFINE_RUN_ONCE_STATIC(do_ex_data_init) { - OPENSSL_init_crypto(0, NULL); + if (!OPENSSL_init_crypto(0, NULL)) + return 0; ex_data_lock = CRYPTO_THREAD_lock_new(); return ex_data_lock != NULL; } diff --git a/crypto/include/internal/cryptlib_int.h b/crypto/include/internal/cryptlib_int.h index 8f5650f..38b5dac 100644 --- a/crypto/include/internal/cryptlib_int.h +++ b/crypto/include/internal/cryptlib_int.h @@ -25,6 +25,7 @@ int ossl_init_thread_start(uint64_t opts); * use". */ # define OPENSSL_INIT_ZLIB 0x00010000L +# define OPENSSL_INIT_BASE_ONLY 0x00040000L /* OPENSSL_INIT_THREAD flags */ # define OPENSSL_INIT_THREAD_ASYNC 0x01 diff --git a/crypto/include/internal/err_int.h b/crypto/include/internal/err_int.h index 7fec3ed..4a7e43a 100644 --- a/crypto/include/internal/err_int.h +++ b/crypto/include/internal/err_int.h @@ -13,5 +13,7 @@ int err_load_crypto_strings_int(void); void err_cleanup(void); void err_delete_thread_state(void); +int err_shelve_state(void **); +void err_unshelve_state(void *); #endif diff --git a/crypto/init.c b/crypto/init.c index c79c32c..fb7e3ac 100644 --- a/crypto/init.c +++ b/crypto/init.c @@ -81,22 +81,36 @@ DEFINE_RUN_ONCE_STATIC(ossl_init_base) * We use a dummy thread local key here. We use the destructor to detect * when the thread is going to stop (where that feature is available) */ - CRYPTO_THREAD_init_local(&threadstopkey, ossl_init_thread_stop_wrap); + if (!CRYPTO_THREAD_init_local(&threadstopkey, ossl_init_thread_stop_wrap)) + return 0; + if ((init_lock = CRYPTO_THREAD_lock_new()) == NULL) + goto err; #ifndef OPENSSL_SYS_UEFI - atexit(OPENSSL_cleanup); + if (atexit(OPENSSL_cleanup) != 0) + goto err; #endif - if ((init_lock = CRYPTO_THREAD_lock_new()) == NULL) - return 0; OPENSSL_cpuid_setup(); - /* - * BIG FAT WARNING! - * Everything needed to be initialized in this function before threads - * come along MUST happen before base_inited is set to 1, or we will - * see race conditions. - */ base_inited = 1; + return 1; +err: +#ifdef OPENSSL_INIT_DEBUG + fprintf(stderr, "OPENSSL_INIT: ossl_init_base not ok!\n"); +#endif + CRYPTO_THREAD_lock_free(init_lock); + init_lock = NULL; + + CRYPTO_THREAD_cleanup_local(&threadstopkey); + return 0; +} + +static CRYPTO_ONCE load_crypto_nodelete = CRYPTO_ONCE_STATIC_INIT; +DEFINE_RUN_ONCE_STATIC(ossl_init_load_crypto_nodelete) +{ +#ifdef OPENSSL_INIT_DEBUG + fprintf(stderr, "OPENSSL_INIT: ossl_init_load_crypto_nodelete()\n"); +#endif #if !defined(OPENSSL_NO_DSO) && !defined(OPENSSL_USE_NODELETE) # ifdef DSO_WIN32 { @@ -108,6 +122,10 @@ DEFINE_RUN_ONCE_STATIC(ossl_init_base) | GET_MODULE_HANDLE_EX_FLAG_PIN, (void *)&base_inited, &handle); +# ifdef OPENSSL_INIT_DEBUG + fprintf(stderr, "OPENSSL_INIT: obtained DSO reference? %s\n", + (ret == TRUE ? "No!" : "Yes.")); +# endif return (ret == TRUE) ? 1 : 0; } # else @@ -116,9 +134,12 @@ DEFINE_RUN_ONCE_STATIC(ossl_init_base) * to remain loaded until the atexit() handler is run at process exit. */ { - DSO *dso = NULL; + DSO *dso; + void *err; + + if (!err_shelve_state(&err)) + return 0; - ERR_set_mark(); dso = DSO_dsobyaddr(&base_inited, DSO_FLAG_NO_UNLOAD_ON_FREE); # ifdef OPENSSL_INIT_DEBUG fprintf(stderr, "OPENSSL_INIT: obtained DSO reference? %s\n", @@ -130,7 +151,7 @@ DEFINE_RUN_ONCE_STATIC(ossl_init_base) */ # endif DSO_free(dso); - ERR_pop_to_mark(); + err_unshelve_state(err); } # endif #endif @@ -541,11 +562,17 @@ void OPENSSL_cleanup(void) int OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings) { if (stopped) { - CRYPTOerr(CRYPTO_F_OPENSSL_INIT_CRYPTO, ERR_R_INIT_FAIL); + if (!(opts & OPENSSL_INIT_BASE_ONLY)) + CRYPTOerr(CRYPTO_F_OPENSSL_INIT_CRYPTO, ERR_R_INIT_FAIL); return 0; } - if (!base_inited && !RUN_ONCE(&base, ossl_init_base)) + if (!RUN_ONCE(&base, ossl_init_base)) + return 0; + + if (!(opts & OPENSSL_INIT_BASE_ONLY) + && !RUN_ONCE(&load_crypto_nodelete, + ossl_init_load_crypto_nodelete)) return 0; if ((opts & OPENSSL_INIT_NO_LOAD_CRYPTO_STRINGS) diff --git a/doc/man3/OPENSSL_init_crypto.pod b/doc/man3/OPENSSL_init_crypto.pod index 606885b..a259539 100644 --- a/doc/man3/OPENSSL_init_crypto.pod +++ b/doc/man3/OPENSSL_init_crypto.pod @@ -141,15 +141,15 @@ CAPI engine (if available). This not a default option. With this option the library will automatically load and initialise the padlock engine (if available). This not a default option. -=item OPENSSL_INIT_ENGINE_DASYNC +=item OPENSSL_INIT_ENGINE_AFALG With this option the library will automatically load and initialise the -DASYNC engine. This not a default option. +AFALG engine. This not a default option. =item OPENSSL_INIT_ENGINE_ALL_BUILTIN With this option the library will automatically load and initialise all the -built in engines listed above with the exception of the openssl and dasync +built in engines listed above with the exception of the openssl and afalg engines. This not a default option. =item OPENSSL_INIT_ATFORK diff --git a/include/openssl/crypto.h b/include/openssl/crypto.h index 27119ff..c2ad65e 100644 --- a/include/openssl/crypto.h +++ b/include/openssl/crypto.h @@ -376,8 +376,9 @@ int CRYPTO_memcmp(const void * in_a, const void * in_b, size_t len); # define OPENSSL_INIT_ENGINE_CAPI 0x00002000L # define OPENSSL_INIT_ENGINE_PADLOCK 0x00004000L # define OPENSSL_INIT_ENGINE_AFALG 0x00008000L -# define OPENSSL_INIT_reserved_internal 0x00010000L +/* OPENSSL_INIT_ZLIB 0x00010000L */ # define OPENSSL_INIT_ATFORK 0x00020000L +/* OPENSSL_INIT_BASE_ONLY 0x00040000L */ /* OPENSSL_INIT flag range 0xfff00000 reserved for OPENSSL_init_ssl() */ /* Max OPENSSL_INIT flag value is 0x80000000 */ From bernd.edlinger at hotmail.de Fri Apr 20 13:50:01 2018 From: bernd.edlinger at hotmail.de (bernd.edlinger at hotmail.de) Date: Fri, 20 Apr 2018 13:50:01 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524232201.851196.21793.nullmailer@dev.openssl.org> The branch master has been updated via 0e0f8116e247912f5c48f8b3786e543f37fc1f87 (commit) from eb2b9892065cf5b69400b98ca82e4e99a525eb29 (commit) - Log ----------------------------------------------------------------- commit 0e0f8116e247912f5c48f8b3786e543f37fc1f87 Author: Bernd Edlinger Date: Thu Apr 19 20:56:46 2018 +0200 Fix building linux-armv4 with --strict-warnings Reviewed-by: Rich Salz Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/6026) ----------------------------------------------------------------------- Summary of changes: crypto/arm_arch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/arm_arch.h b/crypto/arm_arch.h index 547ec95..f11b543 100644 --- a/crypto/arm_arch.h +++ b/crypto/arm_arch.h @@ -69,7 +69,7 @@ # endif # endif -# if !__ASSEMBLER__ +# ifndef __ASSEMBLER__ extern unsigned int OPENSSL_armcap_P; # endif From bernd.edlinger at hotmail.de Fri Apr 20 13:51:15 2018 From: bernd.edlinger at hotmail.de (bernd.edlinger at hotmail.de) Date: Fri, 20 Apr 2018 13:51:15 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1524232275.422870.22705.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via b5da3cadbdaecdbdf45120fd5d75e72068edb652 (commit) from d2118367add0840df472f48e48be19f075a3dec0 (commit) - Log ----------------------------------------------------------------- commit b5da3cadbdaecdbdf45120fd5d75e72068edb652 Author: Bernd Edlinger Date: Thu Apr 19 20:56:46 2018 +0200 Fix building linux-armv4 with --strict-warnings Reviewed-by: Rich Salz Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/6026) (cherry picked from commit 0e0f8116e247912f5c48f8b3786e543f37fc1f87) ----------------------------------------------------------------------- Summary of changes: crypto/arm_arch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/arm_arch.h b/crypto/arm_arch.h index 3fc9e69..ddb60c6 100644 --- a/crypto/arm_arch.h +++ b/crypto/arm_arch.h @@ -69,7 +69,7 @@ # endif # endif -# if !__ASSEMBLER__ +# ifndef __ASSEMBLER__ extern unsigned int OPENSSL_armcap_P; # endif From bernd.edlinger at hotmail.de Fri Apr 20 13:55:07 2018 From: bernd.edlinger at hotmail.de (bernd.edlinger at hotmail.de) Date: Fri, 20 Apr 2018 13:55:07 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1524232507.658926.23926.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via 867dc5441aab7c813136e996d5d437740e6a3c18 (commit) from b5da3cadbdaecdbdf45120fd5d75e72068edb652 (commit) - Log ----------------------------------------------------------------- commit 867dc5441aab7c813136e996d5d437740e6a3c18 Author: Bernd Edlinger Date: Thu Apr 19 22:20:29 2018 +0200 Fix a gcc-8 warning -Wcast-function-type Casting to the generic function type "void (*)(void)" prevents the warning. Backport of #5816 Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6027) ----------------------------------------------------------------------- Summary of changes: test/shlibloadtest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/shlibloadtest.c b/test/shlibloadtest.c index 919bf7c..d584413 100644 --- a/test/shlibloadtest.c +++ b/test/shlibloadtest.c @@ -44,7 +44,7 @@ static OpenSSL_version_num_t OpenSSL_version_num; # define DSO_FREE "DSO_free" typedef void DSO; -typedef DSO * (*DSO_dsobyaddr_t)(void (*addr)(), int flags); +typedef DSO * (*DSO_dsobyaddr_t)(void (*addr)(void), int flags); typedef int (*DSO_free_t)(DSO *dso); static DSO_dsobyaddr_t DSO_dsobyaddr; @@ -252,7 +252,7 @@ int main(int argc, char **argv) { DSO *hndl; /* use known symbol from crypto module */ - if ((hndl = DSO_dsobyaddr((void (*)())ERR_get_error, 0)) != NULL) { + if ((hndl = DSO_dsobyaddr((void (*)(void))ERR_get_error, 0)) != NULL) { DSO_free(hndl); } else { printf("Unable to obtain DSO reference from crypto symbol\n"); From bernd.edlinger at hotmail.de Fri Apr 20 13:56:49 2018 From: bernd.edlinger at hotmail.de (bernd.edlinger at hotmail.de) Date: Fri, 20 Apr 2018 13:56:49 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1524232609.998269.24979.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via 5fc89c1af837026b5812526ef6f519bf7ca42f16 (commit) from 867dc5441aab7c813136e996d5d437740e6a3c18 (commit) - Log ----------------------------------------------------------------- commit 5fc89c1af837026b5812526ef6f519bf7ca42f16 Author: Bernd Edlinger Date: Thu Apr 19 22:17:24 2018 +0200 Fix a warning about missing prototype on arm Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6028) ----------------------------------------------------------------------- Summary of changes: crypto/armcap.c | 1 + crypto/include/internal/cryptlib.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/crypto/armcap.c b/crypto/armcap.c index 432a06c..1f4e31f 100644 --- a/crypto/armcap.c +++ b/crypto/armcap.c @@ -13,6 +13,7 @@ #include #include #include +#include #include "arm_arch.h" diff --git a/crypto/include/internal/cryptlib.h b/crypto/include/internal/cryptlib.h index f3ec9b6..69b00eb 100644 --- a/crypto/include/internal/cryptlib.h +++ b/crypto/include/internal/cryptlib.h @@ -74,6 +74,8 @@ FILE *openssl_fopen(const char *filename, const char *mode); void *openssl_fopen(const char *filename, const char *mode); # endif +unsigned long OPENSSL_rdtsc(void); + #ifdef __cplusplus } #endif From bernd.edlinger at hotmail.de Sat Apr 21 13:42:22 2018 From: bernd.edlinger at hotmail.de (bernd.edlinger at hotmail.de) Date: Sat, 21 Apr 2018 13:42:22 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1524318142.181292.13879.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via bf21fe935a979c08292d06553ef8c9a49382208c (commit) from 5fc89c1af837026b5812526ef6f519bf7ca42f16 (commit) - Log ----------------------------------------------------------------- commit bf21fe935a979c08292d06553ef8c9a49382208c Author: Bernd Edlinger Date: Sat Apr 21 15:41:42 2018 +0200 Ensure the thread keys are always allocated in the same order Back-port of #5911 Fixes: #5899 Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6037) ----------------------------------------------------------------------- Summary of changes: crypto/bio/b_addr.c | 3 +- crypto/engine/eng_lib.c | 3 +- crypto/err/err.c | 40 ++++++++++++++++++--- crypto/ex_data.c | 3 +- crypto/include/internal/cryptlib_int.h | 1 + crypto/include/internal/err_int.h | 2 ++ crypto/init.c | 65 +++++++++++++++++++++------------- include/openssl/crypto.h | 4 ++- 8 files changed, 89 insertions(+), 32 deletions(-) diff --git a/crypto/bio/b_addr.c b/crypto/bio/b_addr.c index 24097d7..5384d73 100644 --- a/crypto/bio/b_addr.c +++ b/crypto/bio/b_addr.c @@ -604,7 +604,8 @@ static int addrinfo_wrap(int family, int socktype, DEFINE_RUN_ONCE_STATIC(do_bio_lookup_init) { - OPENSSL_init_crypto(0, NULL); + if (!OPENSSL_init_crypto(0, NULL)) + return 0; bio_lookup_lock = CRYPTO_THREAD_lock_new(); return bio_lookup_lock != NULL; } diff --git a/crypto/engine/eng_lib.c b/crypto/engine/eng_lib.c index cbefc7e..1b88d6f 100644 --- a/crypto/engine/eng_lib.c +++ b/crypto/engine/eng_lib.c @@ -18,7 +18,8 @@ CRYPTO_ONCE engine_lock_init = CRYPTO_ONCE_STATIC_INIT; DEFINE_RUN_ONCE(do_engine_lock_init) { - OPENSSL_init_crypto(0, NULL); + if (!OPENSSL_init_crypto(0, NULL)) + return 0; global_engine_lock = CRYPTO_THREAD_lock_new(); return global_engine_lock != NULL; } diff --git a/crypto/err/err.c b/crypto/err/err.c index c439928..06f16d3 100644 --- a/crypto/err/err.c +++ b/crypto/err/err.c @@ -254,7 +254,8 @@ static void ERR_STATE_free(ERR_STATE *s) DEFINE_RUN_ONCE_STATIC(do_err_strings_init) { - OPENSSL_init_crypto(0, NULL); + if (!OPENSSL_init_crypto(0, NULL)) + return 0; err_string_lock = CRYPTO_THREAD_lock_new(); return err_string_lock != NULL; } @@ -653,7 +654,10 @@ DEFINE_RUN_ONCE_STATIC(err_do_init) ERR_STATE *ERR_get_state(void) { - ERR_STATE *state = NULL; + ERR_STATE *state; + + if (!OPENSSL_init_crypto(OPENSSL_INIT_BASE_ONLY, NULL)) + return NULL; if (!RUN_ONCE(&err_init, err_do_init)) return NULL; @@ -686,13 +690,41 @@ ERR_STATE *ERR_get_state(void) return state; } +/* + * err_shelve_state returns the current thread local error state + * and freezes the error module until err_unshelve_state is called. + */ +int err_shelve_state(void **state) +{ + if (!OPENSSL_init_crypto(OPENSSL_INIT_BASE_ONLY, NULL)) + return 0; + + if (!RUN_ONCE(&err_init, err_do_init)) + return 0; + + *state = CRYPTO_THREAD_get_local(&err_thread_local); + if (!CRYPTO_THREAD_set_local(&err_thread_local, (ERR_STATE*)-1)) + return 0; + + return 1; +} + +/* + * err_unshelve_state restores the error state that was returned + * by err_shelve_state previously. + */ +void err_unshelve_state(void* state) +{ + if (state != (void*)-1) + CRYPTO_THREAD_set_local(&err_thread_local, (ERR_STATE*)state); +} + int ERR_get_next_error_library(void) { int ret; - if (!RUN_ONCE(&err_string_init, do_err_strings_init)) { + if (!RUN_ONCE(&err_string_init, do_err_strings_init)) return 0; - } CRYPTO_THREAD_write_lock(err_string_lock); ret = int_err_library_number++; diff --git a/crypto/ex_data.c b/crypto/ex_data.c index 22c4d3d..f12a9ef 100644 --- a/crypto/ex_data.c +++ b/crypto/ex_data.c @@ -38,7 +38,8 @@ static CRYPTO_ONCE ex_data_init = CRYPTO_ONCE_STATIC_INIT; DEFINE_RUN_ONCE_STATIC(do_ex_data_init) { - OPENSSL_init_crypto(0, NULL); + if (!OPENSSL_init_crypto(0, NULL)) + return 0; ex_data_lock = CRYPTO_THREAD_lock_new(); return ex_data_lock != NULL; } diff --git a/crypto/include/internal/cryptlib_int.h b/crypto/include/internal/cryptlib_int.h index 8e2a719..4db47ee 100644 --- a/crypto/include/internal/cryptlib_int.h +++ b/crypto/include/internal/cryptlib_int.h @@ -24,6 +24,7 @@ int ossl_init_thread_start(uint64_t opts); * use". */ # define OPENSSL_INIT_ZLIB 0x00010000L +# define OPENSSL_INIT_BASE_ONLY 0x00040000L /* OPENSSL_INIT_THREAD flags */ # define OPENSSL_INIT_THREAD_ASYNC 0x01 diff --git a/crypto/include/internal/err_int.h b/crypto/include/internal/err_int.h index 7fec3ed..4a7e43a 100644 --- a/crypto/include/internal/err_int.h +++ b/crypto/include/internal/err_int.h @@ -13,5 +13,7 @@ int err_load_crypto_strings_int(void); void err_cleanup(void); void err_delete_thread_state(void); +int err_shelve_state(void **); +void err_unshelve_state(void *); #endif diff --git a/crypto/init.c b/crypto/init.c index 1553113..5ed321f 100644 --- a/crypto/init.c +++ b/crypto/init.c @@ -75,22 +75,36 @@ DEFINE_RUN_ONCE_STATIC(ossl_init_base) * We use a dummy thread local key here. We use the destructor to detect * when the thread is going to stop (where that feature is available) */ - CRYPTO_THREAD_init_local(&threadstopkey, ossl_init_thread_stop_wrap); + if (!CRYPTO_THREAD_init_local(&threadstopkey, ossl_init_thread_stop_wrap)) + return 0; + if ((init_lock = CRYPTO_THREAD_lock_new()) == NULL) + goto err; #ifndef OPENSSL_SYS_UEFI - atexit(OPENSSL_cleanup); + if (atexit(OPENSSL_cleanup) != 0) + goto err; #endif - if ((init_lock = CRYPTO_THREAD_lock_new()) == NULL) - return 0; OPENSSL_cpuid_setup(); - /* - * BIG FAT WARNING! - * Everything needed to be initialized in this function before threads - * come along MUST happen before base_inited is set to 1, or we will - * see race conditions. - */ base_inited = 1; + return 1; + +err: +#ifdef OPENSSL_INIT_DEBUG + fprintf(stderr, "OPENSSL_INIT: ossl_init_base not ok!\n"); +#endif + CRYPTO_THREAD_lock_free(init_lock); + init_lock = NULL; + + CRYPTO_THREAD_cleanup_local(&threadstopkey); + return 0; +} +static CRYPTO_ONCE load_crypto_nodelete = CRYPTO_ONCE_STATIC_INIT; +DEFINE_RUN_ONCE_STATIC(ossl_init_load_crypto_nodelete) +{ +#ifdef OPENSSL_INIT_DEBUG + fprintf(stderr, "OPENSSL_INIT: ossl_init_load_crypto_nodelete()\n"); +#endif #if !defined(OPENSSL_NO_DSO) && !defined(OPENSSL_USE_NODELETE) # ifdef DSO_WIN32 { @@ -102,6 +116,10 @@ DEFINE_RUN_ONCE_STATIC(ossl_init_base) | GET_MODULE_HANDLE_EX_FLAG_PIN, (void *)&base_inited, &handle); +# ifdef OPENSSL_INIT_DEBUG + fprintf(stderr, "OPENSSL_INIT: obtained DSO reference? %s\n", + (ret == TRUE ? "No!" : "Yes.")); +# endif return (ret == TRUE) ? 1 : 0; } # else @@ -110,9 +128,12 @@ DEFINE_RUN_ONCE_STATIC(ossl_init_base) * to remain loaded until the atexit() handler is run at process exit. */ { - DSO *dso = NULL; + DSO *dso; + void *err; + + if (!err_shelve_state(&err)) + return 0; - ERR_set_mark(); dso = DSO_dsobyaddr(&base_inited, DSO_FLAG_NO_UNLOAD_ON_FREE); # ifdef OPENSSL_INIT_DEBUG fprintf(stderr, "OPENSSL_INIT: obtained DSO reference? %s\n", @@ -124,7 +145,7 @@ DEFINE_RUN_ONCE_STATIC(ossl_init_base) */ # endif DSO_free(dso); - ERR_pop_to_mark(); + err_unshelve_state(err); } # endif #endif @@ -514,22 +535,18 @@ void OPENSSL_cleanup(void) */ int OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings) { - static int stoperrset = 0; - if (stopped) { - if (!stoperrset) { - /* - * We only ever set this once to avoid getting into an infinite - * loop where the error system keeps trying to init and fails so - * sets an error etc - */ - stoperrset = 1; + if (!(opts & OPENSSL_INIT_BASE_ONLY)) CRYPTOerr(CRYPTO_F_OPENSSL_INIT_CRYPTO, ERR_R_INIT_FAIL); - } return 0; } - if (!base_inited && !RUN_ONCE(&base, ossl_init_base)) + if (!RUN_ONCE(&base, ossl_init_base)) + return 0; + + if (!(opts & OPENSSL_INIT_BASE_ONLY) + && !RUN_ONCE(&load_crypto_nodelete, + ossl_init_load_crypto_nodelete)) return 0; if ((opts & OPENSSL_INIT_NO_LOAD_CRYPTO_STRINGS) diff --git a/include/openssl/crypto.h b/include/openssl/crypto.h index 1ba7f25..7fc60b3 100644 --- a/include/openssl/crypto.h +++ b/include/openssl/crypto.h @@ -371,7 +371,9 @@ int CRYPTO_memcmp(const volatile void * volatile in_a, # define OPENSSL_INIT_ENGINE_CAPI 0x00002000L # define OPENSSL_INIT_ENGINE_PADLOCK 0x00004000L # define OPENSSL_INIT_ENGINE_AFALG 0x00008000L -/* OPENSSL_INIT flag 0x00010000 reserved for internal use */ +/* OPENSSL_INIT_ZLIB 0x00010000L */ +/* currently unused 0x00020000L */ +/* OPENSSL_INIT_BASE_ONLY 0x00040000L */ /* OPENSSL_INIT flag range 0xfff00000 reserved for OPENSSL_init_ssl() */ /* Max OPENSSL_INIT flag value is 0x80000000 */ From scan-admin at coverity.com Sun Apr 22 07:49:17 2018 From: scan-admin at coverity.com (scan-admin at coverity.com) Date: Sun, 22 Apr 2018 07:49:17 +0000 (UTC) Subject: [openssl-commits] Coverity Scan: Analysis completed for openssl/openssl Message-ID: <5adc3e7c730bb_86402ab1dd750f5871463@node1.mail> Your request for analysis of openssl/openssl has been completed successfully. The results are available at https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRakUl6QyjujEohY7rPpoYUEcf-2B75FkFkxwwFKGZV8c1xA-3D-3D_19DGMz38yO7VfzGQuXkecdlEmzBoDG4v8Dvyanv-2F1I1FkNEUF-2B7toF8fckImaJd-2Feu4MV-2BRErEbg4h0-2BmrLYKPlXDdeoewUmkaCq8jtHsA0fSfHwjeERPMnPWJYYxkNpv23FaSPFkslohjUJSEOviyevGLc-2BkolwRXFL-2B-2FwBge2fyObs8FCyFighwVJrt-2BQDlcsDI5piHt-2BjW26BE0oAIznf3t-2BfWVLiIPJmssskkQ0-3D Build ID: 207601 Analysis Summary: New defects found: 4 Defects eliminated: 8 If you have difficulty understanding any defects, email us at scan-admin at coverity.com, or post your question to StackOverflow at https://u2389337.ct.sendgrid.net/wf/click?upn=OgIsEqWzmIl4S-2FzEUMxLXL-2BukuZt9UUdRZhgmgzAKchwAzH1nH3073xDEXNRgHN6q227lMNIWoOb8ZgSjAjKcg-3D-3D_19DGMz38yO7VfzGQuXkecdlEmzBoDG4v8Dvyanv-2F1I1FkNEUF-2B7toF8fckImaJd-2Feu4MV-2BRErEbg4h0-2BmrLYKPaNQ04RReZkyuQkaAMBijhrXfhLxE-2FAletXFZ2Zixq9S4LdsnfG15RYJ6YgQtNq3NmcDAEz3OOQ8MK436nyj7OBcAeKZHSE-2FkZhulDKUuceVi5AWFeyXoEaA7HbaBPY8R98itfGI-2F6dYwr2ZBoOX-2Fc-3D From scan-admin at coverity.com Sun Apr 22 07:54:59 2018 From: scan-admin at coverity.com (scan-admin at coverity.com) Date: Sun, 22 Apr 2018 07:54:59 +0000 (UTC) Subject: [openssl-commits] Coverity Scan: Analysis completed for OpenSSL-1.0.2 Message-ID: <5adc3fd3156a5_8b472ab1dd750f58714a2@node1.mail> Your request for analysis of OpenSSL-1.0.2 has been completed successfully. The results are available at https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRakUl6QyjujEohY7rPpoYUEeuRTZVWU4ku8PUBnVPw8PQ-3D-3D_19DGMz38yO7VfzGQuXkecdlEmzBoDG4v8Dvyanv-2F1I2Ep0-2B01luyz05peOHL96nHYU07EZjOf0OrhJV9bCBJjrj-2BVbYzYAVRWpsSAJ8j1lu4CT6-2BQeNdWyNRBhK5Q78LQtiOQ0aQXq7ixT6mJlODJ10IeYU7CKhN44piuOoYVauoK0m4n2oHDOopYEtRRtRcdBe0Zzu5N-2FLdrWEuXr4YQweWNkPKThJlJMZL5w3G02Y-3D Build ID: 207605 Analysis Summary: New defects found: 0 Defects eliminated: 0 From no-reply at appveyor.com Sun Apr 22 17:54:29 2018 From: no-reply at appveyor.com (AppVeyor) Date: Sun, 22 Apr 2018 17:54:29 +0000 Subject: [openssl-commits] Build failed: openssl master.17469 Message-ID: <20180422175429.1.AB622C7E6F755143@appveyor.com> An HTML attachment was scrubbed... URL: From kurt at openssl.org Sun Apr 22 18:17:30 2018 From: kurt at openssl.org (Kurt Roeckx) Date: Sun, 22 Apr 2018 18:17:30 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524421050.923451.12893.nullmailer@dev.openssl.org> The branch master has been updated via 148796291e47ad402ddfd1bbe6f34a2652657ec2 (commit) from 0e0f8116e247912f5c48f8b3786e543f37fc1f87 (commit) - Log ----------------------------------------------------------------- commit 148796291e47ad402ddfd1bbe6f34a2652657ec2 Author: Kurt Roeckx Date: Sun Apr 8 20:20:25 2018 +0200 Add support for getrandom() or equivalent system calls and use them by default Reviewed-by: Dr. Matthias St. Pierre GH: #5910 ----------------------------------------------------------------------- Summary of changes: INSTALL | 3 +- crypto/rand/rand_unix.c | 101 +++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 93 insertions(+), 11 deletions(-) diff --git a/INSTALL b/INSTALL index c0163a9..a0ebef9 100644 --- a/INSTALL +++ b/INSTALL @@ -224,7 +224,8 @@ os: Use a trusted operating system entropy source. This is the default method if such an entropy source exists. - getrandom: Use the L system call if available. + getrandom: Use the L or equivalent system + call. devrandom: Use the the first device from the DEVRANDOM list which can be opened to read random bytes. The DEVRANDOM preprocessor constant expands to diff --git a/crypto/rand/rand_unix.c b/crypto/rand/rand_unix.c index beb35a3..f6fef9a 100644 --- a/crypto/rand/rand_unix.c +++ b/crypto/rand/rand_unix.c @@ -7,6 +7,7 @@ * https://www.openssl.org/source/license.html */ +#define _GNU_SOURCE #include "e_os.h" #include #include "internal/cryptlib.h" @@ -14,6 +15,17 @@ #include "rand_lcl.h" #include "internal/rand_int.h" #include +#if defined(__linux) +# include +#endif +#if defined(__FreeBSD__) +# include +# include +# include +#endif +#if defined(__OpenBSD__) +# include +#endif #ifdef OPENSSL_SYS_UNIX # include # include @@ -59,6 +71,8 @@ static uint64_t get_timer_bits(void); # endif #endif +int syscall_random(void *buf, size_t buflen); + #if (defined(OPENSSL_SYS_VXWORKS) || defined(OPENSSL_SYS_UEFI)) && \ !defined(OPENSSL_RAND_SEED_NONE) # error "UEFI and VXWorks only support seeding NONE" @@ -149,26 +163,93 @@ size_t rand_pool_acquire_entropy(RAND_POOL *pool) # error "Seeding uses urandom but DEVRANDOM is not configured" # endif +# if defined(__GLIBC__) && defined(__GLIBC_PREREQ) +# if __GLIBC_PREREQ(2, 25) +# define OPENSSL_HAVE_GETRANDOM +# endif +# endif + +# if (defined(__FreeBSD__) && __FreeBSD_version >= 1200061) +# define OPENSSL_HAVE_GETRANDOM +# endif + +# if defined(OPENSSL_HAVE_GETRANDOM) +# include +# endif + # if defined(OPENSSL_RAND_SEED_OS) # if !defined(DEVRANDOM) # error "OS seeding requires DEVRANDOM to be configured" # endif +# define OPENSSL_RAND_SEED_GETRANDOM # define OPENSSL_RAND_SEED_DEVRANDOM -# if defined(__GLIBC__) && defined(__GLIBC_PREREQ) -# if __GLIBC_PREREQ(2, 25) -# define OPENSSL_RAND_SEED_GETRANDOM -# endif -# endif -# endif - -# ifdef OPENSSL_RAND_SEED_GETRANDOM -# include # endif # if defined(OPENSSL_RAND_SEED_LIBRANDOM) # error "librandom not (yet) supported" # endif +# if defined(__FreeBSD__) && defined(KERN_ARND) +/* + * sysctl_random(): Use sysctl() to read a random number from the kernel + * Returns the size on success, 0 on failure. + */ +static size_t sysctl_random(char *buf, size_t buflen) +{ + int mib[2]; + size_t done = 0; + size_t len; + + /* + * Old implementations returned longs, newer versions support variable + * sizes up to 256 byte. The code below would not work properly when + * the sysctl returns long and we want to request something not a multiple + * of longs, which should never be the case. + */ + ossl_assert(buflen % sizeof(long) == 0); + + mib[0] = CTL_KERN; + mib[1] = KERN_ARND; + + do { + len = buflen; + if (sysctl(mib, 2, buf, &len, NULL, 0) == -1) + return done; + done += len; + buf += len; + buflen -= len; + } while (buflen > 0); + + return done; +} +# endif + +/* + * syscall_random(): Try to get random data using a system call + * returns the number of bytes returned in buf, or <= 0 on error. + */ +int syscall_random(void *buf, size_t buflen) +{ +# if defined(OPENSSL_HAVE_GETRANDOM) + return (int)getrandom(buf, buflen, 0); +# endif + +# if defined(__linux) && defined(SYS_getrandom) + return (int)syscall(SYS_getrandom, buf, buflen, 0); +# endif + +# if defined(__FreeBSD__) && defined(KERN_ARND) + return (int)sysctl_random(buf, buflen); +# endif + + /* Supported since OpenBSD 5.6 */ +# if defined(__OpenBSD__) && OpenBSD >= 201411 + return getentropy(buf, buflen); +# endif + + return -1; +} + /* * Try the various seeding methods in turn, exit when successful. * @@ -201,7 +282,7 @@ size_t rand_pool_acquire_entropy(RAND_POOL *pool) if (buffer != NULL) { size_t bytes = 0; - if (getrandom(buffer, bytes_needed, 0) == (int)bytes_needed) + if (syscall_random(buffer, bytes_needed) == (int)bytes_needed) bytes = bytes_needed; rand_pool_add_end(pool, bytes, 8 * bytes); From no-reply at appveyor.com Sun Apr 22 18:32:35 2018 From: no-reply at appveyor.com (AppVeyor) Date: Sun, 22 Apr 2018 18:32:35 +0000 Subject: [openssl-commits] Build failed: openssl master.17470 Message-ID: <20180422183235.1.A476DCD01372FF8F@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Sun Apr 22 18:53:04 2018 From: no-reply at appveyor.com (AppVeyor) Date: Sun, 22 Apr 2018 18:53:04 +0000 Subject: [openssl-commits] Build completed: openssl master.17471 Message-ID: <20180422185304.1.528746B0BCCA63F5@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Mon Apr 23 02:36:19 2018 From: no-reply at appveyor.com (AppVeyor) Date: Mon, 23 Apr 2018 02:36:19 +0000 Subject: [openssl-commits] Build failed: openssl master.17476 Message-ID: <20180423023619.1.8174822F8E6942E2@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Mon Apr 23 03:13:11 2018 From: no-reply at appveyor.com (AppVeyor) Date: Mon, 23 Apr 2018 03:13:11 +0000 Subject: [openssl-commits] Build failed: openssl master.17477 Message-ID: <20180423031311.1.E3C6B3E65398DDF0@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Mon Apr 23 03:35:35 2018 From: no-reply at appveyor.com (AppVeyor) Date: Mon, 23 Apr 2018 03:35:35 +0000 Subject: [openssl-commits] Build completed: openssl master.17478 Message-ID: <20180423033535.1.BC0C7AC37B53BBF9@appveyor.com> An HTML attachment was scrubbed... URL: From levitte at openssl.org Mon Apr 23 08:51:53 2018 From: levitte at openssl.org (Richard Levitte) Date: Mon, 23 Apr 2018 08:51:53 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524473513.455083.2518.nullmailer@dev.openssl.org> The branch master has been updated via 10b37541dc7f27b0ca74102970691ce4636cc0bd (commit) from 148796291e47ad402ddfd1bbe6f34a2652657ec2 (commit) - Log ----------------------------------------------------------------- commit 10b37541dc7f27b0ca74102970691ce4636cc0bd Author: Richard Levitte Date: Mon Apr 23 10:26:05 2018 +0200 Fix late opening of output file For 'openssl dhparams', the output file was opened after calculations were made, which is a waste of cycles and time if the output file turns out not to be writable. Fixes #3404 Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/6051) ----------------------------------------------------------------------- Summary of changes: apps/dhparam.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/dhparam.c b/apps/dhparam.c index 8a3a389..44160fd 100644 --- a/apps/dhparam.c +++ b/apps/dhparam.c @@ -153,6 +153,11 @@ int dhparam_main(int argc, char **argv) goto end; } # endif + + out = bio_open_default(outfile, 'w', outformat); + if (out == NULL) + goto end; + /* DH parameters */ if (num && !g) g = 2; @@ -260,10 +265,6 @@ int dhparam_main(int argc, char **argv) /* dh != NULL */ } - out = bio_open_default(outfile, 'w', outformat); - if (out == NULL) - goto end; - if (text) { DHparams_print(out, dh); } From levitte at openssl.org Mon Apr 23 08:52:51 2018 From: levitte at openssl.org (Richard Levitte) Date: Mon, 23 Apr 2018 08:52:51 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1524473571.209721.3432.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via 7afe18bd003ff7477168626d99efb5a297f2df39 (commit) from bf21fe935a979c08292d06553ef8c9a49382208c (commit) - Log ----------------------------------------------------------------- commit 7afe18bd003ff7477168626d99efb5a297f2df39 Author: Richard Levitte Date: Mon Apr 23 10:26:05 2018 +0200 Fix late opening of output file For 'openssl dhparams', the output file was opened after calculations were made, which is a waste of cycles and time if the output file turns out not to be writable. Fixes #3404 Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/6051) (cherry picked from commit 10b37541dc7f27b0ca74102970691ce4636cc0bd) ----------------------------------------------------------------------- Summary of changes: apps/dhparam.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/dhparam.c b/apps/dhparam.c index 94322e3..ae2279e 100644 --- a/apps/dhparam.c +++ b/apps/dhparam.c @@ -151,6 +151,11 @@ int dhparam_main(int argc, char **argv) goto end; } # endif + + out = bio_open_default(outfile, 'w', outformat); + if (out == NULL) + goto end; + /* DH parameters */ if (num && !g) g = 2; @@ -266,10 +271,6 @@ int dhparam_main(int argc, char **argv) /* dh != NULL */ } - out = bio_open_default(outfile, 'w', outformat); - if (out == NULL) - goto end; - if (text) { DHparams_print(out, dh); } From levitte at openssl.org Mon Apr 23 09:08:41 2018 From: levitte at openssl.org (Richard Levitte) Date: Mon, 23 Apr 2018 09:08:41 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524474521.673542.7249.nullmailer@dev.openssl.org> The branch master has been updated via 25642ad29e6a2c15c10ceb5e4f029638f73a879e (commit) from 10b37541dc7f27b0ca74102970691ce4636cc0bd (commit) - Log ----------------------------------------------------------------- commit 25642ad29e6a2c15c10ceb5e4f029638f73a879e Author: Richard Levitte Date: Mon Apr 23 10:22:56 2018 +0200 Fix openssl ca, to correctly make output file binary when using -spkac On Unix, this doesn't matter, but on other platforms, it may. Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/6050) ----------------------------------------------------------------------- Summary of changes: apps/ca.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/ca.c b/apps/ca.c index 1c053b5..ea774ad 100644 --- a/apps/ca.c +++ b/apps/ca.c @@ -722,8 +722,12 @@ end_of_options: /*****************************************************************/ if (req || gencrl) { - /* FIXME: Is it really always text? */ - Sout = bio_open_default(outfile, 'w', FORMAT_TEXT); + if (spkac_file != NULL) { + output_der = 1; + batch = 1; + } + Sout = bio_open_default(outfile, 'w', + output_der ? FORMAT_ASN1 : FORMAT_TEXT); if (Sout == NULL) goto end; } @@ -877,10 +881,6 @@ end_of_options: BIO_printf(bio_err, "Memory allocation failure\n"); goto end; } - if (outfile) { - output_der = 1; - batch = 1; - } } } if (ss_cert_file != NULL) { From levitte at openssl.org Mon Apr 23 09:09:48 2018 From: levitte at openssl.org (Richard Levitte) Date: Mon, 23 Apr 2018 09:09:48 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1524474588.477163.8251.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via 29a7148d4e47cf5c7861ed66679d69d5380c95f2 (commit) from 7afe18bd003ff7477168626d99efb5a297f2df39 (commit) - Log ----------------------------------------------------------------- commit 29a7148d4e47cf5c7861ed66679d69d5380c95f2 Author: Richard Levitte Date: Mon Apr 23 10:22:56 2018 +0200 Fix openssl ca, to correctly make output file binary when using -spkac On Unix, this doesn't matter, but on other platforms, it may. Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/6050) (cherry picked from commit 25642ad29e6a2c15c10ceb5e4f029638f73a879e) ----------------------------------------------------------------------- Summary of changes: apps/ca.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/ca.c b/apps/ca.c index d474a2b..eb093d0 100644 --- a/apps/ca.c +++ b/apps/ca.c @@ -725,8 +725,12 @@ end_of_options: /*****************************************************************/ if (req || gencrl) { - /* FIXME: Is it really always text? */ - Sout = bio_open_default(outfile, 'w', FORMAT_TEXT); + if (spkac_file != NULL) { + output_der = 1; + batch = 1; + } + Sout = bio_open_default(outfile, 'w', + output_der ? FORMAT_ASN1 : FORMAT_TEXT); if (Sout == NULL) goto end; } @@ -872,10 +876,6 @@ end_of_options: BIO_printf(bio_err, "Memory allocation failure\n"); goto end; } - if (outfile) { - output_der = 1; - batch = 1; - } } } if (ss_cert_file != NULL) { From no-reply at appveyor.com Mon Apr 23 11:19:03 2018 From: no-reply at appveyor.com (AppVeyor) Date: Mon, 23 Apr 2018 11:19:03 +0000 Subject: [openssl-commits] Build failed: openssl master.17489 Message-ID: <20180423111903.1.FC6749A8AA3815DF@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Mon Apr 23 11:40:36 2018 From: no-reply at appveyor.com (AppVeyor) Date: Mon, 23 Apr 2018 11:40:36 +0000 Subject: [openssl-commits] Build completed: openssl master.17490 Message-ID: <20180423114036.1.5353C581A0AD0395@appveyor.com> An HTML attachment was scrubbed... URL: From appro at openssl.org Mon Apr 23 15:17:43 2018 From: appro at openssl.org (Andy Polyakov) Date: Mon, 23 Apr 2018 15:17:43 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524496663.474007.19890.nullmailer@dev.openssl.org> The branch master has been updated via 46cc9f35ae98ade6c56f01351d72163049a4d5b1 (commit) from 25642ad29e6a2c15c10ceb5e4f029638f73a879e (commit) - Log ----------------------------------------------------------------- commit 46cc9f35ae98ade6c56f01351d72163049a4d5b1 Author: Andy Polyakov Date: Sun Apr 22 21:14:15 2018 +0200 .travis.yml: switch to newer osx image. Default osx image runs Mac OS X 10.12, which apparently suffers from infrequent socket failures affecting some tests. Later image runs 10.13... Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5986) ----------------------------------------------------------------------- Summary of changes: .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index bd9d8f8..33c3751 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,8 @@ dist: trusty sudo: required +osx_image: xcode9.3 + language: c cache: ccache git: From appro at openssl.org Mon Apr 23 15:20:36 2018 From: appro at openssl.org (Andy Polyakov) Date: Mon, 23 Apr 2018 15:20:36 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524496836.949236.21301.nullmailer@dev.openssl.org> The branch master has been updated via dd2d7b19f8572b2c447397524621efdb675b5248 (commit) from 46cc9f35ae98ade6c56f01351d72163049a4d5b1 (commit) - Log ----------------------------------------------------------------- commit dd2d7b19f8572b2c447397524621efdb675b5248 Author: Andy Polyakov Date: Sun Apr 22 12:24:09 2018 +0200 sha/asm/keccak1600-armv8.pl: halve the size of hw-assisted subroutine. Reviewed-by: Richard Levitte Reviewed-by: Rich Salz ----------------------------------------------------------------------- Summary of changes: crypto/sha/asm/keccak1600-armv8.pl | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/crypto/sha/asm/keccak1600-armv8.pl b/crypto/sha/asm/keccak1600-armv8.pl index a32b8ba..704ab4a 100755 --- a/crypto/sha/asm/keccak1600-armv8.pl +++ b/crypto/sha/asm/keccak1600-armv8.pl @@ -538,13 +538,13 @@ $code.=<<___; .type KeccakF1600_ce,%function .align 5 KeccakF1600_ce: - mov x9,#6 + mov x9,#12 adr x10,iotas b .Loop_ce .align 4 .Loop_ce: ___ -for($i=0; $i<4; $i++) { +for($i=0; $i<2; $i++) { $code.=<<___; ////////////////////////////////////////////////// Theta eor3 $C[0],$A[0][0],$A[1][0],$A[2][0] @@ -584,7 +584,7 @@ $code.=<<___; eor $A[0][0],$A[0][0],$C[4] ldr x11,[x10],#8 - xar $C[1] ,$A[3][3],$C[2],#64-$rhotates[3][3] // C[1]=A[0][3] + xar $C[1], $A[3][3],$C[2],#64-$rhotates[3][3] // C[1]=A[0][3] xar $A[3][3],$A[3][2],$C[6],#64-$rhotates[3][2] xar $A[3][2],$A[2][1],$C[5],#64-$rhotates[2][1] xar $A[2][1],$A[1][2],$C[6],#64-$rhotates[1][2] @@ -598,7 +598,7 @@ $code.=<<___; xar $A[1][3],$A[3][1],$C[5],#64-$rhotates[3][1] xar $A[3][1],$A[1][0],$C[4],#64-$rhotates[1][0] - xar $A[1][0],$A[0][3],$C[2],#64-$rhotates[0][3] // * + xar $C[2], $A[0][3],$C[2],#64-$rhotates[0][3] // C[2]=A[1][0] ////////////////////////////////////////////////// Chi+Iota dup $C[6],x11 // borrow C[6] @@ -608,36 +608,36 @@ $code.=<<___; bcax $A[0][3],$C[1], $A[0][0],$A[0][4] bcax $A[0][4],$A[0][4],$C[0], $A[0][0] - bcax $C[0], $A[1][0],$A[1][2],$A[1][1] // * - bcax $C[1], $A[1][1],$A[1][3],$A[1][2] // * + bcax $A[1][0],$C[2], $A[1][2],$A[1][1] // * + bcax $C[0], $A[1][1],$A[1][3],$A[1][2] // * bcax $A[1][2],$A[1][2],$A[1][4],$A[1][3] - bcax $A[1][3],$A[1][3],$A[1][0],$A[1][4] - bcax $A[1][4],$A[1][4],$A[1][1],$A[1][0] + bcax $A[1][3],$A[1][3],$C[2], $A[1][4] + bcax $A[1][4],$A[1][4],$A[1][1],$C[2] eor $A[0][0],$C[3],$C[6] // Iota - bcax $C[2], $A[2][0],$A[2][2],$A[2][1] // * - bcax $C[3], $A[2][1],$A[2][3],$A[2][2] // * + bcax $C[1], $A[2][0],$A[2][2],$A[2][1] // * + bcax $C[2], $A[2][1],$A[2][3],$A[2][2] // * bcax $A[2][2],$A[2][2],$A[2][4],$A[2][3] bcax $A[2][3],$A[2][3],$A[2][0],$A[2][4] bcax $A[2][4],$A[2][4],$A[2][1],$A[2][0] - bcax $A[2][0],$A[3][0],$A[3][2],$A[3][1] // * - bcax $A[2][1],$A[3][1],$A[3][3],$A[3][2] // * + bcax $C[3], $A[3][0],$A[3][2],$A[3][1] // * + bcax $C[4], $A[3][1],$A[3][3],$A[3][2] // * bcax $A[3][2],$A[3][2],$A[3][4],$A[3][3] bcax $A[3][3],$A[3][3],$A[3][0],$A[3][4] bcax $A[3][4],$A[3][4],$A[3][1],$A[3][0] - bcax $A[3][0],$A[4][0],$A[4][2],$A[4][1] // * - bcax $A[3][1],$A[4][1],$A[4][3],$A[4][2] // * + bcax $C[5], $A[4][0],$A[4][2],$A[4][1] // * + bcax $C[6], $A[4][1],$A[4][3],$A[4][2] // * bcax $A[4][2],$A[4][2],$A[4][4],$A[4][3] bcax $A[4][3],$A[4][3],$A[4][0],$A[4][4] bcax $A[4][4],$A[4][4],$A[4][1],$A[4][0] ___ - ($A[1][0],$A[1][1], $C[0],$C[1]) - = ($C[0],$C[1], $A[1][0],$A[1][1]); - ($A[2][0],$A[2][1], $A[3][0],$A[3][1], $A[4][0],$A[4][1], $C[2],$C[3]) - = ($C[2],$C[3], $A[2][0],$A[2][1], $A[3][0],$A[3][1], $A[4][0],$A[4][1]); + ( $A[1][1], $C[0]) = ( $C[0], $A[1][1]); + ($A[2][0],$A[2][1], $C[1],$C[2]) = ($C[1],$C[2], $A[2][0],$A[2][1]); + ($A[3][0],$A[3][1], $C[3],$C[4]) = ($C[3],$C[4], $A[3][0],$A[3][1]); + ($A[4][0],$A[4][1], $C[5],$C[6]) = ($C[5],$C[6], $A[4][0],$A[4][1]); } $code.=<<___; subs x9,x9,#1 From appro at openssl.org Mon Apr 23 15:28:15 2018 From: appro at openssl.org (Andy Polyakov) Date: Mon, 23 Apr 2018 15:28:15 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524497295.915823.23162.nullmailer@dev.openssl.org> The branch master has been updated via 40ab6b856754a11050174b222c7abb10b6dcb822 (commit) via e9afe7a143a27e4e488e3d027439157fb0fc550b (commit) via 3571069526084778528b3099159689bbc485079b (commit) via fe46035dbe173a42cbdfc7d31d17976300b22ccc (commit) via eefc485bda4ab1ac7293b4c749c251b662d9fba8 (commit) via 1018a7251e1f8721fc7aebbe5737680544f71698 (commit) via 0fe72aaaa9bb01b440e6a285bffc1ffc2ea174ac (commit) via e4739e31ee7430046e80b88132c2ccbc7ca501d9 (commit) from dd2d7b19f8572b2c447397524621efdb675b5248 (commit) - Log ----------------------------------------------------------------- commit 40ab6b856754a11050174b222c7abb10b6dcb822 Author: Andy Polyakov Date: Sun Apr 22 14:08:28 2018 +0200 00-base-templates.conf: wire keccak1600-armv4 module. Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/6042) commit e9afe7a143a27e4e488e3d027439157fb0fc550b Author: Andy Polyakov Date: Sun Apr 22 13:59:52 2018 +0200 sha/asm/keccak1600-armv4.pl: adapt for multi-platform. Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/6042) commit 3571069526084778528b3099159689bbc485079b Author: Andy Polyakov Date: Sun Apr 22 13:45:12 2018 +0200 00-base-templates.conf: wire keccak1600-ppc64 module. Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/6042) commit fe46035dbe173a42cbdfc7d31d17976300b22ccc Author: Andy Polyakov Date: Sun Apr 22 13:09:49 2018 +0200 00-base-templates.conf: wire keccak1600-s390x module. Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/6042) commit eefc485bda4ab1ac7293b4c749c251b662d9fba8 Author: Andy Polyakov Date: Sun Apr 22 13:00:28 2018 +0200 00-base-templates.conf: wire keccak1600-armv8 module. Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/6042) commit 1018a7251e1f8721fc7aebbe5737680544f71698 Author: Andy Polyakov Date: Sun Apr 22 12:56:31 2018 +0200 00-base-templates.conf: wire keccak1600-x86_64 module. Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/6042) commit 0fe72aaaa9bb01b440e6a285bffc1ffc2ea174ac Author: Andy Polyakov Date: Sun Apr 22 12:48:56 2018 +0200 sha/asm/keccak1600-x86_64.pl: make it work on Windows. Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/6042) commit e4739e31ee7430046e80b88132c2ccbc7ca501d9 Author: Andy Polyakov Date: Sun Apr 22 10:42:59 2018 +0200 Configure: add $target{keccak1600_asm_src}. Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/6042) ----------------------------------------------------------------------- Summary of changes: Configurations/00-base-templates.conf | 7 ++++++- Configure | 3 +++ crypto/sha/asm/keccak1600-armv4.pl | 23 ++++++++++++++++++++--- crypto/sha/asm/keccak1600-x86_64.pl | 8 ++++---- crypto/sha/build.info | 8 +++++++- 5 files changed, 40 insertions(+), 9 deletions(-) diff --git a/Configurations/00-base-templates.conf b/Configurations/00-base-templates.conf index edcc454..4a1645f 100644 --- a/Configurations/00-base-templates.conf +++ b/Configurations/00-base-templates.conf @@ -34,6 +34,7 @@ my %targets=( padlock_asm_src => "", chacha_asm_src => "chacha_enc.c", poly1305_asm_src => "", + keccak1600_asm_src => "keccak1600.c", unistd => "", shared_target => "", @@ -226,6 +227,7 @@ my %targets=( padlock_asm_src => "e_padlock-x86_64.s", chacha_asm_src => "chacha-x86_64.s", poly1305_asm_src=> "poly1305-x86_64.s", + keccak1600_asm_src => "keccak1600-x86_64.s", }, ia64_asm => { template => 1, @@ -287,6 +289,7 @@ my %targets=( modes_asm_src => "ghash-s390x.S", chacha_asm_src => "chacha-s390x.S", poly1305_asm_src=> "poly1305-s390x.S", + keccak1600_asm_src => "keccak1600-s390x.S", }, armv4_asm => { template => 1, @@ -298,6 +301,7 @@ my %targets=( modes_asm_src => "ghash-armv4.S ghashv8-armx.S", chacha_asm_src => "chacha-armv4.S", poly1305_asm_src=> "poly1305-armv4.S", + keccak1600_asm_src => "keccak1600-armv4.S", perlasm_scheme => "void" }, aarch64_asm => { @@ -310,6 +314,7 @@ my %targets=( modes_asm_src => "ghashv8-armx.S", chacha_asm_src => "chacha-armv8.S", poly1305_asm_src=> "poly1305-armv8.S", + keccak1600_asm_src => "keccak1600-armv8.S", }, parisc11_asm => { template => 1, @@ -340,6 +345,6 @@ my %targets=( inherit_from => [ "ppc32_asm" ], template => 1, ec_asm_src => "ecp_nistz256.c ecp_nistz256-ppc64.s", - + keccak1600_asm_src => "keccak1600-ppc64.s", }, ); diff --git a/Configure b/Configure index 5703302..ffc5fe5 100755 --- a/Configure +++ b/Configure @@ -1359,6 +1359,9 @@ unless ($disabled{asm}) { push @{$config{lib_defines}}, "SHA256_ASM" if ($target{sha1_asm_src} =~ /sha256/); push @{$config{lib_defines}}, "SHA512_ASM" if ($target{sha1_asm_src} =~ /sha512/); } + if ($target{keccak1600_asm_src} ne $table{DEFAULTS}->{keccak1600_asm_src}) { + push @{$config{lib_defines}}, "KECCAK1600_ASM"; + } if ($target{rc4_asm_src} ne $table{DEFAULTS}->{rc4_asm_src}) { push @{$config{lib_defines}}, "RC4_ASM"; } diff --git a/crypto/sha/asm/keccak1600-armv4.pl b/crypto/sha/asm/keccak1600-armv4.pl index 4ef9ee0..8bf665c 100755 --- a/crypto/sha/asm/keccak1600-armv4.pl +++ b/crypto/sha/asm/keccak1600-armv4.pl @@ -70,6 +70,21 @@ # Cortex-Mx, x>=3. Otherwise, non-NEON results for NEON-capable # processors are presented mostly for reference purposes. +$flavour = shift; +if ($flavour=~/\w[\w\-]*\.\w+$/) { $output=$flavour; undef $flavour; } +else { while (($output=shift) && ($output!~/\w[\w\-]*\.\w+$/)) {} } + +if ($flavour && $flavour ne "void") { + $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1; + ( $xlate="${dir}arm-xlate.pl" and -f $xlate ) or + ( $xlate="${dir}../../perlasm/arm-xlate.pl" and -f $xlate) or + die "can't locate arm-xlate.pl"; + + open STDOUT,"| \"$^X\" $xlate $flavour $output"; +} else { + open STDOUT,">$output"; +} + my @C = map("r$_",(0..9)); my @E = map("r$_",(10..12,14)); @@ -96,6 +111,8 @@ my @D = map(8*$_, (25..29)); my @T = map([ 8*$_, 8*($_+1), 8*($_+2), 8*($_+3), 8*($_+4) ], (30,35,40,45,50)); $code.=<<___; +#include "arm_arch.h" + .text #if defined(__thumb2__) @@ -1044,6 +1061,7 @@ ___ } $code.=<<___; +#if __ARM_MAX_ARCH__>=7 .fpu neon .type iotas64, %object @@ -1545,6 +1563,7 @@ SHA3_squeeze_neon: .Lsqueeze_neon_done: ldmia sp!, {r4-r6,pc} .size SHA3_squeeze_neon,.-SHA3_squeeze_neon +#endif .asciz "Keccak-1600 absorb and squeeze for ARMv4/NEON, CRYPTOGAMS by " .align 2 ___ @@ -1573,13 +1592,11 @@ ___ } } -$output=pop; -open STDOUT,">$output"; - foreach (split($/,$code)) { s/\`([^\`]*)\`/eval $1/ge; s/^\s+(ldr|str)\.([lh])\s+(r[0-9]+),\s*(\[.*)/ldrd($1,$2,$3,$4)/ge or + s/\b(ror|ls[rl])\s+(r[0-9]+.*)#/mov $2$1#/g or s/\bret\b/bx lr/g or s/\bbx\s+lr\b/.word\t0xe12fff1e/g; # make it possible to compile with -march=armv4 diff --git a/crypto/sha/asm/keccak1600-x86_64.pl b/crypto/sha/asm/keccak1600-x86_64.pl index 94c9c10..e24b575 100755 --- a/crypto/sha/asm/keccak1600-x86_64.pl +++ b/crypto/sha/asm/keccak1600-x86_64.pl @@ -81,7 +81,7 @@ my @rhotates = ([ 0, 1, 62, 28, 27 ], $code.=<<___; .text -.type __KeccakF1600,\@function +.type __KeccakF1600,\@abi-omnipotent .align 32 __KeccakF1600: mov $A[4][0](%rdi), at C[0] @@ -345,7 +345,7 @@ $code.=<<___; .size __KeccakF1600,.-__KeccakF1600 .globl KeccakF1600 -.type KeccakF1600,\@function +.type KeccakF1600,\@abi-omnipotent .align 32 KeccakF1600: .cfi_startproc @@ -410,7 +410,7 @@ ___ ($A_flat,$inp) = ("%r8","%r9"); $code.=<<___; .globl SHA3_absorb -.type SHA3_absorb,\@function +.type SHA3_absorb,\@function,4 .align 32 SHA3_absorb: .cfi_startproc @@ -505,7 +505,7 @@ ___ $code.=<<___; .globl SHA3_squeeze -.type SHA3_squeeze,\@function +.type SHA3_squeeze,\@function,4 .align 32 SHA3_squeeze: .cfi_startproc diff --git a/crypto/sha/build.info b/crypto/sha/build.info index 9dffec3..5dd5a99 100644 --- a/crypto/sha/build.info +++ b/crypto/sha/build.info @@ -1,7 +1,7 @@ LIBS=../../libcrypto SOURCE[../../libcrypto]=\ sha1dgst.c sha1_one.c sha256.c sha512.c {- $target{sha1_asm_src} -} \ - keccak1600.c + {- $target{keccak1600_asm_src} -} GENERATE[sha1-586.s]=asm/sha1-586.pl \ $(PERLASM_SCHEME) $(LIB_CFLAGS) $(LIB_CPPFLAGS) $(PROCESSOR) @@ -24,6 +24,7 @@ GENERATE[sha1-mb-x86_64.s]=asm/sha1-mb-x86_64.pl $(PERLASM_SCHEME) GENERATE[sha256-x86_64.s]=asm/sha512-x86_64.pl $(PERLASM_SCHEME) GENERATE[sha256-mb-x86_64.s]=asm/sha256-mb-x86_64.pl $(PERLASM_SCHEME) GENERATE[sha512-x86_64.s]=asm/sha512-x86_64.pl $(PERLASM_SCHEME) +GENERATE[keccak1600-x86_64.s]=asm/keccak1600-x86_64.pl $(PERLASM_SCHEME) GENERATE[sha1-sparcv9.S]=asm/sha1-sparcv9.pl $(PERLASM_SCHEME) INCLUDE[sha1-sparcv9.o]=.. @@ -37,6 +38,7 @@ GENERATE[sha256-ppc.s]=asm/sha512-ppc.pl $(PERLASM_SCHEME) GENERATE[sha512-ppc.s]=asm/sha512-ppc.pl $(PERLASM_SCHEME) GENERATE[sha256p8-ppc.s]=asm/sha512p8-ppc.pl $(PERLASM_SCHEME) GENERATE[sha512p8-ppc.s]=asm/sha512p8-ppc.pl $(PERLASM_SCHEME) +GENERATE[keccak1600-ppc64.s]=asm/keccak1600-ppc64.pl $(PERLASM_SCHEME) GENERATE[sha1-parisc.s]=asm/sha1-parisc.pl $(PERLASM_SCHEME) GENERATE[sha256-parisc.s]=asm/sha512-parisc.pl $(PERLASM_SCHEME) @@ -55,6 +57,8 @@ GENERATE[sha256-armv4.S]=asm/sha256-armv4.pl $(PERLASM_SCHEME) INCLUDE[sha256-armv4.o]=.. GENERATE[sha512-armv4.S]=asm/sha512-armv4.pl $(PERLASM_SCHEME) INCLUDE[sha512-armv4.o]=.. +GENERATE[keccak1600-armv4.S]=asm/keccak1600-armv4.pl $(PERLASM_SCHEME) +INCLUDE[keccak1600-armv4.o]=.. GENERATE[sha1-armv8.S]=asm/sha1-armv8.pl $(PERLASM_SCHEME) INCLUDE[sha1-armv8.o]=.. @@ -62,6 +66,7 @@ GENERATE[sha256-armv8.S]=asm/sha512-armv8.pl $(PERLASM_SCHEME) INCLUDE[sha256-armv8.o]=.. GENERATE[sha512-armv8.S]=asm/sha512-armv8.pl $(PERLASM_SCHEME) INCLUDE[sha512-armv8.o]=.. +GENERATE[keccak1600-armv8.S]=asm/keccak1600-armv8.pl $(PERLASM_SCHEME) GENERATE[sha1-s390x.S]=asm/sha1-s390x.pl $(PERLASM_SCHEME) INCLUDE[sha1-s390x.o]=.. @@ -69,6 +74,7 @@ GENERATE[sha256-s390x.S]=asm/sha512-s390x.pl $(PERLASM_SCHEME) INCLUDE[sha256-s390x.o]=.. GENERATE[sha512-s390x.S]=asm/sha512-s390x.pl $(PERLASM_SCHEME) INCLUDE[sha512-s390x.o]=.. +GENERATE[keccak1600-s390x.S]=asm/keccak1600-s390x.pl $(PERLASM_SCHEME) BEGINRAW[Makefile(unix)] ##### SHA assembler implementations From appro at openssl.org Mon Apr 23 15:31:16 2018 From: appro at openssl.org (Andy Polyakov) Date: Mon, 23 Apr 2018 15:31:16 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524497476.479183.24437.nullmailer@dev.openssl.org> The branch master has been updated via 198a2ed791e8f4f00d0b92272987f564ca1d9783 (commit) from 40ab6b856754a11050174b222c7abb10b6dcb822 (commit) - Log ----------------------------------------------------------------- commit 198a2ed791e8f4f00d0b92272987f564ca1d9783 Author: Andy Polyakov Date: Sun Apr 22 16:09:56 2018 +0200 ARM assembly pack: make it work with older assembler. Reviewed-by: Richard Levitte Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/6043) ----------------------------------------------------------------------- Summary of changes: crypto/armv4cpuid.pl | 2 +- crypto/ec/asm/ecp_nistz256-armv4.pl | 2 +- crypto/modes/asm/ghashv8-armx.pl | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/crypto/armv4cpuid.pl b/crypto/armv4cpuid.pl index f7d31a6..9e46149 100644 --- a/crypto/armv4cpuid.pl +++ b/crypto/armv4cpuid.pl @@ -125,7 +125,7 @@ CRYPTO_memcmp: ldmia sp!,{r4,r5} .Lno_data: - neg r0,ip + rsb r0,ip,#0 mov r0,r0,lsr#31 #if __ARM_ARCH__>=5 bx lr diff --git a/crypto/ec/asm/ecp_nistz256-armv4.pl b/crypto/ec/asm/ecp_nistz256-armv4.pl index c414334..7bb268d 100755 --- a/crypto/ec/asm/ecp_nistz256-armv4.pl +++ b/crypto/ec/asm/ecp_nistz256-armv4.pl @@ -1633,7 +1633,7 @@ ___ $code.=<<___; .Ladd_done: add sp,sp,#32*18+16+16 @ +16 means "skip even over saved r0-r3" -#if __ARM_ARCH__>=5 || defined(__thumb__) +#if __ARM_ARCH__>=5 || !defined(__thumb__) ldmia sp!,{r4-r12,pc} #else ldmia sp!,{r4-r12,lr} diff --git a/crypto/modes/asm/ghashv8-armx.pl b/crypto/modes/asm/ghashv8-armx.pl index 7e57238..ac9d5a2 100644 --- a/crypto/modes/asm/ghashv8-armx.pl +++ b/crypto/modes/asm/ghashv8-armx.pl @@ -70,6 +70,7 @@ my ($t0,$t1,$t2,$xC2,$H,$Hhl,$H2)=map("q$_",(8..14)); $code=<<___; #include "arm_arch.h" +#if __ARM_MAX_ARCH__>=7 .text ___ $code.=".arch armv8-a+crypto\n" if ($flavour =~ /64/); @@ -699,6 +700,7 @@ ___ $code.=<<___; .asciz "GHASH for ARMv8, CRYPTOGAMS by " .align 2 +#endif ___ if ($flavour =~ /64/) { ######## 64-bit code From appro at openssl.org Mon Apr 23 15:31:55 2018 From: appro at openssl.org (Andy Polyakov) Date: Mon, 23 Apr 2018 15:31:55 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1524497515.638018.25350.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via aab39f60b0a834e5be52fe22caa7f516976309d3 (commit) from 29a7148d4e47cf5c7861ed66679d69d5380c95f2 (commit) - Log ----------------------------------------------------------------- commit aab39f60b0a834e5be52fe22caa7f516976309d3 Author: Andy Polyakov Date: Sun Apr 22 16:09:56 2018 +0200 ARM assembly pack: make it work with older assembler. Reviewed-by: Richard Levitte Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/6043) (cherry picked from commit 198a2ed791e8f4f00d0b92272987f564ca1d9783) ----------------------------------------------------------------------- Summary of changes: crypto/armv4cpuid.pl | 2 +- crypto/ec/asm/ecp_nistz256-armv4.pl | 2 +- crypto/modes/asm/ghashv8-armx.pl | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/crypto/armv4cpuid.pl b/crypto/armv4cpuid.pl index f7d31a6..9e46149 100644 --- a/crypto/armv4cpuid.pl +++ b/crypto/armv4cpuid.pl @@ -125,7 +125,7 @@ CRYPTO_memcmp: ldmia sp!,{r4,r5} .Lno_data: - neg r0,ip + rsb r0,ip,#0 mov r0,r0,lsr#31 #if __ARM_ARCH__>=5 bx lr diff --git a/crypto/ec/asm/ecp_nistz256-armv4.pl b/crypto/ec/asm/ecp_nistz256-armv4.pl index 2314b75..39d4cb9 100755 --- a/crypto/ec/asm/ecp_nistz256-armv4.pl +++ b/crypto/ec/asm/ecp_nistz256-armv4.pl @@ -1633,7 +1633,7 @@ ___ $code.=<<___; .Ladd_done: add sp,sp,#32*18+16+16 @ +16 means "skip even over saved r0-r3" -#if __ARM_ARCH__>=5 || defined(__thumb__) +#if __ARM_ARCH__>=5 || !defined(__thumb__) ldmia sp!,{r4-r12,pc} #else ldmia sp!,{r4-r12,lr} diff --git a/crypto/modes/asm/ghashv8-armx.pl b/crypto/modes/asm/ghashv8-armx.pl index dcd5f59..eb3b1a5 100644 --- a/crypto/modes/asm/ghashv8-armx.pl +++ b/crypto/modes/asm/ghashv8-armx.pl @@ -64,6 +64,7 @@ my ($t0,$t1,$t2,$xC2,$H,$Hhl,$H2)=map("q$_",(8..14)); $code=<<___; #include "arm_arch.h" +#if __ARM_MAX_ARCH__>=7 .text ___ $code.=".arch armv8-a+crypto\n" if ($flavour =~ /64/); @@ -351,6 +352,7 @@ ___ $code.=<<___; .asciz "GHASH for ARMv8, CRYPTOGAMS by " .align 2 +#endif ___ if ($flavour =~ /64/) { ######## 64-bit code From kurt at openssl.org Mon Apr 23 16:46:29 2018 From: kurt at openssl.org (Kurt Roeckx) Date: Mon, 23 Apr 2018 16:46:29 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524501989.218840.2990.nullmailer@dev.openssl.org> The branch master has been updated via 5b820d785d6b5f9c3fedcf0ce4e4f0476a1bb9c8 (commit) from 198a2ed791e8f4f00d0b92272987f564ca1d9783 (commit) - Log ----------------------------------------------------------------- commit 5b820d785d6b5f9c3fedcf0ce4e4f0476a1bb9c8 Author: Kurt Roeckx Date: Sun Apr 22 22:04:25 2018 +0200 Fix usage of ossl_assert() Reviewed-by: Andy Polyakov GH: #6044 ----------------------------------------------------------------------- Summary of changes: crypto/rand/rand_unix.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crypto/rand/rand_unix.c b/crypto/rand/rand_unix.c index f6fef9a..9b6971c 100644 --- a/crypto/rand/rand_unix.c +++ b/crypto/rand/rand_unix.c @@ -206,7 +206,8 @@ static size_t sysctl_random(char *buf, size_t buflen) * the sysctl returns long and we want to request something not a multiple * of longs, which should never be the case. */ - ossl_assert(buflen % sizeof(long) == 0); + if (!ossl_assert(buflen % sizeof(long) == 0)) + return 0; mib[0] = CTL_KERN; mib[1] = KERN_ARND; From matt at openssl.org Mon Apr 23 18:22:27 2018 From: matt at openssl.org (Matt Caswell) Date: Mon, 23 Apr 2018 18:22:27 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524507747.600688.17302.nullmailer@dev.openssl.org> The branch master has been updated via 39df51522ba2e3773ae2f1d4df5a6031ef41c1ba (commit) via 736b31e5ea33166d89d5cff5774697d0c15d96bd (commit) via f4675379275c304dbfa593cc573b4e4c4eb54bd4 (commit) via a067a8705a654c85d43b942e0d1616e282667969 (commit) via 36bed230b580f92d2e10d13e4ba472236e622562 (commit) via 40e48e54582e46c1a01e184ecf5bd31f4f7f8294 (commit) from 5b820d785d6b5f9c3fedcf0ce4e4f0476a1bb9c8 (commit) - Log ----------------------------------------------------------------- commit 39df51522ba2e3773ae2f1d4df5a6031ef41c1ba Author: Billy Brumley Date: Mon Apr 23 14:34:11 2018 +0300 Remove superfluous NULL checks. Add Andy's BN_FLG comment. Reviewed-by: Andy Polyakov Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/6009) commit 736b31e5ea33166d89d5cff5774697d0c15d96bd Author: Nicola Tuveri Date: Fri Apr 20 11:13:40 2018 +0000 Move up check for EC_R_INCOMPATIBLE_OBJECTS and for the point at infinity case Reviewed-by: Andy Polyakov Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/6009) commit f4675379275c304dbfa593cc573b4e4c4eb54bd4 Author: Nicola Tuveri Date: Fri Apr 20 11:02:52 2018 +0000 Pass through Reviewed-by: Andy Polyakov Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/6009) commit a067a8705a654c85d43b942e0d1616e282667969 Author: Billy Brumley Date: Thu Apr 19 19:10:21 2018 +0300 ladder description: why it works Reviewed-by: Andy Polyakov Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/6009) commit 36bed230b580f92d2e10d13e4ba472236e622562 Author: Nicola Tuveri Date: Thu Apr 19 12:43:33 2018 +0000 Address code style comments Reviewed-by: Andy Polyakov Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/6009) commit 40e48e54582e46c1a01e184ecf5bd31f4f7f8294 Author: Billy Brumley Date: Thu Apr 19 12:21:51 2018 +0300 Elliptic curve scalar multiplication with timing attack defenses Co-authored-by: Nicola Tuveri Co-authored-by: Cesar Pereida Garcia Co-authored-by: Sohaib ul Hassan Reviewed-by: Andy Polyakov Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/6009) ----------------------------------------------------------------------- Summary of changes: crypto/bn/bn_lib.c | 28 ++++++ crypto/ec/ec_mult.c | 242 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 270 insertions(+) diff --git a/crypto/bn/bn_lib.c b/crypto/bn/bn_lib.c index 57fe452..91553d4 100644 --- a/crypto/bn/bn_lib.c +++ b/crypto/bn/bn_lib.c @@ -739,6 +739,34 @@ void BN_consttime_swap(BN_ULONG condition, BIGNUM *a, BIGNUM *b, int nwords) a->top ^= t; b->top ^= t; + t = (a->neg ^ b->neg) & condition; + a->neg ^= t; + b->neg ^= t; + + /*- + * Idea behind BN_FLG_STATIC_DATA is actually to + * indicate that data may not be written to. + * Intention is actually to treat it as it's + * read-only data, and some (if not most) of it does + * reside in read-only segment. In other words + * observation of BN_FLG_STATIC_DATA in + * BN_consttime_swap should be treated as fatal + * condition. It would either cause SEGV or + * effectively cause data corruption. + * BN_FLG_MALLOCED refers to BN structure itself, + * and hence must be preserved. Remaining flags are + * BN_FLG_CONSTIME and BN_FLG_SECURE. Latter must be + * preserved, because it determines how x->d was + * allocated and hence how to free it. This leaves + * BN_FLG_CONSTTIME that one can do something about. + * To summarize it's sufficient to mask and swap + * BN_FLG_CONSTTIME alone. BN_FLG_STATIC_DATA should + * be treated as fatal. + */ + t = ((a->flags ^ b->flags) & BN_FLG_CONSTTIME) & condition; + a->flags ^= t; + b->flags ^= t; + #define BN_CONSTTIME_SWAP(ind) \ do { \ t = (a->d[ind] ^ b->d[ind]) & condition; \ diff --git a/crypto/ec/ec_mult.c b/crypto/ec/ec_mult.c index ed26b68..0779e4f 100644 --- a/crypto/ec/ec_mult.c +++ b/crypto/ec/ec_mult.c @@ -101,6 +101,222 @@ void EC_ec_pre_comp_free(EC_PRE_COMP *pre) OPENSSL_free(pre); } +#define EC_POINT_BN_set_flags(P, flags) do { \ + BN_set_flags((P)->X, (flags)); \ + BN_set_flags((P)->Y, (flags)); \ + BN_set_flags((P)->Z, (flags)); \ +} while(0) + +/*- + * This functions computes (in constant time) a point multiplication over the + * EC group. + * + * At a high level, it is Montgomery ladder with conditional swaps. + * + * It performs either a fixed scalar point multiplication + * (scalar * generator) + * when point is NULL, or a generic scalar point multiplication + * (scalar * point) + * when point is not NULL. + * + * scalar should be in the range [0,n) otherwise all constant time bets are off. + * + * NB: This says nothing about EC_POINT_add and EC_POINT_dbl, + * which of course are not constant time themselves. + * + * The product is stored in r. + * + * Returns 1 on success, 0 otherwise. + */ +static int ec_mul_consttime(const EC_GROUP *group, EC_POINT *r, + const BIGNUM *scalar, const EC_POINT *point, + BN_CTX *ctx) +{ + int i, order_bits, group_top, kbit, pbit, Z_is_one; + EC_POINT *s = NULL; + BIGNUM *k = NULL; + BIGNUM *lambda = NULL; + BN_CTX *new_ctx = NULL; + int ret = 0; + + if (ctx == NULL && (ctx = new_ctx = BN_CTX_secure_new()) == NULL) + goto err; + + order_bits = BN_num_bits(group->order); + + s = EC_POINT_new(group); + if (s == NULL) + goto err; + + if (point == NULL) { + if (!EC_POINT_copy(s, group->generator)) + goto err; + } else { + if (!EC_POINT_copy(s, point)) + goto err; + } + + EC_POINT_BN_set_flags(s, BN_FLG_CONSTTIME); + + BN_CTX_start(ctx); + lambda = BN_CTX_get(ctx); + k = BN_CTX_get(ctx); + if (k == NULL) + goto err; + + /* + * Group orders are often on a word boundary. + * So when we pad the scalar, some timing diff might + * pop if it needs to be expanded due to carries. + * So expand ahead of time. + */ + group_top = bn_get_top(group->order); + if ((bn_wexpand(k, group_top + 1) == NULL) + || (bn_wexpand(lambda, group_top + 1) == NULL)) + goto err; + + if (!BN_copy(k, scalar)) + goto err; + + BN_set_flags(k, BN_FLG_CONSTTIME); + + if ((BN_num_bits(k) > order_bits) || (BN_is_negative(k))) { + /*- + * this is an unusual input, and we don't guarantee + * constant-timeness + */ + if (!BN_nnmod(k, k, group->order, ctx)) + goto err; + } + + if (!BN_add(lambda, k, group->order)) + goto err; + BN_set_flags(lambda, BN_FLG_CONSTTIME); + if (!BN_add(k, lambda, group->order)) + goto err; + /* + * lambda := scalar + order + * k := scalar + 2*order + */ + kbit = BN_is_bit_set(lambda, order_bits); + BN_consttime_swap(kbit, k, lambda, group_top + 1); + + group_top = bn_get_top(group->field); + if ((bn_wexpand(s->X, group_top) == NULL) + || (bn_wexpand(s->Y, group_top) == NULL) + || (bn_wexpand(s->Z, group_top) == NULL) + || (bn_wexpand(r->X, group_top) == NULL) + || (bn_wexpand(r->Y, group_top) == NULL) + || (bn_wexpand(r->Z, group_top) == NULL)) + goto err; + + /* top bit is a 1, in a fixed pos */ + if (!EC_POINT_copy(r, s)) + goto err; + + EC_POINT_BN_set_flags(r, BN_FLG_CONSTTIME); + + if (!EC_POINT_dbl(group, s, s, ctx)) + goto err; + + pbit = 0; + +#define EC_POINT_CSWAP(c, a, b, w, t) do { \ + BN_consttime_swap(c, (a)->X, (b)->X, w); \ + BN_consttime_swap(c, (a)->Y, (b)->Y, w); \ + BN_consttime_swap(c, (a)->Z, (b)->Z, w); \ + t = ((a)->Z_is_one ^ (b)->Z_is_one) & (c); \ + (a)->Z_is_one ^= (t); \ + (b)->Z_is_one ^= (t); \ +} while(0) + + /*- + * The ladder step, with branches, is + * + * k[i] == 0: S = add(R, S), R = dbl(R) + * k[i] == 1: R = add(S, R), S = dbl(S) + * + * Swapping R, S conditionally on k[i] leaves you with state + * + * k[i] == 0: T, U = R, S + * k[i] == 1: T, U = S, R + * + * Then perform the ECC ops. + * + * U = add(T, U) + * T = dbl(T) + * + * Which leaves you with state + * + * k[i] == 0: U = add(R, S), T = dbl(R) + * k[i] == 1: U = add(S, R), T = dbl(S) + * + * Swapping T, U conditionally on k[i] leaves you with state + * + * k[i] == 0: R, S = T, U + * k[i] == 1: R, S = U, T + * + * Which leaves you with state + * + * k[i] == 0: S = add(R, S), R = dbl(R) + * k[i] == 1: R = add(S, R), S = dbl(S) + * + * So we get the same logic, but instead of a branch it's a + * conditional swap, followed by ECC ops, then another conditional swap. + * + * Optimization: The end of iteration i and start of i-1 looks like + * + * ... + * CSWAP(k[i], R, S) + * ECC + * CSWAP(k[i], R, S) + * (next iteration) + * CSWAP(k[i-1], R, S) + * ECC + * CSWAP(k[i-1], R, S) + * ... + * + * So instead of two contiguous swaps, you can merge the condition + * bits and do a single swap. + * + * k[i] k[i-1] Outcome + * 0 0 No Swap + * 0 1 Swap + * 1 0 Swap + * 1 1 No Swap + * + * This is XOR. pbit tracks the previous bit of k. + */ + + for (i = order_bits - 1; i >= 0; i--) { + kbit = BN_is_bit_set(k, i) ^ pbit; + EC_POINT_CSWAP(kbit, r, s, group_top, Z_is_one); + if (!EC_POINT_add(group, s, r, s, ctx)) + goto err; + if (!EC_POINT_dbl(group, r, r, ctx)) + goto err; + /* + * pbit logic merges this cswap with that of the + * next iteration + */ + pbit ^= kbit; + } + /* one final cswap to move the right value into r */ + EC_POINT_CSWAP(pbit, r, s, group_top, Z_is_one); +#undef EC_POINT_CSWAP + + ret = 1; + + err: + EC_POINT_free(s); + BN_CTX_end(ctx); + BN_CTX_free(new_ctx); + + return ret; +} + +#undef EC_POINT_BN_set_flags + /* * TODO: table should be optimised for the wNAF-based implementation, * sometimes smaller windows will give better performance (thus the @@ -160,6 +376,32 @@ int ec_wNAF_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, return EC_POINT_set_to_infinity(group, r); } + /*- + * Handle the common cases where the scalar is secret, enforcing a constant + * time scalar multiplication algorithm. + */ + if ((scalar != NULL) && (num == 0)) { + /*- + * In this case we want to compute scalar * GeneratorPoint: this + * codepath is reached most prominently by (ephemeral) key generation + * of EC cryptosystems (i.e. ECDSA keygen and sign setup, ECDH + * keygen/first half), where the scalar is always secret. This is why + * we ignore if BN_FLG_CONSTTIME is actually set and we always call the + * constant time version. + */ + return ec_mul_consttime(group, r, scalar, NULL, ctx); + } + if ((scalar == NULL) && (num == 1)) { + /*- + * In this case we want to compute scalar * GenericPoint: this codepath + * is reached most prominently by the second half of ECDH, where the + * secret scalar is multiplied by the peer's public point. To protect + * the secret scalar, we ignore if BN_FLG_CONSTTIME is actually set and + * we always call the constant time version. + */ + return ec_mul_consttime(group, r, scalars[0], points[0], ctx); + } + for (i = 0; i < num; i++) { if (group->meth != points[i]->meth) { ECerr(EC_F_EC_WNAF_MUL, EC_R_INCOMPATIBLE_OBJECTS); From matt at openssl.org Mon Apr 23 18:22:39 2018 From: matt at openssl.org (Matt Caswell) Date: Mon, 23 Apr 2018 18:22:39 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1524507759.698817.18134.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via 2172133d0dc58256bf776da074c0d1944fef15cb (commit) via b43ad53119c0ac2ecfa6e4356210ccda57e0d16b (commit) via f916a735bcdce496cebc7653a8ad2e72b333405a (commit) via 33588c930d39d67d1128794dc7c85bae71af24ad (commit) via f06437c751d6f6ec7f4176518e2897f44dd58eb0 (commit) via aab7c770353b1dc4ba045938c8fb446dd1c4531e (commit) from aab39f60b0a834e5be52fe22caa7f516976309d3 (commit) - Log ----------------------------------------------------------------- commit 2172133d0dc58256bf776da074c0d1944fef15cb Author: Billy Brumley Date: Mon Apr 23 14:34:11 2018 +0300 Remove superfluous NULL checks. Add Andy's BN_FLG comment. Reviewed-by: Andy Polyakov Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/6009) (cherry picked from commit 39df51522ba2e3773ae2f1d4df5a6031ef41c1ba) commit b43ad53119c0ac2ecfa6e4356210ccda57e0d16b Author: Nicola Tuveri Date: Fri Apr 20 11:13:40 2018 +0000 Move up check for EC_R_INCOMPATIBLE_OBJECTS and for the point at infinity case Reviewed-by: Andy Polyakov Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/6009) (cherry picked from commit 736b31e5ea33166d89d5cff5774697d0c15d96bd) commit f916a735bcdce496cebc7653a8ad2e72b333405a Author: Nicola Tuveri Date: Fri Apr 20 11:02:52 2018 +0000 Pass through Reviewed-by: Andy Polyakov Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/6009) (cherry picked from commit f4675379275c304dbfa593cc573b4e4c4eb54bd4) commit 33588c930d39d67d1128794dc7c85bae71af24ad Author: Billy Brumley Date: Thu Apr 19 19:10:21 2018 +0300 ladder description: why it works Reviewed-by: Andy Polyakov Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/6009) (cherry picked from commit a067a8705a654c85d43b942e0d1616e282667969) commit f06437c751d6f6ec7f4176518e2897f44dd58eb0 Author: Nicola Tuveri Date: Thu Apr 19 12:43:33 2018 +0000 Address code style comments Reviewed-by: Andy Polyakov Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/6009) (cherry picked from commit 36bed230b580f92d2e10d13e4ba472236e622562) commit aab7c770353b1dc4ba045938c8fb446dd1c4531e Author: Billy Brumley Date: Thu Apr 19 12:21:51 2018 +0300 Elliptic curve scalar multiplication with timing attack defenses Co-authored-by: Nicola Tuveri Co-authored-by: Cesar Pereida Garcia Co-authored-by: Sohaib ul Hassan Reviewed-by: Andy Polyakov Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/6009) (cherry picked from commit 40e48e54582e46c1a01e184ecf5bd31f4f7f8294) ----------------------------------------------------------------------- Summary of changes: crypto/bn/bn_lib.c | 28 ++++++ crypto/ec/ec_mult.c | 242 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 270 insertions(+) diff --git a/crypto/bn/bn_lib.c b/crypto/bn/bn_lib.c index 7058494..07b715d 100644 --- a/crypto/bn/bn_lib.c +++ b/crypto/bn/bn_lib.c @@ -824,6 +824,34 @@ void BN_consttime_swap(BN_ULONG condition, BIGNUM *a, BIGNUM *b, int nwords) a->top ^= t; b->top ^= t; + t = (a->neg ^ b->neg) & condition; + a->neg ^= t; + b->neg ^= t; + + /*- + * Idea behind BN_FLG_STATIC_DATA is actually to + * indicate that data may not be written to. + * Intention is actually to treat it as it's + * read-only data, and some (if not most) of it does + * reside in read-only segment. In other words + * observation of BN_FLG_STATIC_DATA in + * BN_consttime_swap should be treated as fatal + * condition. It would either cause SEGV or + * effectively cause data corruption. + * BN_FLG_MALLOCED refers to BN structure itself, + * and hence must be preserved. Remaining flags are + * BN_FLG_CONSTIME and BN_FLG_SECURE. Latter must be + * preserved, because it determines how x->d was + * allocated and hence how to free it. This leaves + * BN_FLG_CONSTTIME that one can do something about. + * To summarize it's sufficient to mask and swap + * BN_FLG_CONSTTIME alone. BN_FLG_STATIC_DATA should + * be treated as fatal. + */ + t = ((a->flags ^ b->flags) & BN_FLG_CONSTTIME) & condition; + a->flags ^= t; + b->flags ^= t; + #define BN_CONSTTIME_SWAP(ind) \ do { \ t = (a->d[ind] ^ b->d[ind]) & condition; \ diff --git a/crypto/ec/ec_mult.c b/crypto/ec/ec_mult.c index b39777f..f69271e 100644 --- a/crypto/ec/ec_mult.c +++ b/crypto/ec/ec_mult.c @@ -105,6 +105,222 @@ void EC_ec_pre_comp_free(EC_PRE_COMP *pre) OPENSSL_free(pre); } +#define EC_POINT_BN_set_flags(P, flags) do { \ + BN_set_flags((P)->X, (flags)); \ + BN_set_flags((P)->Y, (flags)); \ + BN_set_flags((P)->Z, (flags)); \ +} while(0) + +/*- + * This functions computes (in constant time) a point multiplication over the + * EC group. + * + * At a high level, it is Montgomery ladder with conditional swaps. + * + * It performs either a fixed scalar point multiplication + * (scalar * generator) + * when point is NULL, or a generic scalar point multiplication + * (scalar * point) + * when point is not NULL. + * + * scalar should be in the range [0,n) otherwise all constant time bets are off. + * + * NB: This says nothing about EC_POINT_add and EC_POINT_dbl, + * which of course are not constant time themselves. + * + * The product is stored in r. + * + * Returns 1 on success, 0 otherwise. + */ +static int ec_mul_consttime(const EC_GROUP *group, EC_POINT *r, + const BIGNUM *scalar, const EC_POINT *point, + BN_CTX *ctx) +{ + int i, order_bits, group_top, kbit, pbit, Z_is_one; + EC_POINT *s = NULL; + BIGNUM *k = NULL; + BIGNUM *lambda = NULL; + BN_CTX *new_ctx = NULL; + int ret = 0; + + if (ctx == NULL && (ctx = new_ctx = BN_CTX_secure_new()) == NULL) + goto err; + + order_bits = BN_num_bits(group->order); + + s = EC_POINT_new(group); + if (s == NULL) + goto err; + + if (point == NULL) { + if (!EC_POINT_copy(s, group->generator)) + goto err; + } else { + if (!EC_POINT_copy(s, point)) + goto err; + } + + EC_POINT_BN_set_flags(s, BN_FLG_CONSTTIME); + + BN_CTX_start(ctx); + lambda = BN_CTX_get(ctx); + k = BN_CTX_get(ctx); + if (k == NULL) + goto err; + + /* + * Group orders are often on a word boundary. + * So when we pad the scalar, some timing diff might + * pop if it needs to be expanded due to carries. + * So expand ahead of time. + */ + group_top = bn_get_top(group->order); + if ((bn_wexpand(k, group_top + 1) == NULL) + || (bn_wexpand(lambda, group_top + 1) == NULL)) + goto err; + + if (!BN_copy(k, scalar)) + goto err; + + BN_set_flags(k, BN_FLG_CONSTTIME); + + if ((BN_num_bits(k) > order_bits) || (BN_is_negative(k))) { + /*- + * this is an unusual input, and we don't guarantee + * constant-timeness + */ + if (!BN_nnmod(k, k, group->order, ctx)) + goto err; + } + + if (!BN_add(lambda, k, group->order)) + goto err; + BN_set_flags(lambda, BN_FLG_CONSTTIME); + if (!BN_add(k, lambda, group->order)) + goto err; + /* + * lambda := scalar + order + * k := scalar + 2*order + */ + kbit = BN_is_bit_set(lambda, order_bits); + BN_consttime_swap(kbit, k, lambda, group_top + 1); + + group_top = bn_get_top(group->field); + if ((bn_wexpand(s->X, group_top) == NULL) + || (bn_wexpand(s->Y, group_top) == NULL) + || (bn_wexpand(s->Z, group_top) == NULL) + || (bn_wexpand(r->X, group_top) == NULL) + || (bn_wexpand(r->Y, group_top) == NULL) + || (bn_wexpand(r->Z, group_top) == NULL)) + goto err; + + /* top bit is a 1, in a fixed pos */ + if (!EC_POINT_copy(r, s)) + goto err; + + EC_POINT_BN_set_flags(r, BN_FLG_CONSTTIME); + + if (!EC_POINT_dbl(group, s, s, ctx)) + goto err; + + pbit = 0; + +#define EC_POINT_CSWAP(c, a, b, w, t) do { \ + BN_consttime_swap(c, (a)->X, (b)->X, w); \ + BN_consttime_swap(c, (a)->Y, (b)->Y, w); \ + BN_consttime_swap(c, (a)->Z, (b)->Z, w); \ + t = ((a)->Z_is_one ^ (b)->Z_is_one) & (c); \ + (a)->Z_is_one ^= (t); \ + (b)->Z_is_one ^= (t); \ +} while(0) + + /*- + * The ladder step, with branches, is + * + * k[i] == 0: S = add(R, S), R = dbl(R) + * k[i] == 1: R = add(S, R), S = dbl(S) + * + * Swapping R, S conditionally on k[i] leaves you with state + * + * k[i] == 0: T, U = R, S + * k[i] == 1: T, U = S, R + * + * Then perform the ECC ops. + * + * U = add(T, U) + * T = dbl(T) + * + * Which leaves you with state + * + * k[i] == 0: U = add(R, S), T = dbl(R) + * k[i] == 1: U = add(S, R), T = dbl(S) + * + * Swapping T, U conditionally on k[i] leaves you with state + * + * k[i] == 0: R, S = T, U + * k[i] == 1: R, S = U, T + * + * Which leaves you with state + * + * k[i] == 0: S = add(R, S), R = dbl(R) + * k[i] == 1: R = add(S, R), S = dbl(S) + * + * So we get the same logic, but instead of a branch it's a + * conditional swap, followed by ECC ops, then another conditional swap. + * + * Optimization: The end of iteration i and start of i-1 looks like + * + * ... + * CSWAP(k[i], R, S) + * ECC + * CSWAP(k[i], R, S) + * (next iteration) + * CSWAP(k[i-1], R, S) + * ECC + * CSWAP(k[i-1], R, S) + * ... + * + * So instead of two contiguous swaps, you can merge the condition + * bits and do a single swap. + * + * k[i] k[i-1] Outcome + * 0 0 No Swap + * 0 1 Swap + * 1 0 Swap + * 1 1 No Swap + * + * This is XOR. pbit tracks the previous bit of k. + */ + + for (i = order_bits - 1; i >= 0; i--) { + kbit = BN_is_bit_set(k, i) ^ pbit; + EC_POINT_CSWAP(kbit, r, s, group_top, Z_is_one); + if (!EC_POINT_add(group, s, r, s, ctx)) + goto err; + if (!EC_POINT_dbl(group, r, r, ctx)) + goto err; + /* + * pbit logic merges this cswap with that of the + * next iteration + */ + pbit ^= kbit; + } + /* one final cswap to move the right value into r */ + EC_POINT_CSWAP(pbit, r, s, group_top, Z_is_one); +#undef EC_POINT_CSWAP + + ret = 1; + + err: + EC_POINT_free(s); + BN_CTX_end(ctx); + BN_CTX_free(new_ctx); + + return ret; +} + +#undef EC_POINT_BN_set_flags + /* * TODO: table should be optimised for the wNAF-based implementation, * sometimes smaller windows will give better performance (thus the @@ -164,6 +380,32 @@ int ec_wNAF_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, return EC_POINT_set_to_infinity(group, r); } + /*- + * Handle the common cases where the scalar is secret, enforcing a constant + * time scalar multiplication algorithm. + */ + if ((scalar != NULL) && (num == 0)) { + /*- + * In this case we want to compute scalar * GeneratorPoint: this + * codepath is reached most prominently by (ephemeral) key generation + * of EC cryptosystems (i.e. ECDSA keygen and sign setup, ECDH + * keygen/first half), where the scalar is always secret. This is why + * we ignore if BN_FLG_CONSTTIME is actually set and we always call the + * constant time version. + */ + return ec_mul_consttime(group, r, scalar, NULL, ctx); + } + if ((scalar == NULL) && (num == 1)) { + /*- + * In this case we want to compute scalar * GenericPoint: this codepath + * is reached most prominently by the second half of ECDH, where the + * secret scalar is multiplied by the peer's public point. To protect + * the secret scalar, we ignore if BN_FLG_CONSTTIME is actually set and + * we always call the constant time version. + */ + return ec_mul_consttime(group, r, scalars[0], points[0], ctx); + } + for (i = 0; i < num; i++) { if (group->meth != points[i]->meth) { ECerr(EC_F_EC_WNAF_MUL, EC_R_INCOMPATIBLE_OBJECTS); From matthias.st.pierre at ncp-e.com Tue Apr 24 06:06:50 2018 From: matthias.st.pierre at ncp-e.com (matthias.st.pierre at ncp-e.com) Date: Tue, 24 Apr 2018 06:06:50 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524550010.791112.31056.nullmailer@dev.openssl.org> The branch master has been updated via d8f436f3cf771d519573460b14ece6ed01a157ff (commit) from 39df51522ba2e3773ae2f1d4df5a6031ef41c1ba (commit) - Log ----------------------------------------------------------------- commit d8f436f3cf771d519573460b14ece6ed01a157ff Author: Dr. Matthias St. Pierre Date: Fri Apr 20 17:55:02 2018 +0200 a_strex.c: improve documentation of 'tag2nbyte' lookup table The 'tag2nbyte' lookup table maps the tags of ASN1 string types to their respective character widths. It is used for example by ASN1_STRING_to_UTF8(). This commit adds the tag names as comments. Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6062) ----------------------------------------------------------------------- Summary of changes: crypto/asn1/a_strex.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/crypto/asn1/a_strex.c b/crypto/asn1/a_strex.c index db9fa80..1d34f56 100644 --- a/crypto/asn1/a_strex.c +++ b/crypto/asn1/a_strex.c @@ -281,12 +281,22 @@ static int do_dump(unsigned long lflags, char_io *io_ch, void *arg, static const signed char tag2nbyte[] = { -1, -1, -1, -1, -1, /* 0-4 */ -1, -1, -1, -1, -1, /* 5-9 */ - -1, -1, 0, -1, /* 10-13 */ - -1, -1, -1, -1, /* 15-17 */ - 1, 1, 1, /* 18-20 */ - -1, 1, 1, 1, /* 21-24 */ - -1, 1, -1, /* 25-27 */ - 4, -1, 2 /* 28-30 */ + -1, -1, /* 10-11 */ + 0, /* 12 V_ASN1_UTF8STRING */ + -1, -1, -1, -1, -1, /* 13-17 */ + 1, /* 18 V_ASN1_NUMERICSTRING */ + 1, /* 19 V_ASN1_PRINTABLESTRING */ + 1, /* 20 V_ASN1_T61STRING */ + -1, /* 21 */ + 1, /* 22 V_ASN1_IA5STRING */ + 1, /* 23 V_ASN1_UTCTIME */ + 1, /* 24 V_ASN1_GENERALIZEDTIME */ + -1, /* 25 */ + 1, /* 26 V_ASN1_ISO64STRING */ + -1, /* 27 */ + 4, /* 28 V_ASN1_UNIVERSALSTRING */ + -1, /* 29 */ + 2 /* 30 V_ASN1_BMPSTRING */ }; /* From matthias.st.pierre at ncp-e.com Tue Apr 24 07:13:16 2018 From: matthias.st.pierre at ncp-e.com (matthias.st.pierre at ncp-e.com) Date: Tue, 24 Apr 2018 07:13:16 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524553996.236537.6690.nullmailer@dev.openssl.org> The branch master has been updated via 7fcdbd839c629f5419a49bf8da28c968c8140c3d (commit) from d8f436f3cf771d519573460b14ece6ed01a157ff (commit) - Log ----------------------------------------------------------------- commit 7fcdbd839c629f5419a49bf8da28c968c8140c3d Author: FdaSilvaYY Date: Wed Mar 28 22:32:31 2018 +0200 X509: add more error codes on malloc or sk_TYP_push failure Reviewed-by: Rich Salz Reviewed-by: Matthias St. Pierre (Merged from https://github.com/openssl/openssl/pull/5837) ----------------------------------------------------------------------- Summary of changes: crypto/err/openssl.txt | 12 ++++++++++ crypto/x509/by_dir.c | 42 +++++++++++++++++++++------------- crypto/x509/by_file.c | 2 +- crypto/x509/x509_err.c | 12 +++++++++- crypto/x509/x509_lu.c | 55 ++++++++++++++++++++++++++++----------------- crypto/x509/x509_vfy.c | 3 +++ crypto/x509/x_crl.c | 9 +++++--- crypto/x509/x_name.c | 28 ++++++++++++++--------- crypto/x509/x_pubkey.c | 2 +- crypto/x509/x_x509.c | 6 +++-- crypto/x509v3/pcy_cache.c | 26 ++++++++++++++------- crypto/x509v3/pcy_data.c | 6 ++++- crypto/x509v3/pcy_node.c | 21 ++++++++++++----- crypto/x509v3/v3_cpols.c | 2 +- crypto/x509v3/v3err.c | 8 ++++++- include/openssl/x509err.h | 8 +++++++ include/openssl/x509v3err.h | 4 ++++ 17 files changed, 175 insertions(+), 71 deletions(-) diff --git a/crypto/err/openssl.txt b/crypto/err/openssl.txt index be03aeb..d62968e 100644 --- a/crypto/err/openssl.txt +++ b/crypto/err/openssl.txt @@ -1587,8 +1587,12 @@ X509V3_F_I2S_ASN1_ENUMERATED:121:i2s_ASN1_ENUMERATED X509V3_F_I2S_ASN1_IA5STRING:149:i2s_ASN1_IA5STRING X509V3_F_I2S_ASN1_INTEGER:120:i2s_ASN1_INTEGER X509V3_F_I2V_AUTHORITY_INFO_ACCESS:138:i2v_AUTHORITY_INFO_ACCESS +X509V3_F_LEVEL_ADD_NODE:168:level_add_node X509V3_F_NOTICE_SECTION:132:notice_section X509V3_F_NREF_NOS:133:nref_nos +X509V3_F_POLICY_CACHE_CREATE:169:policy_cache_create +X509V3_F_POLICY_CACHE_NEW:170:policy_cache_new +X509V3_F_POLICY_DATA_NEW:171:policy_data_new X509V3_F_POLICY_SECTION:131:policy_section X509V3_F_PROCESS_PCI_VALUE:150:process_pci_value X509V3_F_R2I_CERTPOL:130:r2i_certpol @@ -1641,8 +1645,11 @@ X509_F_CHECK_POLICY:145:check_policy X509_F_DANE_I2D:107:dane_i2d X509_F_DIR_CTRL:102:dir_ctrl X509_F_GET_CERT_BY_SUBJECT:103:get_cert_by_subject +X509_F_I2D_X509_AUX:151:i2d_X509_AUX +X509_F_LOOKUP_CERTS_SK:152:lookup_certs_sk X509_F_NETSCAPE_SPKI_B64_DECODE:129:NETSCAPE_SPKI_b64_decode X509_F_NETSCAPE_SPKI_B64_ENCODE:130:NETSCAPE_SPKI_b64_encode +X509_F_NEW_DIR:153:new_dir X509_F_X509AT_ADD1_ATTR:135:X509at_add1_attr X509_F_X509V3_ADD_EXT:104:X509v3_add_ext X509_F_X509_ATTRIBUTE_CREATE_BY_NID:136:X509_ATTRIBUTE_create_by_NID @@ -1652,6 +1659,7 @@ X509_F_X509_ATTRIBUTE_GET0_DATA:139:X509_ATTRIBUTE_get0_data X509_F_X509_ATTRIBUTE_SET1_DATA:138:X509_ATTRIBUTE_set1_data X509_F_X509_CHECK_PRIVATE_KEY:128:X509_check_private_key X509_F_X509_CRL_DIFF:105:X509_CRL_diff +X509_F_X509_CRL_METHOD_NEW:154:X509_CRL_METHOD_new X509_F_X509_CRL_PRINT_FP:147:X509_CRL_print_fp X509_F_X509_EXTENSION_CREATE_BY_NID:108:X509_EXTENSION_create_by_NID X509_F_X509_EXTENSION_CREATE_BY_OBJ:109:X509_EXTENSION_create_by_OBJ @@ -1659,7 +1667,9 @@ X509_F_X509_GET_PUBKEY_PARAMETERS:110:X509_get_pubkey_parameters X509_F_X509_LOAD_CERT_CRL_FILE:132:X509_load_cert_crl_file X509_F_X509_LOAD_CERT_FILE:111:X509_load_cert_file X509_F_X509_LOAD_CRL_FILE:112:X509_load_crl_file +X509_F_X509_LOOKUP_NEW:155:X509_LOOKUP_new X509_F_X509_NAME_ADD_ENTRY:113:X509_NAME_add_entry +X509_F_X509_NAME_CANON:156:x509_name_canon X509_F_X509_NAME_ENTRY_CREATE_BY_NID:114:X509_NAME_ENTRY_create_by_NID X509_F_X509_NAME_ENTRY_CREATE_BY_TXT:131:X509_NAME_ENTRY_create_by_txt X509_F_X509_NAME_ENTRY_SET_OBJECT:115:X509_NAME_ENTRY_set_object @@ -1676,10 +1686,12 @@ X509_F_X509_REQ_PRINT_FP:122:X509_REQ_print_fp X509_F_X509_REQ_TO_X509:123:X509_REQ_to_X509 X509_F_X509_STORE_ADD_CERT:124:X509_STORE_add_cert X509_F_X509_STORE_ADD_CRL:125:X509_STORE_add_crl +X509_F_X509_STORE_ADD_LOOKUP:157:X509_STORE_add_lookup X509_F_X509_STORE_CTX_GET1_ISSUER:146:X509_STORE_CTX_get1_issuer X509_F_X509_STORE_CTX_INIT:143:X509_STORE_CTX_init X509_F_X509_STORE_CTX_NEW:142:X509_STORE_CTX_new X509_F_X509_STORE_CTX_PURPOSE_INHERIT:134:X509_STORE_CTX_purpose_inherit +X509_F_X509_STORE_NEW:158:X509_STORE_new X509_F_X509_TO_X509_REQ:126:X509_to_X509_REQ X509_F_X509_TRUST_ADD:133:X509_TRUST_add X509_F_X509_TRUST_SET:141:X509_TRUST_set diff --git a/crypto/x509/by_dir.c b/crypto/x509/by_dir.c index f64cf38..f213eec 100644 --- a/crypto/x509/by_dir.c +++ b/crypto/x509/by_dir.c @@ -48,7 +48,7 @@ static int get_cert_by_subject(X509_LOOKUP *xl, X509_LOOKUP_TYPE type, X509_NAME *name, X509_OBJECT *ret); static X509_LOOKUP_METHOD x509_dir_lookup = { "Load certs from files in a directory", - new_dir, /* new */ + new_dir, /* new_item */ free_dir, /* free */ NULL, /* init */ NULL, /* shutdown */ @@ -68,15 +68,13 @@ static int dir_ctrl(X509_LOOKUP *ctx, int cmd, const char *argp, long argl, char **retp) { int ret = 0; - BY_DIR *ld; - char *dir = NULL; - - ld = (BY_DIR *)ctx->method_data; + BY_DIR *ld = (BY_DIR *)ctx->method_data; switch (cmd) { case X509_L_ADD_DIR: if (argl == X509_FILETYPE_DEFAULT) { - dir = (char *)getenv(X509_get_default_cert_dir_env()); + const char *dir = getenv(X509_get_default_cert_dir_env()); + if (dir) ret = add_cert_dir(ld, dir, X509_FILETYPE_PEM); else @@ -94,23 +92,30 @@ static int dir_ctrl(X509_LOOKUP *ctx, int cmd, const char *argp, long argl, static int new_dir(X509_LOOKUP *lu) { - BY_DIR *a; + BY_DIR *a = OPENSSL_malloc(sizeof(*a)); - if ((a = OPENSSL_malloc(sizeof(*a))) == NULL) + if (a == NULL) { + X509err(X509_F_NEW_DIR, ERR_R_MALLOC_FAILURE); return 0; + } + if ((a->buffer = BUF_MEM_new()) == NULL) { - OPENSSL_free(a); - return 0; + X509err(X509_F_NEW_DIR, ERR_R_MALLOC_FAILURE); + goto err; } a->dirs = NULL; a->lock = CRYPTO_THREAD_lock_new(); if (a->lock == NULL) { BUF_MEM_free(a->buffer); - OPENSSL_free(a); - return 0; + X509err(X509_F_NEW_DIR, ERR_R_MALLOC_FAILURE); + goto err; } lu->method_data = (char *)a; return 1; + + err: + OPENSSL_free(a); + return 0; } static void by_dir_hash_free(BY_DIR_HASH *hash) @@ -137,9 +142,8 @@ static void by_dir_entry_free(BY_DIR_ENTRY *ent) static void free_dir(X509_LOOKUP *lu) { - BY_DIR *a; + BY_DIR *a = (BY_DIR *)lu->method_data; - a = (BY_DIR *)lu->method_data; sk_BY_DIR_ENTRY_pop_free(a->dirs, by_dir_entry_free); BUF_MEM_free(a->buffer); CRYPTO_THREAD_lock_free(a->lock); @@ -162,6 +166,7 @@ static int add_cert_dir(BY_DIR *ctx, const char *dir, int type) do { if ((*p == LIST_SEPARATOR_CHAR) || (*p == '\0')) { BY_DIR_ENTRY *ent; + ss = s; s = p + 1; len = p - ss; @@ -182,8 +187,10 @@ static int add_cert_dir(BY_DIR *ctx, const char *dir, int type) } } ent = OPENSSL_malloc(sizeof(*ent)); - if (ent == NULL) + if (ent == NULL) { + X509err(X509_F_ADD_CERT_DIR, ERR_R_MALLOC_FAILURE); return 0; + } ent->dir_type = type; ent->hashes = sk_BY_DIR_HASH_new(by_dir_hash_cmp); ent->dir = OPENSSL_strndup(ss, len); @@ -193,6 +200,7 @@ static int add_cert_dir(BY_DIR *ctx, const char *dir, int type) } if (!sk_BY_DIR_ENTRY_push(ctx->dirs, ent)) { by_dir_entry_free(ent); + X509err(X509_F_ADD_CERT_DIR, ERR_R_MALLOC_FAILURE); return 0; } } @@ -244,6 +252,7 @@ static int get_cert_by_subject(X509_LOOKUP *xl, X509_LOOKUP_TYPE type, BY_DIR_ENTRY *ent; int idx; BY_DIR_HASH htmp, *hent; + ent = sk_BY_DIR_ENTRY_value(ctx->dirs, i); j = strlen(ent->dir) + 1 + 8 + 6 + 1 + 1; if (!BUF_MEM_grow(b, j)) { @@ -340,7 +349,7 @@ static int get_cert_by_subject(X509_LOOKUP *xl, X509_LOOKUP_TYPE type, if (idx >= 0) hent = sk_BY_DIR_HASH_value(ent->hashes, idx); } - if (!hent) { + if (hent == NULL) { hent = OPENSSL_malloc(sizeof(*hent)); if (hent == NULL) { CRYPTO_THREAD_unlock(ctx->lock); @@ -353,6 +362,7 @@ static int get_cert_by_subject(X509_LOOKUP *xl, X509_LOOKUP_TYPE type, if (!sk_BY_DIR_HASH_push(ent->hashes, hent)) { CRYPTO_THREAD_unlock(ctx->lock); OPENSSL_free(hent); + X509err(X509_F_GET_CERT_BY_SUBJECT, ERR_R_MALLOC_FAILURE); ok = 0; goto finish; } diff --git a/crypto/x509/by_file.c b/crypto/x509/by_file.c index 52955b6..bd39ecb 100644 --- a/crypto/x509/by_file.c +++ b/crypto/x509/by_file.c @@ -21,7 +21,7 @@ static int by_file_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc, long argl, char **ret); static X509_LOOKUP_METHOD x509_file_lookup = { "Load file into cache", - NULL, /* new */ + NULL, /* new_item */ NULL, /* free */ NULL, /* init */ NULL, /* shutdown */ diff --git a/crypto/x509/x509_err.c b/crypto/x509/x509_err.c index 84c726f..7b9f505 100644 --- a/crypto/x509/x509_err.c +++ b/crypto/x509/x509_err.c @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -24,10 +24,13 @@ static const ERR_STRING_DATA X509_str_functs[] = { {ERR_PACK(ERR_LIB_X509, X509_F_DIR_CTRL, 0), "dir_ctrl"}, {ERR_PACK(ERR_LIB_X509, X509_F_GET_CERT_BY_SUBJECT, 0), "get_cert_by_subject"}, + {ERR_PACK(ERR_LIB_X509, X509_F_I2D_X509_AUX, 0), "i2d_X509_AUX"}, + {ERR_PACK(ERR_LIB_X509, X509_F_LOOKUP_CERTS_SK, 0), "lookup_certs_sk"}, {ERR_PACK(ERR_LIB_X509, X509_F_NETSCAPE_SPKI_B64_DECODE, 0), "NETSCAPE_SPKI_b64_decode"}, {ERR_PACK(ERR_LIB_X509, X509_F_NETSCAPE_SPKI_B64_ENCODE, 0), "NETSCAPE_SPKI_b64_encode"}, + {ERR_PACK(ERR_LIB_X509, X509_F_NEW_DIR, 0), "new_dir"}, {ERR_PACK(ERR_LIB_X509, X509_F_X509AT_ADD1_ATTR, 0), "X509at_add1_attr"}, {ERR_PACK(ERR_LIB_X509, X509_F_X509V3_ADD_EXT, 0), "X509v3_add_ext"}, {ERR_PACK(ERR_LIB_X509, X509_F_X509_ATTRIBUTE_CREATE_BY_NID, 0), @@ -43,6 +46,8 @@ static const ERR_STRING_DATA X509_str_functs[] = { {ERR_PACK(ERR_LIB_X509, X509_F_X509_CHECK_PRIVATE_KEY, 0), "X509_check_private_key"}, {ERR_PACK(ERR_LIB_X509, X509_F_X509_CRL_DIFF, 0), "X509_CRL_diff"}, + {ERR_PACK(ERR_LIB_X509, X509_F_X509_CRL_METHOD_NEW, 0), + "X509_CRL_METHOD_new"}, {ERR_PACK(ERR_LIB_X509, X509_F_X509_CRL_PRINT_FP, 0), "X509_CRL_print_fp"}, {ERR_PACK(ERR_LIB_X509, X509_F_X509_EXTENSION_CREATE_BY_NID, 0), "X509_EXTENSION_create_by_NID"}, @@ -56,8 +61,10 @@ static const ERR_STRING_DATA X509_str_functs[] = { "X509_load_cert_file"}, {ERR_PACK(ERR_LIB_X509, X509_F_X509_LOAD_CRL_FILE, 0), "X509_load_crl_file"}, + {ERR_PACK(ERR_LIB_X509, X509_F_X509_LOOKUP_NEW, 0), "X509_LOOKUP_new"}, {ERR_PACK(ERR_LIB_X509, X509_F_X509_NAME_ADD_ENTRY, 0), "X509_NAME_add_entry"}, + {ERR_PACK(ERR_LIB_X509, X509_F_X509_NAME_CANON, 0), "x509_name_canon"}, {ERR_PACK(ERR_LIB_X509, X509_F_X509_NAME_ENTRY_CREATE_BY_NID, 0), "X509_NAME_ENTRY_create_by_NID"}, {ERR_PACK(ERR_LIB_X509, X509_F_X509_NAME_ENTRY_CREATE_BY_TXT, 0), @@ -81,6 +88,8 @@ static const ERR_STRING_DATA X509_str_functs[] = { "X509_STORE_add_cert"}, {ERR_PACK(ERR_LIB_X509, X509_F_X509_STORE_ADD_CRL, 0), "X509_STORE_add_crl"}, + {ERR_PACK(ERR_LIB_X509, X509_F_X509_STORE_ADD_LOOKUP, 0), + "X509_STORE_add_lookup"}, {ERR_PACK(ERR_LIB_X509, X509_F_X509_STORE_CTX_GET1_ISSUER, 0), "X509_STORE_CTX_get1_issuer"}, {ERR_PACK(ERR_LIB_X509, X509_F_X509_STORE_CTX_INIT, 0), @@ -89,6 +98,7 @@ static const ERR_STRING_DATA X509_str_functs[] = { "X509_STORE_CTX_new"}, {ERR_PACK(ERR_LIB_X509, X509_F_X509_STORE_CTX_PURPOSE_INHERIT, 0), "X509_STORE_CTX_purpose_inherit"}, + {ERR_PACK(ERR_LIB_X509, X509_F_X509_STORE_NEW, 0), "X509_STORE_new"}, {ERR_PACK(ERR_LIB_X509, X509_F_X509_TO_X509_REQ, 0), "X509_to_X509_REQ"}, {ERR_PACK(ERR_LIB_X509, X509_F_X509_TRUST_ADD, 0), "X509_TRUST_add"}, {ERR_PACK(ERR_LIB_X509, X509_F_X509_TRUST_SET, 0), "X509_TRUST_set"}, diff --git a/crypto/x509/x509_lu.c b/crypto/x509/x509_lu.c index 7407005..fbeed01 100644 --- a/crypto/x509/x509_lu.c +++ b/crypto/x509/x509_lu.c @@ -17,14 +17,15 @@ X509_LOOKUP *X509_LOOKUP_new(X509_LOOKUP_METHOD *method) { - X509_LOOKUP *ret; + X509_LOOKUP *ret = OPENSSL_zalloc(sizeof(*ret)); - ret = OPENSSL_zalloc(sizeof(*ret)); - if (ret == NULL) + if (ret == NULL) { + X509err(X509_F_X509_LOOKUP_NEW, ERR_R_MALLOC_FAILURE); return NULL; + } ret->method = method; - if ((method->new_item != NULL) && !method->new_item(ret)) { + if (method->new_item != NULL && method->new_item(ret) == 0) { OPENSSL_free(ret); return NULL; } @@ -141,25 +142,36 @@ static int x509_object_cmp(const X509_OBJECT *const *a, X509_STORE *X509_STORE_new(void) { - X509_STORE *ret; + X509_STORE *ret = OPENSSL_zalloc(sizeof(*ret)); - if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) + if (ret == NULL) { + X509err(X509_F_X509_STORE_NEW, ERR_R_MALLOC_FAILURE); return NULL; - if ((ret->objs = sk_X509_OBJECT_new(x509_object_cmp)) == NULL) + } + if ((ret->objs = sk_X509_OBJECT_new(x509_object_cmp)) == NULL) { + X509err(X509_F_X509_STORE_NEW, ERR_R_MALLOC_FAILURE); goto err; + } ret->cache = 1; - if ((ret->get_cert_methods = sk_X509_LOOKUP_new_null()) == NULL) + if ((ret->get_cert_methods = sk_X509_LOOKUP_new_null()) == NULL) { + X509err(X509_F_X509_STORE_NEW, ERR_R_MALLOC_FAILURE); goto err; + } - if ((ret->param = X509_VERIFY_PARAM_new()) == NULL) + if ((ret->param = X509_VERIFY_PARAM_new()) == NULL) { + X509err(X509_F_X509_STORE_NEW, ERR_R_MALLOC_FAILURE); goto err; - - if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_X509_STORE, ret, &ret->ex_data)) + } + if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_X509_STORE, ret, &ret->ex_data)) { + X509err(X509_F_X509_STORE_NEW, ERR_R_MALLOC_FAILURE); goto err; + } ret->lock = CRYPTO_THREAD_lock_new(); - if (ret->lock == NULL) + if (ret->lock == NULL) { + X509err(X509_F_X509_STORE_NEW, ERR_R_MALLOC_FAILURE); goto err; + } ret->references = 1; return ret; @@ -228,17 +240,18 @@ X509_LOOKUP *X509_STORE_add_lookup(X509_STORE *v, X509_LOOKUP_METHOD *m) } /* a new one */ lu = X509_LOOKUP_new(m); - if (lu == NULL) + if (lu == NULL) { + X509err(X509_F_X509_STORE_ADD_LOOKUP, ERR_R_MALLOC_FAILURE); return NULL; - else { - lu->store_ctx = v; - if (sk_X509_LOOKUP_push(v->get_cert_methods, lu)) - return lu; - else { - X509_LOOKUP_free(lu); - return NULL; - } } + + lu->store_ctx = v; + if (sk_X509_LOOKUP_push(v->get_cert_methods, lu)) + return lu; + /* malloc failed */ + X509err(X509_F_X509_STORE_ADD_LOOKUP, ERR_R_MALLOC_FAILURE); + X509_LOOKUP_free(lu); + return NULL; } X509_OBJECT *X509_STORE_CTX_get_obj_by_subject(X509_STORE_CTX *vs, diff --git a/crypto/x509/x509_vfy.c b/crypto/x509/x509_vfy.c index 9ebda1b..fd8ecfa 100644 --- a/crypto/x509/x509_vfy.c +++ b/crypto/x509/x509_vfy.c @@ -366,6 +366,7 @@ static STACK_OF(X509) *lookup_certs_sk(X509_STORE_CTX *ctx, X509_NAME *nm) STACK_OF(X509) *sk = NULL; X509 *x; int i; + for (i = 0; i < sk_X509_num(ctx->other_ctx); i++) { x = sk_X509_value(ctx->other_ctx, i); if (X509_NAME_cmp(nm, X509_get_subject_name(x)) == 0) { @@ -373,6 +374,8 @@ static STACK_OF(X509) *lookup_certs_sk(X509_STORE_CTX *ctx, X509_NAME *nm) sk = sk_X509_new_null(); if (sk == NULL || sk_X509_push(sk, x) == 0) { sk_X509_pop_free(sk, X509_free); + X509err(X509_F_LOOKUP_CERTS_SK, ERR_R_MALLOC_FAILURE); + ctx->error = X509_V_ERR_OUT_OF_MEM; return NULL; } X509_up_ref(x); diff --git a/crypto/x509/x_crl.c b/crypto/x509/x_crl.c index dbed850..5098b5f 100644 --- a/crypto/x509/x_crl.c +++ b/crypto/x509/x_crl.c @@ -309,6 +309,7 @@ static int X509_REVOKED_cmp(const X509_REVOKED *const *a, int X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev) { X509_CRL_INFO *inf; + inf = &crl->crl; if (inf->revoked == NULL) inf->revoked = sk_X509_REVOKED_new(X509_REVOKED_cmp); @@ -429,10 +430,12 @@ X509_CRL_METHOD *X509_CRL_METHOD_new(int (*crl_init) (X509_CRL *crl), int (*crl_verify) (X509_CRL *crl, EVP_PKEY *pk)) { - X509_CRL_METHOD *m; - m = OPENSSL_malloc(sizeof(*m)); - if (m == NULL) + X509_CRL_METHOD *m = OPENSSL_malloc(sizeof(*m)); + + if (m == NULL) { + X509err(X509_F_X509_CRL_METHOD_NEW, ERR_R_MALLOC_FAILURE); return NULL; + } m->crl_init = crl_init; m->crl_free = crl_free; m->crl_lookup = crl_lookup; diff --git a/crypto/x509/x_name.c b/crypto/x509/x_name.c index d36a9d3..a30b5e1 100644 --- a/crypto/x509/x_name.c +++ b/crypto/x509/x_name.c @@ -300,7 +300,7 @@ static int x509_name_ex_print(BIO *out, ASN1_VALUE **pval, static int x509_name_canon(X509_NAME *a) { unsigned char *p; - STACK_OF(STACK_OF_X509_NAME_ENTRY) *intname = NULL; + STACK_OF(STACK_OF_X509_NAME_ENTRY) *intname; STACK_OF(X509_NAME_ENTRY) *entries = NULL; X509_NAME_ENTRY *entry, *tmpentry = NULL; int i, set = -1, ret = 0, len; @@ -313,44 +313,53 @@ static int x509_name_canon(X509_NAME *a) return 1; } intname = sk_STACK_OF_X509_NAME_ENTRY_new_null(); - if (!intname) + if (intname == NULL) { + X509err(X509_F_X509_NAME_CANON, ERR_R_MALLOC_FAILURE); goto err; + } for (i = 0; i < sk_X509_NAME_ENTRY_num(a->entries); i++) { entry = sk_X509_NAME_ENTRY_value(a->entries, i); if (entry->set != set) { entries = sk_X509_NAME_ENTRY_new_null(); - if (!entries) + if (entries == NULL) goto err; if (!sk_STACK_OF_X509_NAME_ENTRY_push(intname, entries)) { sk_X509_NAME_ENTRY_free(entries); + X509err(X509_F_X509_NAME_CANON, ERR_R_MALLOC_FAILURE); goto err; } set = entry->set; } tmpentry = X509_NAME_ENTRY_new(); - if (tmpentry == NULL) + if (tmpentry == NULL) { + X509err(X509_F_X509_NAME_CANON, ERR_R_MALLOC_FAILURE); goto err; + } tmpentry->object = OBJ_dup(entry->object); - if (tmpentry->object == NULL) + if (tmpentry->object == NULL) { + X509err(X509_F_X509_NAME_CANON, ERR_R_MALLOC_FAILURE); goto err; + } if (!asn1_string_canon(tmpentry->value, entry->value)) goto err; - if (!sk_X509_NAME_ENTRY_push(entries, tmpentry)) + if (!sk_X509_NAME_ENTRY_push(entries, tmpentry)) { + X509err(X509_F_X509_NAME_CANON, ERR_R_MALLOC_FAILURE); goto err; + } tmpentry = NULL; } /* Finally generate encoding */ - len = i2d_name_canon(intname, NULL); if (len < 0) goto err; a->canon_enclen = len; p = OPENSSL_malloc(a->canon_enclen); - - if (p == NULL) + if (p == NULL) { + X509err(X509_F_X509_NAME_CANON, ERR_R_MALLOC_FAILURE); goto err; + } a->canon_enc = p; @@ -359,7 +368,6 @@ static int x509_name_canon(X509_NAME *a) ret = 1; err: - X509_NAME_ENTRY_free(tmpentry); sk_STACK_OF_X509_NAME_ENTRY_pop_free(intname, local_sk_X509_NAME_ENTRY_pop_free); diff --git a/crypto/x509/x_pubkey.c b/crypto/x509/x_pubkey.c index 73977cd..8616297 100644 --- a/crypto/x509/x_pubkey.c +++ b/crypto/x509/x_pubkey.c @@ -101,7 +101,7 @@ int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey) static int x509_pubkey_decode(EVP_PKEY **ppkey, X509_PUBKEY *key) - { +{ EVP_PKEY *pkey = EVP_PKEY_new(); if (pkey == NULL) { diff --git a/crypto/x509/x_x509.c b/crypto/x509/x_x509.c index c28fdda..cf71180 100644 --- a/crypto/x509/x_x509.c +++ b/crypto/x509/x_x509.c @@ -189,8 +189,10 @@ int i2d_X509_AUX(X509 *a, unsigned char **pp) /* Allocate requisite combined storage */ *pp = tmp = OPENSSL_malloc(length); - if (tmp == NULL) - return -1; /* Push error onto error stack? */ + if (tmp == NULL) { + X509err(X509_F_I2D_X509_AUX, ERR_R_MALLOC_FAILURE); + return -1; + } /* Encode, but keep *pp at the originally malloced pointer */ length = i2d_x509_aux_internal(a, &tmp); diff --git a/crypto/x509v3/pcy_cache.c b/crypto/x509v3/pcy_cache.c index a9ee30a..0f506ac 100644 --- a/crypto/x509v3/pcy_cache.c +++ b/crypto/x509v3/pcy_cache.c @@ -26,21 +26,25 @@ static int policy_cache_set_int(long *out, ASN1_INTEGER *value); static int policy_cache_create(X509 *x, CERTIFICATEPOLICIES *policies, int crit) { - int i; - int ret = 0; + int i, ret = 0; X509_POLICY_CACHE *cache = x->policy_cache; X509_POLICY_DATA *data = NULL; POLICYINFO *policy; + if (sk_POLICYINFO_num(policies) == 0) goto bad_policy; cache->data = sk_X509_POLICY_DATA_new(policy_data_cmp); - if (cache->data == NULL) - goto bad_policy; + if (cache->data == NULL) { + X509V3err(X509V3_F_POLICY_CACHE_CREATE, ERR_R_MALLOC_FAILURE); + goto just_cleanup; + } for (i = 0; i < sk_POLICYINFO_num(policies); i++) { policy = sk_POLICYINFO_value(policies, i); data = policy_data_new(policy, NULL, crit); - if (data == NULL) - goto bad_policy; + if (data == NULL) { + X509V3err(X509V3_F_POLICY_CACHE_CREATE, ERR_R_MALLOC_FAILURE); + goto just_cleanup; + } /* * Duplicate policy OIDs are illegal: reject if matches found. */ @@ -53,15 +57,19 @@ static int policy_cache_create(X509 *x, } else if (sk_X509_POLICY_DATA_find(cache->data, data) != -1) { ret = -1; goto bad_policy; - } else if (!sk_X509_POLICY_DATA_push(cache->data, data)) + } else if (!sk_X509_POLICY_DATA_push(cache->data, data)) { + X509V3err(X509V3_F_POLICY_CACHE_CREATE, ERR_R_MALLOC_FAILURE); goto bad_policy; + } data = NULL; } ret = 1; + bad_policy: if (ret == -1) x->ex_flags |= EXFLAG_INVALID_POLICY; policy_data_free(data); + just_cleanup: sk_POLICYINFO_pop_free(policies, POLICYINFO_free); if (ret <= 0) { sk_X509_POLICY_DATA_pop_free(cache->data, policy_data_free); @@ -82,8 +90,10 @@ static int policy_cache_new(X509 *x) if (x->policy_cache != NULL) return 1; cache = OPENSSL_malloc(sizeof(*cache)); - if (cache == NULL) + if (cache == NULL) { + X509V3err(X509V3_F_POLICY_CACHE_NEW, ERR_R_MALLOC_FAILURE); return 0; + } cache->anyPolicy = NULL; cache->data = NULL; cache->any_skip = -1; diff --git a/crypto/x509v3/pcy_data.c b/crypto/x509v3/pcy_data.c index 757b101..7b75a6d 100644 --- a/crypto/x509v3/pcy_data.c +++ b/crypto/x509v3/pcy_data.c @@ -40,6 +40,7 @@ X509_POLICY_DATA *policy_data_new(POLICYINFO *policy, { X509_POLICY_DATA *ret; ASN1_OBJECT *id; + if (policy == NULL && cid == NULL) return NULL; if (cid) { @@ -49,12 +50,15 @@ X509_POLICY_DATA *policy_data_new(POLICYINFO *policy, } else id = NULL; ret = OPENSSL_zalloc(sizeof(*ret)); - if (ret == NULL) + if (ret == NULL) { + X509V3err(X509V3_F_POLICY_DATA_NEW, ERR_R_MALLOC_FAILURE); return NULL; + } ret->expected_policy_set = sk_ASN1_OBJECT_new_null(); if (ret->expected_policy_set == NULL) { OPENSSL_free(ret); ASN1_OBJECT_free(id); + X509V3err(X509V3_F_POLICY_DATA_NEW, ERR_R_MALLOC_FAILURE); return NULL; } diff --git a/crypto/x509v3/pcy_node.c b/crypto/x509v3/pcy_node.c index 80443bf..f739373 100644 --- a/crypto/x509v3/pcy_node.c +++ b/crypto/x509v3/pcy_node.c @@ -10,6 +10,7 @@ #include #include #include +#include #include "pcy_int.h" @@ -66,8 +67,10 @@ X509_POLICY_NODE *level_add_node(X509_POLICY_LEVEL *level, X509_POLICY_NODE *node; node = OPENSSL_zalloc(sizeof(*node)); - if (node == NULL) + if (node == NULL) { + X509V3err(X509V3_F_LEVEL_ADD_NODE, ERR_R_MALLOC_FAILURE); return NULL; + } node->data = data; node->parent = parent; if (level) { @@ -79,20 +82,28 @@ X509_POLICY_NODE *level_add_node(X509_POLICY_LEVEL *level, if (level->nodes == NULL) level->nodes = policy_node_cmp_new(); - if (level->nodes == NULL) + if (level->nodes == NULL) { + X509V3err(X509V3_F_LEVEL_ADD_NODE, ERR_R_MALLOC_FAILURE); goto node_error; - if (!sk_X509_POLICY_NODE_push(level->nodes, node)) + } + if (!sk_X509_POLICY_NODE_push(level->nodes, node)) { + X509V3err(X509V3_F_LEVEL_ADD_NODE, ERR_R_MALLOC_FAILURE); goto node_error; + } } } if (tree) { if (tree->extra_data == NULL) tree->extra_data = sk_X509_POLICY_DATA_new_null(); - if (tree->extra_data == NULL) + if (tree->extra_data == NULL){ + X509V3err(X509V3_F_LEVEL_ADD_NODE, ERR_R_MALLOC_FAILURE); goto node_error; - if (!sk_X509_POLICY_DATA_push(tree->extra_data, data)) + } + if (!sk_X509_POLICY_DATA_push(tree->extra_data, data)) { + X509V3err(X509V3_F_LEVEL_ADD_NODE, ERR_R_MALLOC_FAILURE); goto node_error; + } } if (parent) diff --git a/crypto/x509v3/v3_cpols.c b/crypto/x509v3/v3_cpols.c index 51fbb1f..518a0f2 100644 --- a/crypto/x509v3/v3_cpols.c +++ b/crypto/x509v3/v3_cpols.c @@ -144,8 +144,8 @@ static STACK_OF(POLICYINFO) *r2i_certpol(X509V3_EXT_METHOD *method, } pol = POLICYINFO_new(); if (pol == NULL) { - X509V3err(X509V3_F_R2I_CERTPOL, ERR_R_MALLOC_FAILURE); ASN1_OBJECT_free(pobj); + X509V3err(X509V3_F_R2I_CERTPOL, ERR_R_MALLOC_FAILURE); goto err; } pol->policyid = pobj; diff --git a/crypto/x509v3/v3err.c b/crypto/x509v3/v3err.c index 6f30ba3..d1b0308 100644 --- a/crypto/x509v3/v3err.c +++ b/crypto/x509v3/v3err.c @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -39,8 +39,14 @@ static const ERR_STRING_DATA X509V3_str_functs[] = { "i2s_ASN1_INTEGER"}, {ERR_PACK(ERR_LIB_X509V3, X509V3_F_I2V_AUTHORITY_INFO_ACCESS, 0), "i2v_AUTHORITY_INFO_ACCESS"}, + {ERR_PACK(ERR_LIB_X509V3, X509V3_F_LEVEL_ADD_NODE, 0), "level_add_node"}, {ERR_PACK(ERR_LIB_X509V3, X509V3_F_NOTICE_SECTION, 0), "notice_section"}, {ERR_PACK(ERR_LIB_X509V3, X509V3_F_NREF_NOS, 0), "nref_nos"}, + {ERR_PACK(ERR_LIB_X509V3, X509V3_F_POLICY_CACHE_CREATE, 0), + "policy_cache_create"}, + {ERR_PACK(ERR_LIB_X509V3, X509V3_F_POLICY_CACHE_NEW, 0), + "policy_cache_new"}, + {ERR_PACK(ERR_LIB_X509V3, X509V3_F_POLICY_DATA_NEW, 0), "policy_data_new"}, {ERR_PACK(ERR_LIB_X509V3, X509V3_F_POLICY_SECTION, 0), "policy_section"}, {ERR_PACK(ERR_LIB_X509V3, X509V3_F_PROCESS_PCI_VALUE, 0), "process_pci_value"}, diff --git a/include/openssl/x509err.h b/include/openssl/x509err.h index 08692a5..4faeffa 100644 --- a/include/openssl/x509err.h +++ b/include/openssl/x509err.h @@ -27,8 +27,11 @@ int ERR_load_X509_strings(void); # define X509_F_DANE_I2D 107 # define X509_F_DIR_CTRL 102 # define X509_F_GET_CERT_BY_SUBJECT 103 +# define X509_F_I2D_X509_AUX 151 +# define X509_F_LOOKUP_CERTS_SK 152 # define X509_F_NETSCAPE_SPKI_B64_DECODE 129 # define X509_F_NETSCAPE_SPKI_B64_ENCODE 130 +# define X509_F_NEW_DIR 153 # define X509_F_X509AT_ADD1_ATTR 135 # define X509_F_X509V3_ADD_EXT 104 # define X509_F_X509_ATTRIBUTE_CREATE_BY_NID 136 @@ -38,6 +41,7 @@ int ERR_load_X509_strings(void); # define X509_F_X509_ATTRIBUTE_SET1_DATA 138 # define X509_F_X509_CHECK_PRIVATE_KEY 128 # define X509_F_X509_CRL_DIFF 105 +# define X509_F_X509_CRL_METHOD_NEW 154 # define X509_F_X509_CRL_PRINT_FP 147 # define X509_F_X509_EXTENSION_CREATE_BY_NID 108 # define X509_F_X509_EXTENSION_CREATE_BY_OBJ 109 @@ -45,7 +49,9 @@ int ERR_load_X509_strings(void); # define X509_F_X509_LOAD_CERT_CRL_FILE 132 # define X509_F_X509_LOAD_CERT_FILE 111 # define X509_F_X509_LOAD_CRL_FILE 112 +# define X509_F_X509_LOOKUP_NEW 155 # define X509_F_X509_NAME_ADD_ENTRY 113 +# define X509_F_X509_NAME_CANON 156 # define X509_F_X509_NAME_ENTRY_CREATE_BY_NID 114 # define X509_F_X509_NAME_ENTRY_CREATE_BY_TXT 131 # define X509_F_X509_NAME_ENTRY_SET_OBJECT 115 @@ -62,10 +68,12 @@ int ERR_load_X509_strings(void); # define X509_F_X509_REQ_TO_X509 123 # define X509_F_X509_STORE_ADD_CERT 124 # define X509_F_X509_STORE_ADD_CRL 125 +# define X509_F_X509_STORE_ADD_LOOKUP 157 # define X509_F_X509_STORE_CTX_GET1_ISSUER 146 # define X509_F_X509_STORE_CTX_INIT 143 # define X509_F_X509_STORE_CTX_NEW 142 # define X509_F_X509_STORE_CTX_PURPOSE_INHERIT 134 +# define X509_F_X509_STORE_NEW 158 # define X509_F_X509_TO_X509_REQ 126 # define X509_F_X509_TRUST_ADD 133 # define X509_F_X509_TRUST_SET 141 diff --git a/include/openssl/x509v3err.h b/include/openssl/x509v3err.h index e8308ef..f961339 100644 --- a/include/openssl/x509v3err.h +++ b/include/openssl/x509v3err.h @@ -34,8 +34,12 @@ int ERR_load_X509V3_strings(void); # define X509V3_F_I2S_ASN1_IA5STRING 149 # define X509V3_F_I2S_ASN1_INTEGER 120 # define X509V3_F_I2V_AUTHORITY_INFO_ACCESS 138 +# define X509V3_F_LEVEL_ADD_NODE 168 # define X509V3_F_NOTICE_SECTION 132 # define X509V3_F_NREF_NOS 133 +# define X509V3_F_POLICY_CACHE_CREATE 169 +# define X509V3_F_POLICY_CACHE_NEW 170 +# define X509V3_F_POLICY_DATA_NEW 171 # define X509V3_F_POLICY_SECTION 131 # define X509V3_F_PROCESS_PCI_VALUE 150 # define X509V3_F_R2I_CERTPOL 130 From matt at openssl.org Tue Apr 24 07:22:59 2018 From: matt at openssl.org (Matt Caswell) Date: Tue, 24 Apr 2018 07:22:59 +0000 Subject: [openssl-commits] [web] master update Message-ID: <1524554579.630751.8949.nullmailer@dev.openssl.org> The branch master has been updated via 5f9833f853d1fd6eb25d485b309ae540b09cf796 (commit) from f8a362841bcc696786c5faa1dcfc8d0c274f92e7 (commit) - Log ----------------------------------------------------------------- commit 5f9833f853d1fd6eb25d485b309ae540b09cf796 Author: Matt Caswell Date: Tue Apr 24 08:21:54 2018 +0100 Fix error for CVE-2018-0737 vulnerabilities.xml erroneously did not list 1.0.2a and 1.0.2 as affected. ----------------------------------------------------------------------- Summary of changes: news/vulnerabilities.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/news/vulnerabilities.xml b/news/vulnerabilities.xml index 684eb33..bb13b7f 100644 --- a/news/vulnerabilities.xml +++ b/news/vulnerabilities.xml @@ -20,6 +20,8 @@ + + From matt at openssl.org Tue Apr 24 08:12:06 2018 From: matt at openssl.org (Matt Caswell) Date: Tue, 24 Apr 2018 08:12:06 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524557526.509291.15259.nullmailer@dev.openssl.org> The branch master has been updated via ededc88dd52029e4eb18b845703c8780e2d23c17 (commit) from 7fcdbd839c629f5419a49bf8da28c968c8140c3d (commit) - Log ----------------------------------------------------------------- commit ededc88dd52029e4eb18b845703c8780e2d23c17 Author: Matt Caswell Date: Fri Apr 20 14:12:11 2018 +0100 Improve backwards compat with 1.0.2 for ECDHParameters In 1.0.2 you could configure automatic ecdh params by using the ECDHParameters config directive and setting it to the value "+Automatic" or just "Automatic". This is no longer required in 1.1.0+ but we still recognise the "+Automatic" keyword for backwards compatibility. However we did not recognise just "Automatic" without the leading "+" which is equally valid. This commit fixes that omission. Fixes #4113 Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6035) ----------------------------------------------------------------------- Summary of changes: doc/man3/SSL_CONF_cmd.pod | 4 ---- ssl/ssl_conf.c | 5 +++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/doc/man3/SSL_CONF_cmd.pod b/doc/man3/SSL_CONF_cmd.pod index e3dc42c..4d3e9c2 100644 --- a/doc/man3/SSL_CONF_cmd.pod +++ b/doc/man3/SSL_CONF_cmd.pod @@ -597,10 +597,6 @@ Set supported curves to P-256, P-384: SSL_CONF_cmd(ctx, "Curves", "P-256:P-384"); -Set automatic support for any elliptic curve for key exchange: - - SSL_CONF_cmd(ctx, "ECDHParameters", "Automatic"); - =head1 RETURN VALUES SSL_CONF_cmd() returns 1 if the value of B is recognised and B is diff --git a/ssl/ssl_conf.c b/ssl/ssl_conf.c index 30e43d9..f1e8200 100644 --- a/ssl/ssl_conf.c +++ b/ssl/ssl_conf.c @@ -229,8 +229,9 @@ static int cmd_ECDHParameters(SSL_CONF_CTX *cctx, const char *value) int nid; /* Ignore values supported by 1.0.2 for the automatic selection */ - if ((cctx->flags & SSL_CONF_FLAG_FILE) && - strcasecmp(value, "+automatic") == 0) + if ((cctx->flags & SSL_CONF_FLAG_FILE) + && (strcasecmp(value, "+automatic") == 0 + || strcasecmp(value, "automatic") == 0)) return 1; if ((cctx->flags & SSL_CONF_FLAG_CMDLINE) && strcmp(value, "auto") == 0) From matt at openssl.org Tue Apr 24 08:15:10 2018 From: matt at openssl.org (Matt Caswell) Date: Tue, 24 Apr 2018 08:15:10 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1524557710.622313.16471.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via c5ed6c553a2efe7abf84ceed5fe38769621a3807 (commit) from 2172133d0dc58256bf776da074c0d1944fef15cb (commit) - Log ----------------------------------------------------------------- commit c5ed6c553a2efe7abf84ceed5fe38769621a3807 Author: Matt Caswell Date: Fri Apr 20 14:12:11 2018 +0100 Improve backwards compat with 1.0.2 for ECDHParameters In 1.0.2 you could configure automatic ecdh params by using the ECDHParameters config directive and setting it to the value "+Automatic" or just "Automatic". This is no longer required in 1.1.0+ but we still recognise the "+Automatic" keyword for backwards compatibility. However we did not recognise just "Automatic" without the leading "+" which is equally valid. This commit fixes that omission. Fixes #4113 Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6036) ----------------------------------------------------------------------- Summary of changes: doc/ssl/SSL_CONF_cmd.pod | 4 ---- ssl/ssl_conf.c | 5 +++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/doc/ssl/SSL_CONF_cmd.pod b/doc/ssl/SSL_CONF_cmd.pod index a28e218..12fdcab 100644 --- a/doc/ssl/SSL_CONF_cmd.pod +++ b/doc/ssl/SSL_CONF_cmd.pod @@ -506,10 +506,6 @@ Set supported curves to P-256, P-384: SSL_CONF_cmd(ctx, "Curves", "P-256:P-384"); -Set automatic support for any elliptic curve for key exchange: - - SSL_CONF_cmd(ctx, "ECDHParameters", "Automatic"); - =head1 RETURN VALUES SSL_CONF_cmd() returns 1 if the value of B is recognised and B is diff --git a/ssl/ssl_conf.c b/ssl/ssl_conf.c index 7f89488..9d9309a 100644 --- a/ssl/ssl_conf.c +++ b/ssl/ssl_conf.c @@ -222,8 +222,9 @@ static int cmd_ECDHParameters(SSL_CONF_CTX *cctx, const char *value) int nid; /* Ignore values supported by 1.0.2 for the automatic selection */ - if ((cctx->flags & SSL_CONF_FLAG_FILE) && - strcasecmp(value, "+automatic") == 0) + if ((cctx->flags & SSL_CONF_FLAG_FILE) + && (strcasecmp(value, "+automatic") == 0 + || strcasecmp(value, "automatic") == 0)) return 1; if ((cctx->flags & SSL_CONF_FLAG_CMDLINE) && strcmp(value, "auto") == 0) From matt at openssl.org Tue Apr 24 08:19:05 2018 From: matt at openssl.org (Matt Caswell) Date: Tue, 24 Apr 2018 08:19:05 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524557945.407795.17872.nullmailer@dev.openssl.org> The branch master has been updated via 22eb2d1c80ff511985c0b32a6f4699c3a062311b (commit) from ededc88dd52029e4eb18b845703c8780e2d23c17 (commit) - Log ----------------------------------------------------------------- commit 22eb2d1c80ff511985c0b32a6f4699c3a062311b Author: Matt Caswell Date: Mon Apr 23 09:01:49 2018 +0100 Remove some logically dead code This dead code should have been removed as part of #5874 but got missed. Found by Coverity. Reviewed-by: Rich Salz Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/6049) ----------------------------------------------------------------------- Summary of changes: ssl/statem/statem_lib.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/ssl/statem/statem_lib.c b/ssl/statem/statem_lib.c index 6d0778d..269ba85 100644 --- a/ssl/statem/statem_lib.c +++ b/ssl/statem/statem_lib.c @@ -1073,9 +1073,6 @@ WORK_STATE tls_finish_handshake(SSL *s, WORK_STATE wst, int clearbufs, int stop) &discard, s->session_ctx->lock); } - if (cb != NULL) - cb(s, SSL_CB_HANDSHAKE_DONE, 1); - if (SSL_IS_DTLS(s)) { /* done with handshaking */ s->d1->handshake_read_seq = 0; From matt at openssl.org Tue Apr 24 08:22:24 2018 From: matt at openssl.org (Matt Caswell) Date: Tue, 24 Apr 2018 08:22:24 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1524558144.167433.19189.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via 5791a917ca0b6273c48fb43a442fd156604065de (commit) from c5ed6c553a2efe7abf84ceed5fe38769621a3807 (commit) - Log ----------------------------------------------------------------- commit 5791a917ca0b6273c48fb43a442fd156604065de Author: Matt Caswell Date: Mon Apr 23 09:27:23 2018 +0100 Allow intermediate CAs to use RSA PSS in 1.1.0 In 1.1.0 and above we check the digest algorithm used to create signatures in intermediate CA certs. If it is not sufficiently strong then we reject the cert. To work out what digest was used we look at the OID for the signature. This works for most signatures, but not for RSA PSS where the digest is stored as parameter of the SignatureAlgorithmIdentifier. This results in the digest look up routines failing and the cert being rejected. PR #3301 added support for doing this properly in master. So in that branch this all works as expected. It also works properly in 1.0.2 where we don't have the digest checks at all. So the only branch where this fails is 1.1.0. PR #3301 seems too significant to backport to 1.1.0. Instead we simply skip the signature digest algorithm strength checks if we detect RSA PSS. Fixes #3558. Reviewed-by: Bernd Edlinger (Merged from https://github.com/openssl/openssl/pull/6052) ----------------------------------------------------------------------- Summary of changes: crypto/x509/x509_vfy.c | 4 ++++ ssl/t1_lib.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/crypto/x509/x509_vfy.c b/crypto/x509/x509_vfy.c index b9b36c4..a48d231 100644 --- a/crypto/x509/x509_vfy.c +++ b/crypto/x509/x509_vfy.c @@ -3265,6 +3265,10 @@ static int check_sig_level(X509_STORE_CTX *ctx, X509 *cert) if (level > NUM_AUTH_LEVELS) level = NUM_AUTH_LEVELS; + /* We are not able to look up the CA MD for RSA PSS in this version */ + if (nid == NID_rsassaPss) + return 1; + /* Lookup signature algorithm digest */ if (nid && OBJ_find_sigid_algs(nid, &mdnid, NULL)) { const EVP_MD *md; diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index 6f4078e..cd0cba0 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -4188,6 +4188,9 @@ static int ssl_security_cert_sig(SSL *s, SSL_CTX *ctx, X509 *x, int op) if ((X509_get_extension_flags(x) & EXFLAG_SS) != 0) return 1; sig_nid = X509_get_signature_nid(x); + /* We are not able to look up the CA MD for RSA PSS in this version */ + if (sig_nid == NID_rsassaPss) + return 1; if (sig_nid && OBJ_find_sigid_algs(sig_nid, &md_nid, NULL)) { const EVP_MD *md; if (md_nid && (md = EVP_get_digestbynid(md_nid))) From matt at openssl.org Tue Apr 24 08:24:00 2018 From: matt at openssl.org (Matt Caswell) Date: Tue, 24 Apr 2018 08:24:00 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524558240.993025.20287.nullmailer@dev.openssl.org> The branch master has been updated via 4753ad858c299a34815988907989c98d5285e57e (commit) from 22eb2d1c80ff511985c0b32a6f4699c3a062311b (commit) - Log ----------------------------------------------------------------- commit 4753ad858c299a34815988907989c98d5285e57e Author: Matt Caswell Date: Mon Apr 23 11:23:43 2018 +0100 Document when a session gets removed from cache Document the fact that if a session is not closed down cleanly then the session gets removed from the cache and marked as non-resumable. Fixes #4720 Reviewed-by: Rich Salz Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/6053) ----------------------------------------------------------------------- Summary of changes: doc/man3/SSL_get_session.pod | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/man3/SSL_get_session.pod b/doc/man3/SSL_get_session.pod index b2e92af..7ed6353 100644 --- a/doc/man3/SSL_get_session.pod +++ b/doc/man3/SSL_get_session.pod @@ -48,6 +48,11 @@ SSL_SESSION object that cannot be used for resumption in TLSv1.3. It also enables applications to obtain information about all sessions sent by the server. +A session will be automatically removed from the session cache and marked as +non-resumable if the connection is not closed down cleanly, e.g. if a fatal +error occurs on the connection or L is not called prior to +L. + In TLSv1.3 it is recommended that each SSL_SESSION object is only used for resumption once. From matt at openssl.org Tue Apr 24 08:24:45 2018 From: matt at openssl.org (Matt Caswell) Date: Tue, 24 Apr 2018 08:24:45 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1524558285.965145.21310.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via 0abb903b7618ad404c83ac9b44b2c1bf162b90de (commit) from 5791a917ca0b6273c48fb43a442fd156604065de (commit) - Log ----------------------------------------------------------------- commit 0abb903b7618ad404c83ac9b44b2c1bf162b90de Author: Matt Caswell Date: Mon Apr 23 11:23:43 2018 +0100 Document when a session gets removed from cache Document the fact that if a session is not closed down cleanly then the session gets removed from the cache and marked as non-resumable. Fixes #4720 Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6054) ----------------------------------------------------------------------- Summary of changes: doc/ssl/SSL_get_session.pod | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/ssl/SSL_get_session.pod b/doc/ssl/SSL_get_session.pod index 99936ad..21becff 100644 --- a/doc/ssl/SSL_get_session.pod +++ b/doc/ssl/SSL_get_session.pod @@ -28,6 +28,11 @@ count of the B is incremented by one. The ssl session contains all information required to re-establish the connection without a new handshake. +A session will be automatically removed from the session cache and marked as +non-resumable if the connection is not closed down cleanly, e.g. if a fatal +error occurs on the connection or L is not called prior to +L. + SSL_get0_session() returns a pointer to the actual session. As the reference counter is not incremented, the pointer is only valid while the connection is in use. If L or From matt at openssl.org Tue Apr 24 08:25:17 2018 From: matt at openssl.org (Matt Caswell) Date: Tue, 24 Apr 2018 08:25:17 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_0_2-stable update Message-ID: <1524558317.904219.22301.nullmailer@dev.openssl.org> The branch OpenSSL_1_0_2-stable has been updated via 9668efbcf3b924f23320b58b8f44bbe8b9490e5e (commit) from 279bf3e0a07d6c84043a316ca8494cbc3b51f731 (commit) - Log ----------------------------------------------------------------- commit 9668efbcf3b924f23320b58b8f44bbe8b9490e5e Author: Matt Caswell Date: Mon Apr 23 11:23:43 2018 +0100 Document when a session gets removed from cache Document the fact that if a session is not closed down cleanly then the session gets removed from the cache and marked as non-resumable. Fixes #4720 Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6054) (cherry picked from commit 0abb903b7618ad404c83ac9b44b2c1bf162b90de) ----------------------------------------------------------------------- Summary of changes: doc/ssl/SSL_get_session.pod | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/ssl/SSL_get_session.pod b/doc/ssl/SSL_get_session.pod index 0c41caa..921d316 100644 --- a/doc/ssl/SSL_get_session.pod +++ b/doc/ssl/SSL_get_session.pod @@ -28,6 +28,11 @@ count of the B is incremented by one. The ssl session contains all information required to re-establish the connection without a new handshake. +A session will be automatically removed from the session cache and marked as +non-resumable if the connection is not closed down cleanly, e.g. if a fatal +error occurs on the connection or L is not called prior to +L. + SSL_get0_session() returns a pointer to the actual session. As the reference counter is not incremented, the pointer is only valid while the connection is in use. If L or From matt at openssl.org Tue Apr 24 08:50:41 2018 From: matt at openssl.org (Matt Caswell) Date: Tue, 24 Apr 2018 08:50:41 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524559841.738059.25899.nullmailer@dev.openssl.org> The branch master has been updated via 7500bc337ae61ff370c8e77bb018114d73dfcf18 (commit) from 4753ad858c299a34815988907989c98d5285e57e (commit) - Log ----------------------------------------------------------------- commit 7500bc337ae61ff370c8e77bb018114d73dfcf18 Author: Matt Caswell Date: Mon Apr 23 14:02:23 2018 +0100 Allow TLSv1.3 EC certs to use compressed points The spec does not prohib certs form using compressed points. It only requires that points in a key share are uncompressed. It says nothing about point compression for certs, so we should not fail if a cert uses a compressed point. Fixes #5743 Reviewed-by: Rich Salz Reviewed-by: Bernd Edlinger (Merged from https://github.com/openssl/openssl/pull/6055) ----------------------------------------------------------------------- Summary of changes: ssl/t1_lib.c | 14 +++++++------- test/ssl-tests/20-cert-select.conf | 6 +++++- test/ssl-tests/20-cert-select.conf.in | 6 +++++- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index b698e2b..b777b3a 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -442,8 +442,11 @@ static int tls1_check_pkey_comp(SSL *s, EVP_PKEY *pkey) if (EC_KEY_get_conv_form(ec) == POINT_CONVERSION_UNCOMPRESSED) { comp_id = TLSEXT_ECPOINTFORMAT_uncompressed; } else if (SSL_IS_TLS13(s)) { - /* Compression not allowed in TLS 1.3 */ - return 0; + /* + * ec_point_formats extension is not used in TLSv1.3 so we ignore + * this check. + */ + return 1; } else { int field_type = EC_METHOD_get_field_type(EC_GROUP_method_of(grp)); @@ -2435,7 +2438,7 @@ int tls_choose_sigalg(SSL *s, int fatalerrs) if (SSL_IS_TLS13(s)) { size_t i; #ifndef OPENSSL_NO_EC - int curve = -1, skip_ec = 0; + int curve = -1; #endif /* Look for a certificate matching shared sigalgs */ @@ -2458,11 +2461,8 @@ int tls_choose_sigalg(SSL *s, int fatalerrs) EC_KEY *ec = EVP_PKEY_get0_EC_KEY(s->cert->pkeys[SSL_PKEY_ECC].privatekey); curve = EC_GROUP_get_curve_name(EC_KEY_get0_group(ec)); - if (EC_KEY_get_conv_form(ec) - != POINT_CONVERSION_UNCOMPRESSED) - skip_ec = 1; } - if (skip_ec || (lu->curve != NID_undef && curve != lu->curve)) + if (lu->curve != NID_undef && curve != lu->curve) continue; #else continue; diff --git a/test/ssl-tests/20-cert-select.conf b/test/ssl-tests/20-cert-select.conf index 26da1c0..0a92bf8 100644 --- a/test/ssl-tests/20-cert-select.conf +++ b/test/ssl-tests/20-cert-select.conf @@ -971,7 +971,11 @@ VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem VerifyMode = Peer [test-28] -ExpectedResult = ServerFail +ExpectedResult = Success +ExpectedServerCANames = empty +ExpectedServerCertType = P-256 +ExpectedServerSignHash = SHA256 +ExpectedServerSignType = EC # =========================================================== diff --git a/test/ssl-tests/20-cert-select.conf.in b/test/ssl-tests/20-cert-select.conf.in index 62dfc52..51a158d 100644 --- a/test/ssl-tests/20-cert-select.conf.in +++ b/test/ssl-tests/20-cert-select.conf.in @@ -511,7 +511,11 @@ my @tests_tls_1_3 = ( "SignatureAlgorithms" => "ECDSA+SHA256", }, test => { - "ExpectedResult" => "ServerFail" + "ExpectedServerCertType" => "P-256", + "ExpectedServerSignHash" => "SHA256", + "ExpectedServerSignType" => "EC", + "ExpectedServerCANames" => "empty", + "ExpectedResult" => "Success" }, }, { From matt at openssl.org Tue Apr 24 08:52:45 2018 From: matt at openssl.org (Matt Caswell) Date: Tue, 24 Apr 2018 08:52:45 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524559965.005701.26892.nullmailer@dev.openssl.org> The branch master has been updated via ac98d3860206bd31fd484baf163398bfb41e8595 (commit) from 7500bc337ae61ff370c8e77bb018114d73dfcf18 (commit) - Log ----------------------------------------------------------------- commit ac98d3860206bd31fd484baf163398bfb41e8595 Author: Matt Caswell Date: Mon Apr 23 15:37:03 2018 +0100 Don't build AFALG on android This didn't get built anyway for gcc because it was detected as a cross compile. But it did get built for clang - even though this is still a cross compile build. This disables it in all cases for Android. Fixes #5748 Reviewed-by: Rich Salz Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/6057) ----------------------------------------------------------------------- Summary of changes: Configurations/15-android.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/Configurations/15-android.conf b/Configurations/15-android.conf index d117386..9df4d94 100644 --- a/Configurations/15-android.conf +++ b/Configurations/15-android.conf @@ -132,6 +132,7 @@ my %targets = ( cxxflags => add(sub { android_ndk()->{cflags} }), bn_ops => sub { android_ndk()->{bn_ops} }, bin_cflags => "-pie", + enable => [ ], }, "android-arm" => { ################################################################ From matt at openssl.org Tue Apr 24 08:58:09 2018 From: matt at openssl.org (Matt Caswell) Date: Tue, 24 Apr 2018 08:58:09 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524560289.336144.28441.nullmailer@dev.openssl.org> The branch master has been updated via 6862de63d469f3148a2ff5a04a6b9ab6413bd5ac (commit) via 447cc0ad732858f3ab80b2dc52f15fd045b25363 (commit) from ac98d3860206bd31fd484baf163398bfb41e8595 (commit) - Log ----------------------------------------------------------------- commit 6862de63d469f3148a2ff5a04a6b9ab6413bd5ac Author: Matt Caswell Date: Mon Apr 23 17:40:10 2018 +0100 Add a test to verify the ClientHello version is the same in a reneg Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6059) commit 447cc0ad732858f3ab80b2dc52f15fd045b25363 Author: Matt Caswell Date: Mon Apr 23 17:14:47 2018 +0100 In a reneg use the same client_version we used last time In 1.0.2 and below we always send the same client_version in a reneg ClientHello that we sent the first time around, regardless of what version eventually gets negotiated. According to a comment in statem_clnt.c this is a workaround for some buggy servers that choked if we changed the version used in the RSA encrypted premaster secret. In 1.1.0+ this behaviour no longer occurs. This restores the original behaviour. Fixes #1651 Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6059) ----------------------------------------------------------------------- Summary of changes: ssl/statem/statem_lib.c | 7 +++++++ test/recipes/70-test_renegotiation.t | 30 +++++++++++++++++++++++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/ssl/statem/statem_lib.c b/ssl/statem/statem_lib.c index 269ba85..49b4443 100644 --- a/ssl/statem/statem_lib.c +++ b/ssl/statem/statem_lib.c @@ -2004,6 +2004,13 @@ int ssl_set_client_hello_version(SSL *s) { int ver_min, ver_max, ret; + /* + * In a renegotiation we always send the same client_version that we sent + * last time, regardless of which version we eventually negotiated. + */ + if (!SSL_IS_FIRST_HANDSHAKE(s)) + return 0; + ret = ssl_get_min_max_version(s, &ver_min, &ver_max); if (ret != 0) diff --git a/test/recipes/70-test_renegotiation.t b/test/recipes/70-test_renegotiation.t index 0951487..734f1cd 100644 --- a/test/recipes/70-test_renegotiation.t +++ b/test/recipes/70-test_renegotiation.t @@ -38,7 +38,7 @@ my $proxy = TLSProxy::Proxy->new( $proxy->clientflags("-no_tls1_3"); $proxy->reneg(1); $proxy->start() or plan skip_all => "Unable to start up Proxy for tests"; -plan tests => 2; +plan tests => 3; ok(TLSProxy::Message->success(), "Basic renegotiation"); #Test 2: Client does not send the Reneg SCSV. Reneg should fail @@ -49,6 +49,34 @@ $proxy->reneg(1); $proxy->start(); ok(TLSProxy::Message->fail(), "No client SCSV"); +SKIP: { + skip "TLSv1.2 or TLSv1.1 disabled", 1 + if disabled("tls1_2") || disabled("tls1_1"); + #Test 3: Check that the ClientHello version remains the same in the reneg + # handshake + $proxy->clear(); + $proxy->filter(undef); + $proxy->clientflags("-no_tls1_3"); + $proxy->serverflags("-no_tls1_3 -no_tls1_2"); + $proxy->reneg(1); + $proxy->start(); + my $chversion; + my $chmatch = 0; + foreach my $message (@{$proxy->message_list}) { + if ($message->mt == TLSProxy::Message::MT_CLIENT_HELLO) { + if (!defined $chversion) { + $chversion = $message->client_version; + } else { + if ($chversion == $message->client_version) { + $chmatch = 1; + } + } + } + } + ok(TLSProxy::Message->success() && $chmatch, + "Check ClientHello version is the same"); +} + sub reneg_filter { my $proxy = shift; From matt at openssl.org Tue Apr 24 09:00:26 2018 From: matt at openssl.org (Matt Caswell) Date: Tue, 24 Apr 2018 09:00:26 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1524560426.637423.29526.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via ba2fd95037b9550e3efb4547034951151cc0e273 (commit) from 0abb903b7618ad404c83ac9b44b2c1bf162b90de (commit) - Log ----------------------------------------------------------------- commit ba2fd95037b9550e3efb4547034951151cc0e273 Author: Matt Caswell Date: Mon Apr 23 17:14:47 2018 +0100 In a reneg use the same client_version we used last time In 1.0.2 and below we always send the same client_version in a reneg ClientHello that we sent the first time around, regardless of what version eventually gets negotiated. According to a comment in statem_clnt.c this is a workaround for some buggy servers that choked if we changed the version used in the RSA encrypted premaster secret. In 1.1.0+ this behaviour no longer occurs. This restores the original behaviour. Fixes #1651 Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6060) ----------------------------------------------------------------------- Summary of changes: ssl/ssl_locl.h | 3 +++ ssl/statem/statem_lib.c | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/ssl/ssl_locl.h b/ssl/ssl_locl.h index d86bd7e..85c7549 100644 --- a/ssl/ssl_locl.h +++ b/ssl/ssl_locl.h @@ -347,6 +347,9 @@ /* we have used 0000003f - 26 bits left to go */ +# define SSL_IS_FIRST_HANDSHAKE(S) ((s)->s3->tmp.finish_md_len == 0 \ + || (s)->s3->tmp.peer_finish_md_len == 0) + /* Check if an SSL structure is using DTLS */ # define SSL_IS_DTLS(s) (s->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS) /* See if we need explicit IV */ diff --git a/ssl/statem/statem_lib.c b/ssl/statem/statem_lib.c index 36d410b..c4d4f26 100644 --- a/ssl/statem/statem_lib.c +++ b/ssl/statem/statem_lib.c @@ -1073,6 +1073,13 @@ int ssl_set_client_hello_version(SSL *s) { int ver_min, ver_max, ret; + /* + * In a renegotiation we always send the same client_version that we sent + * last time, regardless of which version we eventually negotiated. + */ + if (!SSL_IS_FIRST_HANDSHAKE(s)) + return 0; + ret = ssl_get_client_min_max_version(s, &ver_min, &ver_max); if (ret != 0) From matthias.st.pierre at ncp-e.com Tue Apr 24 11:49:29 2018 From: matthias.st.pierre at ncp-e.com (matthias.st.pierre at ncp-e.com) Date: Tue, 24 Apr 2018 11:49:29 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524570569.058009.22422.nullmailer@dev.openssl.org> The branch master has been updated via 208056b2ae41e2501f071fa134765349ddb57b3c (commit) from 6862de63d469f3148a2ff5a04a6b9ab6413bd5ac (commit) - Log ----------------------------------------------------------------- commit 208056b2ae41e2501f071fa134765349ddb57b3c Author: Dr. Matthias St. Pierre Date: Tue Apr 24 09:17:09 2018 +0200 x509/by_dir.c: Remove dead code Noticed in #5837 Reviewed-by: Bernd Edlinger Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6064) ----------------------------------------------------------------------- Summary of changes: crypto/x509/by_dir.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/crypto/x509/by_dir.c b/crypto/x509/by_dir.c index f213eec..c883458 100644 --- a/crypto/x509/by_dir.c +++ b/crypto/x509/by_dir.c @@ -385,12 +385,6 @@ static int get_cert_by_subject(X509_LOOKUP *xl, X509_LOOKUP_TYPE type, */ ERR_clear_error(); - /* - * If we were going to up the reference count, we would need to - * do it on a perl 'type' basis - */ - /*- CRYPTO_add(&tmp->data.x509->references,1, - CRYPTO_LOCK_X509);*/ goto finish; } } From no-reply at appveyor.com Tue Apr 24 16:47:24 2018 From: no-reply at appveyor.com (AppVeyor) Date: Tue, 24 Apr 2018 16:47:24 +0000 Subject: [openssl-commits] Build failed: openssl master.17541 Message-ID: <20180424164724.1.9DD118DEC9202675@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Tue Apr 24 17:10:48 2018 From: no-reply at appveyor.com (AppVeyor) Date: Tue, 24 Apr 2018 17:10:48 +0000 Subject: [openssl-commits] Build completed: openssl master.17542 Message-ID: <20180424171048.1.41532584CB7D7133@appveyor.com> An HTML attachment was scrubbed... URL: From rsalz at openssl.org Tue Apr 24 20:49:53 2018 From: rsalz at openssl.org (Rich Salz) Date: Tue, 24 Apr 2018 20:49:53 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524602993.944177.27715.nullmailer@dev.openssl.org> The branch master has been updated via f90bc6c5cb9ca4d97730ff63e6d34fd94047893e (commit) from 208056b2ae41e2501f071fa134765349ddb57b3c (commit) - Log ----------------------------------------------------------------- commit f90bc6c5cb9ca4d97730ff63e6d34fd94047893e Author: Rich Salz Date: Tue Apr 24 12:41:45 2018 -0400 Add missing malloc-return-null instance Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/6071) ----------------------------------------------------------------------- Summary of changes: crypto/err/openssl.txt | 1 + crypto/x509/x509_err.c | 2 ++ crypto/x509/x509_vpm.c | 9 ++++----- include/openssl/x509err.h | 1 + 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/crypto/err/openssl.txt b/crypto/err/openssl.txt index d62968e..1b547ea 100644 --- a/crypto/err/openssl.txt +++ b/crypto/err/openssl.txt @@ -1696,6 +1696,7 @@ X509_F_X509_TO_X509_REQ:126:X509_to_X509_REQ X509_F_X509_TRUST_ADD:133:X509_TRUST_add X509_F_X509_TRUST_SET:141:X509_TRUST_set X509_F_X509_VERIFY_CERT:127:X509_verify_cert +X509_F_X509_VERIFY_PARAM_NEW:159:X509_VERIFY_PARAM_new #Reason codes ASN1_R_ADDING_OBJECT:171:adding object diff --git a/crypto/x509/x509_err.c b/crypto/x509/x509_err.c index 7b9f505..5027df4 100644 --- a/crypto/x509/x509_err.c +++ b/crypto/x509/x509_err.c @@ -103,6 +103,8 @@ static const ERR_STRING_DATA X509_str_functs[] = { {ERR_PACK(ERR_LIB_X509, X509_F_X509_TRUST_ADD, 0), "X509_TRUST_add"}, {ERR_PACK(ERR_LIB_X509, X509_F_X509_TRUST_SET, 0), "X509_TRUST_set"}, {ERR_PACK(ERR_LIB_X509, X509_F_X509_VERIFY_CERT, 0), "X509_verify_cert"}, + {ERR_PACK(ERR_LIB_X509, X509_F_X509_VERIFY_PARAM_NEW, 0), + "X509_VERIFY_PARAM_new"}, {0, NULL} }; diff --git a/crypto/x509/x509_vpm.c b/crypto/x509/x509_vpm.c index 033ec42..fa51990 100644 --- a/crypto/x509/x509_vpm.c +++ b/crypto/x509/x509_vpm.c @@ -84,13 +84,12 @@ X509_VERIFY_PARAM *X509_VERIFY_PARAM_new(void) X509_VERIFY_PARAM *param; param = OPENSSL_zalloc(sizeof(*param)); - if (param == NULL) + if (param == NULL) { + X509err(X509_F_X509_VERIFY_PARAM_NEW, ERR_R_MALLOC_FAILURE); return NULL; + } param->trust = X509_TRUST_DEFAULT; - /* - * param->inh_flags = X509_VP_FLAG_DEFAULT; - */ - param->inh_flags = 0; + /* param->inh_flags = X509_VP_FLAG_DEFAULT; */ param->depth = -1; param->auth_level = -1; /* -1 means unset, 0 is explicit */ return param; diff --git a/include/openssl/x509err.h b/include/openssl/x509err.h index 4faeffa..15a0d75 100644 --- a/include/openssl/x509err.h +++ b/include/openssl/x509err.h @@ -78,6 +78,7 @@ int ERR_load_X509_strings(void); # define X509_F_X509_TRUST_ADD 133 # define X509_F_X509_TRUST_SET 141 # define X509_F_X509_VERIFY_CERT 127 +# define X509_F_X509_VERIFY_PARAM_NEW 159 /* * X509 reason codes. From mark at openssl.org Wed Apr 25 09:07:19 2018 From: mark at openssl.org (Mark J. Cox) Date: Wed, 25 Apr 2018 09:07:19 +0000 Subject: [openssl-commits] [web] master update Message-ID: <1524647239.745907.11170.nullmailer@dev.openssl.org> The branch master has been updated via 56be59c9b561ac2d3183723c35fbc3d530c5bbca (commit) from 5f9833f853d1fd6eb25d485b309ae540b09cf796 (commit) - Log ----------------------------------------------------------------- commit 56be59c9b561ac2d3183723c35fbc3d530c5bbca Author: Mark J. Cox Date: Wed Apr 25 10:06:48 2018 +0100 Move the details of reporting security issues here, that way we can remove the duplication from each vulnerability page and we can add more details about reports we will reject ----------------------------------------------------------------------- Summary of changes: community/index.html | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/community/index.html b/community/index.html index 45c0210..c2bce5c 100644 --- a/community/index.html +++ b/community/index.html @@ -44,11 +44,25 @@ several groups for help with the project infrastructure over time.

-

Reporting Bugs

+

Reporting Security Bugs

+ +

If you think you have found a security bug in OpenSSL, + please send mail to openssl-security at openssl.org. + Encryption is not required, but if you want to encrypt the mail, you can use our + team's PGP Key. Or you can + send mail to one or more individual OMC Members, + encrypted or plaintext. + We will work with you to assess and fix the flaw, + as discussed in our + Security Policy.

+ +

+ All fixed security bugs are listed on our vulnerabilities page +

-

If you think have found a security bug, please see our - vulnerabilities page - for information on how to report it.

+

Reporting Bugs

To report a bug or make an enhancement request, please open an issue on GitHub, by clicking "new issue" on this page: From mark at openssl.org Wed Apr 25 09:11:46 2018 From: mark at openssl.org (Mark J. Cox) Date: Wed, 25 Apr 2018 09:11:46 +0000 Subject: [openssl-commits] [web] master update Message-ID: <1524647506.169050.12322.nullmailer@dev.openssl.org> The branch master has been updated via 9ff40f37a3cdab765451353163477290698248c2 (commit) from 56be59c9b561ac2d3183723c35fbc3d530c5bbca (commit) - Log ----------------------------------------------------------------- commit 9ff40f37a3cdab765451353163477290698248c2 Author: Mark J. Cox Date: Wed Apr 25 10:11:30 2018 +0100 Remove duplicated text and refer to report a security issue section ----------------------------------------------------------------------- Summary of changes: news/vulnerabilities-0.9.6.html | 13 ++----------- news/vulnerabilities-0.9.7.html | 13 ++----------- news/vulnerabilities-0.9.8.html | 13 ++----------- news/vulnerabilities-1.0.0.html | 13 ++----------- news/vulnerabilities-1.0.1.html | 13 ++----------- news/vulnerabilities-1.0.2.html | 13 ++----------- news/vulnerabilities-1.1.0.html | 13 ++----------- news/vulnerabilities.html | 13 ++----------- 8 files changed, 16 insertions(+), 88 deletions(-) diff --git a/news/vulnerabilities-0.9.6.html b/news/vulnerabilities-0.9.6.html index 97932bd..34d4b20 100644 --- a/news/vulnerabilities-0.9.6.html +++ b/news/vulnerabilities-0.9.6.html @@ -12,17 +12,8 @@

Vulnerabilities

- If you think you have found a security bug in OpenSSL, - please send mail to openssl-security at openssl.org. - If you want to encrypt the mail, you can use our - team's PGP Key. Or you can - send mail to one or more individual OMC Members, - encrypted or plaintext. - We will work with you to assess and fix the flaw, - as discussed in our - Security Policy. + If you think you have found a security bug in OpenSSL, + please report it to us.

Note: Support for OpenSSL 0.9.6 ended and is no longer receiving security updates

diff --git a/news/vulnerabilities-0.9.7.html b/news/vulnerabilities-0.9.7.html index fe0e5af..8293333 100644 --- a/news/vulnerabilities-0.9.7.html +++ b/news/vulnerabilities-0.9.7.html @@ -12,17 +12,8 @@

Vulnerabilities

- If you think you have found a security bug in OpenSSL, - please send mail to openssl-security at openssl.org. - If you want to encrypt the mail, you can use our - team's PGP Key. Or you can - send mail to one or more individual OMC Members, - encrypted or plaintext. - We will work with you to assess and fix the flaw, - as discussed in our - Security Policy. + If you think you have found a security bug in OpenSSL, + please report it to us.

Note: Support for OpenSSL 0.9.7 ended and is no longer receiving security updates

diff --git a/news/vulnerabilities-0.9.8.html b/news/vulnerabilities-0.9.8.html index 0cabef2..127624f 100644 --- a/news/vulnerabilities-0.9.8.html +++ b/news/vulnerabilities-0.9.8.html @@ -12,17 +12,8 @@

Vulnerabilities

- If you think you have found a security bug in OpenSSL, - please send mail to openssl-security at openssl.org. - If you want to encrypt the mail, you can use our - team's PGP Key. Or you can - send mail to one or more individual OMC Members, - encrypted or plaintext. - We will work with you to assess and fix the flaw, - as discussed in our - Security Policy. + If you think you have found a security bug in OpenSSL, + please report it to us.

Note: Support for OpenSSL 0.9.8 ended on 31st December 2015 and is no longer receiving security updates

diff --git a/news/vulnerabilities-1.0.0.html b/news/vulnerabilities-1.0.0.html index d40c7cb..f0c375d 100644 --- a/news/vulnerabilities-1.0.0.html +++ b/news/vulnerabilities-1.0.0.html @@ -12,17 +12,8 @@

Vulnerabilities

- If you think you have found a security bug in OpenSSL, - please send mail to openssl-security at openssl.org. - If you want to encrypt the mail, you can use our - team's PGP Key. Or you can - send mail to one or more individual OMC Members, - encrypted or plaintext. - We will work with you to assess and fix the flaw, - as discussed in our - Security Policy. + If you think you have found a security bug in OpenSSL, + please report it to us.

Note: Support for OpenSSL 1.0.0 ended on 31st December 2015 and is no longer receiving security updates

diff --git a/news/vulnerabilities-1.0.1.html b/news/vulnerabilities-1.0.1.html index cceeebd..08302c2 100644 --- a/news/vulnerabilities-1.0.1.html +++ b/news/vulnerabilities-1.0.1.html @@ -12,17 +12,8 @@

Vulnerabilities

- If you think you have found a security bug in OpenSSL, - please send mail to openssl-security at openssl.org. - If you want to encrypt the mail, you can use our - team's PGP Key. Or you can - send mail to one or more individual OMC Members, - encrypted or plaintext. - We will work with you to assess and fix the flaw, - as discussed in our - Security Policy. + If you think you have found a security bug in OpenSSL, + please report it to us.

Note: Support for OpenSSL 1.0.1 ended on 31st December 2016 and is no longer receiving security updates

diff --git a/news/vulnerabilities-1.0.2.html b/news/vulnerabilities-1.0.2.html index 54dd401..0f1ac3b 100644 --- a/news/vulnerabilities-1.0.2.html +++ b/news/vulnerabilities-1.0.2.html @@ -12,17 +12,8 @@

Vulnerabilities

- If you think you have found a security bug in OpenSSL, - please send mail to openssl-security at openssl.org. - If you want to encrypt the mail, you can use our - team's PGP Key. Or you can - send mail to one or more individual OMC Members, - encrypted or plaintext. - We will work with you to assess and fix the flaw, - as discussed in our - Security Policy. + If you think you have found a security bug in OpenSSL, + please report it to us.

diff --git a/news/vulnerabilities-1.1.0.html b/news/vulnerabilities-1.1.0.html index 4a91a3e..15a62de 100644 --- a/news/vulnerabilities-1.1.0.html +++ b/news/vulnerabilities-1.1.0.html @@ -12,17 +12,8 @@

Vulnerabilities

- If you think you have found a security bug in OpenSSL, - please send mail to openssl-security at openssl.org. - If you want to encrypt the mail, you can use our - team's PGP Key. Or you can - send mail to one or more individual OMC Members, - encrypted or plaintext. - We will work with you to assess and fix the flaw, - as discussed in our - Security Policy. + If you think you have found a security bug in OpenSSL, + please report it to us.

diff --git a/news/vulnerabilities.html b/news/vulnerabilities.html index dc73d6f..672b6ec 100644 --- a/news/vulnerabilities.html +++ b/news/vulnerabilities.html @@ -12,17 +12,8 @@

Vulnerabilities

- If you think you have found a security bug in OpenSSL, - please send mail to openssl-security at openssl.org. - If you want to encrypt the mail, you can use our - team's PGP Key. Or you can - send mail to one or more individual OMC Members, - encrypted or plaintext. - We will work with you to assess and fix the flaw, - as discussed in our - Security Policy. + If you think you have found a security bug in OpenSSL, + please report it to us.

From matt at openssl.org Wed Apr 25 09:21:42 2018 From: matt at openssl.org (Matt Caswell) Date: Wed, 25 Apr 2018 09:21:42 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524648102.608685.13629.nullmailer@dev.openssl.org> The branch master has been updated via ca50cd911ca3c9dc9ec8dd956f8eb45557585a98 (commit) from f90bc6c5cb9ca4d97730ff63e6d34fd94047893e (commit) - Log ----------------------------------------------------------------- commit ca50cd911ca3c9dc9ec8dd956f8eb45557585a98 Author: Matt Caswell Date: Tue Apr 24 10:10:39 2018 +0100 Fix the MAX_CURVELIST definition The MAX_CURVELIST macro defines the total number of in-built SSL/TLS curves that we support. However it has not been updated as new curves are added. Fixes #5232 Reviewed-by: Bernd Edlinger (Merged from https://github.com/openssl/openssl/pull/6065) ----------------------------------------------------------------------- Summary of changes: ssl/t1_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index b777b3a..6f4923d 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -366,7 +366,7 @@ int tls1_set_groups(uint16_t **pext, size_t *pextlen, return 1; } -# define MAX_CURVELIST 28 +# define MAX_CURVELIST OSSL_NELEM(nid_list) typedef struct { size_t nidcnt; From matt at openssl.org Wed Apr 25 09:22:50 2018 From: matt at openssl.org (Matt Caswell) Date: Wed, 25 Apr 2018 09:22:50 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1524648170.171929.14633.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via 36ebf15d495d8c10163c04d0fd7348dbc445c609 (commit) from ba2fd95037b9550e3efb4547034951151cc0e273 (commit) - Log ----------------------------------------------------------------- commit 36ebf15d495d8c10163c04d0fd7348dbc445c609 Author: Matt Caswell Date: Tue Apr 24 10:10:39 2018 +0100 Fix the MAX_CURVELIST definition The MAX_CURVELIST macro defines the total number of in-built SSL/TLS curves that we support. However it has not been updated as new curves are added. Fixes #5232 Reviewed-by: Bernd Edlinger (Merged from https://github.com/openssl/openssl/pull/6065) (cherry picked from commit ca50cd911ca3c9dc9ec8dd956f8eb45557585a98) ----------------------------------------------------------------------- Summary of changes: ssl/t1_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index cd0cba0..3dddd9c 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -408,7 +408,7 @@ int tls1_set_curves(unsigned char **pext, size_t *pextlen, return 1; } -# define MAX_CURVELIST 28 +# define MAX_CURVELIST OSSL_NELEM(nid_list) typedef struct { size_t nidcnt; From matt at openssl.org Wed Apr 25 09:29:29 2018 From: matt at openssl.org (Matt Caswell) Date: Wed, 25 Apr 2018 09:29:29 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524648569.664731.16033.nullmailer@dev.openssl.org> The branch master has been updated via 22f0c72b928604cc42c16bf59b9d31f92e4c4be9 (commit) via 67cc2bae02fdcc0d9409861d1e941e72774411ba (commit) from ca50cd911ca3c9dc9ec8dd956f8eb45557585a98 (commit) - Log ----------------------------------------------------------------- commit 22f0c72b928604cc42c16bf59b9d31f92e4c4be9 Author: Nicola Tuveri Date: Tue Apr 10 03:53:01 2018 +0300 [SM2_sign] add minimal EVP_PKEY functionality testing The actual functionality of generating signatures through the `EVP_PKEY` API is completely untested. Current tests under the `EVP_PKEY` API (`test/recipes/30-test_evp_data/evppkey.txt`) only cover `Verify` and `Decrypt`, while encryption and signature generation are tested with ad-hoc clients (`test/sm2crypttest.c`, `test/sm2signtest.c`) that do not call the `EVP_PKEY` interface at all but soon-to-be private functions that bypass it (cf. PR#5895 ). It is my opinion that an ideal solution for the future would consist on enhancing the `test/evp_pkey` facility and syntax to allow tests to take control of the PRNG to inject known nonces and validate the results of `EVP_PKEY` implementations against deterministic known answer tests, but it is probably too late to work on this feature in time for next release. Given that commit b5a85f70d8 highlights some critical bugs in the hook between the `EVP_PKEY` interface and SM2 signature generation and that these defects escaped testing and code review, I think that at least for now it is beneficial to at least add the kind of "bogus" testing provided by this patch: this is a "fake" test as it does only verify that the SM2 `EVP_PKEY` interface is capable of creating a signature without failing, but it does not say anything about the generated signature being valid, nor does it test the functional correctness of the cryptosystem. Reviewed-by: Bernd Edlinger Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/6066) commit 67cc2bae02fdcc0d9409861d1e941e72774411ba Author: Nicola Tuveri Date: Tue Apr 10 03:19:30 2018 +0300 [SM2_sign] fix double free and return value Currently, critical bugs prevent using SM2 signatures through the `EVP_PKEY` interface: any application that managed to satisfy the requirement of forcing SM3 as the message digest ? even if this is currently not possible transparently through the `EVP_PKEY` interface and requires manually forcing the MD selection ? would crash with a segmentation fault upon calling the `SM2_sign()` function. This is easily verified using the OpenSSL CLI to execute this critical code path under the right conditions: `openssl dgst -sm3 -hex -sign sm2.eckey /path/to/file/to/sign` The issue is caused by a double free at the end of `SM2_sign()` in `crypto/sm2/sm2_sign.c` in case of successful signature generation. In addition, even if the double free was not causing segfaults, the function returns the wrong return value in case of success (it would return 0 rather than 1). This patch fixes both problems. Reviewed-by: Bernd Edlinger Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/6066) ----------------------------------------------------------------------- Summary of changes: crypto/sm2/sm2_sign.c | 4 +--- test/recipes/30-test_evp_data/evppkey.txt | 9 +++++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/crypto/sm2/sm2_sign.c b/crypto/sm2/sm2_sign.c index 12ccd28..e12eca1 100644 --- a/crypto/sm2/sm2_sign.c +++ b/crypto/sm2/sm2_sign.c @@ -279,9 +279,7 @@ int SM2_sign(int type, const unsigned char *dgst, int dgstlen, *siglen = i2d_ECDSA_SIG(s, &sig); - ECDSA_SIG_free(s); - - ret = 0; + ret = 1; done: ECDSA_SIG_free(s); diff --git a/test/recipes/30-test_evp_data/evppkey.txt b/test/recipes/30-test_evp_data/evppkey.txt index 00db26d..6b50452 100644 --- a/test/recipes/30-test_evp_data/evppkey.txt +++ b/test/recipes/30-test_evp_data/evppkey.txt @@ -18388,3 +18388,12 @@ Decrypt = SM2_key1 Input = 30818A0220466BE2EF5C11782EC77864A0055417F407A5AFC11D653C6BCE69E417BB1D05B6022062B572E21FF0DDF5C726BD3F9FF2EAE56E6294713A607E9B9525628965F62CC804203C1B5713B5DB2728EB7BF775E44F4689FC32668BDC564F52EA45B09E8DF2A5F40422084A9D0CC2997092B7D3C404FCE95956EB604D732B2307A8E5B8900ED6608CA5B197 Output = "The floofy bunnies hop at midnight" +# This is a "fake" test as it does only verify that the SM2 EVP_PKEY interface +# is capable of creating a signature without failing, but it does not say +# anything about the generated signature being valid, nor does it test the +# correct implementation of the cryptosystem. +Sign = SM2_key1 +Ctrl = digest:SM3 +Input = D7AD397F6FFA5D4F7F11E7217F241607DC30618C236D2C09C1B9EA8FDADEE2E8 +Output = 3045022100f11bf36e75bb304f094fb42a4ca22377d0cc768637c5011cd59fb9ed4b130c98022035545ffe2c2efb3abee4fee661468946d886004fae8ea5311593e48f7fe21b91 +Result = KEYOP_MISMATCH From no-reply at appveyor.com Wed Apr 25 09:30:23 2018 From: no-reply at appveyor.com (AppVeyor) Date: Wed, 25 Apr 2018 09:30:23 +0000 Subject: [openssl-commits] Build failed: openssl master.17552 Message-ID: <20180425093023.1.A31AC562FDD67D52@appveyor.com> An HTML attachment was scrubbed... URL: From mark at openssl.org Wed Apr 25 09:44:24 2018 From: mark at openssl.org (Mark J. Cox) Date: Wed, 25 Apr 2018 09:44:24 +0000 Subject: [openssl-commits] [web] master update Message-ID: <1524649464.971003.18412.nullmailer@dev.openssl.org> The branch master has been updated via 0a533713bb32d0e21b2a44d0ebdf666988db4ee6 (commit) from 9ff40f37a3cdab765451353163477290698248c2 (commit) - Log ----------------------------------------------------------------- commit 0a533713bb32d0e21b2a44d0ebdf666988db4ee6 Author: Mark J. Cox Date: Wed Apr 25 10:43:04 2018 +0100 Note the questions we get asked frequently about bug bounties and lack of a SPF record. We could add more here for the other frequently reported issues (like an open ftp server, open directory listings etc) ----------------------------------------------------------------------- Summary of changes: community/index.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/community/index.html b/community/index.html index c2bce5c..06e5861 100644 --- a/community/index.html +++ b/community/index.html @@ -59,6 +59,14 @@ Security Policy.

+ Please note that we do not run a Bug Bounty program, although third parties + may reward confirmed security issues reported in the OpenSSL codebase. We + do not consider + the lack + of SPF records for openssl.org a security issue. +

+ +

All fixed security bugs are listed on our vulnerabilities page

From levitte at openssl.org Wed Apr 25 09:44:46 2018 From: levitte at openssl.org (Richard Levitte) Date: Wed, 25 Apr 2018 09:44:46 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524649486.996286.18937.nullmailer@dev.openssl.org> The branch master has been updated via 4522e130c87c341342c640bba970f4b89755f1cb (commit) via c36e9093914aab4bfc42af1db35558a9272607b5 (commit) via 96de2e590bad00575baa7c2c6be5767b43aa017c (commit) via b47b6650164711de449a7738112a3efb733213e2 (commit) via b9a354d08810e95c03dec1f796fdd4069a4001e7 (commit) via 39e32be1ccc527036e0a52c3cf64a40faf28ab9d (commit) from 22f0c72b928604cc42c16bf59b9d31f92e4c4be9 (commit) - Log ----------------------------------------------------------------- commit 4522e130c87c341342c640bba970f4b89755f1cb Author: Richard Levitte Date: Tue Apr 24 14:31:32 2018 +0200 apps/opt.c: Remove the access checks of input and output files open() will take care of the checks anyway Reviewed-by: Andy Polyakov (Merged from https://github.com/openssl/openssl/pull/6033) commit c36e9093914aab4bfc42af1db35558a9272607b5 Author: Richard Levitte Date: Fri Apr 20 12:27:14 2018 +0200 Better check of return values from app_isdir and app_access [extended tests] Reviewed-by: Andy Polyakov (Merged from https://github.com/openssl/openssl/pull/6033) commit 96de2e590bad00575baa7c2c6be5767b43aa017c Author: Richard Levitte Date: Fri Apr 20 12:22:45 2018 +0200 Revert "Check directory is able to create files for various -out option" This reverts commit 555c94a0db9661428da0a45cb32b9f002324eefd. Reviewed-by: Andy Polyakov (Merged from https://github.com/openssl/openssl/pull/6033) commit b47b6650164711de449a7738112a3efb733213e2 Author: Richard Levitte Date: Fri Apr 20 12:22:36 2018 +0200 Revert "Add VMS version of app_dirname()" This reverts commit 215a6730f1eaf53b01a4eb10d75bd09fd74f70cc. Reviewed-by: Andy Polyakov (Merged from https://github.com/openssl/openssl/pull/6033) commit b9a354d08810e95c03dec1f796fdd4069a4001e7 Author: Richard Levitte Date: Fri Apr 20 12:22:27 2018 +0200 Revert "Check on VMS as well" This reverts commit f6d765988f37c43edb1056ab83165f2569182e9d. Reviewed-by: Andy Polyakov (Merged from https://github.com/openssl/openssl/pull/6033) commit 39e32be1ccc527036e0a52c3cf64a40faf28ab9d Author: Richard Levitte Date: Fri Apr 20 08:36:18 2018 +0200 test/recipes/15-test_out_option.t: refine tests Test writing to the null device. This should be successful. Also, refactor so the planned number of tests is calculated. Reviewed-by: Andy Polyakov (Merged from https://github.com/openssl/openssl/pull/6033) ----------------------------------------------------------------------- Summary of changes: apps/apps.c | 116 -------------------------------------- apps/apps.h | 1 - apps/opt.c | 47 +-------------- test/recipes/15-test_out_option.t | 71 ++++++++++++----------- 4 files changed, 40 insertions(+), 195 deletions(-) diff --git a/apps/apps.c b/apps/apps.c index 6ae8523..b35ea56 100644 --- a/apps/apps.c +++ b/apps/apps.c @@ -25,12 +25,6 @@ #endif #include #include -#ifdef __VMS -# include -# include -# include -# include -#endif #include #include #include @@ -2370,116 +2364,6 @@ int app_isdir(const char *name) } #endif -/* app_dirname section */ - -/* - * This exactly follows what POSIX's - * dirname does, but is implemented - * in a more platform independent way. - * - * path dirname - * /usr/lib /usr - * /usr/ / - * usr . - * / / - * . . - * .. . - * "" . - * - * Note: this function also keeps the - * possibility of modifying the 'path' - * string same as POSIX dirname. - */ -static char *posix_dirname(char *path) -{ - size_t l; - char *ret = "."; - - l = strlen(path); - if (l == 0) - goto out; - if (strcmp(path, ".") == 0) - goto out; - if (strcmp(path, "..") == 0) - goto out; - if (strcmp(path, "/") == 0) { - ret = "/"; - goto out; - } - if (path[l - 1] == '/') { - /* /usr/ */ - path[l - 1] = '\0'; - } - if ((ret = strrchr(path, '/')) == NULL) { - /* usr */ - ret = "."; - } else if (ret == path) { - /* /usr */ - *++ret = '\0'; - ret = path; - } else { - /* /usr/lib */ - *ret = '\0'; - ret = path; - } - out: - return ret; -} - -/* - * TODO: implement app_dirname for Windows. - */ -#if !defined(_WIN32) -char *app_dirname(char *path) -{ - return posix_dirname(path); -} -#elif defined(__VMS) -/* - * sys$filescan fills the given item list with pointers into the original - * path string, so all we need to do is to find the file name and simply - * put a NUL byte wherever the FSCN$_NAME pointer points. If there is no - * file name part and the path string isn't the empty string, we know for - * a fact that the whole string is a directory spec and return it as is. - * Otherwise or if that pointer is the starting address of the original - * path string, we know to return "sys$disk:[]", which corresponds to the - * Unixly ".". - * - * If sys$filescan returns an error status, we know that this is not - * parsable as a VMS file spec, and then use the fallback, in case we - * have a Unix type path. - */ -char *app_dirname(char *path) -{ - char *ret = "sys$disk:[]"; - struct dsc$descriptor_s dsc_path = { 0 }; - ile2 itemlist[] = { - {0, FSCN$_NAME, 0}, - {0, 0, 0} - }; - int fields; - int status; - - dsc_path.dsc$a_pointer = path; - dsc_path.dsc$w_length = strlen(path); - status = sys$filescan(&dsc_path, itemlist, &fields, 0, 0); - - if (!(status & 1)) - return posix_dirname(path); - - if ((fields & (1 << FSCN$_NAME)) == 0) { - if (dsc_path.dsc$w_length != 0) - ret = path; - } else if (itemlist[0].ile2$ps_bufaddr != path) { - if (itemlist[0].ile2$ps_bufaddr != path) { - *itemlist[0].ile2$ps_bufaddr = '\0'; - ret = path; - } - } - return ret; -} -#endif - /* raw_read|write section */ #if defined(__VMS) # include "vms_term_sock.h" diff --git a/apps/apps.h b/apps/apps.h index 4d4aae7..b45a31a 100644 --- a/apps/apps.h +++ b/apps/apps.h @@ -611,7 +611,6 @@ void store_setup_crl_download(X509_STORE *st); int app_isdir(const char *); int app_access(const char *, int flag); -char *app_dirname(char *path); int fileno_stdin(void); int fileno_stdout(void); int raw_read_stdin(void *, int); diff --git a/apps/opt.c b/apps/opt.c index 9025636..cc14184 100644 --- a/apps/opt.c +++ b/apps/opt.c @@ -613,17 +613,13 @@ int opt_verify(int opt, X509_VERIFY_PARAM *vpm) */ int opt_next(void) { - char *p, *estr; + char *p; const OPTIONS *o; int ival; long lval; unsigned long ulval; ossl_intmax_t imval; ossl_uintmax_t umval; -#if !defined(_WIN32) - char *c; - int oerrno; -#endif /* Look at current arg; at end of the list? */ arg = NULL; @@ -686,47 +682,10 @@ int opt_next(void) return -1; case '<': /* Input file. */ - if (strcmp(arg, "-") == 0 || app_access(arg, R_OK) == 0) - break; - BIO_printf(bio_err, - "%s: Cannot open input file %s, %s\n", - prog, arg, strerror(errno)); - return -1; + break; case '>': /* Output file. */ -#if !defined(_WIN32) - c = OPENSSL_strdup(arg); - if (c == NULL) { - BIO_printf(bio_err, - "%s: Memory allocation failure\n", prog); - return -1; - } - oerrno = errno; - errno = 0; - if (strcmp(arg, "-") == 0 - || (app_access(app_dirname(c), W_OK) == 0 - && app_isdir(arg) <= 0 - && (app_access(arg, W_OK) == 0 || errno == ENOENT))) { - OPENSSL_free(c); - break; - } - OPENSSL_free(c); - if (errno == 0) - /* only possible if 'arg' is a directory */ - estr = "is a directory"; - else - estr = strerror(errno); - errno = oerrno; -#else - if (strcmp(arg, "-") == 0 || app_access(arg, W_OK) == 0 - || errno == ENOENT) - break; - estr = strerror(errno); -#endif - BIO_printf(bio_err, - "%s: Cannot open output file %s, %s\n", - prog, arg, estr); - return -1; + break; case 'p': case 'n': if (!opt_int(arg, &ival) diff --git a/test/recipes/15-test_out_option.t b/test/recipes/15-test_out_option.t index f50001d..e1129cc 100644 --- a/test/recipes/15-test_out_option.t +++ b/test/recipes/15-test_out_option.t @@ -16,46 +16,49 @@ use OpenSSL::Test::Utils; setup("test_out_option"); -plan skip_all => "'-out' option tests are not available on Windows" - if $^O eq 'MSWin32'; - -plan tests => 11; - -# The following patterns should be tested: -# -# path dirname -# /usr/ / -# / / -# . . -# .. . - -test_illegal_path('/usr/'); -test_illegal_path('/'); -test_illegal_path('./'); -test_illegal_path('../'); +# Paths that should generate failure when trying to write to them. +# Directories are a safe bet for failure on all platforms. +# Note that directories must end with a slash here, because of how +# File::Spec massages them into directory specs on some platforms. +my @failure_paths = ( + './', + ); +my @success_paths = ( + 'randomname.bin' + ); # Test for trying to create a file in a non-exist directory -my @chars = ("A".."Z", "a".."z", "0".."9"); my $rand_path = ""; -$rand_path .= $chars[rand @chars] for 1..32; -$rand_path .= "/test.pem"; +do { + my @chars = ("A".."Z", "a".."z", "0".."9"); + $rand_path .= $chars[rand @chars] for 1..32; +} while (-d File::Spec->catdir('.', $rand_path)); +$rand_path .= "/randomname.bin"; -test_illegal_path($rand_path); -test_legal_path('test.pem'); -unlink 'test.pem'; +push @failure_paths, $rand_path; -sub test_illegal_path { - my $path = File::Spec->canonpath($_[0]); - - my $start = time(); - ok(!run(app([ 'openssl', 'genrsa', '-out', $path, '16384'])), "invalid output path: $path"); - my $end = time(); - # The above process should exit in 2 seconds if the path is not valid - ok($end - $start < 2, "check time consumed"); +# All explicit cross compilations run a risk of failing this, because the +# null device provided by perl might not match what the cross compiled +# application expects to see as a null device. Therefore, we skip the check +# of outputing to the null device if the cross compile prefix is set. +if ((config('CROSS_COMPILE') // '') eq '') { + # Check that we can write to the NULL device + push @success_paths, File::Spec->devnull(); } -sub test_legal_path { - my $path = File::Spec->canonpath($_[0]); +plan tests => scalar @failure_paths + scalar @success_paths; + +foreach (@failure_paths) { + my $path = File::Spec->canonpath($_); + ok(!run(app([ 'openssl', 'rand', '-out', $path, '1'])), + "invalid output path: $path"); +} +foreach (@success_paths) { + my $path = File::Spec->canonpath($_); + ok(run(app([ 'openssl', 'rand', '-out', $path, '1'])), + "valid output path: $path"); +} - ok(run(app([ 'openssl', 'genrsa', '-out', $path, '2048'])), "valid output path: $path"); +END { + unlink 'randomname.bin' if -f 'randomname.bin'; } From mark at openssl.org Wed Apr 25 09:45:27 2018 From: mark at openssl.org (Mark J. Cox) Date: Wed, 25 Apr 2018 09:45:27 +0000 Subject: [openssl-commits] [web] master update Message-ID: <1524649527.050531.19750.nullmailer@dev.openssl.org> The branch master has been updated via f6eb108b46978392e0f3187af1b24ece5fc2cdda (commit) from 0a533713bb32d0e21b2a44d0ebdf666988db4ee6 (commit) - Log ----------------------------------------------------------------- commit f6eb108b46978392e0f3187af1b24ece5fc2cdda Author: Mark J. Cox Date: Wed Apr 25 10:44:57 2018 +0100 Fix emacs autowrap I didn't notice ----------------------------------------------------------------------- Summary of changes: community/index.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/community/index.html b/community/index.html index 06e5861..82ea6bb 100644 --- a/community/index.html +++ b/community/index.html @@ -62,8 +62,7 @@ Please note that we do not run a Bug Bounty program, although third parties may reward confirmed security issues reported in the OpenSSL codebase. We do not consider - the lack - of SPF records for openssl.org a security issue. + the lack of SPF records for openssl.org a security issue.

From matt at openssl.org Wed Apr 25 09:52:44 2018 From: matt at openssl.org (Matt Caswell) Date: Wed, 25 Apr 2018 09:52:44 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524649964.819978.21176.nullmailer@dev.openssl.org> The branch master has been updated via bdb59d97a6a92498926ad8b3d5e166258339b447 (commit) from 4522e130c87c341342c640bba970f4b89755f1cb (commit) - Log ----------------------------------------------------------------- commit bdb59d97a6a92498926ad8b3d5e166258339b447 Author: Matt Caswell Date: Tue Apr 24 10:27:32 2018 +0100 Fix documentation for the -showcerts s_client option This option shows the certificates as sent by the server. It is not the full verified chain. Fixes #4933 Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6067) ----------------------------------------------------------------------- Summary of changes: apps/s_client.c | 3 ++- doc/man1/s_client.pod | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/apps/s_client.c b/apps/s_client.c index 89cddb3..9d463f6 100644 --- a/apps/s_client.c +++ b/apps/s_client.c @@ -637,7 +637,8 @@ const OPTIONS s_client_options[] = { "Disable name checks when matching DANE-EE(3) TLSA records"}, {"reconnect", OPT_RECONNECT, '-', "Drop and re-make the connection with the same Session-ID"}, - {"showcerts", OPT_SHOWCERTS, '-', "Show all certificates in the chain"}, + {"showcerts", OPT_SHOWCERTS, '-', + "Show all certificates sent by the server"}, {"debug", OPT_DEBUG, '-', "Extra output"}, {"msg", OPT_MSG, '-', "Show protocol messages"}, {"msgfile", OPT_MSGFILE, '>', diff --git a/doc/man1/s_client.pod b/doc/man1/s_client.pod index a06d3a6..5d33e1c 100644 --- a/doc/man1/s_client.pod +++ b/doc/man1/s_client.pod @@ -333,8 +333,9 @@ be used as a test that session caching is working. =item B<-showcerts> -Display the whole server certificate chain: normally only the server -certificate itself is displayed. +Displays the server certificate list as sent by the server: it only consists of +certificates the server has sent (in the order the server has sent them). It is +B a verified chain. =item B<-prexit> @@ -695,7 +696,8 @@ a client certificate. Therefor merely including a client certificate on the command line is no guarantee that the certificate works. If there are problems verifying a server certificate then the -B<-showcerts> option can be used to show the whole chain. +B<-showcerts> option can be used to show all the certificates sent by the +server. The B utility is a test tool and is designed to continue the handshake after any certificate verification errors. As a result it will From matt at openssl.org Wed Apr 25 09:54:24 2018 From: matt at openssl.org (Matt Caswell) Date: Wed, 25 Apr 2018 09:54:24 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1524650064.439740.22417.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via fd749e2a0fde493216e0fd2896643badd0d875fe (commit) from 36ebf15d495d8c10163c04d0fd7348dbc445c609 (commit) - Log ----------------------------------------------------------------- commit fd749e2a0fde493216e0fd2896643badd0d875fe Author: Matt Caswell Date: Tue Apr 24 10:27:32 2018 +0100 Fix documentation for the -showcerts s_client option This option shows the certificates as sent by the server. It is not the full verified chain. Fixes #4933 Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6068) ----------------------------------------------------------------------- Summary of changes: apps/s_client.c | 3 ++- doc/apps/s_client.pod | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/apps/s_client.c b/apps/s_client.c index fb89f0c..81669d0 100644 --- a/apps/s_client.c +++ b/apps/s_client.c @@ -593,7 +593,8 @@ OPTIONS s_client_options[] = { "Disable name checks when matching DANE-EE(3) TLSA records"}, {"reconnect", OPT_RECONNECT, '-', "Drop and re-make the connection with the same Session-ID"}, - {"showcerts", OPT_SHOWCERTS, '-', "Show all certificates in the chain"}, + {"showcerts", OPT_SHOWCERTS, '-', + "Show all certificates sent by the server"}, {"debug", OPT_DEBUG, '-', "Extra output"}, {"msg", OPT_MSG, '-', "Show protocol messages"}, {"msgfile", OPT_MSGFILE, '>', diff --git a/doc/apps/s_client.pod b/doc/apps/s_client.pod index 01a6c5f..9f6c7ec 100644 --- a/doc/apps/s_client.pod +++ b/doc/apps/s_client.pod @@ -281,8 +281,9 @@ be used as a test that session caching is working. =item B<-showcerts> -display the whole server certificate chain: normally only the server -certificate itself is displayed. +Displays the server certificate list as sent by the server: it only consists of +certificates the server has sent (in the order the server has sent them). It is +B a verified chain. =item B<-prexit> @@ -579,7 +580,8 @@ a client certificate. Therefor merely including a client certificate on the command line is no guarantee that the certificate works. If there are problems verifying a server certificate then the -B<-showcerts> option can be used to show the whole chain. +B<-showcerts> option can be used to show all the certificates sent by the +server. The B utility is a test tool and is designed to continue the handshake after any certificate verification errors. As a result it will From matt at openssl.org Wed Apr 25 09:56:12 2018 From: matt at openssl.org (Matt Caswell) Date: Wed, 25 Apr 2018 09:56:12 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_0_2-stable update Message-ID: <1524650172.393851.23716.nullmailer@dev.openssl.org> The branch OpenSSL_1_0_2-stable has been updated via e77017b39c60ddbb4775e6b0d45a81fe7128caf7 (commit) from 9668efbcf3b924f23320b58b8f44bbe8b9490e5e (commit) - Log ----------------------------------------------------------------- commit e77017b39c60ddbb4775e6b0d45a81fe7128caf7 Author: Matt Caswell Date: Tue Apr 24 10:27:32 2018 +0100 Fix documentation for the -showcerts s_client option This option shows the certificates as sent by the server. It is not the full verified chain. Fixes #4933 Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6069) ----------------------------------------------------------------------- Summary of changes: apps/s_client.c | 2 +- doc/apps/s_client.pod | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/s_client.c b/apps/s_client.c index c855668..9b09672 100644 --- a/apps/s_client.c +++ b/apps/s_client.c @@ -337,7 +337,7 @@ static void sc_usage(void) BIO_printf(bio_err, " -prexit - print session information even on connection failure\n"); BIO_printf(bio_err, - " -showcerts - show all certificates in the chain\n"); + " -showcerts - Show all certificates sent by the server\n"); BIO_printf(bio_err, " -debug - extra output\n"); #ifdef WATT32 BIO_printf(bio_err, " -wdebug - WATT-32 tcp debugging\n"); diff --git a/doc/apps/s_client.pod b/doc/apps/s_client.pod index d2cad29..77cc071 100644 --- a/doc/apps/s_client.pod +++ b/doc/apps/s_client.pod @@ -141,8 +141,9 @@ pauses 1 second between each read and write call. =item B<-showcerts> -display the whole server certificate chain: normally only the server -certificate itself is displayed. +Displays the server certificate list as sent by the server: it only consists of +certificates the server has sent (in the order the server has sent them). It is +B a verified chain. =item B<-prexit> @@ -354,7 +355,8 @@ a client certificate. Therefor merely including a client certificate on the command line is no guarantee that the certificate works. If there are problems verifying a server certificate then the -B<-showcerts> option can be used to show the whole chain. +B<-showcerts> option can be used to show all the certificates sent by the +server. Since the SSLv23 client hello cannot include compression methods or extensions these will only be supported if its use is disabled, for example by using the From levitte at openssl.org Wed Apr 25 12:08:42 2018 From: levitte at openssl.org (Richard Levitte) Date: Wed, 25 Apr 2018 12:08:42 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524658122.186491.8529.nullmailer@dev.openssl.org> The branch master has been updated via 3625f6c977beccd7bb0d80a1a670c19f4338a27a (commit) from bdb59d97a6a92498926ad8b3d5e166258339b447 (commit) - Log ----------------------------------------------------------------- commit 3625f6c977beccd7bb0d80a1a670c19f4338a27a Author: Richard Levitte Date: Wed Apr 25 13:01:39 2018 +0200 ms/uplink-x86.pl: close the file handle that was opened Fixes #5656 Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/6079) ----------------------------------------------------------------------- Summary of changes: ms/uplink-x86.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ms/uplink-x86.pl b/ms/uplink-x86.pl index 440bf7d..c298bdc 100755 --- a/ms/uplink-x86.pl +++ b/ms/uplink-x86.pl @@ -41,4 +41,4 @@ for ($i=1;$i<=$N;$i++) { } &asm_finish(); -close OUTPUT; +close STDOUT; From levitte at openssl.org Wed Apr 25 12:10:05 2018 From: levitte at openssl.org (Richard Levitte) Date: Wed, 25 Apr 2018 12:10:05 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1524658205.328871.9674.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via a08116c0d6b53bc7c23e3929d48a03d03f60e2fb (commit) from fd749e2a0fde493216e0fd2896643badd0d875fe (commit) - Log ----------------------------------------------------------------- commit a08116c0d6b53bc7c23e3929d48a03d03f60e2fb Author: Richard Levitte Date: Wed Apr 25 13:01:39 2018 +0200 ms/uplink-x86.pl: close the file handle that was opened Fixes #5656 Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/6079) (cherry picked from commit 3625f6c977beccd7bb0d80a1a670c19f4338a27a) ----------------------------------------------------------------------- Summary of changes: ms/uplink-x86.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ms/uplink-x86.pl b/ms/uplink-x86.pl index e25668e..17484f6 100755 --- a/ms/uplink-x86.pl +++ b/ms/uplink-x86.pl @@ -41,4 +41,4 @@ for ($i=1;$i<=$N;$i++) { } &asm_finish(); -close OUTPUT; +close STDOUT; From mark at openssl.org Wed Apr 25 14:24:14 2018 From: mark at openssl.org (Mark J. Cox) Date: Wed, 25 Apr 2018 14:24:14 +0000 Subject: [openssl-commits] [web] master update Message-ID: <1524666254.445126.27738.nullmailer@dev.openssl.org> The branch master has been updated via 0e6239e71a69d99c0e7c2bd88ffd0bfa80b2b395 (commit) from f6eb108b46978392e0f3187af1b24ece5fc2cdda (commit) - Log ----------------------------------------------------------------- commit 0e6239e71a69d99c0e7c2bd88ffd0bfa80b2b395 Author: Mark J. Cox Date: Wed Apr 25 15:23:27 2018 +0100 Update the URL to save having to click through twice to the new location; this is a trivial change for which we do not need to vote on a policy change or update the policy change date. ----------------------------------------------------------------------- Summary of changes: policies/secpolicy.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/policies/secpolicy.html b/policies/secpolicy.html index 24b7b25..7af2965 100644 --- a/policies/secpolicy.html +++ b/policies/secpolicy.html @@ -21,7 +21,7 @@

If you wish to report a possible security issue in OpenSSL - please notify us. + please notify us.

Issue triage

From mark at openssl.org Wed Apr 25 14:27:06 2018 From: mark at openssl.org (Mark J. Cox) Date: Wed, 25 Apr 2018 14:27:06 +0000 Subject: [openssl-commits] [web] master update Message-ID: <1524666426.450223.28408.nullmailer@dev.openssl.org> The branch master has been updated via 7d8bb2e70f7b294ba633eb550626fe2ae11c9055 (commit) from 0e6239e71a69d99c0e7c2bd88ffd0bfa80b2b395 (commit) - Log ----------------------------------------------------------------- commit 7d8bb2e70f7b294ba633eb550626fe2ae11c9055 Author: Mark J. Cox Date: Wed Apr 25 15:26:35 2018 +0100 What we probably meant to do here is create anchors, so let's do that ----------------------------------------------------------------------- Summary of changes: community/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/community/index.html b/community/index.html index 82ea6bb..82374b6 100644 --- a/community/index.html +++ b/community/index.html @@ -44,7 +44,7 @@ several groups for help with the project infrastructure over time.

-

Reporting Security Bugs

+

Reporting Security Bugs

If you think you have found a security bug in OpenSSL, please send mail to vulnerabilities page

-

Reporting Bugs

+

Reporting Bugs

To report a bug or make an enhancement request, please open an issue on GitHub, by clicking "new issue" on this page: From levitte at openssl.org Wed Apr 25 19:48:19 2018 From: levitte at openssl.org (Richard Levitte) Date: Wed, 25 Apr 2018 19:48:19 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524685699.323470.29053.nullmailer@dev.openssl.org> The branch master has been updated via e6a833cb97ed762408b57ea3efa83bd10c1d2a78 (commit) from 3625f6c977beccd7bb0d80a1a670c19f4338a27a (commit) - Log ----------------------------------------------------------------- commit e6a833cb97ed762408b57ea3efa83bd10c1d2a78 Author: Richard Levitte Date: Wed Apr 25 19:59:36 2018 +0200 openssl rehash: exit 0 on warnings, same as c_rehash Fixes #6083 Reviewed-by: Rich Salz Reviewed-by: Matthias St. Pierre (Merged from https://github.com/openssl/openssl/pull/6084) ----------------------------------------------------------------------- Summary of changes: apps/rehash.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/apps/rehash.c b/apps/rehash.c index 2b6167f..521bf61 100644 --- a/apps/rehash.c +++ b/apps/rehash.c @@ -126,9 +126,10 @@ static int add_entry(enum Type type, unsigned int hash, const char *filename, for (ep = bp->first_entry; ep; ep = ep->next) { if (digest && memcmp(digest, ep->digest, evpmdsize) == 0) { BIO_printf(bio_err, - "%s: skipping duplicate %s in %s\n", opt_getprog(), + "%s: warning: skipping duplicate %s in %s\n", + opt_getprog(), type == TYPE_CERT ? "certificate" : "CRL", filename); - return 1; + return 0; } if (strcmp(filename, ep->filename) == 0) { found = ep; @@ -140,7 +141,7 @@ static int add_entry(enum Type type, unsigned int hash, const char *filename, if (ep == NULL) { if (bp->num_needed >= MAX_COLLISIONS) { BIO_printf(bio_err, - "%s: hash table overflow for %s\n", + "%s: error: hash table overflow for %s\n", opt_getprog(), filename); return 1; } @@ -231,7 +232,7 @@ static int do_file(const char *filename, const char *fullpath, enum Hash h) /* Does it have X.509 data in it? */ if ((b = BIO_new_file(fullpath, "r")) == NULL) { - BIO_printf(bio_err, "%s: skipping %s, cannot open file\n", + BIO_printf(bio_err, "%s: error: skipping %s, cannot open file\n", opt_getprog(), filename); errs++; goto end; @@ -243,7 +244,7 @@ static int do_file(const char *filename, const char *fullpath, enum Hash h) if (sk_X509_INFO_num(inf) != 1) { BIO_printf(bio_err, - "%s: skipping %s," + "%s: warning: skipping %s," "it does not contain exactly one certificate or CRL\n", opt_getprog(), filename); /* This is not an error. */ From levitte at openssl.org Wed Apr 25 21:05:36 2018 From: levitte at openssl.org (Richard Levitte) Date: Wed, 25 Apr 2018 21:05:36 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1524690336.876678.4939.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via 00937429502a160fbb96a47a47e6a0a7f7a6e9ca (commit) from a08116c0d6b53bc7c23e3929d48a03d03f60e2fb (commit) - Log ----------------------------------------------------------------- commit 00937429502a160fbb96a47a47e6a0a7f7a6e9ca Author: Richard Levitte Date: Wed Apr 25 19:59:36 2018 +0200 openssl rehash: exit 0 on warnings, same as c_rehash Fixes #6083 Reviewed-by: Rich Salz Reviewed-by: Matthias St. Pierre (Merged from https://github.com/openssl/openssl/pull/6084) (cherry picked from commit e6a833cb97ed762408b57ea3efa83bd10c1d2a78) ----------------------------------------------------------------------- Summary of changes: apps/rehash.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/apps/rehash.c b/apps/rehash.c index 19e24d9..d581c47 100644 --- a/apps/rehash.c +++ b/apps/rehash.c @@ -130,9 +130,10 @@ static int add_entry(enum Type type, unsigned int hash, const char *filename, for (ep = bp->first_entry; ep; ep = ep->next) { if (digest && memcmp(digest, ep->digest, evpmdsize) == 0) { BIO_printf(bio_err, - "%s: skipping duplicate %s in %s\n", opt_getprog(), + "%s: warning: skipping duplicate %s in %s\n", + opt_getprog(), type == TYPE_CERT ? "certificate" : "CRL", filename); - return 1; + return 0; } if (strcmp(filename, ep->filename) == 0) { found = ep; @@ -144,7 +145,7 @@ static int add_entry(enum Type type, unsigned int hash, const char *filename, if (ep == NULL) { if (bp->num_needed >= MAX_COLLISIONS) { BIO_printf(bio_err, - "%s: hash table overflow for %s\n", + "%s: error: hash table overflow for %s\n", opt_getprog(), filename); return 1; } @@ -235,7 +236,7 @@ static int do_file(const char *filename, const char *fullpath, enum Hash h) /* Does it have X.509 data in it? */ if ((b = BIO_new_file(fullpath, "r")) == NULL) { - BIO_printf(bio_err, "%s: skipping %s, cannot open file\n", + BIO_printf(bio_err, "%s: error: skipping %s, cannot open file\n", opt_getprog(), filename); errs++; goto end; @@ -247,7 +248,7 @@ static int do_file(const char *filename, const char *fullpath, enum Hash h) if (sk_X509_INFO_num(inf) != 1) { BIO_printf(bio_err, - "%s: skipping %s," + "%s: warning: skipping %s," "it does not contain exactly one certificate or CRL\n", opt_getprog(), filename); /* This is not an error. */ From levitte at openssl.org Thu Apr 26 08:40:47 2018 From: levitte at openssl.org (Richard Levitte) Date: Thu, 26 Apr 2018 08:40:47 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524732047.435714.4269.nullmailer@dev.openssl.org> The branch master has been updated via d6d94d339756332bbabe2a1032ac511ae31b3fdc (commit) via 4977b4e9281c981efcf6a8b31378b8bbd6a8a96f (commit) from e6a833cb97ed762408b57ea3efa83bd10c1d2a78 (commit) - Log ----------------------------------------------------------------- commit d6d94d339756332bbabe2a1032ac511ae31b3fdc Author: Richard Levitte Date: Wed Apr 25 22:53:40 2018 +0200 PEM_def_callback(): use same parameter names as for pem_password_cb Add a bit more commentary to explain what's going on. Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/6080) commit 4977b4e9281c981efcf6a8b31378b8bbd6a8a96f Author: Richard Levitte Date: Wed Apr 25 13:57:39 2018 +0200 PEM_def_callback(): don't loop because of too short password given That error is already caught by EVP_read_pw_string_min, and causes this function to return -1, so the code detecting too short passwords in this function is practically dead. Fixes #5465 Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/6080) ----------------------------------------------------------------------- Summary of changes: crypto/pem/pem_lib.c | 45 ++++++++++++++++++++------------------------- include/openssl/pem.h | 3 ++- 2 files changed, 22 insertions(+), 26 deletions(-) diff --git a/crypto/pem/pem_lib.c b/crypto/pem/pem_lib.c index 6e66e9d..5000f26 100644 --- a/crypto/pem/pem_lib.c +++ b/crypto/pem/pem_lib.c @@ -28,15 +28,16 @@ static int load_iv(char **fromp, unsigned char *to, int num); static int check_pem(const char *nm, const char *name); int pem_check_suffix(const char *pem_str, const char *suffix); -int PEM_def_callback(char *buf, int num, int w, void *key) +int PEM_def_callback(char *buf, int num, int rwflag, void *userdata) { - int i, j; + int i, min_len; const char *prompt; - if (key) { - i = strlen(key); + /* We assume that the user passes a default password as userdata */ + if (userdata) { + i = strlen(userdata); i = (i > num) ? num : i; - memcpy(buf, key, i); + memcpy(buf, userdata, i); return i; } @@ -44,28 +45,22 @@ int PEM_def_callback(char *buf, int num, int w, void *key) if (prompt == NULL) prompt = "Enter PEM pass phrase:"; - for (;;) { - /* - * We assume that w == 0 means decryption, - * while w == 1 means encryption - */ - int min_len = w ? MIN_LENGTH : 0; + /* + * rwflag == 0 means decryption + * rwflag == 1 means encryption + * + * We assume that for encryption, we want a minimum length, while for + * decryption, we cannot know any minimum length, so we assume zero. + */ + min_len = rwflag ? MIN_LENGTH : 0; - i = EVP_read_pw_string_min(buf, min_len, num, prompt, w); - if (i != 0) { - PEMerr(PEM_F_PEM_DEF_CALLBACK, PEM_R_PROBLEMS_GETTING_PASSWORD); - memset(buf, 0, (unsigned int)num); - return -1; - } - j = strlen(buf); - if (min_len && j < min_len) { - fprintf(stderr, - "phrase is too short, needs to be at least %d chars\n", - min_len); - } else - break; + i = EVP_read_pw_string_min(buf, min_len, num, prompt, rwflag); + if (i != 0) { + PEMerr(PEM_F_PEM_DEF_CALLBACK, PEM_R_PROBLEMS_GETTING_PASSWORD); + memset(buf, 0, (unsigned int)num); + return -1; } - return j; + return strlen(buf); } void PEM_proc_type(char *buf, int type) diff --git a/include/openssl/pem.h b/include/openssl/pem.h index 165544c..2ef5b5d 100644 --- a/include/openssl/pem.h +++ b/include/openssl/pem.h @@ -280,7 +280,8 @@ int PEM_SignUpdate(EVP_MD_CTX *ctx, unsigned char *d, unsigned int cnt); int PEM_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, unsigned int *siglen, EVP_PKEY *pkey); -int PEM_def_callback(char *buf, int num, int w, void *key); +/* The default pem_password_cb that's used internally */ +int PEM_def_callback(char *buf, int num, int rwflag, void *userdata); void PEM_proc_type(char *buf, int type); void PEM_dek_info(char *buf, const char *type, int len, char *str); From levitte at openssl.org Thu Apr 26 08:44:50 2018 From: levitte at openssl.org (Richard Levitte) Date: Thu, 26 Apr 2018 08:44:50 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1524732290.416309.6042.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via 096adcf28ab75ec0bd83ce2cb7f0ba197ba4268f (commit) via 04858a4e3d7629b0c237160636b69bf339611c44 (commit) from 00937429502a160fbb96a47a47e6a0a7f7a6e9ca (commit) - Log ----------------------------------------------------------------- commit 096adcf28ab75ec0bd83ce2cb7f0ba197ba4268f Author: Richard Levitte Date: Wed Apr 25 22:53:40 2018 +0200 PEM_def_callback(): use same parameter names as for pem_password_cb Add a bit more commentary to explain what's going on. Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/6080) (cherry picked from commit d6d94d339756332bbabe2a1032ac511ae31b3fdc) commit 04858a4e3d7629b0c237160636b69bf339611c44 Author: Richard Levitte Date: Wed Apr 25 13:57:39 2018 +0200 PEM_def_callback(): don't loop because of too short password given That error is already caught by EVP_read_pw_string_min, and causes this function to return -1, so the code detecting too short passwords in this function is practically dead. Fixes #5465 Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/6080) (cherry picked from commit 4977b4e9281c981efcf6a8b31378b8bbd6a8a96f) ----------------------------------------------------------------------- Summary of changes: crypto/pem/pem_lib.c | 49 ++++++++++++++++++++----------------------------- include/openssl/pem.h | 3 ++- 2 files changed, 22 insertions(+), 30 deletions(-) diff --git a/crypto/pem/pem_lib.c b/crypto/pem/pem_lib.c index e9202f4..04d374b 100644 --- a/crypto/pem/pem_lib.c +++ b/crypto/pem/pem_lib.c @@ -28,19 +28,16 @@ static int load_iv(char **fromp, unsigned char *to, int num); static int check_pem(const char *nm, const char *name); int pem_check_suffix(const char *pem_str, const char *suffix); -int PEM_def_callback(char *buf, int num, int w, void *key) +int PEM_def_callback(char *buf, int num, int rwflag, void *userdata) { -#if defined(OPENSSL_NO_STDIO) || defined(OPENSSL_NO_UI) - int i; -#else - int i, j; + int i, min_len; const char *prompt; -#endif - if (key) { - i = strlen(key); + /* We assume that the user passes a default password as userdata */ + if (userdata) { + i = strlen(userdata); i = (i > num) ? num : i; - memcpy(buf, key, i); + memcpy(buf, userdata, i); return i; } @@ -52,28 +49,22 @@ int PEM_def_callback(char *buf, int num, int w, void *key) if (prompt == NULL) prompt = "Enter PEM pass phrase:"; - for (;;) { - /* - * We assume that w == 0 means decryption, - * while w == 1 means encryption - */ - int min_len = w ? MIN_LENGTH : 0; + /* + * rwflag == 0 means decryption + * rwflag == 1 means encryption + * + * We assume that for encryption, we want a minimum length, while for + * decryption, we cannot know any minimum length, so we assume zero. + */ + min_len = rwflag ? MIN_LENGTH : 0; - i = EVP_read_pw_string_min(buf, min_len, num, prompt, w); - if (i != 0) { - PEMerr(PEM_F_PEM_DEF_CALLBACK, PEM_R_PROBLEMS_GETTING_PASSWORD); - memset(buf, 0, (unsigned int)num); - return -1; - } - j = strlen(buf); - if (min_len && j < min_len) { - fprintf(stderr, - "phrase is too short, needs to be at least %d chars\n", - min_len); - } else - break; + i = EVP_read_pw_string_min(buf, min_len, num, prompt, rwflag); + if (i != 0) { + PEMerr(PEM_F_PEM_DEF_CALLBACK, PEM_R_PROBLEMS_GETTING_PASSWORD); + memset(buf, 0, (unsigned int)num); + return -1; } - return j; + return strlen(buf); #endif } diff --git a/include/openssl/pem.h b/include/openssl/pem.h index 2375d63..655106b 100644 --- a/include/openssl/pem.h +++ b/include/openssl/pem.h @@ -322,7 +322,8 @@ int PEM_SignUpdate(EVP_MD_CTX *ctx, unsigned char *d, unsigned int cnt); int PEM_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, unsigned int *siglen, EVP_PKEY *pkey); -int PEM_def_callback(char *buf, int num, int w, void *key); +/* The default pem_password_cb that's used internally */ +int PEM_def_callback(char *buf, int num, int rwflag, void *userdata); void PEM_proc_type(char *buf, int type); void PEM_dek_info(char *buf, const char *type, int len, char *str); From levitte at openssl.org Thu Apr 26 08:52:50 2018 From: levitte at openssl.org (Richard Levitte) Date: Thu, 26 Apr 2018 08:52:50 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_0_2-stable update Message-ID: <1524732770.580591.7746.nullmailer@dev.openssl.org> The branch OpenSSL_1_0_2-stable has been updated via 165a92dcb1caab4671edad5aea68c8f698f51180 (commit) via 3986986eba6c4e70499a8d24aa8d00e934b16d91 (commit) from e77017b39c60ddbb4775e6b0d45a81fe7128caf7 (commit) - Log ----------------------------------------------------------------- commit 165a92dcb1caab4671edad5aea68c8f698f51180 Author: Richard Levitte Date: Wed Apr 25 22:53:40 2018 +0200 PEM_def_callback(): use same parameter names as for pem_password_cb Add a bit more commentary to explain what's going on. Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/6080) (cherry picked from commit d6d94d339756332bbabe2a1032ac511ae31b3fdc) commit 3986986eba6c4e70499a8d24aa8d00e934b16d91 Author: Richard Levitte Date: Wed Apr 25 13:57:39 2018 +0200 PEM_def_callback(): don't loop because of too short password given That error is already caught by EVP_read_pw_string_min, and causes this function to return -1, so the code detecting too short passwords in this function is practically dead. Fixes #5465 Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/6080) (cherry picked from commit 4977b4e9281c981efcf6a8b31378b8bbd6a8a96f) ----------------------------------------------------------------------- Summary of changes: crypto/pem/pem.h | 3 ++- crypto/pem/pem_lib.c | 56 +++++++++++++++++++++------------------------------- 2 files changed, 24 insertions(+), 35 deletions(-) diff --git a/crypto/pem/pem.h b/crypto/pem/pem.h index aac72fb..9c1d939 100644 --- a/crypto/pem/pem.h +++ b/crypto/pem/pem.h @@ -442,7 +442,8 @@ void PEM_SignUpdate(EVP_MD_CTX *ctx, unsigned char *d, unsigned int cnt); int PEM_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, unsigned int *siglen, EVP_PKEY *pkey); -int PEM_def_callback(char *buf, int num, int w, void *key); +/* The default pem_password_cb that's used internally */ +int PEM_def_callback(char *buf, int num, int rwflag, void *userdata); void PEM_proc_type(char *buf, int type); void PEM_dek_info(char *buf, const char *type, int len, char *str); diff --git a/crypto/pem/pem_lib.c b/crypto/pem/pem_lib.c index 4d5f053..119cb4a 100644 --- a/crypto/pem/pem_lib.c +++ b/crypto/pem/pem_lib.c @@ -82,51 +82,39 @@ static int load_iv(char **fromp, unsigned char *to, int num); static int check_pem(const char *nm, const char *name); int pem_check_suffix(const char *pem_str, const char *suffix); -int PEM_def_callback(char *buf, int num, int w, void *key) +int PEM_def_callback(char *buf, int num, int rwflag, void *userdata) { -#ifdef OPENSSL_NO_FP_API - /* - * We should not ever call the default callback routine from windows. - */ - PEMerr(PEM_F_PEM_DEF_CALLBACK, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); - return (-1); -#else - int i, j; + int i, min_len; const char *prompt; - if (key) { - i = strlen(key); + + /* We assume that the user passes a default password as userdata */ + if (userdata) { + i = strlen(userdata); i = (i > num) ? num : i; - memcpy(buf, key, i); - return (i); + memcpy(buf, userdata, i); + return i; } prompt = EVP_get_pw_prompt(); if (prompt == NULL) prompt = "Enter PEM pass phrase:"; - for (;;) { - /* - * We assume that w == 0 means decryption, - * while w == 1 means encryption - */ - int min_len = w ? MIN_LENGTH : 0; + /* + * rwflag == 0 means decryption + * rwflag == 1 means encryption + * + * We assume that for encryption, we want a minimum length, while for + * decryption, we cannot know any minimum length, so we assume zero. + */ + min_len = rwflag ? MIN_LENGTH : 0; - i = EVP_read_pw_string_min(buf, min_len, num, prompt, w); - if (i != 0) { - PEMerr(PEM_F_PEM_DEF_CALLBACK, PEM_R_PROBLEMS_GETTING_PASSWORD); - memset(buf, 0, (unsigned int)num); - return (-1); - } - j = strlen(buf); - if (min_len && j < min_len) { - fprintf(stderr, - "phrase is too short, needs to be at least %d chars\n", - min_len); - } else - break; + i = EVP_read_pw_string_min(buf, min_len, num, prompt, rwflag); + if (i != 0) { + PEMerr(PEM_F_PEM_DEF_CALLBACK, PEM_R_PROBLEMS_GETTING_PASSWORD); + memset(buf, 0, (unsigned int)num); + return -1; } - return (j); -#endif + return strlen(buf); } void PEM_proc_type(char *buf, int type) From levitte at openssl.org Thu Apr 26 13:02:02 2018 From: levitte at openssl.org (Richard Levitte) Date: Thu, 26 Apr 2018 13:02:02 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524747722.861299.7000.nullmailer@dev.openssl.org> The branch master has been updated via b4c35656441929ce6f6be112648d637cba51dc91 (commit) from d6d94d339756332bbabe2a1032ac511ae31b3fdc (commit) - Log ----------------------------------------------------------------- commit b4c35656441929ce6f6be112648d637cba51dc91 Author: Richard Levitte Date: Thu Apr 26 09:59:22 2018 +0200 Use get_last_sys_error() instead of get_last_rtl_error() get_last_sys_error() already exists, so there's no need for yet another macro that fulfills the same purpose. Fixes #4120 Reviewed-by: Andy Polyakov (Merged from https://github.com/openssl/openssl/pull/6088) ----------------------------------------------------------------------- Summary of changes: crypto/bio/b_sock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/bio/b_sock.c b/crypto/bio/b_sock.c index 740ff17..e7a24d0 100644 --- a/crypto/bio/b_sock.c +++ b/crypto/bio/b_sock.c @@ -308,7 +308,7 @@ int BIO_socket_nbio(int s, int mode) l = fcntl(s, F_GETFL, 0); if (l == -1) { - SYSerr(SYS_F_FCNTL, get_last_rtl_error()); + SYSerr(SYS_F_FCNTL, get_last_sys_error()); ret = -1; } else { # if defined(O_NONBLOCK) @@ -326,7 +326,7 @@ int BIO_socket_nbio(int s, int mode) ret = fcntl(s, F_SETFL, l); if (ret < 0) { - SYSerr(SYS_F_FCNTL, get_last_rtl_error()); + SYSerr(SYS_F_FCNTL, get_last_sys_error()); } } # else From levitte at openssl.org Thu Apr 26 13:03:19 2018 From: levitte at openssl.org (Richard Levitte) Date: Thu, 26 Apr 2018 13:03:19 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1524747799.703741.7939.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via e00fa4ee53e05fac63b5a25f8e9ea71a1ec59c33 (commit) from 096adcf28ab75ec0bd83ce2cb7f0ba197ba4268f (commit) - Log ----------------------------------------------------------------- commit e00fa4ee53e05fac63b5a25f8e9ea71a1ec59c33 Author: Richard Levitte Date: Thu Apr 26 09:59:22 2018 +0200 Use get_last_sys_error() instead of get_last_rtl_error() get_last_sys_error() already exists, so there's no need for yet another macro that fulfills the same purpose. Fixes #4120 Reviewed-by: Andy Polyakov (Merged from https://github.com/openssl/openssl/pull/6088) (cherry picked from commit b4c35656441929ce6f6be112648d637cba51dc91) ----------------------------------------------------------------------- Summary of changes: crypto/bio/b_sock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/bio/b_sock.c b/crypto/bio/b_sock.c index 97dcc70..99c13a0 100644 --- a/crypto/bio/b_sock.c +++ b/crypto/bio/b_sock.c @@ -317,7 +317,7 @@ int BIO_socket_nbio(int s, int mode) l = fcntl(s, F_GETFL, 0); if (l == -1) { - SYSerr(SYS_F_FCNTL, get_last_rtl_error()); + SYSerr(SYS_F_FCNTL, get_last_sys_error()); ret = -1; } else { # if defined(O_NONBLOCK) @@ -335,7 +335,7 @@ int BIO_socket_nbio(int s, int mode) ret = fcntl(s, F_SETFL, l); if (ret < 0) { - SYSerr(SYS_F_FCNTL, get_last_rtl_error()); + SYSerr(SYS_F_FCNTL, get_last_sys_error()); } } # else From levitte at openssl.org Thu Apr 26 15:02:40 2018 From: levitte at openssl.org (Richard Levitte) Date: Thu, 26 Apr 2018 15:02:40 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1524754960.471530.25229.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via e8d3f50249a7bd7a80a585830a318635834f435d (commit) from e00fa4ee53e05fac63b5a25f8e9ea71a1ec59c33 (commit) - Log ----------------------------------------------------------------- commit e8d3f50249a7bd7a80a585830a318635834f435d Author: Richard Levitte Date: Thu Apr 26 15:27:54 2018 +0200 Fix no-ui In a recent commit, a OPENSSL_NO_UI guard was dropped by mistake in PEM_def_callback(), so this puts it back. At the same time, that previous commit got rid of the necessity to have a OPENSSL_NO_STDIO guard, so we drop that instead. Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6096) ----------------------------------------------------------------------- Summary of changes: crypto/pem/pem_lib.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/crypto/pem/pem_lib.c b/crypto/pem/pem_lib.c index 04d374b..fdf2b00 100644 --- a/crypto/pem/pem_lib.c +++ b/crypto/pem/pem_lib.c @@ -30,8 +30,11 @@ int pem_check_suffix(const char *pem_str, const char *suffix); int PEM_def_callback(char *buf, int num, int rwflag, void *userdata) { - int i, min_len; + int i; +#ifndef OPENSSL_NO_UI + int min_len; const char *prompt; +#endif /* We assume that the user passes a default password as userdata */ if (userdata) { @@ -41,7 +44,7 @@ int PEM_def_callback(char *buf, int num, int rwflag, void *userdata) return i; } -#if defined(OPENSSL_NO_STDIO) || defined(OPENSSL_NO_UI) +#ifdef OPENSSL_NO_UI PEMerr(PEM_F_PEM_DEF_CALLBACK, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); return -1; #else From matt at openssl.org Thu Apr 26 15:36:19 2018 From: matt at openssl.org (Matt Caswell) Date: Thu, 26 Apr 2018 15:36:19 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524756979.937223.29988.nullmailer@dev.openssl.org> The branch master has been updated via f80c864318ee86cf26492c6914299423cddbe229 (commit) from b4c35656441929ce6f6be112648d637cba51dc91 (commit) - Log ----------------------------------------------------------------- commit f80c864318ee86cf26492c6914299423cddbe229 Author: Matt Caswell Date: Thu Apr 26 14:20:59 2018 +0100 Fix typo in the definition of tls13_ciphers SSL_kANY, and SSL_aANY were placed in the wrong fields. It makes no functional difference since these macros evaluate to 0 anyway, which is the correct value for these fields. Fixes #6048 Reviewed-by: Richard Levitte Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6095) ----------------------------------------------------------------------- Summary of changes: ssl/s3_lib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c index 6193269..f797497 100644 --- a/ssl/s3_lib.c +++ b/ssl/s3_lib.c @@ -37,12 +37,12 @@ static SSL_CIPHER tls13_ciphers[] = { TLS1_3_RFC_AES_128_GCM_SHA256, TLS1_3_RFC_AES_128_GCM_SHA256, TLS1_3_CK_AES_128_GCM_SHA256, - 0, 0, + SSL_kANY, + SSL_aANY, SSL_AES128GCM, SSL_AEAD, TLS1_3_VERSION, TLS1_3_VERSION, - SSL_kANY, - SSL_aANY, + 0, 0, SSL_HIGH, SSL_HANDSHAKE_MAC_SHA256, 128, From matt at openssl.org Thu Apr 26 15:40:49 2018 From: matt at openssl.org (Matt Caswell) Date: Thu, 26 Apr 2018 15:40:49 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524757249.260542.31337.nullmailer@dev.openssl.org> The branch master has been updated via d1f7a1e62a5b67b492f8e7eb48130bf00f9a3ab0 (commit) from f80c864318ee86cf26492c6914299423cddbe229 (commit) - Log ----------------------------------------------------------------- commit d1f7a1e62a5b67b492f8e7eb48130bf00f9a3ab0 Author: Matt Caswell Date: Thu Apr 26 14:05:40 2018 +0100 Update the *use_certificate* docs Note that calling the *use_certificate* functions will replace any existing certificate of the same type. The same thing applies for private keys. Fixes #2147 Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6092) ----------------------------------------------------------------------- Summary of changes: doc/man3/SSL_CTX_use_certificate.pod | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/man3/SSL_CTX_use_certificate.pod b/doc/man3/SSL_CTX_use_certificate.pod index 4dff79c..b065d8f 100644 --- a/doc/man3/SSL_CTX_use_certificate.pod +++ b/doc/man3/SSL_CTX_use_certificate.pod @@ -170,6 +170,13 @@ L. of view, it however does not make sense as the data in the certificate is considered public anyway.) +All of the functions to set a new certificate will replace any existing +certificate of the same type that has already been set. Similarly all of the +functions to set a new private key will replace any private key that has already +been set. Applications should call L or +L as appropriate after loading a new certificate and +private key to confirm that the certificate and key match. + =head1 RETURN VALUES On success, the functions return 1. From matt at openssl.org Thu Apr 26 15:41:36 2018 From: matt at openssl.org (Matt Caswell) Date: Thu, 26 Apr 2018 15:41:36 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1524757296.869057.32429.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via db747425b0caae12e73c680799b57bdfcc72dbb4 (commit) from e8d3f50249a7bd7a80a585830a318635834f435d (commit) - Log ----------------------------------------------------------------- commit db747425b0caae12e73c680799b57bdfcc72dbb4 Author: Matt Caswell Date: Thu Apr 26 14:05:40 2018 +0100 Update the *use_certificate* docs Note that calling the *use_certificate* functions will replace any existing certificate of the same type. The same thing applies for private keys. Fixes #2147 Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6093) ----------------------------------------------------------------------- Summary of changes: doc/ssl/SSL_CTX_use_certificate.pod | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/ssl/SSL_CTX_use_certificate.pod b/doc/ssl/SSL_CTX_use_certificate.pod index c645f58..96890b3 100644 --- a/doc/ssl/SSL_CTX_use_certificate.pod +++ b/doc/ssl/SSL_CTX_use_certificate.pod @@ -153,6 +153,13 @@ L. of view, it however does not make sense as the data in the certificate is considered public anyway.) +All of the functions to set a new certificate will replace any existing +certificate of the same type that has already been set. Similarly all of the +functions to set a new private key will replace any private key that has already +been set. Applications should call L or +L as appropriate after loading a new certificate and +private key to confirm that the certificate and key match. + =head1 RETURN VALUES On success, the functions return 1. From matt at openssl.org Thu Apr 26 15:42:03 2018 From: matt at openssl.org (Matt Caswell) Date: Thu, 26 Apr 2018 15:42:03 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_0_2-stable update Message-ID: <1524757323.306854.982.nullmailer@dev.openssl.org> The branch OpenSSL_1_0_2-stable has been updated via aadcf069828431819970421749da64b24b559490 (commit) from 165a92dcb1caab4671edad5aea68c8f698f51180 (commit) - Log ----------------------------------------------------------------- commit aadcf069828431819970421749da64b24b559490 Author: Matt Caswell Date: Thu Apr 26 14:05:40 2018 +0100 Update the *use_certificate* docs Note that calling the *use_certificate* functions will replace any existing certificate of the same type. The same thing applies for private keys. Fixes #2147 Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6093) (cherry picked from commit db747425b0caae12e73c680799b57bdfcc72dbb4) ----------------------------------------------------------------------- Summary of changes: doc/ssl/SSL_CTX_use_certificate.pod | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/ssl/SSL_CTX_use_certificate.pod b/doc/ssl/SSL_CTX_use_certificate.pod index 80321b8..800423e 100644 --- a/doc/ssl/SSL_CTX_use_certificate.pod +++ b/doc/ssl/SSL_CTX_use_certificate.pod @@ -142,6 +142,13 @@ L. of view, it however does not make sense as the data in the certificate is considered public anyway.) +All of the functions to set a new certificate will replace any existing +certificate of the same type that has already been set. Similarly all of the +functions to set a new private key will replace any private key that has already +been set. Applications should call L or +L as appropriate after loading a new certificate and +private key to confirm that the certificate and key match. + =head1 RETURN VALUES On success, the functions return 1. From rsalz at openssl.org Thu Apr 26 16:27:54 2018 From: rsalz at openssl.org (Rich Salz) Date: Thu, 26 Apr 2018 16:27:54 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524760074.873958.7856.nullmailer@dev.openssl.org> The branch master has been updated via f06080cb3da93e99755edb5f19e7ccc132aeba36 (commit) from d1f7a1e62a5b67b492f8e7eb48130bf00f9a3ab0 (commit) - Log ----------------------------------------------------------------- commit f06080cb3da93e99755edb5f19e7ccc132aeba36 Author: FdaSilvaYY Date: Thu Apr 26 12:06:17 2018 -0400 Add missing error code when alloc-return-null Reviewed-by: Bernd Edlinger Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6085) ----------------------------------------------------------------------- Summary of changes: crypto/bio/bf_nbio.c | 4 +++- crypto/bio/bio_err.c | 4 ++++ crypto/bio/bss_acpt.c | 4 +++- crypto/bio/bss_conn.c | 4 +++- crypto/bio/bss_log.c | 1 + crypto/bn/bn_err.c | 2 ++ crypto/bn/bn_mont.c | 4 +++- crypto/bn/bn_recp.c | 4 +++- crypto/ec/ec_err.c | 1 + crypto/ec/ec_lib.c | 6 ++++-- crypto/err/openssl.txt | 13 +++++++++++++ crypto/objects/obj_dat.c | 6 ++++-- crypto/objects/obj_err.c | 1 + crypto/pkcs12/p12_utl.c | 17 ++++++++++++----- crypto/pkcs12/pk12err.c | 8 +++++++- crypto/x509v3/pcy_tree.c | 5 ++++- crypto/x509v3/v3err.c | 1 + include/openssl/bioerr.h | 4 ++++ include/openssl/bnerr.h | 2 ++ include/openssl/ecerr.h | 1 + include/openssl/objectserr.h | 1 + include/openssl/pkcs12err.h | 4 ++++ include/openssl/x509v3err.h | 1 + 23 files changed, 82 insertions(+), 16 deletions(-) diff --git a/crypto/bio/bf_nbio.c b/crypto/bio/bf_nbio.c index d7972bf..4bc84ee 100644 --- a/crypto/bio/bf_nbio.c +++ b/crypto/bio/bf_nbio.c @@ -57,8 +57,10 @@ static int nbiof_new(BIO *bi) { NBIO_TEST *nt; - if ((nt = OPENSSL_zalloc(sizeof(*nt))) == NULL) + if ((nt = OPENSSL_zalloc(sizeof(*nt))) == NULL) { + BIOerr(BIO_F_NBIOF_NEW, ERR_R_MALLOC_FAILURE); return 0; + } nt->lrn = -1; nt->lwn = -1; bi->ptr = (char *)nt; diff --git a/crypto/bio/bio_err.c b/crypto/bio/bio_err.c index 2a4e478..7aa9dab 100644 --- a/crypto/bio/bio_err.c +++ b/crypto/bio/bio_err.c @@ -19,10 +19,12 @@ static const ERR_STRING_DATA BIO_str_functs[] = { {ERR_PACK(ERR_LIB_BIO, BIO_F_ADDR_STRINGS, 0), "addr_strings"}, {ERR_PACK(ERR_LIB_BIO, BIO_F_BIO_ACCEPT, 0), "BIO_accept"}, {ERR_PACK(ERR_LIB_BIO, BIO_F_BIO_ACCEPT_EX, 0), "BIO_accept_ex"}, + {ERR_PACK(ERR_LIB_BIO, BIO_F_BIO_ACCEPT_NEW, 0), "BIO_ACCEPT_new"}, {ERR_PACK(ERR_LIB_BIO, BIO_F_BIO_ADDR_NEW, 0), "BIO_ADDR_new"}, {ERR_PACK(ERR_LIB_BIO, BIO_F_BIO_BIND, 0), "BIO_bind"}, {ERR_PACK(ERR_LIB_BIO, BIO_F_BIO_CALLBACK_CTRL, 0), "BIO_callback_ctrl"}, {ERR_PACK(ERR_LIB_BIO, BIO_F_BIO_CONNECT, 0), "BIO_connect"}, + {ERR_PACK(ERR_LIB_BIO, BIO_F_BIO_CONNECT_NEW, 0), "BIO_CONNECT_new"}, {ERR_PACK(ERR_LIB_BIO, BIO_F_BIO_CTRL, 0), "BIO_ctrl"}, {ERR_PACK(ERR_LIB_BIO, BIO_F_BIO_GETS, 0), "BIO_gets"}, {ERR_PACK(ERR_LIB_BIO, BIO_F_BIO_GET_HOST_IP, 0), "BIO_get_host_ip"}, @@ -65,6 +67,8 @@ static const ERR_STRING_DATA BIO_str_functs[] = { {ERR_PACK(ERR_LIB_BIO, BIO_F_LINEBUFFER_CTRL, 0), "linebuffer_ctrl"}, {ERR_PACK(ERR_LIB_BIO, BIO_F_LINEBUFFER_NEW, 0), "linebuffer_new"}, {ERR_PACK(ERR_LIB_BIO, BIO_F_MEM_WRITE, 0), "mem_write"}, + {ERR_PACK(ERR_LIB_BIO, BIO_F_NBIOF_NEW, 0), "nbiof_new"}, + {ERR_PACK(ERR_LIB_BIO, BIO_F_SLG_WRITE, 0), "slg_write"}, {ERR_PACK(ERR_LIB_BIO, BIO_F_SSL_NEW, 0), "SSL_new"}, {0, NULL} }; diff --git a/crypto/bio/bss_acpt.c b/crypto/bio/bss_acpt.c index 64cc452..993e590 100644 --- a/crypto/bio/bss_acpt.c +++ b/crypto/bio/bss_acpt.c @@ -92,8 +92,10 @@ static BIO_ACCEPT *BIO_ACCEPT_new(void) { BIO_ACCEPT *ret; - if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) + if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) { + BIOerr(BIO_F_BIO_ACCEPT_NEW, ERR_R_MALLOC_FAILURE); return NULL; + } ret->accept_family = BIO_FAMILY_IPANY; ret->accept_sock = (int)INVALID_SOCKET; return ret; diff --git a/crypto/bio/bss_conn.c b/crypto/bio/bss_conn.c index c87b431..e9673fe 100644 --- a/crypto/bio/bss_conn.c +++ b/crypto/bio/bss_conn.c @@ -223,8 +223,10 @@ BIO_CONNECT *BIO_CONNECT_new(void) { BIO_CONNECT *ret; - if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) + if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) { + BIOerr(BIO_F_BIO_CONNECT_NEW, ERR_R_MALLOC_FAILURE); return NULL; + } ret->state = BIO_CONN_S_BEFORE; ret->connect_family = BIO_FAMILY_IPANY; return ret; diff --git a/crypto/bio/bss_log.c b/crypto/bio/bss_log.c index 10acba1..0376919 100644 --- a/crypto/bio/bss_log.c +++ b/crypto/bio/bss_log.c @@ -197,6 +197,7 @@ static int slg_write(BIO *b, const char *in, int inl) }; if ((buf = OPENSSL_malloc(inl + 1)) == NULL) { + BIOerr(BIO_F_SLG_WRITE, ERR_R_MALLOC_FAILURE); return 0; } strncpy(buf, in, inl); diff --git a/crypto/bn/bn_err.c b/crypto/bn/bn_err.c index e6bfbf6..dd87c15 100644 --- a/crypto/bn/bn_err.c +++ b/crypto/bn/bn_err.c @@ -62,11 +62,13 @@ static const ERR_STRING_DATA BN_str_functs[] = { "BN_mod_inverse_no_branch"}, {ERR_PACK(ERR_LIB_BN, BN_F_BN_MOD_LSHIFT_QUICK, 0), "BN_mod_lshift_quick"}, {ERR_PACK(ERR_LIB_BN, BN_F_BN_MOD_SQRT, 0), "BN_mod_sqrt"}, + {ERR_PACK(ERR_LIB_BN, BN_F_BN_MONT_CTX_NEW, 0), "BN_MONT_CTX_new"}, {ERR_PACK(ERR_LIB_BN, BN_F_BN_MPI2BN, 0), "BN_mpi2bn"}, {ERR_PACK(ERR_LIB_BN, BN_F_BN_NEW, 0), "BN_new"}, {ERR_PACK(ERR_LIB_BN, BN_F_BN_POOL_GET, 0), "BN_POOL_get"}, {ERR_PACK(ERR_LIB_BN, BN_F_BN_RAND, 0), "BN_rand"}, {ERR_PACK(ERR_LIB_BN, BN_F_BN_RAND_RANGE, 0), "BN_rand_range"}, + {ERR_PACK(ERR_LIB_BN, BN_F_BN_RECP_CTX_NEW, 0), "BN_RECP_CTX_new"}, {ERR_PACK(ERR_LIB_BN, BN_F_BN_RSHIFT, 0), "BN_rshift"}, {ERR_PACK(ERR_LIB_BN, BN_F_BN_SET_WORDS, 0), "bn_set_words"}, {ERR_PACK(ERR_LIB_BN, BN_F_BN_STACK_PUSH, 0), "BN_STACK_push"}, diff --git a/crypto/bn/bn_mont.c b/crypto/bn/bn_mont.c index 362390a..b85a893 100644 --- a/crypto/bn/bn_mont.c +++ b/crypto/bn/bn_mont.c @@ -199,8 +199,10 @@ BN_MONT_CTX *BN_MONT_CTX_new(void) { BN_MONT_CTX *ret; - if ((ret = OPENSSL_malloc(sizeof(*ret))) == NULL) + if ((ret = OPENSSL_malloc(sizeof(*ret))) == NULL) { + BNerr(BN_F_BN_MONT_CTX_NEW, ERR_R_MALLOC_FAILURE); return NULL; + } BN_MONT_CTX_init(ret); ret->flags = BN_FLG_MALLOCED; diff --git a/crypto/bn/bn_recp.c b/crypto/bn/bn_recp.c index 130debd..9ab767f 100644 --- a/crypto/bn/bn_recp.c +++ b/crypto/bn/bn_recp.c @@ -21,8 +21,10 @@ BN_RECP_CTX *BN_RECP_CTX_new(void) { BN_RECP_CTX *ret; - if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) + if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) { + BNerr(BN_F_BN_RECP_CTX_NEW, ERR_R_MALLOC_FAILURE); return NULL; + } bn_init(&(ret->N)); bn_init(&(ret->Nr)); diff --git a/crypto/ec/ec_err.c b/crypto/ec/ec_err.c index fba986d..807427f 100644 --- a/crypto/ec/ec_err.c +++ b/crypto/ec/ec_err.c @@ -166,6 +166,7 @@ static const ERR_STRING_DATA EC_str_functs[] = { "EC_GROUP_set_curve_GFp"}, {ERR_PACK(ERR_LIB_EC, EC_F_EC_GROUP_SET_GENERATOR, 0), "EC_GROUP_set_generator"}, + {ERR_PACK(ERR_LIB_EC, EC_F_EC_GROUP_SET_SEED, 0), "EC_GROUP_set_seed"}, {ERR_PACK(ERR_LIB_EC, EC_F_EC_KEY_CHECK_KEY, 0), "EC_KEY_check_key"}, {ERR_PACK(ERR_LIB_EC, EC_F_EC_KEY_COPY, 0), "EC_KEY_copy"}, {ERR_PACK(ERR_LIB_EC, EC_F_EC_KEY_GENERATE_KEY, 0), "EC_KEY_generate_key"}, diff --git a/crypto/ec/ec_lib.c b/crypto/ec/ec_lib.c index 1d7e633..10b0cb7 100644 --- a/crypto/ec/ec_lib.c +++ b/crypto/ec/ec_lib.c @@ -394,8 +394,10 @@ size_t EC_GROUP_set_seed(EC_GROUP *group, const unsigned char *p, size_t len) if (!len || !p) return 1; - if ((group->seed = OPENSSL_malloc(len)) == NULL) + if ((group->seed = OPENSSL_malloc(len)) == NULL) { + ECerr(EC_F_EC_GROUP_SET_SEED, ERR_R_MALLOC_FAILURE); return 0; + } memcpy(group->seed, p, len); group->seed_len = len; @@ -558,7 +560,7 @@ EC_POINT *EC_POINT_new(const EC_GROUP *group) ECerr(EC_F_EC_POINT_NEW, ERR_R_PASSED_NULL_PARAMETER); return NULL; } - if (group->meth->point_init == 0) { + if (group->meth->point_init == NULL) { ECerr(EC_F_EC_POINT_NEW, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); return NULL; } diff --git a/crypto/err/openssl.txt b/crypto/err/openssl.txt index 1b547ea..b9457b9 100644 --- a/crypto/err/openssl.txt +++ b/crypto/err/openssl.txt @@ -129,10 +129,12 @@ BIO_F_ADDRINFO_WRAP:148:addrinfo_wrap BIO_F_ADDR_STRINGS:134:addr_strings BIO_F_BIO_ACCEPT:101:BIO_accept BIO_F_BIO_ACCEPT_EX:137:BIO_accept_ex +BIO_F_BIO_ACCEPT_NEW:152:BIO_ACCEPT_new BIO_F_BIO_ADDR_NEW:144:BIO_ADDR_new BIO_F_BIO_BIND:147:BIO_bind BIO_F_BIO_CALLBACK_CTRL:131:BIO_callback_ctrl BIO_F_BIO_CONNECT:138:BIO_connect +BIO_F_BIO_CONNECT_NEW:153:BIO_CONNECT_new BIO_F_BIO_CTRL:103:BIO_ctrl BIO_F_BIO_GETS:104:BIO_gets BIO_F_BIO_GET_HOST_IP:106:BIO_get_host_ip @@ -175,6 +177,8 @@ BIO_F_FILE_READ:130:file_read BIO_F_LINEBUFFER_CTRL:129:linebuffer_ctrl BIO_F_LINEBUFFER_NEW:151:linebuffer_new BIO_F_MEM_WRITE:117:mem_write +BIO_F_NBIOF_NEW:154:nbiof_new +BIO_F_SLG_WRITE:155:slg_write BIO_F_SSL_NEW:118:SSL_new BN_F_BNRAND:127:bnrand BN_F_BNRAND_RANGE:138:bnrand_range @@ -214,11 +218,13 @@ BN_F_BN_MOD_INVERSE:110:BN_mod_inverse BN_F_BN_MOD_INVERSE_NO_BRANCH:139:BN_mod_inverse_no_branch BN_F_BN_MOD_LSHIFT_QUICK:119:BN_mod_lshift_quick BN_F_BN_MOD_SQRT:121:BN_mod_sqrt +BN_F_BN_MONT_CTX_NEW:149:BN_MONT_CTX_new BN_F_BN_MPI2BN:112:BN_mpi2bn BN_F_BN_NEW:113:BN_new BN_F_BN_POOL_GET:147:BN_POOL_get BN_F_BN_RAND:114:BN_rand BN_F_BN_RAND_RANGE:122:BN_rand_range +BN_F_BN_RECP_CTX_NEW:150:BN_RECP_CTX_new BN_F_BN_RSHIFT:146:BN_rshift BN_F_BN_SET_WORDS:144:bn_set_words BN_F_BN_STACK_PUSH:148:BN_STACK_push @@ -569,6 +575,7 @@ EC_F_EC_GROUP_NEW_FROM_ECPKPARAMETERS:264:EC_GROUP_new_from_ecpkparameters EC_F_EC_GROUP_SET_CURVE_GF2M:176:EC_GROUP_set_curve_GF2m EC_F_EC_GROUP_SET_CURVE_GFP:109:EC_GROUP_set_curve_GFp EC_F_EC_GROUP_SET_GENERATOR:111:EC_GROUP_set_generator +EC_F_EC_GROUP_SET_SEED:286:EC_GROUP_set_seed EC_F_EC_KEY_CHECK_KEY:177:EC_KEY_check_key EC_F_EC_KEY_COPY:178:EC_KEY_copy EC_F_EC_KEY_GENERATE_KEY:179:EC_KEY_generate_key @@ -798,6 +805,7 @@ OBJ_F_OBJ_NAME_NEW_INDEX:106:OBJ_NAME_new_index OBJ_F_OBJ_NID2LN:102:OBJ_nid2ln OBJ_F_OBJ_NID2OBJ:103:OBJ_nid2obj OBJ_F_OBJ_NID2SN:104:OBJ_nid2sn +OBJ_F_OBJ_TXT2OBJ:108:OBJ_txt2obj OCSP_F_D2I_OCSP_NONCE:102:d2i_ocsp_nonce OCSP_F_OCSP_BASIC_ADD1_STATUS:103:OCSP_basic_add1_status OCSP_F_OCSP_BASIC_SIGN:104:OCSP_basic_sign @@ -900,6 +908,10 @@ PEM_F_PEM_WRITE_PRIVATEKEY:139:PEM_write_PrivateKey PEM_F_PEM_X509_INFO_READ:115:PEM_X509_INFO_read PEM_F_PEM_X509_INFO_READ_BIO:116:PEM_X509_INFO_read_bio PEM_F_PEM_X509_INFO_WRITE_BIO:117:PEM_X509_INFO_write_bio +PKCS12_F_OPENSSL_ASC2UNI:121:OPENSSL_asc2uni +PKCS12_F_OPENSSL_UNI2ASC:124:OPENSSL_uni2asc +PKCS12_F_OPENSSL_UNI2UTF8:127:OPENSSL_uni2utf8 +PKCS12_F_OPENSSL_UTF82UNI:129:OPENSSL_utf82uni PKCS12_F_PKCS12_CREATE:105:PKCS12_create PKCS12_F_PKCS12_GEN_MAC:107:PKCS12_gen_mac PKCS12_F_PKCS12_INIT:109:PKCS12_init @@ -1607,6 +1619,7 @@ X509V3_F_SXNET_ADD_ID_INTEGER:126:SXNET_add_id_INTEGER X509V3_F_SXNET_ADD_ID_ULONG:127:SXNET_add_id_ulong X509V3_F_SXNET_GET_ID_ASC:128:SXNET_get_id_asc X509V3_F_SXNET_GET_ID_ULONG:129:SXNET_get_id_ulong +X509V3_F_TREE_INIT:172:tree_init X509V3_F_V2I_ASIDENTIFIERS:163:v2i_ASIdentifiers X509V3_F_V2I_ASN1_BIT_STRING:101:v2i_ASN1_BIT_STRING X509V3_F_V2I_AUTHORITY_INFO_ACCESS:139:v2i_AUTHORITY_INFO_ACCESS diff --git a/crypto/objects/obj_dat.c b/crypto/objects/obj_dat.c index fb82f25..ef2d1e0 100644 --- a/crypto/objects/obj_dat.c +++ b/crypto/objects/obj_dat.c @@ -350,7 +350,7 @@ int OBJ_obj2nid(const ASN1_OBJECT *a) ASN1_OBJECT *OBJ_txt2obj(const char *s, int no_name) { int nid = NID_undef; - ASN1_OBJECT *op = NULL; + ASN1_OBJECT *op; unsigned char *buf; unsigned char *p; const unsigned char *cp; @@ -376,8 +376,10 @@ ASN1_OBJECT *OBJ_txt2obj(const char *s, int no_name) if (j < 0) return NULL; - if ((buf = OPENSSL_malloc(j)) == NULL) + if ((buf = OPENSSL_malloc(j)) == NULL) { + OBJerr(OBJ_F_OBJ_TXT2OBJ, ERR_R_MALLOC_FAILURE); return NULL; + } p = buf; /* Write out tag+length */ diff --git a/crypto/objects/obj_err.c b/crypto/objects/obj_err.c index 9b4779a..be4f11c 100644 --- a/crypto/objects/obj_err.c +++ b/crypto/objects/obj_err.c @@ -22,6 +22,7 @@ static const ERR_STRING_DATA OBJ_str_functs[] = { {ERR_PACK(ERR_LIB_OBJ, OBJ_F_OBJ_NID2LN, 0), "OBJ_nid2ln"}, {ERR_PACK(ERR_LIB_OBJ, OBJ_F_OBJ_NID2OBJ, 0), "OBJ_nid2obj"}, {ERR_PACK(ERR_LIB_OBJ, OBJ_F_OBJ_NID2SN, 0), "OBJ_nid2sn"}, + {ERR_PACK(ERR_LIB_OBJ, OBJ_F_OBJ_TXT2OBJ, 0), "OBJ_txt2obj"}, {0, NULL} }; diff --git a/crypto/pkcs12/p12_utl.c b/crypto/pkcs12/p12_utl.c index 0701478..df5901a 100644 --- a/crypto/pkcs12/p12_utl.c +++ b/crypto/pkcs12/p12_utl.c @@ -22,8 +22,10 @@ unsigned char *OPENSSL_asc2uni(const char *asc, int asclen, if (asclen == -1) asclen = strlen(asc); ulen = asclen * 2 + 2; - if ((unitmp = OPENSSL_malloc(ulen)) == NULL) + if ((unitmp = OPENSSL_malloc(ulen)) == NULL) { + PKCS12err(PKCS12_F_OPENSSL_ASC2UNI, ERR_R_MALLOC_FAILURE); return NULL; + } for (i = 0; i < ulen - 2; i += 2) { unitmp[i] = 0; unitmp[i + 1] = asc[i >> 1]; @@ -50,8 +52,10 @@ char *OPENSSL_uni2asc(const unsigned char *uni, int unilen) if (!unilen || uni[unilen - 1]) asclen++; uni++; - if ((asctmp = OPENSSL_malloc(asclen)) == NULL) + if ((asctmp = OPENSSL_malloc(asclen)) == NULL) { + PKCS12err(PKCS12_F_OPENSSL_UNI2ASC, ERR_R_MALLOC_FAILURE); return NULL; + } for (i = 0; i < unilen; i += 2) asctmp[i >> 1] = uni[i]; asctmp[asclen - 1] = 0; @@ -110,9 +114,10 @@ unsigned char *OPENSSL_utf82uni(const char *asc, int asclen, ulen += 2; /* for trailing UTF16 zero */ - if ((ret = OPENSSL_malloc(ulen)) == NULL) + if ((ret = OPENSSL_malloc(ulen)) == NULL) { + PKCS12err(PKCS12_F_OPENSSL_UTF82UNI, ERR_R_MALLOC_FAILURE); return NULL; - + } /* re-run the loop writing down UTF-16 characters in big-endian order */ for (unitmp = ret, i = 0; i < asclen; i += j) { j = UTF8_getc((const unsigned char *)asc+i, asclen-i, &utf32chr); @@ -194,8 +199,10 @@ char *OPENSSL_uni2utf8(const unsigned char *uni, int unilen) if (!unilen || (uni[unilen-2]||uni[unilen - 1])) asclen++; - if ((asctmp = OPENSSL_malloc(asclen)) == NULL) + if ((asctmp = OPENSSL_malloc(asclen)) == NULL) { + PKCS12err(PKCS12_F_OPENSSL_UNI2UTF8, ERR_R_MALLOC_FAILURE); return NULL; + } /* re-run the loop emitting UTF-8 string */ for (asclen = 0, i = 0; i < unilen; ) { diff --git a/crypto/pkcs12/pk12err.c b/crypto/pkcs12/pk12err.c index 38e7c66..38ce519 100644 --- a/crypto/pkcs12/pk12err.c +++ b/crypto/pkcs12/pk12err.c @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -14,6 +14,12 @@ #ifndef OPENSSL_NO_ERR static const ERR_STRING_DATA PKCS12_str_functs[] = { + {ERR_PACK(ERR_LIB_PKCS12, PKCS12_F_OPENSSL_ASC2UNI, 0), "OPENSSL_asc2uni"}, + {ERR_PACK(ERR_LIB_PKCS12, PKCS12_F_OPENSSL_UNI2ASC, 0), "OPENSSL_uni2asc"}, + {ERR_PACK(ERR_LIB_PKCS12, PKCS12_F_OPENSSL_UNI2UTF8, 0), + "OPENSSL_uni2utf8"}, + {ERR_PACK(ERR_LIB_PKCS12, PKCS12_F_OPENSSL_UTF82UNI, 0), + "OPENSSL_utf82uni"}, {ERR_PACK(ERR_LIB_PKCS12, PKCS12_F_PKCS12_CREATE, 0), "PKCS12_create"}, {ERR_PACK(ERR_LIB_PKCS12, PKCS12_F_PKCS12_GEN_MAC, 0), "PKCS12_gen_mac"}, {ERR_PACK(ERR_LIB_PKCS12, PKCS12_F_PKCS12_INIT, 0), "PKCS12_init"}, diff --git a/crypto/x509v3/pcy_tree.c b/crypto/x509v3/pcy_tree.c index b3d1983..9e1d640 100644 --- a/crypto/x509v3/pcy_tree.c +++ b/crypto/x509v3/pcy_tree.c @@ -163,8 +163,10 @@ static int tree_init(X509_POLICY_TREE **ptree, STACK_OF(X509) *certs, return ret; /* If we get this far initialize the tree */ - if ((tree = OPENSSL_zalloc(sizeof(*tree))) == NULL) + if ((tree = OPENSSL_zalloc(sizeof(*tree))) == NULL) { + X509V3err(X509V3_F_TREE_INIT, ERR_R_MALLOC_FAILURE); return X509_PCY_TREE_INTERNAL; + } /* * http://tools.ietf.org/html/rfc5280#section-6.1.2, figure 3. @@ -175,6 +177,7 @@ static int tree_init(X509_POLICY_TREE **ptree, STACK_OF(X509) *certs, */ if ((tree->levels = OPENSSL_zalloc(sizeof(*tree->levels)*(n+1))) == NULL) { OPENSSL_free(tree); + X509V3err(X509V3_F_TREE_INIT, ERR_R_MALLOC_FAILURE); return X509_PCY_TREE_INTERNAL; } tree->nlevel = n+1; diff --git a/crypto/x509v3/v3err.c b/crypto/x509v3/v3err.c index d1b0308..4f2ea52 100644 --- a/crypto/x509v3/v3err.c +++ b/crypto/x509v3/v3err.c @@ -71,6 +71,7 @@ static const ERR_STRING_DATA X509V3_str_functs[] = { "SXNET_get_id_asc"}, {ERR_PACK(ERR_LIB_X509V3, X509V3_F_SXNET_GET_ID_ULONG, 0), "SXNET_get_id_ulong"}, + {ERR_PACK(ERR_LIB_X509V3, X509V3_F_TREE_INIT, 0), "tree_init"}, {ERR_PACK(ERR_LIB_X509V3, X509V3_F_V2I_ASIDENTIFIERS, 0), "v2i_ASIdentifiers"}, {ERR_PACK(ERR_LIB_X509V3, X509V3_F_V2I_ASN1_BIT_STRING, 0), diff --git a/include/openssl/bioerr.h b/include/openssl/bioerr.h index de70388..f119a59 100644 --- a/include/openssl/bioerr.h +++ b/include/openssl/bioerr.h @@ -24,10 +24,12 @@ int ERR_load_BIO_strings(void); # define BIO_F_ADDR_STRINGS 134 # define BIO_F_BIO_ACCEPT 101 # define BIO_F_BIO_ACCEPT_EX 137 +# define BIO_F_BIO_ACCEPT_NEW 152 # define BIO_F_BIO_ADDR_NEW 144 # define BIO_F_BIO_BIND 147 # define BIO_F_BIO_CALLBACK_CTRL 131 # define BIO_F_BIO_CONNECT 138 +# define BIO_F_BIO_CONNECT_NEW 153 # define BIO_F_BIO_CTRL 103 # define BIO_F_BIO_GETS 104 # define BIO_F_BIO_GET_HOST_IP 106 @@ -70,6 +72,8 @@ int ERR_load_BIO_strings(void); # define BIO_F_LINEBUFFER_CTRL 129 # define BIO_F_LINEBUFFER_NEW 151 # define BIO_F_MEM_WRITE 117 +# define BIO_F_NBIOF_NEW 154 +# define BIO_F_SLG_WRITE 155 # define BIO_F_SSL_NEW 118 /* diff --git a/include/openssl/bnerr.h b/include/openssl/bnerr.h index 297b8c5..8a022cc 100644 --- a/include/openssl/bnerr.h +++ b/include/openssl/bnerr.h @@ -57,11 +57,13 @@ int ERR_load_BN_strings(void); # define BN_F_BN_MOD_INVERSE_NO_BRANCH 139 # define BN_F_BN_MOD_LSHIFT_QUICK 119 # define BN_F_BN_MOD_SQRT 121 +# define BN_F_BN_MONT_CTX_NEW 149 # define BN_F_BN_MPI2BN 112 # define BN_F_BN_NEW 113 # define BN_F_BN_POOL_GET 147 # define BN_F_BN_RAND 114 # define BN_F_BN_RAND_RANGE 122 +# define BN_F_BN_RECP_CTX_NEW 150 # define BN_F_BN_RSHIFT 146 # define BN_F_BN_SET_WORDS 144 # define BN_F_BN_STACK_PUSH 148 diff --git a/include/openssl/ecerr.h b/include/openssl/ecerr.h index 202088d..320c651 100644 --- a/include/openssl/ecerr.h +++ b/include/openssl/ecerr.h @@ -114,6 +114,7 @@ int ERR_load_EC_strings(void); # define EC_F_EC_GROUP_SET_CURVE_GF2M 176 # define EC_F_EC_GROUP_SET_CURVE_GFP 109 # define EC_F_EC_GROUP_SET_GENERATOR 111 +# define EC_F_EC_GROUP_SET_SEED 286 # define EC_F_EC_KEY_CHECK_KEY 177 # define EC_F_EC_KEY_COPY 178 # define EC_F_EC_KEY_GENERATE_KEY 179 diff --git a/include/openssl/objectserr.h b/include/openssl/objectserr.h index e965791..02308df 100644 --- a/include/openssl/objectserr.h +++ b/include/openssl/objectserr.h @@ -27,6 +27,7 @@ int ERR_load_OBJ_strings(void); # define OBJ_F_OBJ_NID2LN 102 # define OBJ_F_OBJ_NID2OBJ 103 # define OBJ_F_OBJ_NID2SN 104 +# define OBJ_F_OBJ_TXT2OBJ 108 /* * OBJ reason codes. diff --git a/include/openssl/pkcs12err.h b/include/openssl/pkcs12err.h index ba82043..c7184ff 100644 --- a/include/openssl/pkcs12err.h +++ b/include/openssl/pkcs12err.h @@ -19,6 +19,10 @@ int ERR_load_PKCS12_strings(void); /* * PKCS12 function codes. */ +# define PKCS12_F_OPENSSL_ASC2UNI 121 +# define PKCS12_F_OPENSSL_UNI2ASC 124 +# define PKCS12_F_OPENSSL_UNI2UTF8 127 +# define PKCS12_F_OPENSSL_UTF82UNI 129 # define PKCS12_F_PKCS12_CREATE 105 # define PKCS12_F_PKCS12_GEN_MAC 107 # define PKCS12_F_PKCS12_INIT 109 diff --git a/include/openssl/x509v3err.h b/include/openssl/x509v3err.h index f961339..6b3df12 100644 --- a/include/openssl/x509v3err.h +++ b/include/openssl/x509v3err.h @@ -54,6 +54,7 @@ int ERR_load_X509V3_strings(void); # define X509V3_F_SXNET_ADD_ID_ULONG 127 # define X509V3_F_SXNET_GET_ID_ASC 128 # define X509V3_F_SXNET_GET_ID_ULONG 129 +# define X509V3_F_TREE_INIT 172 # define X509V3_F_V2I_ASIDENTIFIERS 163 # define X509V3_F_V2I_ASN1_BIT_STRING 101 # define X509V3_F_V2I_AUTHORITY_INFO_ACCESS 139 From bernd.edlinger at hotmail.de Thu Apr 26 16:35:40 2018 From: bernd.edlinger at hotmail.de (bernd.edlinger at hotmail.de) Date: Thu, 26 Apr 2018 16:35:40 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524760540.902045.9800.nullmailer@dev.openssl.org> The branch master has been updated via bc6614484563f975a380bc97e907ce289036b802 (commit) from f06080cb3da93e99755edb5f19e7ccc132aeba36 (commit) - Log ----------------------------------------------------------------- commit bc6614484563f975a380bc97e907ce289036b802 Author: Bernd Edlinger Date: Mon Apr 16 14:16:26 2018 +0200 Wait max. 60 seconds for s_client to connect Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/5964) ----------------------------------------------------------------------- Summary of changes: util/perl/TLSProxy/Proxy.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/perl/TLSProxy/Proxy.pm b/util/perl/TLSProxy/Proxy.pm index de6d2fd..8df0153 100644 --- a/util/perl/TLSProxy/Proxy.pm +++ b/util/perl/TLSProxy/Proxy.pm @@ -349,7 +349,7 @@ sub clientstart # Wait for incoming connection from client my $fdset = IO::Select->new($self->{proxy_sock}); - if (!$fdset->can_read(1)) { + if (!$fdset->can_read(60)) { kill(3, $self->{real_serverpid}); die "s_client didn't try to connect\n"; } From bernd.edlinger at hotmail.de Thu Apr 26 16:40:44 2018 From: bernd.edlinger at hotmail.de (bernd.edlinger at hotmail.de) Date: Thu, 26 Apr 2018 16:40:44 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524760844.938349.11546.nullmailer@dev.openssl.org> The branch master has been updated via 74a8acbdfb2c7f398d1ae2fe914cd32b437f6df4 (commit) from bc6614484563f975a380bc97e907ce289036b802 (commit) - Log ----------------------------------------------------------------- commit 74a8acbdfb2c7f398d1ae2fe914cd32b437f6df4 Author: Bernd Edlinger Date: Thu Apr 26 18:39:51 2018 +0200 Fix memleaks in async api Fixes: #5950 Reviewed-by: Matt Caswell Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6038) ----------------------------------------------------------------------- Summary of changes: crypto/async/async.c | 74 +++++++++++++++++++++++++---------------- crypto/include/internal/async.h | 1 + crypto/init.c | 4 +-- 3 files changed, 49 insertions(+), 30 deletions(-) diff --git a/crypto/async/async.c b/crypto/async/async.c index 2874790..7c6cf5b 100644 --- a/crypto/async/async.c +++ b/crypto/async/async.c @@ -30,11 +30,12 @@ static CRYPTO_THREAD_LOCAL ctxkey; static CRYPTO_THREAD_LOCAL poolkey; -static void async_free_pool_internal(async_pool *pool); - static async_ctx *async_ctx_new(void) { - async_ctx *nctx = NULL; + async_ctx *nctx; + + if (!ossl_init_thread_start(OPENSSL_INIT_THREAD_ASYNC)) + return NULL; nctx = OPENSSL_malloc(sizeof(*nctx)); if (nctx == NULL) { @@ -57,9 +58,6 @@ err: async_ctx *async_get_ctx(void) { - if (!OPENSSL_init_crypto(OPENSSL_INIT_ASYNC, NULL)) - return NULL; - return (async_ctx *)CRYPTO_THREAD_get_local(&ctxkey); } @@ -169,16 +167,19 @@ void async_start_func(void) int ASYNC_start_job(ASYNC_JOB **job, ASYNC_WAIT_CTX *wctx, int *ret, int (*func)(void *), void *args, size_t size) { - async_ctx *ctx = async_get_ctx(); + async_ctx *ctx; + + if (!OPENSSL_init_crypto(OPENSSL_INIT_ASYNC, NULL)) + return ASYNC_ERR; + + ctx = async_get_ctx(); if (ctx == NULL) ctx = async_ctx_new(); - if (ctx == NULL) { + if (ctx == NULL) return ASYNC_ERR; - } - if (*job) { + if (*job) ctx->currjob = *job; - } for (;;) { if (ctx->currjob != NULL) { @@ -219,9 +220,8 @@ int ASYNC_start_job(ASYNC_JOB **job, ASYNC_WAIT_CTX *wctx, int *ret, } /* Start a new job */ - if ((ctx->currjob = async_get_pool_job()) == NULL) { + if ((ctx->currjob = async_get_pool_job()) == NULL) return ASYNC_NO_JOBS; - } if (args != NULL) { ctx->currjob->funcargs = OPENSSL_malloc(size); @@ -323,12 +323,11 @@ int ASYNC_init_thread(size_t max_size, size_t init_size) return 0; } - if (!OPENSSL_init_crypto(OPENSSL_INIT_ASYNC, NULL)) { + if (!OPENSSL_init_crypto(OPENSSL_INIT_ASYNC, NULL)) return 0; - } - if (!ossl_init_thread_start(OPENSSL_INIT_THREAD_ASYNC)) { + + if (!ossl_init_thread_start(OPENSSL_INIT_THREAD_ASYNC)) return 0; - } pool = OPENSSL_zalloc(sizeof(*pool)); if (pool == NULL) { @@ -369,32 +368,41 @@ int ASYNC_init_thread(size_t max_size, size_t init_size) return 1; err: - async_free_pool_internal(pool); + async_empty_pool(pool); + sk_ASYNC_JOB_free(pool->jobs); + OPENSSL_free(pool); return 0; } -static void async_free_pool_internal(async_pool *pool) +void async_delete_thread_state(void) { - if (pool == NULL) - return; + async_pool *pool = (async_pool *)CRYPTO_THREAD_get_local(&poolkey); - async_empty_pool(pool); - sk_ASYNC_JOB_free(pool->jobs); - OPENSSL_free(pool); - CRYPTO_THREAD_set_local(&poolkey, NULL); + if (pool != NULL) { + async_empty_pool(pool); + sk_ASYNC_JOB_free(pool->jobs); + OPENSSL_free(pool); + CRYPTO_THREAD_set_local(&poolkey, NULL); + } async_local_cleanup(); async_ctx_free(); } void ASYNC_cleanup_thread(void) { - async_free_pool_internal((async_pool *)CRYPTO_THREAD_get_local(&poolkey)); + if (!OPENSSL_init_crypto(OPENSSL_INIT_ASYNC, NULL)) + return; + + async_delete_thread_state(); } ASYNC_JOB *ASYNC_get_current_job(void) { async_ctx *ctx; + if (!OPENSSL_init_crypto(OPENSSL_INIT_ASYNC, NULL)) + return NULL; + ctx = async_get_ctx(); if (ctx == NULL) return NULL; @@ -409,7 +417,12 @@ ASYNC_WAIT_CTX *ASYNC_get_wait_ctx(ASYNC_JOB *job) void ASYNC_block_pause(void) { - async_ctx *ctx = async_get_ctx(); + async_ctx *ctx; + + if (!OPENSSL_init_crypto(OPENSSL_INIT_ASYNC, NULL)) + return; + + ctx = async_get_ctx(); if (ctx == NULL || ctx->currjob == NULL) { /* * We're not in a job anyway so ignore this @@ -421,7 +434,12 @@ void ASYNC_block_pause(void) void ASYNC_unblock_pause(void) { - async_ctx *ctx = async_get_ctx(); + async_ctx *ctx; + + if (!OPENSSL_init_crypto(OPENSSL_INIT_ASYNC, NULL)) + return; + + ctx = async_get_ctx(); if (ctx == NULL || ctx->currjob == NULL) { /* * We're not in a job anyway so ignore this diff --git a/crypto/include/internal/async.h b/crypto/include/internal/async.h index db56258..747e0b8 100644 --- a/crypto/include/internal/async.h +++ b/crypto/include/internal/async.h @@ -11,4 +11,5 @@ int async_init(void); void async_deinit(void); +void async_delete_thread_state(void); diff --git a/crypto/init.c b/crypto/init.c index fb7e3ac..2c8b48f 100644 --- a/crypto/init.c +++ b/crypto/init.c @@ -370,9 +370,9 @@ static void ossl_init_thread_stop(struct thread_local_inits_st *locals) if (locals->async) { #ifdef OPENSSL_INIT_DEBUG fprintf(stderr, "OPENSSL_INIT: ossl_init_thread_stop: " - "ASYNC_cleanup_thread()\n"); + "async_delete_thread_state()\n"); #endif - ASYNC_cleanup_thread(); + async_delete_thread_state(); } if (locals->err_state) { From bernd.edlinger at hotmail.de Thu Apr 26 16:41:57 2018 From: bernd.edlinger at hotmail.de (bernd.edlinger at hotmail.de) Date: Thu, 26 Apr 2018 16:41:57 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1524760917.060068.12445.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via ba1cf1b1a130f31deee8736dc225e77b746fe5df (commit) from db747425b0caae12e73c680799b57bdfcc72dbb4 (commit) - Log ----------------------------------------------------------------- commit ba1cf1b1a130f31deee8736dc225e77b746fe5df Author: Bernd Edlinger Date: Thu Apr 26 18:39:51 2018 +0200 Fix memleaks in async api Fixes: #5950 Reviewed-by: Matt Caswell Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6038) (cherry picked from commit 74a8acbdfb2c7f398d1ae2fe914cd32b437f6df4) ----------------------------------------------------------------------- Summary of changes: crypto/async/async.c | 74 +++++++++++++++++++++++++---------------- crypto/include/internal/async.h | 1 + crypto/init.c | 4 +-- 3 files changed, 49 insertions(+), 30 deletions(-) diff --git a/crypto/async/async.c b/crypto/async/async.c index 9a4e6b2..6191df9 100644 --- a/crypto/async/async.c +++ b/crypto/async/async.c @@ -30,11 +30,12 @@ static CRYPTO_THREAD_LOCAL ctxkey; static CRYPTO_THREAD_LOCAL poolkey; -static void async_free_pool_internal(async_pool *pool); - static async_ctx *async_ctx_new(void) { - async_ctx *nctx = NULL; + async_ctx *nctx; + + if (!ossl_init_thread_start(OPENSSL_INIT_THREAD_ASYNC)) + return NULL; nctx = OPENSSL_malloc(sizeof(async_ctx)); if (nctx == NULL) { @@ -57,9 +58,6 @@ err: async_ctx *async_get_ctx(void) { - if (!OPENSSL_init_crypto(OPENSSL_INIT_ASYNC, NULL)) - return NULL; - return (async_ctx *)CRYPTO_THREAD_get_local(&ctxkey); } @@ -169,16 +167,19 @@ void async_start_func(void) int ASYNC_start_job(ASYNC_JOB **job, ASYNC_WAIT_CTX *wctx, int *ret, int (*func)(void *), void *args, size_t size) { - async_ctx *ctx = async_get_ctx(); + async_ctx *ctx; + + if (!OPENSSL_init_crypto(OPENSSL_INIT_ASYNC, NULL)) + return ASYNC_ERR; + + ctx = async_get_ctx(); if (ctx == NULL) ctx = async_ctx_new(); - if (ctx == NULL) { + if (ctx == NULL) return ASYNC_ERR; - } - if (*job) { + if (*job) ctx->currjob = *job; - } for (;;) { if (ctx->currjob != NULL) { @@ -219,9 +220,8 @@ int ASYNC_start_job(ASYNC_JOB **job, ASYNC_WAIT_CTX *wctx, int *ret, } /* Start a new job */ - if ((ctx->currjob = async_get_pool_job()) == NULL) { + if ((ctx->currjob = async_get_pool_job()) == NULL) return ASYNC_NO_JOBS; - } if (args != NULL) { ctx->currjob->funcargs = OPENSSL_malloc(size); @@ -323,12 +323,11 @@ int ASYNC_init_thread(size_t max_size, size_t init_size) return 0; } - if (!OPENSSL_init_crypto(OPENSSL_INIT_ASYNC, NULL)) { + if (!OPENSSL_init_crypto(OPENSSL_INIT_ASYNC, NULL)) return 0; - } - if (!ossl_init_thread_start(OPENSSL_INIT_THREAD_ASYNC)) { + + if (!ossl_init_thread_start(OPENSSL_INIT_THREAD_ASYNC)) return 0; - } pool = OPENSSL_zalloc(sizeof(*pool)); if (pool == NULL) { @@ -369,32 +368,41 @@ int ASYNC_init_thread(size_t max_size, size_t init_size) return 1; err: - async_free_pool_internal(pool); + async_empty_pool(pool); + sk_ASYNC_JOB_free(pool->jobs); + OPENSSL_free(pool); return 0; } -static void async_free_pool_internal(async_pool *pool) +void async_delete_thread_state(void) { - if (pool == NULL) - return; + async_pool *pool = (async_pool *)CRYPTO_THREAD_get_local(&poolkey); - async_empty_pool(pool); - sk_ASYNC_JOB_free(pool->jobs); - OPENSSL_free(pool); - CRYPTO_THREAD_set_local(&poolkey, NULL); + if (pool != NULL) { + async_empty_pool(pool); + sk_ASYNC_JOB_free(pool->jobs); + OPENSSL_free(pool); + CRYPTO_THREAD_set_local(&poolkey, NULL); + } async_local_cleanup(); async_ctx_free(); } void ASYNC_cleanup_thread(void) { - async_free_pool_internal((async_pool *)CRYPTO_THREAD_get_local(&poolkey)); + if (!OPENSSL_init_crypto(OPENSSL_INIT_ASYNC, NULL)) + return; + + async_delete_thread_state(); } ASYNC_JOB *ASYNC_get_current_job(void) { async_ctx *ctx; + if (!OPENSSL_init_crypto(OPENSSL_INIT_ASYNC, NULL)) + return NULL; + ctx = async_get_ctx(); if (ctx == NULL) return NULL; @@ -409,7 +417,12 @@ ASYNC_WAIT_CTX *ASYNC_get_wait_ctx(ASYNC_JOB *job) void ASYNC_block_pause(void) { - async_ctx *ctx = async_get_ctx(); + async_ctx *ctx; + + if (!OPENSSL_init_crypto(OPENSSL_INIT_ASYNC, NULL)) + return; + + ctx = async_get_ctx(); if (ctx == NULL || ctx->currjob == NULL) { /* * We're not in a job anyway so ignore this @@ -421,7 +434,12 @@ void ASYNC_block_pause(void) void ASYNC_unblock_pause(void) { - async_ctx *ctx = async_get_ctx(); + async_ctx *ctx; + + if (!OPENSSL_init_crypto(OPENSSL_INIT_ASYNC, NULL)) + return; + + ctx = async_get_ctx(); if (ctx == NULL || ctx->currjob == NULL) { /* * We're not in a job anyway so ignore this diff --git a/crypto/include/internal/async.h b/crypto/include/internal/async.h index db56258..747e0b8 100644 --- a/crypto/include/internal/async.h +++ b/crypto/include/internal/async.h @@ -11,4 +11,5 @@ int async_init(void); void async_deinit(void); +void async_delete_thread_state(void); diff --git a/crypto/init.c b/crypto/init.c index 5ed321f..4eb163e 100644 --- a/crypto/init.c +++ b/crypto/init.c @@ -365,9 +365,9 @@ static void ossl_init_thread_stop(struct thread_local_inits_st *locals) if (locals->async) { #ifdef OPENSSL_INIT_DEBUG fprintf(stderr, "OPENSSL_INIT: ossl_init_thread_stop: " - "ASYNC_cleanup_thread()\n"); + "async_delete_thread_state()\n"); #endif - ASYNC_cleanup_thread(); + async_delete_thread_state(); } if (locals->err_state) { From rsalz at openssl.org Thu Apr 26 18:16:07 2018 From: rsalz at openssl.org (Rich Salz) Date: Thu, 26 Apr 2018 18:16:07 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524766567.714351.24100.nullmailer@dev.openssl.org> The branch master has been updated via fe1128dc2a6e7aae9010cf6595c78245e0eefd46 (commit) from 74a8acbdfb2c7f398d1ae2fe914cd32b437f6df4 (commit) - Log ----------------------------------------------------------------- commit fe1128dc2a6e7aae9010cf6595c78245e0eefd46 Author: Rich Salz Date: Thu Apr 26 14:02:24 2018 -0400 Fix last(?) batch of malloc-NULL places Add a script to find them in the future Reviewed-by: Bernd Edlinger (Merged from https://github.com/openssl/openssl/pull/6103) ----------------------------------------------------------------------- Summary of changes: crypto/comp/comp_err.c | 3 ++- crypto/comp/comp_lib.c | 5 ++++- crypto/cpt_err.c | 5 +++++ crypto/err/openssl.txt | 6 ++++++ crypto/lhash/lhash.c | 9 ++++++++- crypto/stack/stack.c | 10 +++++++--- include/openssl/comperr.h | 1 + include/openssl/cryptoerr.h | 4 ++++ include/openssl/sslerr.h | 1 + ssl/record/rec_layer_d1.c | 4 +++- ssl/ssl_err.c | 2 ++ .../04-test_bio_callback.t => util/check-malloc-errs | 14 +++++++++----- 12 files changed, 52 insertions(+), 12 deletions(-) copy test/recipes/04-test_bio_callback.t => util/check-malloc-errs (57%) mode change 100644 => 100755 diff --git a/crypto/comp/comp_err.c b/crypto/comp/comp_err.c index 5aff502..2dca315 100644 --- a/crypto/comp/comp_err.c +++ b/crypto/comp/comp_err.c @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -18,6 +18,7 @@ static const ERR_STRING_DATA COMP_str_functs[] = { {ERR_PACK(ERR_LIB_COMP, COMP_F_BIO_ZLIB_NEW, 0), "bio_zlib_new"}, {ERR_PACK(ERR_LIB_COMP, COMP_F_BIO_ZLIB_READ, 0), "bio_zlib_read"}, {ERR_PACK(ERR_LIB_COMP, COMP_F_BIO_ZLIB_WRITE, 0), "bio_zlib_write"}, + {ERR_PACK(ERR_LIB_COMP, COMP_F_COMP_CTX_NEW, 0), "COMP_CTX_new"}, {0, NULL} }; diff --git a/crypto/comp/comp_lib.c b/crypto/comp/comp_lib.c index e509f59..6ae2114 100644 --- a/crypto/comp/comp_lib.c +++ b/crypto/comp/comp_lib.c @@ -12,14 +12,17 @@ #include #include #include +#include #include "comp_lcl.h" COMP_CTX *COMP_CTX_new(COMP_METHOD *meth) { COMP_CTX *ret; - if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) + if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) { + COMPerr(COMP_F_COMP_CTX_NEW, ERR_R_MALLOC_FAILURE); return NULL; + } ret->meth = meth; if ((ret->meth->init != NULL) && !ret->meth->init(ret)) { OPENSSL_free(ret); diff --git a/crypto/cpt_err.c b/crypto/cpt_err.c index da1004d..4147b1c 100644 --- a/crypto/cpt_err.c +++ b/crypto/cpt_err.c @@ -40,11 +40,16 @@ static const ERR_STRING_DATA CRYPTO_str_functs[] = { "OPENSSL_hexstr2buf"}, {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_OPENSSL_INIT_CRYPTO, 0), "OPENSSL_init_crypto"}, + {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_OPENSSL_LH_NEW, 0), "OPENSSL_LH_new"}, + {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_OPENSSL_SK_DEEP_COPY, 0), + "OPENSSL_sk_deep_copy"}, + {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_OPENSSL_SK_DUP, 0), "OPENSSL_sk_dup"}, {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_PKEY_HMAC_INIT, 0), "pkey_hmac_init"}, {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_PKEY_POLY1305_INIT, 0), "pkey_poly1305_init"}, {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_PKEY_SIPHASH_INIT, 0), "pkey_siphash_init"}, + {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_SK_RESERVE, 0), "sk_reserve"}, {0, NULL} }; diff --git a/crypto/err/openssl.txt b/crypto/err/openssl.txt index b9457b9..155a8f3 100644 --- a/crypto/err/openssl.txt +++ b/crypto/err/openssl.txt @@ -320,6 +320,7 @@ COMP_F_BIO_ZLIB_FLUSH:99:bio_zlib_flush COMP_F_BIO_ZLIB_NEW:100:bio_zlib_new COMP_F_BIO_ZLIB_READ:101:bio_zlib_read COMP_F_BIO_ZLIB_WRITE:102:bio_zlib_write +COMP_F_COMP_CTX_NEW:103:COMP_CTX_new CONF_F_CONF_DUMP_FP:104:CONF_dump_fp CONF_F_CONF_LOAD:100:CONF_load CONF_F_CONF_LOAD_FP:103:CONF_load_fp @@ -359,9 +360,13 @@ CRYPTO_F_OPENSSL_BUF2HEXSTR:117:OPENSSL_buf2hexstr CRYPTO_F_OPENSSL_FOPEN:119:openssl_fopen CRYPTO_F_OPENSSL_HEXSTR2BUF:118:OPENSSL_hexstr2buf CRYPTO_F_OPENSSL_INIT_CRYPTO:116:OPENSSL_init_crypto +CRYPTO_F_OPENSSL_LH_NEW:126:OPENSSL_LH_new +CRYPTO_F_OPENSSL_SK_DEEP_COPY:127:OPENSSL_sk_deep_copy +CRYPTO_F_OPENSSL_SK_DUP:128:OPENSSL_sk_dup CRYPTO_F_PKEY_HMAC_INIT:123:pkey_hmac_init CRYPTO_F_PKEY_POLY1305_INIT:124:pkey_poly1305_init CRYPTO_F_PKEY_SIPHASH_INIT:125:pkey_siphash_init +CRYPTO_F_SK_RESERVE:129:sk_reserve CT_F_CTLOG_NEW:117:CTLOG_new CT_F_CTLOG_NEW_FROM_BASE64:118:CTLOG_new_from_base64 CT_F_CTLOG_NEW_FROM_CONF:119:ctlog_new_from_conf @@ -1101,6 +1106,7 @@ SSL_F_DTLS_CONSTRUCT_HELLO_VERIFY_REQUEST:385:\ dtls_construct_hello_verify_request SSL_F_DTLS_GET_REASSEMBLED_MESSAGE:370:dtls_get_reassembled_message SSL_F_DTLS_PROCESS_HELLO_VERIFY:386:dtls_process_hello_verify +SSL_F_DTLS_RECORD_LAYER_NEW:635:DTLS_RECORD_LAYER_new SSL_F_DTLS_WAIT_FOR_DRY:592:dtls_wait_for_dry SSL_F_EARLY_DATA_COUNT_OK:532:early_data_count_ok SSL_F_FINAL_EARLY_DATA:556:final_early_data diff --git a/crypto/lhash/lhash.c b/crypto/lhash/lhash.c index 38c084d..116274b 100644 --- a/crypto/lhash/lhash.c +++ b/crypto/lhash/lhash.c @@ -12,6 +12,7 @@ #include #include #include +#include #include "lhash_lcl.h" /* @@ -45,8 +46,14 @@ OPENSSL_LHASH *OPENSSL_LH_new(OPENSSL_LH_HASHFUNC h, OPENSSL_LH_COMPFUNC c) { OPENSSL_LHASH *ret; - if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) + if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) { + /* + * Do not set the error code, because the ERR code uses LHASH + * and we want to avoid possible endless error loop. + * CRYPTOerr(CRYPTO_F_OPENSSL_LH_NEW, ERR_R_MALLOC_FAILURE); + */ return NULL; + } if ((ret->b = OPENSSL_zalloc(sizeof(*ret->b) * MIN_NODES)) == NULL) goto err; ret->comp = ((c == NULL) ? (OPENSSL_LH_COMPFUNC)strcmp : c); diff --git a/crypto/stack/stack.c b/crypto/stack/stack.c index 5fc4eb8..975515d 100644 --- a/crypto/stack/stack.c +++ b/crypto/stack/stack.c @@ -46,8 +46,10 @@ OPENSSL_STACK *OPENSSL_sk_dup(const OPENSSL_STACK *sk) { OPENSSL_STACK *ret; - if ((ret = OPENSSL_malloc(sizeof(*ret))) == NULL) + if ((ret = OPENSSL_malloc(sizeof(*ret))) == NULL) { + CRYPTOerr(CRYPTO_F_OPENSSL_SK_DUP, ERR_R_MALLOC_FAILURE); return NULL; + } /* direct structure assignment */ *ret = *sk; @@ -75,8 +77,10 @@ OPENSSL_STACK *OPENSSL_sk_deep_copy(const OPENSSL_STACK *sk, OPENSSL_STACK *ret; int i; - if ((ret = OPENSSL_malloc(sizeof(*ret))) == NULL) + if ((ret = OPENSSL_malloc(sizeof(*ret))) == NULL) { + CRYPTOerr(CRYPTO_F_OPENSSL_SK_DEEP_COPY, ERR_R_MALLOC_FAILURE); return NULL; + } /* direct structure assignment */ *ret = *sk; @@ -174,7 +178,7 @@ static int sk_reserve(OPENSSL_STACK *st, int n, int exact) * so |num_alloc| value is |n| or |min_nodes| if greater than |n|. */ if ((st->data = OPENSSL_zalloc(sizeof(void *) * num_alloc)) == NULL) { - /* STACKerr(STACK_F_SK_RESERVE, ERR_R_MALLOC_FAILURE); */ + CRYPTOerr(CRYPTO_F_SK_RESERVE, ERR_R_MALLOC_FAILURE); return 0; } st->num_alloc = num_alloc; diff --git a/include/openssl/comperr.h b/include/openssl/comperr.h index 5a1c8df..edea63a 100644 --- a/include/openssl/comperr.h +++ b/include/openssl/comperr.h @@ -27,6 +27,7 @@ int ERR_load_COMP_strings(void); # define COMP_F_BIO_ZLIB_NEW 100 # define COMP_F_BIO_ZLIB_READ 101 # define COMP_F_BIO_ZLIB_WRITE 102 +# define COMP_F_COMP_CTX_NEW 103 /* * COMP reason codes. diff --git a/include/openssl/cryptoerr.h b/include/openssl/cryptoerr.h index 85c1952..e127ff6 100644 --- a/include/openssl/cryptoerr.h +++ b/include/openssl/cryptoerr.h @@ -35,9 +35,13 @@ int ERR_load_CRYPTO_strings(void); # define CRYPTO_F_OPENSSL_FOPEN 119 # define CRYPTO_F_OPENSSL_HEXSTR2BUF 118 # define CRYPTO_F_OPENSSL_INIT_CRYPTO 116 +# define CRYPTO_F_OPENSSL_LH_NEW 126 +# define CRYPTO_F_OPENSSL_SK_DEEP_COPY 127 +# define CRYPTO_F_OPENSSL_SK_DUP 128 # define CRYPTO_F_PKEY_HMAC_INIT 123 # define CRYPTO_F_PKEY_POLY1305_INIT 124 # define CRYPTO_F_PKEY_SIPHASH_INIT 125 +# define CRYPTO_F_SK_RESERVE 129 /* * CRYPTO reason codes. diff --git a/include/openssl/sslerr.h b/include/openssl/sslerr.h index 5c6718f..8e395cd 100644 --- a/include/openssl/sslerr.h +++ b/include/openssl/sslerr.h @@ -55,6 +55,7 @@ int ERR_load_SSL_strings(void); # define SSL_F_DTLS_CONSTRUCT_HELLO_VERIFY_REQUEST 385 # define SSL_F_DTLS_GET_REASSEMBLED_MESSAGE 370 # define SSL_F_DTLS_PROCESS_HELLO_VERIFY 386 +# define SSL_F_DTLS_RECORD_LAYER_NEW 635 # define SSL_F_DTLS_WAIT_FOR_DRY 592 # define SSL_F_EARLY_DATA_COUNT_OK 532 # define SSL_F_FINAL_EARLY_DATA 556 diff --git a/ssl/record/rec_layer_d1.c b/ssl/record/rec_layer_d1.c index 90029a2..e3e168d 100644 --- a/ssl/record/rec_layer_d1.c +++ b/ssl/record/rec_layer_d1.c @@ -20,8 +20,10 @@ int DTLS_RECORD_LAYER_new(RECORD_LAYER *rl) { DTLS_RECORD_LAYER *d; - if ((d = OPENSSL_malloc(sizeof(*d))) == NULL) + if ((d = OPENSSL_malloc(sizeof(*d))) == NULL) { + SSLerr(SSL_F_DTLS_RECORD_LAYER_NEW, ERR_R_MALLOC_FAILURE); return 0; + } rl->d = d; diff --git a/ssl/ssl_err.c b/ssl/ssl_err.c index 0a86a7e..bce2036 100644 --- a/ssl/ssl_err.c +++ b/ssl/ssl_err.c @@ -67,6 +67,8 @@ static const ERR_STRING_DATA SSL_str_functs[] = { "dtls_get_reassembled_message"}, {ERR_PACK(ERR_LIB_SSL, SSL_F_DTLS_PROCESS_HELLO_VERIFY, 0), "dtls_process_hello_verify"}, + {ERR_PACK(ERR_LIB_SSL, SSL_F_DTLS_RECORD_LAYER_NEW, 0), + "DTLS_RECORD_LAYER_new"}, {ERR_PACK(ERR_LIB_SSL, SSL_F_DTLS_WAIT_FOR_DRY, 0), "dtls_wait_for_dry"}, {ERR_PACK(ERR_LIB_SSL, SSL_F_EARLY_DATA_COUNT_OK, 0), "early_data_count_ok"}, diff --git a/test/recipes/04-test_bio_callback.t b/util/check-malloc-errs old mode 100644 new mode 100755 similarity index 57% copy from test/recipes/04-test_bio_callback.t copy to util/check-malloc-errs index 1422cb6..1e63240 --- a/test/recipes/04-test_bio_callback.t +++ b/util/check-malloc-errs @@ -1,4 +1,4 @@ -#! /usr/bin/env perl +#! /bin/sh # Copyright 2018 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use @@ -6,7 +6,11 @@ # in the file LICENSE in the source distribution or at # https://www.openssl.org/source/license.html - -use OpenSSL::Test::Simple; - -simple_test("test_bio_callback", "bio_callback_test"); +( + pcregrep -rnM 'OPENSSL_.?alloc.*\n.*if.*NULL.*\n.*return' crypto ssl + pcregrep -rnM 'if.*OPENSSL_.?alloc.*NULL.*\n.*.*return' crypto ssl +) | tee /tmp/out$$ +X=0 +test -s /tmp/out$$ && X=1 +rm /tmp/out$$ +exit $X From levitte at openssl.org Thu Apr 26 19:19:55 2018 From: levitte at openssl.org (Richard Levitte) Date: Thu, 26 Apr 2018 19:19:55 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524770395.814368.1651.nullmailer@dev.openssl.org> The branch master has been updated via 6fb7b08987b57a3a90d426fcad6ca24e6a11c705 (commit) from fe1128dc2a6e7aae9010cf6595c78245e0eefd46 (commit) - Log ----------------------------------------------------------------- commit 6fb7b08987b57a3a90d426fcad6ca24e6a11c705 Author: Richard Levitte Date: Thu Apr 26 17:41:46 2018 +0200 15-test_out_option: Refactor and don't test directory write on VMS To my surprise, it turns out that on OpenVMS, opening './' (which is translated to '[]') for writing actually creates a file, '[].'. On OpenVMS, this is a perfectly valid file with no name or extension, just the delimiter between the two. Because of the mess the exception would generate in the test recipe, it gets refactored again, to clearly separate each test inside it, and use skips to avoid some of them (that makes it clear that they are skipped and why, when running the recipe). Reviewed-by: Andy Polyakov (Merged from https://github.com/openssl/openssl/pull/6100) ----------------------------------------------------------------------- Summary of changes: test/recipes/15-test_out_option.t | 69 ++++++++++++++++++++++----------------- 1 file changed, 39 insertions(+), 30 deletions(-) diff --git a/test/recipes/15-test_out_option.t b/test/recipes/15-test_out_option.t index e1129cc..9c2a954 100644 --- a/test/recipes/15-test_out_option.t +++ b/test/recipes/15-test_out_option.t @@ -16,49 +16,58 @@ use OpenSSL::Test::Utils; setup("test_out_option"); -# Paths that should generate failure when trying to write to them. -# Directories are a safe bet for failure on all platforms. -# Note that directories must end with a slash here, because of how -# File::Spec massages them into directory specs on some platforms. -my @failure_paths = ( - './', - ); -my @success_paths = ( - 'randomname.bin' - ); +plan tests => 4; -# Test for trying to create a file in a non-exist directory -my $rand_path = ""; -do { - my @chars = ("A".."Z", "a".."z", "0".."9"); - $rand_path .= $chars[rand @chars] for 1..32; -} while (-d File::Spec->catdir('.', $rand_path)); -$rand_path .= "/randomname.bin"; +# Test 1 +SKIP: { + # Paths that should generate failure when trying to write to them. + # Directories are a safe bet for failure on most platforms. + # Notably, this isn't true on OpenVMS, as a default file name is + # appended under the hood when trying to "write" to a directory spec. + # From observation, that file is '.' (i.e. a file with no file name + # and no extension), so '[]' gets translated to '[].' + skip 'Directories become writable files on OpenVMS', 1 if $^O eq 'VMS'; -push @failure_paths, $rand_path; + # Note that directories must end with a slash here, because of how + # File::Spec massages them into directory specs on some platforms. + my $path = File::Spec->canonpath('./'); + ok(!run(app([ 'openssl', 'rand', '-out', $path, '1'])), + "invalid output path: $path"); +} -# All explicit cross compilations run a risk of failing this, because the -# null device provided by perl might not match what the cross compiled -# application expects to see as a null device. Therefore, we skip the check -# of outputing to the null device if the cross compile prefix is set. -if ((config('CROSS_COMPILE') // '') eq '') { - # Check that we can write to the NULL device - push @success_paths, File::Spec->devnull(); +# Test 2 +{ + my $path = File::Spec->canonpath('randomname.bin'); + ok(run(app([ 'openssl', 'rand', '-out', $path, '1'])), + "valid output path: $path"); } -plan tests => scalar @failure_paths + scalar @success_paths; +# Test 3 +{ + # Test for trying to create a file in a non-exist directory + my $rand_path = ""; + do { + my @chars = ("A".."Z", "a".."z", "0".."9"); + $rand_path .= $chars[rand @chars] for 1..32; + } while (-d File::Spec->catdir('.', $rand_path)); + $rand_path .= "/randomname.bin"; -foreach (@failure_paths) { - my $path = File::Spec->canonpath($_); + my $path = File::Spec->canonpath($rand_path); ok(!run(app([ 'openssl', 'rand', '-out', $path, '1'])), "invalid output path: $path"); } -foreach (@success_paths) { - my $path = File::Spec->canonpath($_); + +# Test 4 +SKIP: { + skip "It's not safe to use perl's idea of the NULL device in an explicitly cross compiled build", 1 + unless (config('CROSS_COMPILE') // '') eq ''; + + my $path = File::Spec->canonpath(File::Spec->devnull()); ok(run(app([ 'openssl', 'rand', '-out', $path, '1'])), "valid output path: $path"); } +# Cleanup END { unlink 'randomname.bin' if -f 'randomname.bin'; } From matthias.st.pierre at ncp-e.com Thu Apr 26 19:36:42 2018 From: matthias.st.pierre at ncp-e.com (matthias.st.pierre at ncp-e.com) Date: Thu, 26 Apr 2018 19:36:42 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524771402.896565.3906.nullmailer@dev.openssl.org> The branch master has been updated via 32c6985349ba134761f75a3f61814234d096a1df (commit) from 6fb7b08987b57a3a90d426fcad6ca24e6a11c705 (commit) - Log ----------------------------------------------------------------- commit 32c6985349ba134761f75a3f61814234d096a1df Author: Dr. Matthias St. Pierre Date: Thu Apr 26 13:57:14 2018 +0200 Fix mixed indentation (and other whitespace issues) Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/6094) ----------------------------------------------------------------------- Summary of changes: apps/spkac.c | 2 +- crypto/pem/pem_pkey.c | 2 +- crypto/pkcs12/p12_utl.c | 4 +-- crypto/poly1305/poly1305_ieee754.c | 74 +++++++++++++++++++------------------- engines/e_capi.c | 16 +++++---- ssl/t1_trce.c | 12 +++---- 6 files changed, 56 insertions(+), 54 deletions(-) diff --git a/apps/spkac.c b/apps/spkac.c index 8ed9dd9..f384af6 100644 --- a/apps/spkac.c +++ b/apps/spkac.c @@ -98,7 +98,7 @@ int spkac_main(int argc, char **argv) case OPT_KEYFORM: if (!opt_format(opt_arg(), OPT_FMT_ANY, &keyformat)) goto opthelp; - break; + break; case OPT_CHALLENGE: challenge = opt_arg(); break; diff --git a/crypto/pem/pem_pkey.c b/crypto/pem/pem_pkey.c index 62eb91c..8c4797c 100644 --- a/crypto/pem/pem_pkey.c +++ b/crypto/pem/pem_pkey.c @@ -33,7 +33,7 @@ EVP_PKEY *PEM_read_bio_PrivateKey(BIO *bp, EVP_PKEY **x, pem_password_cb *cb, EVP_PKEY *ret = NULL; if (!PEM_bytes_read_bio_secmem(&data, &len, &nm, PEM_STRING_EVP_PKEY, bp, - cb, u)) + cb, u)) return NULL; p = data; diff --git a/crypto/pkcs12/p12_utl.c b/crypto/pkcs12/p12_utl.c index df5901a..7a8023b 100644 --- a/crypto/pkcs12/p12_utl.c +++ b/crypto/pkcs12/p12_utl.c @@ -101,10 +101,10 @@ unsigned char *OPENSSL_utf82uni(const char *asc, int asclen, * decoding failure... */ if (j < 0) - return OPENSSL_asc2uni(asc, asclen, uni, unilen); + return OPENSSL_asc2uni(asc, asclen, uni, unilen); if (utf32chr > 0x10FFFF) /* UTF-16 cap */ - return NULL; + return NULL; if (utf32chr >= 0x10000) /* pair of UTF-16 characters */ ulen += 2*2; diff --git a/crypto/poly1305/poly1305_ieee754.c b/crypto/poly1305/poly1305_ieee754.c index e9aaae3..995a02e 100644 --- a/crypto/poly1305/poly1305_ieee754.c +++ b/crypto/poly1305/poly1305_ieee754.c @@ -20,30 +20,30 @@ * for x86_64 code. And since we are at it, just for sense of it, * large-block performance in cycles per processed byte for *this* code * is: - * gcc-4.8 icc-15.0 clang-3.4(*) + * gcc-4.8 icc-15.0 clang-3.4(*) * - * Westmere 4.96 5.09 4.37 - * Sandy Bridge 4.95 4.90 4.17 - * Haswell 4.92 4.87 3.78 - * Bulldozer 4.67 4.49 4.68 - * VIA Nano 7.07 7.05 5.98 - * Silvermont 10.6 9.61 12.6 + * Westmere 4.96 5.09 4.37 + * Sandy Bridge 4.95 4.90 4.17 + * Haswell 4.92 4.87 3.78 + * Bulldozer 4.67 4.49 4.68 + * VIA Nano 7.07 7.05 5.98 + * Silvermont 10.6 9.61 12.6 * - * (*) clang managed to discover parallelism and deployed SIMD; + * (*) clang managed to discover parallelism and deployed SIMD; * * And for range of other platforms with unspecified gcc versions: * - * Freescale e300 12.5 - * PPC74x0 10.8 - * POWER6 4.92 - * POWER7 4.50 - * POWER8 4.10 + * Freescale e300 12.5 + * PPC74x0 10.8 + * POWER6 4.92 + * POWER7 4.50 + * POWER8 4.10 * - * z10 11.2 - * z196+ 7.30 + * z10 11.2 + * z196+ 7.30 * - * UltraSPARC III 16.0 - * SPARC T4 16.1 + * UltraSPARC III 16.0 + * SPARC T4 16.1 */ #if !(defined(__GNUC__) && __GNUC__>=2) @@ -57,33 +57,33 @@ typedef unsigned int u32; typedef unsigned long long u64; typedef union { double d; u64 u; } elem64; -#define TWO(p) ((double)(1ULL<<(p))) -#define TWO0 TWO(0) -#define TWO32 TWO(32) -#define TWO64 (TWO32*TWO(32)) -#define TWO96 (TWO64*TWO(32)) -#define TWO130 (TWO96*TWO(34)) +#define TWO(p) ((double)(1ULL<<(p))) +#define TWO0 TWO(0) +#define TWO32 TWO(32) +#define TWO64 (TWO32*TWO(32)) +#define TWO96 (TWO64*TWO(32)) +#define TWO130 (TWO96*TWO(34)) -#define EXP(p) ((1023ULL+(p))<<52) +#define EXP(p) ((1023ULL+(p))<<52) #if defined(__x86_64__) || (defined(__PPC__) && defined(__LITTLE_ENDIAN__)) -# define U8TOU32(p) (*(const u32 *)(p)) -# define U32TO8(p,v) (*(u32 *)(p) = (v)) +# define U8TOU32(p) (*(const u32 *)(p)) +# define U32TO8(p,v) (*(u32 *)(p) = (v)) #elif defined(__PPC__) -# define U8TOU32(p) ({u32 ret; asm ("lwbrx %0,0,%1":"=r"(ret):"b"(p)); ret; }) -# define U32TO8(p,v) asm ("stwbrx %0,0,%1"::"r"(v),"b"(p):"memory") +# define U8TOU32(p) ({u32 ret; asm ("lwbrx %0,0,%1":"=r"(ret):"b"(p)); ret; }) +# define U32TO8(p,v) asm ("stwbrx %0,0,%1"::"r"(v),"b"(p):"memory") #elif defined(__s390x__) -# define U8TOU32(p) ({u32 ret; asm ("lrv %0,%1":"=d"(ret):"m"(*(u32 *)(p))); ret; }) -# define U32TO8(p,v) asm ("strv %1,%0":"=m"(*(u32 *)(p)):"d"(v)) +# define U8TOU32(p) ({u32 ret; asm ("lrv %0,%1":"=d"(ret):"m"(*(u32 *)(p))); ret; }) +# define U32TO8(p,v) asm ("strv %1,%0":"=m"(*(u32 *)(p)):"d"(v)) #endif #ifndef U8TOU32 -# define U8TOU32(p) ((u32)(p)[0] | (u32)(p)[1]<<8 | \ - (u32)(p)[2]<<16 | (u32)(p)[3]<<24 ) +# define U8TOU32(p) ((u32)(p)[0] | (u32)(p)[1]<<8 | \ + (u32)(p)[2]<<16 | (u32)(p)[3]<<24 ) #endif #ifndef U32TO8 -# define U32TO8(p,v) ((p)[0] = (u8)(v), (p)[1] = (u8)((v)>>8), \ - (p)[2] = (u8)((v)>>16), (p)[3] = (u8)((v)>>24) ) +# define U32TO8(p,v) ((p)[0] = (u8)(v), (p)[1] = (u8)((v)>>8), \ + (p)[2] = (u8)((v)>>16), (p)[3] = (u8)((v)>>24) ) #endif typedef struct { @@ -359,9 +359,9 @@ void poly1305_blocks(void *ctx, const unsigned char *inp, size_t len, #ifndef __clang__ fast_entry: #endif - /* - * base 2^32 * base 2^16 = base 2^48 - */ + /* + * base 2^32 * base 2^16 = base 2^48 + */ h0lo = s3lo * x1 + s2lo * x2 + s1lo * x3 + r0lo * x0; h1lo = r0lo * x1 + s3lo * x2 + s2lo * x3 + r1lo * x0; h2lo = r1lo * x1 + r0lo * x2 + s3lo * x3 + r2lo * x0; diff --git a/engines/e_capi.c b/engines/e_capi.c index 4660f1a..1a12350 100644 --- a/engines/e_capi.c +++ b/engines/e_capi.c @@ -577,7 +577,7 @@ static int bind_helper(ENGINE *e, const char *id) } IMPLEMENT_DYNAMIC_CHECK_FN() - IMPLEMENT_DYNAMIC_BIND_FN(bind_helper) +IMPLEMENT_DYNAMIC_BIND_FN(bind_helper) # else static ENGINE *engine_capi(void) { @@ -835,7 +835,7 @@ int capi_rsa_sign(int dtype, const unsigned char *m, unsigned int m_len, CAPIerr(CAPI_F_CAPI_RSA_SIGN, CAPI_R_CANT_GET_KEY); return -1; } -/* Convert the signature type to a CryptoAPI algorithm ID */ + /* Convert the signature type to a CryptoAPI algorithm ID */ switch (dtype) { case NID_sha256: alg = CALG_SHA_256; @@ -870,13 +870,13 @@ int capi_rsa_sign(int dtype, const unsigned char *m, unsigned int m_len, } } -/* Create the hash object */ + /* Create the hash object */ if (!CryptCreateHash(capi_key->hprov, alg, 0, 0, &hash)) { CAPIerr(CAPI_F_CAPI_RSA_SIGN, CAPI_R_CANT_CREATE_HASH_OBJECT); capi_addlasterror(); return -1; } -/* Set the hash value to the value passed */ + /* Set the hash value to the value passed */ if (!CryptSetHashParam(hash, HP_HASHVAL, (unsigned char *)m, 0)) { CAPIerr(CAPI_F_CAPI_RSA_SIGN, CAPI_R_CANT_SET_HASH_VALUE); @@ -884,7 +884,7 @@ int capi_rsa_sign(int dtype, const unsigned char *m, unsigned int m_len, goto err; } -/* Finally sign it */ + /* Finally sign it */ slen = RSA_size(rsa); if (!CryptSignHash(hash, capi_key->keyspec, NULL, 0, sigret, &slen)) { CAPIerr(CAPI_F_CAPI_RSA_SIGN, CAPI_R_ERROR_SIGNING_HASH); @@ -1477,8 +1477,10 @@ static CAPI_KEY *capi_get_key(CAPI_CTX *ctx, const WCHAR *contname, ptype = PROV_RSA_AES; } if (ctx && ctx->debug_level >= CAPI_DBG_TRACE && ctx->debug_file) { - /* above 'if' is [complementary] copy from CAPI_trace and serves - * as optimization to minimize [below] malloc-ations */ + /* + * above 'if' is [complementary] copy from CAPI_trace and serves + * as optimization to minimize [below] malloc-ations + */ char *_contname = wide_to_asc(contname); char *_provname = wide_to_asc(provname); diff --git a/ssl/t1_trce.c b/ssl/t1_trce.c index 394df98..5287326 100644 --- a/ssl/t1_trce.c +++ b/ssl/t1_trce.c @@ -19,11 +19,11 @@ typedef struct { } ssl_trace_tbl; # define ssl_trace_str(val, tbl) \ - do_ssl_trace_str(val, tbl, OSSL_NELEM(tbl)) + do_ssl_trace_str(val, tbl, OSSL_NELEM(tbl)) # define ssl_trace_list(bio, indent, msg, msglen, value, table) \ - do_ssl_trace_list(bio, indent, msg, msglen, value, \ - table, OSSL_NELEM(table)) + do_ssl_trace_list(bio, indent, msg, msglen, value, \ + table, OSSL_NELEM(table)) static const char *do_ssl_trace_str(int val, const ssl_trace_tbl *tbl, size_t ntbl) @@ -1362,8 +1362,8 @@ static int ssl_print_ticket(BIO *bio, int indent, const SSL *ssl, if (msglen < 4) return 0; - ticket_age_add = (msg[0] << 24) | (msg[1] << 16) | (msg[2] << 8) - | msg[3]; + ticket_age_add = + (msg[0] << 24) | (msg[1] << 16) | (msg[2] << 8) | msg[3]; msglen -= 4; msg += 4; BIO_indent(bio, indent + 2, 80); @@ -1505,7 +1505,7 @@ void SSL_trace(int write_p, int version, int content_type, /* avoid overlapping with length at the end of buffer */ if (msglen < (size_t)(SSL_IS_DTLS(ssl) ? - DTLS1_RT_HEADER_LENGTH : SSL3_RT_HEADER_LENGTH)) { + DTLS1_RT_HEADER_LENGTH : SSL3_RT_HEADER_LENGTH)) { BIO_puts(bio, write_p ? "Sent" : "Received"); ssl_print_hex(bio, 0, " too short message", msg, msglen); break; From levitte at openssl.org Fri Apr 27 04:00:18 2018 From: levitte at openssl.org (Richard Levitte) Date: Fri, 27 Apr 2018 04:00:18 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_0_2-stable update Message-ID: <1524801618.112386.28113.nullmailer@dev.openssl.org> The branch OpenSSL_1_0_2-stable has been updated via b10794b5309a42bd3ea30d824ce1068e5189e66f (commit) via 60ced074c48fa265b3eccf91a89dec374b4c7e49 (commit) via 76b8b6932d17414b460f72e15ba8050d609ce768 (commit) from aadcf069828431819970421749da64b24b559490 (commit) - Log ----------------------------------------------------------------- commit b10794b5309a42bd3ea30d824ce1068e5189e66f Author: Cristian Stoica Date: Wed Jun 29 17:45:59 2016 +0300 s_server: fix warnings unused-but-set-variable (no-dh) This patch fixes the following two warnings when OpenSSL is built with no-dh option: s_server.c: In function 's_server_main': s_server.c:1105:25: warning: variable 'no_dhe' set but not used [-Wunused-but-set-variable] int no_tmp_rsa = 0, no_dhe = 0, no_ecdhe = 0, nocert = 0; ^ s_server.c:1101:11: warning: variable 'dhfile' set but not used [-Wunused-but-set-variable] char *dhfile = NULL; ^ CLA: trivial Signed-off-by: Cristian Stoica Reviewed-by: Rich Salz Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/6087) commit 60ced074c48fa265b3eccf91a89dec374b4c7e49 Author: Cristian Stoica Date: Wed Jun 29 18:34:33 2016 +0300 fix warning unused-but-set-variable 'alg_k' (no-dh and no-ec) This patch fixes the following warning when OpenSSL is configured with no-dh and no-ec: ./Configure no-ec no-dh linux-x86_64 ... s3_lib.c: In function 'ssl3_get_req_cert_type': s3_lib.c:4234:19: warning: variable 'alg_k' set but not used [-Wunused-but-set-variable] unsigned long alg_k; CLA: trivial Signed-off-by: Cristian Stoica Reviewed-by: Rich Salz Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/6087) commit 76b8b6932d17414b460f72e15ba8050d609ce768 Author: Cristian Stoica Date: Wed Jun 29 18:30:58 2016 +0300 fix warning unused-but-set-variable 'nostrict' (no-dh and no-ec) This patch fixes the following warning when OpenSSL is configured with no-dh and no-ec: ./Configure no-ec no-dh linux-x86_64 ... s3_lib.c:4231:9: warning: variable 'nostrict' set but not used [-Wunused-but-set-variable] int nostrict = 1; ^ CLA: trivial Signed-off-by: Cristian Stoica Reviewed-by: Rich Salz Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/6087) ----------------------------------------------------------------------- Summary of changes: apps/s_server.c | 21 ++++++++++++++++----- ssl/s3_lib.c | 10 ++++++++++ 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/apps/s_server.c b/apps/s_server.c index f1ab691..9570f07 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -1087,11 +1087,14 @@ int MAIN(int argc, char *argv[]) char *chCApath = NULL, *chCAfile = NULL; char *vfyCApath = NULL, *vfyCAfile = NULL; unsigned char *context = NULL; +#ifndef OPENSSL_NO_DH char *dhfile = NULL; + int no_dhe = 0; +#endif int badop = 0; int ret = 1; int build_chain = 0; - int no_tmp_rsa = 0, no_dhe = 0, no_ecdhe = 0, nocert = 0; + int no_tmp_rsa = 0, no_ecdhe = 0, nocert = 0; int state = 0; const SSL_METHOD *meth = NULL; int socket_type = SOCK_STREAM; @@ -1239,11 +1242,15 @@ int MAIN(int argc, char *argv[]) if (--argc < 1) goto bad; s_chain_file = *(++argv); - } else if (strcmp(*argv, "-dhparam") == 0) { + } +#ifndef OPENSSL_NO_DH + else if (strcmp(*argv, "-dhparam") == 0) { if (--argc < 1) goto bad; dhfile = *(++argv); - } else if (strcmp(*argv, "-dcertform") == 0) { + } +#endif + else if (strcmp(*argv, "-dcertform") == 0) { if (--argc < 1) goto bad; s_dcert_format = str2fmt(*(++argv)); @@ -1390,9 +1397,13 @@ int MAIN(int argc, char *argv[]) verify_quiet = 1; } else if (strcmp(*argv, "-no_tmp_rsa") == 0) { no_tmp_rsa = 1; - } else if (strcmp(*argv, "-no_dhe") == 0) { + } +#ifndef OPENSSL_NO_DH + else if (strcmp(*argv, "-no_dhe") == 0) { no_dhe = 1; - } else if (strcmp(*argv, "-no_ecdhe") == 0) { + } +#endif + else if (strcmp(*argv, "-no_ecdhe") == 0) { no_ecdhe = 1; } else if (strcmp(*argv, "-no_resume_ephemeral") == 0) { no_resume_ephemeral = 1; diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c index 7e27dae..633c954 100644 --- a/ssl/s3_lib.c +++ b/ssl/s3_lib.c @@ -4228,8 +4228,13 @@ int ssl3_get_req_cert_type(SSL *s, unsigned char *p) #ifndef OPENSSL_NO_ECDSA int have_ecdsa_sign = 0; #endif +#if !defined(OPENSSL_NO_DH) || !defined(OPENSSL_NO_ECDH) int nostrict = 1; +#endif +#if !defined(OPENSSL_NO_GOST) || !defined(OPENSSL_NO_DH) || \ + !defined(OPENSSL_NO_ECDH) unsigned long alg_k; +#endif /* If we have custom certificate types set, use them */ if (s->cert->ctypes) { @@ -4238,8 +4243,10 @@ int ssl3_get_req_cert_type(SSL *s, unsigned char *p) } /* get configured sigalgs */ siglen = tls12_get_psigalgs(s, 1, &sig); +#if !defined(OPENSSL_NO_DH) || !defined(OPENSSL_NO_ECDH) if (s->cert->cert_flags & SSL_CERT_FLAGS_CHECK_TLS_STRICT) nostrict = 0; +#endif for (i = 0; i < siglen; i += 2, sig += 2) { switch (sig[1]) { case TLSEXT_signature_rsa: @@ -4257,7 +4264,10 @@ int ssl3_get_req_cert_type(SSL *s, unsigned char *p) } } +#if !defined(OPENSSL_NO_GOST) || !defined(OPENSSL_NO_DH) || \ + !defined(OPENSSL_NO_ECDH) alg_k = s->s3->tmp.new_cipher->algorithm_mkey; +#endif #ifndef OPENSSL_NO_GOST if (s->version >= TLS1_VERSION) { From matt at openssl.org Fri Apr 27 08:57:57 2018 From: matt at openssl.org (Matt Caswell) Date: Fri, 27 Apr 2018 08:57:57 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524819477.625827.6529.nullmailer@dev.openssl.org> The branch master has been updated via 9e5b50b54d1032634979c224f2dd11c84f2900b7 (commit) from 32c6985349ba134761f75a3f61814234d096a1df (commit) - Log ----------------------------------------------------------------- commit 9e5b50b54d1032634979c224f2dd11c84f2900b7 Author: Billy Brumley Date: Thu Apr 26 18:08:36 2018 +0300 fix: BN_swap mishandles flags Reviewed-by: Rich Salz Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/6099) ----------------------------------------------------------------------- Summary of changes: crypto/bn/bn_lib.c | 11 +++++--- test/bntest.c | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+), 4 deletions(-) diff --git a/crypto/bn/bn_lib.c b/crypto/bn/bn_lib.c index 91553d4..5bb996e 100644 --- a/crypto/bn/bn_lib.c +++ b/crypto/bn/bn_lib.c @@ -300,6 +300,11 @@ BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b) return a; } +#define FLAGS_DATA(flags) ((flags) & (BN_FLG_STATIC_DATA \ + | BN_FLG_CONSTTIME \ + | BN_FLG_SECURE)) +#define FLAGS_STRUCT(flags) ((flags) & (BN_FLG_MALLOCED)) + void BN_swap(BIGNUM *a, BIGNUM *b) { int flags_old_a, flags_old_b; @@ -327,10 +332,8 @@ void BN_swap(BIGNUM *a, BIGNUM *b) b->dmax = tmp_dmax; b->neg = tmp_neg; - a->flags = - (flags_old_a & BN_FLG_MALLOCED) | (flags_old_b & BN_FLG_STATIC_DATA); - b->flags = - (flags_old_b & BN_FLG_MALLOCED) | (flags_old_a & BN_FLG_STATIC_DATA); + a->flags = FLAGS_STRUCT(flags_old_a) | FLAGS_DATA(flags_old_b); + b->flags = FLAGS_STRUCT(flags_old_b) | FLAGS_DATA(flags_old_a); bn_check_top(a); bn_check_top(b); } diff --git a/test/bntest.c b/test/bntest.c index d5b5e04..629707a 100644 --- a/test/bntest.c +++ b/test/bntest.c @@ -151,6 +151,78 @@ static int rand_neg(void) } +static int test_swap(void) +{ + BIGNUM *a = NULL, *b = NULL, *c = NULL, *d = NULL; + int top, cond, st = 0; + + if (!TEST_ptr(a = BN_new()) + || !TEST_ptr(b = BN_new()) + || !TEST_ptr(c = BN_new()) + || !TEST_ptr(d = BN_new())) + goto err; + + BN_bntest_rand(a, 1024, 1, 0); + BN_bntest_rand(b, 1024, 1, 0); + BN_copy(c, a); + BN_copy(d, b); + top = BN_num_bits(a)/BN_BITS2; + + /* regular swap */ + BN_swap(a, b); + if (!equalBN("swap", a, d) + || !equalBN("swap", b, c)) + goto err; + + /* conditional swap: true */ + cond = 1; + BN_consttime_swap(cond, a, b, top); + if (!equalBN("cswap true", a, c) + || !equalBN("cswap true", b, d)) + goto err; + + /* conditional swap: false */ + cond = 0; + BN_consttime_swap(cond, a, b, top); + if (!equalBN("cswap false", a, c) + || !equalBN("cswap false", b, d)) + goto err; + + /* same tests but checking flag swap */ + BN_set_flags(a, BN_FLG_CONSTTIME); + + BN_swap(a, b); + if (!equalBN("swap, flags", a, d) + || !equalBN("swap, flags", b, c) + || !TEST_true(BN_get_flags(b, BN_FLG_CONSTTIME)) + || !TEST_false(BN_get_flags(a, BN_FLG_CONSTTIME))) + goto err; + + cond = 1; + BN_consttime_swap(cond, a, b, top); + if (!equalBN("cswap true, flags", a, c) + || !equalBN("cswap true, flags", b, d) + || !TEST_true(BN_get_flags(a, BN_FLG_CONSTTIME)) + || !TEST_false(BN_get_flags(b, BN_FLG_CONSTTIME))) + goto err; + + cond = 0; + BN_consttime_swap(cond, a, b, top); + if (!equalBN("cswap false, flags", a, c) + || !equalBN("cswap false, flags", b, d) + || !TEST_true(BN_get_flags(a, BN_FLG_CONSTTIME)) + || !TEST_false(BN_get_flags(b, BN_FLG_CONSTTIME))) + goto err; + + st = 1; + err: + BN_free(a); + BN_free(b); + BN_free(c); + BN_free(d); + return st; +} + static int test_sub(void) { BIGNUM *a = NULL, *b = NULL, *c = NULL; @@ -2118,6 +2190,7 @@ int setup_tests(void) ADD_TEST(test_badmod); ADD_TEST(test_expmodzero); ADD_TEST(test_smallprime); + ADD_TEST(test_swap); #ifndef OPENSSL_NO_EC2M ADD_TEST(test_gf2m_add); ADD_TEST(test_gf2m_mod); From matt at openssl.org Fri Apr 27 09:00:41 2018 From: matt at openssl.org (Matt Caswell) Date: Fri, 27 Apr 2018 09:00:41 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1524819641.080289.7763.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via b3c586753b57a3899b40d3e10e2af45d1eb515a2 (commit) from ba1cf1b1a130f31deee8736dc225e77b746fe5df (commit) - Log ----------------------------------------------------------------- commit b3c586753b57a3899b40d3e10e2af45d1eb515a2 Author: Billy Brumley Date: Thu Apr 26 19:01:22 2018 +0300 fix: BN_swap mishandles flags (1.1.0) Reviewed-by: Rich Salz Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/6101) ----------------------------------------------------------------------- Summary of changes: crypto/bn/bn_lib.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/crypto/bn/bn_lib.c b/crypto/bn/bn_lib.c index 07b715d..c59bdb7 100644 --- a/crypto/bn/bn_lib.c +++ b/crypto/bn/bn_lib.c @@ -385,6 +385,11 @@ BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b) return (a); } +#define FLAGS_DATA(flags) ((flags) & (BN_FLG_STATIC_DATA \ + | BN_FLG_CONSTTIME \ + | BN_FLG_SECURE)) +#define FLAGS_STRUCT(flags) ((flags) & (BN_FLG_MALLOCED)) + void BN_swap(BIGNUM *a, BIGNUM *b) { int flags_old_a, flags_old_b; @@ -412,10 +417,8 @@ void BN_swap(BIGNUM *a, BIGNUM *b) b->dmax = tmp_dmax; b->neg = tmp_neg; - a->flags = - (flags_old_a & BN_FLG_MALLOCED) | (flags_old_b & BN_FLG_STATIC_DATA); - b->flags = - (flags_old_b & BN_FLG_MALLOCED) | (flags_old_a & BN_FLG_STATIC_DATA); + a->flags = FLAGS_STRUCT(flags_old_a) | FLAGS_DATA(flags_old_b); + b->flags = FLAGS_STRUCT(flags_old_b) | FLAGS_DATA(flags_old_a); bn_check_top(a); bn_check_top(b); } From matt at openssl.org Fri Apr 27 09:04:37 2018 From: matt at openssl.org (Matt Caswell) Date: Fri, 27 Apr 2018 09:04:37 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_0_2-stable update Message-ID: <1524819877.251960.9626.nullmailer@dev.openssl.org> The branch OpenSSL_1_0_2-stable has been updated via 98f2e513ce5c9425ec5d6316de30fdf4b5d333ee (commit) from b10794b5309a42bd3ea30d824ce1068e5189e66f (commit) - Log ----------------------------------------------------------------- commit 98f2e513ce5c9425ec5d6316de30fdf4b5d333ee Author: Billy Brumley Date: Thu Apr 26 19:08:59 2018 +0300 fix: BN_swap mishandles flags (1.0.2) Reviewed-by: Rich Salz Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/6102) ----------------------------------------------------------------------- Summary of changes: crypto/bn/bn_lib.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/crypto/bn/bn_lib.c b/crypto/bn/bn_lib.c index 27b9bdb..f49c61c 100644 --- a/crypto/bn/bn_lib.c +++ b/crypto/bn/bn_lib.c @@ -503,6 +503,10 @@ BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b) return (a); } +#define FLAGS_DATA(flags) ((flags) & (BN_FLG_STATIC_DATA \ + | BN_FLG_CONSTTIME)) +#define FLAGS_STRUCT(flags) ((flags) & (BN_FLG_MALLOCED)) + void BN_swap(BIGNUM *a, BIGNUM *b) { int flags_old_a, flags_old_b; @@ -530,10 +534,8 @@ void BN_swap(BIGNUM *a, BIGNUM *b) b->dmax = tmp_dmax; b->neg = tmp_neg; - a->flags = - (flags_old_a & BN_FLG_MALLOCED) | (flags_old_b & BN_FLG_STATIC_DATA); - b->flags = - (flags_old_b & BN_FLG_MALLOCED) | (flags_old_a & BN_FLG_STATIC_DATA); + a->flags = FLAGS_STRUCT(flags_old_a) | FLAGS_DATA(flags_old_b); + b->flags = FLAGS_STRUCT(flags_old_b) | FLAGS_DATA(flags_old_a); bn_check_top(a); bn_check_top(b); } From levitte at openssl.org Fri Apr 27 09:10:24 2018 From: levitte at openssl.org (Richard Levitte) Date: Fri, 27 Apr 2018 09:10:24 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524820224.625801.11892.nullmailer@dev.openssl.org> The branch master has been updated via ff25dd1a47525c88500dd61cdeb27faaea6ee599 (commit) from 9e5b50b54d1032634979c224f2dd11c84f2900b7 (commit) - Log ----------------------------------------------------------------- commit ff25dd1a47525c88500dd61cdeb27faaea6ee599 Author: Richard Levitte Date: Thu Apr 26 21:11:26 2018 +0200 apps/s_server.c: Avoid unused variable due to 'no-dtls' Fixes #6098 Reviewed-by: Matthias St. Pierre (Merged from https://github.com/openssl/openssl/pull/6104) ----------------------------------------------------------------------- Summary of changes: apps/s_server.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/apps/s_server.c b/apps/s_server.c index be1564a..ef39a4f 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -2189,9 +2189,7 @@ static int sv_body(int s, int stype, int prot, unsigned char *context) SSL *con = NULL; BIO *sbio; struct timeval timeout; -#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS) - struct timeval tv; -#else +#if !(defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)) struct timeval *timeoutp; #endif #ifndef OPENSSL_NO_DTLS @@ -2392,9 +2390,9 @@ static int sv_body(int s, int stype, int prot, unsigned char *context) * second and check for any keypress. In a proper Windows * application we wouldn't do this because it is inefficient. */ - tv.tv_sec = 1; - tv.tv_usec = 0; - i = select(width, (void *)&readfds, NULL, NULL, &tv); + timeout.tv_sec = 1; + timeout.tv_usec = 0; + i = select(width, (void *)&readfds, NULL, NULL, &timeout); if (has_stdin_waiting()) read_from_terminal = 1; if ((i < 0) || (!i && !read_from_terminal)) From matt at openssl.org Fri Apr 27 09:11:20 2018 From: matt at openssl.org (Matt Caswell) Date: Fri, 27 Apr 2018 09:11:20 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524820280.619585.13209.nullmailer@dev.openssl.org> The branch master has been updated via ddba302a0fa3b11d8cfa01d590ace853229e8f35 (commit) from ff25dd1a47525c88500dd61cdeb27faaea6ee599 (commit) - Log ----------------------------------------------------------------- commit ddba302a0fa3b11d8cfa01d590ace853229e8f35 Author: Matt Caswell Date: Thu Apr 19 13:32:45 2018 +0100 Update version docs Make it clear that you should not attempt to get the version before the first handshake is complete. Fixes #2893 Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/6013) ----------------------------------------------------------------------- Summary of changes: doc/man3/SSL_get_version.pod | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/doc/man3/SSL_get_version.pod b/doc/man3/SSL_get_version.pod index f8dd85e..c649c29 100644 --- a/doc/man3/SSL_get_version.pod +++ b/doc/man3/SSL_get_version.pod @@ -20,15 +20,14 @@ protocol information of a connection =head1 DESCRIPTION SSL_client_version() returns the protocol version used by the client when -initiating the connection. - -SSL_get_version() returns the name of the protocol used for the -connection. +initiating the connection. SSL_get_version() returns the name of the protocol +used for the connection. SSL_version() returns the protocol version used for the +connection. They should only be called after the initial handshake has been +completed. Prior to that the results returned from these functions may be +unreliable. SSL_is_dtls() returns one if the connection is using DTLS, zero if not. -SSL_version() returns the protocol version used for the connection. - =head1 RETURN VALUES SSL_get_version() returns one of the following strings: @@ -57,7 +56,7 @@ The connection uses the TLSv1.3 protocol. =item unknown -This indicates that no version has been set (no connection established). +This indicates an unknown protocol version. =back From levitte at openssl.org Fri Apr 27 09:11:22 2018 From: levitte at openssl.org (Richard Levitte) Date: Fri, 27 Apr 2018 09:11:22 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1524820282.347468.13654.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via 63f7291c219ce84298ff98fadfcd70875c3b5318 (commit) from b3c586753b57a3899b40d3e10e2af45d1eb515a2 (commit) - Log ----------------------------------------------------------------- commit 63f7291c219ce84298ff98fadfcd70875c3b5318 Author: Richard Levitte Date: Thu Apr 26 21:11:26 2018 +0200 apps/s_server.c: Avoid unused variable due to 'no-dtls' Fixes #6098 Reviewed-by: Matthias St. Pierre (Merged from https://github.com/openssl/openssl/pull/6104) (cherry picked from commit ff25dd1a47525c88500dd61cdeb27faaea6ee599) ----------------------------------------------------------------------- Summary of changes: apps/s_server.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/apps/s_server.c b/apps/s_server.c index 31c90fd..96a74c4 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -2012,9 +2012,7 @@ static int sv_body(int s, int stype, unsigned char *context) SSL *con = NULL; BIO *sbio; struct timeval timeout; -#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS) - struct timeval tv; -#else +#if !(defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)) struct timeval *timeoutp; #endif @@ -2149,9 +2147,9 @@ static int sv_body(int s, int stype, unsigned char *context) * second and check for any keypress. In a proper Windows * application we wouldn't do this because it is inefficient. */ - tv.tv_sec = 1; - tv.tv_usec = 0; - i = select(width, (void *)&readfds, NULL, NULL, &tv); + timeout.tv_sec = 1; + timeout.tv_usec = 0; + i = select(width, (void *)&readfds, NULL, NULL, &timeout); if (has_stdin_waiting()) read_from_terminal = 1; if ((i < 0) || (!i && !read_from_terminal)) From matt at openssl.org Fri Apr 27 09:12:49 2018 From: matt at openssl.org (Matt Caswell) Date: Fri, 27 Apr 2018 09:12:49 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_1_0-stable update Message-ID: <1524820369.468687.15252.nullmailer@dev.openssl.org> The branch OpenSSL_1_1_0-stable has been updated via 9737a38f34b49487223625a77860e957095cae13 (commit) from 63f7291c219ce84298ff98fadfcd70875c3b5318 (commit) - Log ----------------------------------------------------------------- commit 9737a38f34b49487223625a77860e957095cae13 Author: Matt Caswell Date: Thu Apr 19 13:32:45 2018 +0100 Update version docs Make it clear that you should not attempt to get the version before the first handshake is complete. Fixes #2893 Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/6014) ----------------------------------------------------------------------- Summary of changes: doc/ssl/SSL_get_version.pod | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/ssl/SSL_get_version.pod b/doc/ssl/SSL_get_version.pod index 23b6497..3c2f825 100644 --- a/doc/ssl/SSL_get_version.pod +++ b/doc/ssl/SSL_get_version.pod @@ -15,7 +15,9 @@ SSL_get_version, SSL_is_dtls - get the protocol information of a connection =head1 DESCRIPTION SSL_get_version() returns the name of the protocol used for the -connection B. +connection B. It should only be called after the initial handshake has been +completed. Prior to that the results returned from this function may be +unreliable. SSL_is_dtls() returns one if the connection is using DTLS, zero if not. @@ -43,7 +45,7 @@ The connection uses the TLSv1.2 protocol. =item unknown -This indicates that no version has been set (no connection established). +This indicates an unknown protocol version. =back From levitte at openssl.org Fri Apr 27 09:13:19 2018 From: levitte at openssl.org (Richard Levitte) Date: Fri, 27 Apr 2018 09:13:19 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_0_2-stable update Message-ID: <1524820399.534017.16390.nullmailer@dev.openssl.org> The branch OpenSSL_1_0_2-stable has been updated via ad2510836c8a5b03b4a63e276e370a64161cd6b8 (commit) from 98f2e513ce5c9425ec5d6316de30fdf4b5d333ee (commit) - Log ----------------------------------------------------------------- commit ad2510836c8a5b03b4a63e276e370a64161cd6b8 Author: Richard Levitte Date: Fri Apr 27 06:05:49 2018 +0200 Skip the CMS test if configured 'no-cms' Reviewed-by: Andy Polyakov (Merged from https://github.com/openssl/openssl/pull/6108) ----------------------------------------------------------------------- Summary of changes: test/cms-test.pl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/cms-test.pl b/test/cms-test.pl index baa3b59..69436f1 100644 --- a/test/cms-test.pl +++ b/test/cms-test.pl @@ -100,6 +100,13 @@ my $no_ec2m; my $no_ecdh; my $ossl8 = `$ossl_path version -v` =~ /0\.9\.8/; +system ("$ossl_path no-cms > $null_path"); +if ($? == 0) + { + print STDERR "CMS disabled. skipping...\n"; + exit 0; + } + system ("$ossl_path no-ec > $null_path"); if ($? == 0) { From matt at openssl.org Fri Apr 27 09:14:27 2018 From: matt at openssl.org (Matt Caswell) Date: Fri, 27 Apr 2018 09:14:27 +0000 Subject: [openssl-commits] [openssl] OpenSSL_1_0_2-stable update Message-ID: <1524820467.088413.17305.nullmailer@dev.openssl.org> The branch OpenSSL_1_0_2-stable has been updated via 85032506d6ac917130db3dfb7ecb76f4bfaa137e (commit) from ad2510836c8a5b03b4a63e276e370a64161cd6b8 (commit) - Log ----------------------------------------------------------------- commit 85032506d6ac917130db3dfb7ecb76f4bfaa137e Author: Matt Caswell Date: Thu Apr 19 13:32:45 2018 +0100 Update version docs Make it clear that you should not attempt to get the version before the first handshake is complete. Fixes #2893 Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/6015) ----------------------------------------------------------------------- Summary of changes: doc/ssl/SSL_get_version.pod | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/ssl/SSL_get_version.pod b/doc/ssl/SSL_get_version.pod index 9ae6f25..f0c696c 100644 --- a/doc/ssl/SSL_get_version.pod +++ b/doc/ssl/SSL_get_version.pod @@ -13,7 +13,9 @@ SSL_get_version - get the protocol version of a connection. =head1 DESCRIPTION SSL_get_version() returns the name of the protocol used for the -connection B. +connection B. It should only be called after the initial handshake has been +completed. Prior to that the results returned from this function may be +unreliable. =head1 RETURN VALUES @@ -43,7 +45,7 @@ The connection uses the TLSv1.2 protocol. =item unknown -This indicates that no version has been set (no connection established). +This indicates an unknown protocol version. =back From bernd.edlinger at hotmail.de Fri Apr 27 12:08:12 2018 From: bernd.edlinger at hotmail.de (bernd.edlinger at hotmail.de) Date: Fri, 27 Apr 2018 12:08:12 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524830892.195806.9305.nullmailer@dev.openssl.org> The branch master has been updated via 272c0df8e1aa549da9060bf70b34c9aabb3bcb0d (commit) from ddba302a0fa3b11d8cfa01d590ace853229e8f35 (commit) - Log ----------------------------------------------------------------- commit 272c0df8e1aa549da9060bf70b34c9aabb3bcb0d Author: Bernd Edlinger Date: Thu Apr 26 10:14:14 2018 +0200 Fix drbg thread cleanup and error handling Fixes: #6081 Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/6089) ----------------------------------------------------------------------- Summary of changes: crypto/rand/drbg_lib.c | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/crypto/rand/drbg_lib.c b/crypto/rand/drbg_lib.c index 16ac03b..c6397b2 100644 --- a/crypto/rand/drbg_lib.c +++ b/crypto/rand/drbg_lib.c @@ -285,8 +285,7 @@ int RAND_DRBG_instantiate(RAND_DRBG *drbg, goto end; } - if (drbg->meth == NULL) - { + if (drbg->meth == NULL) { RANDerr(RAND_F_RAND_DRBG_INSTANTIATE, RAND_R_NO_DRBG_IMPLEMENTATION_SELECTED); goto end; @@ -375,8 +374,7 @@ end: */ int RAND_DRBG_uninstantiate(RAND_DRBG *drbg) { - if (drbg->meth == NULL) - { + if (drbg->meth == NULL) { RANDerr(RAND_F_RAND_DRBG_UNINSTANTIATE, RAND_R_NO_DRBG_IMPLEMENTATION_SELECTED); return 0; @@ -413,9 +411,9 @@ int RAND_DRBG_reseed(RAND_DRBG *drbg, return 0; } - if (adin == NULL) + if (adin == NULL) { adinlen = 0; - else if (adinlen > drbg->max_adinlen) { + } else if (adinlen > drbg->max_adinlen) { RANDerr(RAND_F_RAND_DRBG_RESEED, RAND_R_ADDITIONAL_INPUT_TOO_LONG); return 0; } @@ -885,8 +883,6 @@ err: */ DEFINE_RUN_ONCE_STATIC(do_rand_drbg_init) { - int ret = 1; - /* * ensure that libcrypto is initialized, otherwise the * DRBG locks are not cleaned up properly @@ -894,17 +890,23 @@ DEFINE_RUN_ONCE_STATIC(do_rand_drbg_init) if (!OPENSSL_init_crypto(0, NULL)) return 0; - ossl_init_thread_start(OPENSSL_INIT_THREAD_RAND); - - master_drbg = drbg_setup(NULL); + if (!CRYPTO_THREAD_init_local(&private_drbg, NULL)) + return 0; - ret &= CRYPTO_THREAD_init_local(&private_drbg, NULL); - ret &= CRYPTO_THREAD_init_local(&public_drbg, NULL); + if (!CRYPTO_THREAD_init_local(&public_drbg, NULL)) + goto err1; - if (master_drbg == NULL || ret == 0) - return 0; + master_drbg = drbg_setup(NULL); + if (master_drbg == NULL) + goto err2; return 1; + +err2: + CRYPTO_THREAD_cleanup_local(&public_drbg); +err1: + CRYPTO_THREAD_cleanup_local(&private_drbg); + return 0; } /* Clean up the global DRBGs before exit */ @@ -922,9 +924,11 @@ void drbg_delete_thread_state() RAND_DRBG *drbg; drbg = CRYPTO_THREAD_get_local(&public_drbg); + CRYPTO_THREAD_set_local(&public_drbg, NULL); RAND_DRBG_free(drbg); drbg = CRYPTO_THREAD_get_local(&private_drbg); + CRYPTO_THREAD_set_local(&private_drbg, NULL); RAND_DRBG_free(drbg); } @@ -1020,7 +1024,8 @@ RAND_DRBG *RAND_DRBG_get0_public(void) drbg = CRYPTO_THREAD_get_local(&public_drbg); if (drbg == NULL) { - ossl_init_thread_start(OPENSSL_INIT_THREAD_RAND); + if (!ossl_init_thread_start(OPENSSL_INIT_THREAD_RAND)) + return NULL; drbg = drbg_setup(master_drbg); CRYPTO_THREAD_set_local(&public_drbg, drbg); } @@ -1040,7 +1045,8 @@ RAND_DRBG *RAND_DRBG_get0_private(void) drbg = CRYPTO_THREAD_get_local(&private_drbg); if (drbg == NULL) { - ossl_init_thread_start(OPENSSL_INIT_THREAD_RAND); + if (!ossl_init_thread_start(OPENSSL_INIT_THREAD_RAND)) + return NULL; drbg = drbg_setup(master_drbg); CRYPTO_THREAD_set_local(&private_drbg, drbg); } From scan-admin at coverity.com Sun Apr 29 07:20:10 2018 From: scan-admin at coverity.com (scan-admin at coverity.com) Date: Sun, 29 Apr 2018 07:20:10 +0000 (UTC) Subject: [openssl-commits] Coverity Scan: Analysis completed for openssl/openssl Message-ID: <5ae57229f30fd_92232ab1dd750f5871434@node1.mail> Your request for analysis of openssl/openssl has been completed successfully. The results are available at https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRakUl6QyjujEohY7rPpoYUEcf-2B75FkFkxwwFKGZV8c1xA-3D-3D_19DGMz38yO7VfzGQuXkecdlEmzBoDG4v8Dvyanv-2F1I162B1p2SconEmbVcOyfWR1tqVNjqA4KXZOYX52UYWMLg2-2BuHxSU1WpMRls2rE-2BFUuSVUwlvhpTO64xtEjkB-2Bvzo-2BxZM90kttpnA-2Fgygr7-2F9zSLC4nQPgCMwJhXu-2BKPRgSIErXejKlxf9zYU305M1wa6vTJHHejxKpmnXH4X5HHoLdMl2368niTax1ulurbjK0-3D Build ID: 208709 Analysis Summary: New defects found: 1 Defects eliminated: 1 If you have difficulty understanding any defects, email us at scan-admin at coverity.com, or post your question to StackOverflow at https://u2389337.ct.sendgrid.net/wf/click?upn=OgIsEqWzmIl4S-2FzEUMxLXL-2BukuZt9UUdRZhgmgzAKchwAzH1nH3073xDEXNRgHN6q227lMNIWoOb8ZgSjAjKcg-3D-3D_19DGMz38yO7VfzGQuXkecdlEmzBoDG4v8Dvyanv-2F1I162B1p2SconEmbVcOyfWR1tqVNjqA4KXZOYX52UYWMLlQ3Xpf7bz-2B7MM7-2FetNXB5-2FqMjj2-2FZ68EIQsiu1hJGtWIKGnKL9Bq4OcwUlxmXAAU2Bcci4PWqUI4uibbLh2-2BOSiHryYz1YI8mh-2FZNcyyidfhKhq3N0RKo0Iwa9eydQWAKblkIX9NsSfjBuGJeLncbY-3D From scan-admin at coverity.com Sun Apr 29 07:45:33 2018 From: scan-admin at coverity.com (scan-admin at coverity.com) Date: Sun, 29 Apr 2018 07:45:33 +0000 (UTC) Subject: [openssl-commits] Coverity Scan: Analysis completed for OpenSSL-1.0.2 Message-ID: <5ae5781d38607_7402ab1dd750f587142b@node1.mail> Your request for analysis of OpenSSL-1.0.2 has been completed successfully. The results are available at https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRakUl6QyjujEohY7rPpoYUEeuRTZVWU4ku8PUBnVPw8PQ-3D-3D_19DGMz38yO7VfzGQuXkecdlEmzBoDG4v8Dvyanv-2F1I1F734Xq07kzCpdXNvNUPya9hmdcwZO4fz4ErvKy4qatLQ-2ByGQIQOD4p8lLE3fUcX2UOCFSbSoUtJOMHuTt-2BXuIrL-2BPRtXSURAMwqEW-2FxMYNSenFgNTeM8d0ouGBfgHQ8b-2BFyRVMqf1FoXNvKAbUyI4POlR2kCF-2BZIFyCGJyARORULo2OMH9GOFh-2BrHb3lu1VU-3D Build ID: 208713 Analysis Summary: New defects found: 0 Defects eliminated: 0 From bernd.edlinger at hotmail.de Sun Apr 29 08:25:21 2018 From: bernd.edlinger at hotmail.de (bernd.edlinger at hotmail.de) Date: Sun, 29 Apr 2018 08:25:21 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1524990321.361349.1007.nullmailer@dev.openssl.org> The branch master has been updated via bf7ae7500073f85fed8a82c4f8ec981d44a8c3d6 (commit) from 272c0df8e1aa549da9060bf70b34c9aabb3bcb0d (commit) - Log ----------------------------------------------------------------- commit bf7ae7500073f85fed8a82c4f8ec981d44a8c3d6 Author: Bernd Edlinger Date: Sat Apr 28 19:09:55 2018 +0200 Don't cleanup uninitialized thread local slots Fixes: #6120 Reviewed-by: Kurt Roeckx (Merged from https://github.com/openssl/openssl/pull/6123) ----------------------------------------------------------------------- Summary of changes: crypto/rand/drbg_lib.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/crypto/rand/drbg_lib.c b/crypto/rand/drbg_lib.c index c6397b2..60ddd2f 100644 --- a/crypto/rand/drbg_lib.c +++ b/crypto/rand/drbg_lib.c @@ -912,11 +912,13 @@ err1: /* Clean up the global DRBGs before exit */ void rand_drbg_cleanup_int(void) { - RAND_DRBG_free(master_drbg); - master_drbg = NULL; + if (master_drbg != NULL) { + RAND_DRBG_free(master_drbg); + master_drbg = NULL; - CRYPTO_THREAD_cleanup_local(&private_drbg); - CRYPTO_THREAD_cleanup_local(&public_drbg); + CRYPTO_THREAD_cleanup_local(&private_drbg); + CRYPTO_THREAD_cleanup_local(&public_drbg); + } } void drbg_delete_thread_state() From no-reply at appveyor.com Sun Apr 29 18:19:51 2018 From: no-reply at appveyor.com (AppVeyor) Date: Sun, 29 Apr 2018 18:19:51 +0000 Subject: [openssl-commits] Build failed: openssl master.17667 Message-ID: <20180429181951.1.0F2C804A3641C439@appveyor.com> An HTML attachment was scrubbed... URL: From appro at openssl.org Sun Apr 29 19:39:24 2018 From: appro at openssl.org (Andy Polyakov) Date: Sun, 29 Apr 2018 19:39:24 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1525030764.270415.5580.nullmailer@dev.openssl.org> The branch master has been updated via 06444da464c038d7869908aaa26eaa728ae3a032 (commit) via 7069eaee23a1e34727b632171346112563306819 (commit) from bf7ae7500073f85fed8a82c4f8ec981d44a8c3d6 (commit) - Log ----------------------------------------------------------------- commit 06444da464c038d7869908aaa26eaa728ae3a032 Author: Andy Polyakov Date: Thu Apr 26 19:22:30 2018 +0200 Configurations/unix-Makefile.tmpl: harmonize with no-engine. Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/6106) commit 7069eaee23a1e34727b632171346112563306819 Author: Andy Polyakov Date: Thu Apr 26 19:22:04 2018 +0200 Configurations/10-main.conf: force no-engine on ios targets. Rationale for enforcing no-engine is because of disconnect between compile-time config and run-time, which is a per-application sandbox directory which one can't predict in advance. Besides, none of the bundled engines actually give an edge on iOS... Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/6106) ----------------------------------------------------------------------- Summary of changes: Configurations/10-main.conf | 3 +++ Configurations/unix-Makefile.tmpl | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf index cb3e05e..8d55ad8 100644 --- a/Configurations/10-main.conf +++ b/Configurations/10-main.conf @@ -1592,6 +1592,7 @@ my %targets = ( inherit_from => [ "darwin-common" ], cflags => add("-isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"), sys_id => "iOS", + disable => [ "engine" ], }, "ios-cross" => { inherit_from => [ "darwin-common", asm("armv4_asm") ], @@ -1601,6 +1602,7 @@ my %targets = ( cflags => add("-arch armv7 -mios-version-min=6.0.0 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"), sys_id => "iOS", perlasm_scheme => "ios32", + disable => [ "engine" ], }, "ios64-cross" => { inherit_from => [ "darwin-common", asm("aarch64_asm") ], @@ -1608,6 +1610,7 @@ my %targets = ( sys_id => "iOS", bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR", perlasm_scheme => "ios64", + disable => [ "engine" ], }, ##### GNU Hurd diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl index 799eaa8..4451232 100644 --- a/Configurations/unix-Makefile.tmpl +++ b/Configurations/unix-Makefile.tmpl @@ -369,7 +369,7 @@ test: tests RESULT_D=test-runs \ PERL="$(PERL)" \ EXE_EXT={- $exeext -} \ - OPENSSL_ENGINES=`cd ../$(BLDDIR)/engines; pwd` \ + OPENSSL_ENGINES=`cd ../$(BLDDIR)/engines 2>/dev/null && pwd` \ OPENSSL_DEBUG_MEMORY=on \ $(PERL) ../$(SRCDIR)/test/run_tests.pl $(TESTS) ) @ : {- if ($disabled{tests}) { output_on(); } else { output_off(); } "" -} From no-reply at appveyor.com Sun Apr 29 20:21:32 2018 From: no-reply at appveyor.com (AppVeyor) Date: Sun, 29 Apr 2018 20:21:32 +0000 Subject: [openssl-commits] Build completed: openssl master.17668 Message-ID: <20180429202132.1.CE05049BD5C2C83D@appveyor.com> An HTML attachment was scrubbed... URL: From kurt at openssl.org Mon Apr 30 10:01:42 2018 From: kurt at openssl.org (Kurt Roeckx) Date: Mon, 30 Apr 2018 10:01:42 +0000 Subject: [openssl-commits] [openssl] master update Message-ID: <1525082502.132021.26153.nullmailer@dev.openssl.org> The branch master has been updated via d1ae34e92d1ae11a9b650e85790a907e5939cdf6 (commit) from 06444da464c038d7869908aaa26eaa728ae3a032 (commit) - Log ----------------------------------------------------------------- commit d1ae34e92d1ae11a9b650e85790a907e5939cdf6 Author: Kurt Roeckx Date: Sat Apr 28 23:26:22 2018 +0200 Use the config file from the source not the host for the tests Fixes: #6046 Reviewed-by: Rich Salz GH: #6125 ----------------------------------------------------------------------- Summary of changes: test/run_tests.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/run_tests.pl b/test/run_tests.pl index 6343ec7..56b5ad1 100644 --- a/test/run_tests.pl +++ b/test/run_tests.pl @@ -28,6 +28,8 @@ my $bldtop = $ENV{BLDTOP} || $ENV{TOP}; my $recipesdir = catdir($srctop, "test", "recipes"); my $libdir = rel2abs(catdir($srctop, "util", "perl")); +$ENV{OPENSSL_CONF} = catdir($srctop, "apps", "openssl.cnf"); + my %tapargs = ( verbosity => $ENV{VERBOSE} || $ENV{V} || $ENV{HARNESS_VERBOSE} ? 1 : 0, lib => [ $libdir ], From no-reply at appveyor.com Mon Apr 30 10:08:23 2018 From: no-reply at appveyor.com (AppVeyor) Date: Mon, 30 Apr 2018 10:08:23 +0000 Subject: [openssl-commits] Build failed: openssl master.17679 Message-ID: <20180430100823.1.E2BB9499585512B1@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Mon Apr 30 10:52:29 2018 From: no-reply at appveyor.com (AppVeyor) Date: Mon, 30 Apr 2018 10:52:29 +0000 Subject: [openssl-commits] Build completed: openssl master.17680 Message-ID: <20180430105229.1.5AF93F2249A568AB@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Mon Apr 30 11:25:25 2018 From: no-reply at appveyor.com (AppVeyor) Date: Mon, 30 Apr 2018 11:25:25 +0000 Subject: [openssl-commits] Build failed: openssl master.17683 Message-ID: <20180430112525.1.46987FCF47CF71EB@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Mon Apr 30 11:48:12 2018 From: no-reply at appveyor.com (AppVeyor) Date: Mon, 30 Apr 2018 11:48:12 +0000 Subject: [openssl-commits] Build completed: openssl master.17684 Message-ID: <20180430114812.1.5CA353D14026CF10@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Mon Apr 30 15:25:39 2018 From: no-reply at appveyor.com (AppVeyor) Date: Mon, 30 Apr 2018 15:25:39 +0000 Subject: [openssl-commits] Build failed: openssl master.17692 Message-ID: <20180430152539.1.E09457C00B8B2A49@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Mon Apr 30 15:46:25 2018 From: no-reply at appveyor.com (AppVeyor) Date: Mon, 30 Apr 2018 15:46:25 +0000 Subject: [openssl-commits] Build completed: openssl master.17693 Message-ID: <20180430154625.1.3E9509FC7136764B@appveyor.com> An HTML attachment was scrubbed... URL: