Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/crypto/external/bsd/openssl/dist Use the official version of...
details: https://anonhg.NetBSD.org/src/rev/ff394832aded
branches: trunk
changeset: 338908:ff394832aded
user: christos <christos%NetBSD.org@localhost>
date: Tue Jun 16 20:00:13 2015 +0000
description:
Use the official version of openssl's "restore binary compatibility" fix.
Also merge new change to ssl checking.
diffstat:
crypto/external/bsd/openssl/dist/CHANGES | 6 +++++
crypto/external/bsd/openssl/dist/Makefile | 2 +-
crypto/external/bsd/openssl/dist/NEWS | 4 +++
crypto/external/bsd/openssl/dist/README | 2 +-
crypto/external/bsd/openssl/dist/crypto/hmac/hmac.c | 18 +++++-----------
crypto/external/bsd/openssl/dist/crypto/hmac/hmactest.c | 7 +++++-
crypto/external/bsd/openssl/dist/crypto/opensslv.h | 6 ++--
crypto/external/bsd/openssl/dist/openssl.spec | 2 +-
crypto/external/bsd/openssl/dist/ssl/t1_lib.c | 12 +++++-----
9 files changed, 34 insertions(+), 25 deletions(-)
diffs (199 lines):
diff -r 67886794541a -r ff394832aded crypto/external/bsd/openssl/dist/CHANGES
--- a/crypto/external/bsd/openssl/dist/CHANGES Tue Jun 16 18:12:18 2015 +0000
+++ b/crypto/external/bsd/openssl/dist/CHANGES Tue Jun 16 20:00:13 2015 +0000
@@ -2,6 +2,12 @@
OpenSSL CHANGES
_______________
+ Changes between 1.0.1n and 1.0.1o [12 Jun 2015]
+
+ *) Fix HMAC ABI incompatibility. The previous version introduced an ABI
+ incompatibility in the handling of HMAC. The previous ABI has now been
+ restored.
+
Changes between 1.0.1m and 1.0.1n [11 Jun 2015]
*) Malformed ECParameters causes infinite loop
diff -r 67886794541a -r ff394832aded crypto/external/bsd/openssl/dist/Makefile
--- a/crypto/external/bsd/openssl/dist/Makefile Tue Jun 16 18:12:18 2015 +0000
+++ b/crypto/external/bsd/openssl/dist/Makefile Tue Jun 16 20:00:13 2015 +0000
@@ -4,7 +4,7 @@
## Makefile for OpenSSL
##
-VERSION=1.0.1n
+VERSION=1.0.1o
MAJOR=1
MINOR=0.1
SHLIB_VERSION_NUMBER=1.0.0
diff -r 67886794541a -r ff394832aded crypto/external/bsd/openssl/dist/NEWS
--- a/crypto/external/bsd/openssl/dist/NEWS Tue Jun 16 18:12:18 2015 +0000
+++ b/crypto/external/bsd/openssl/dist/NEWS Tue Jun 16 20:00:13 2015 +0000
@@ -5,6 +5,10 @@
This file gives a brief overview of the major changes between each OpenSSL
release. For more details please read the CHANGES file.
+ Major changes between OpenSSL 1.0.1n and OpenSSL 1.0.1o [12 Jun 2015]
+
+ o Fix HMAC ABI incompatibility
+
Major changes between OpenSSL 1.0.1m and OpenSSL 1.0.1n [11 Jun 2015]
o Malformed ECParameters causes infinite loop (CVE-2015-1788)
diff -r 67886794541a -r ff394832aded crypto/external/bsd/openssl/dist/README
--- a/crypto/external/bsd/openssl/dist/README Tue Jun 16 18:12:18 2015 +0000
+++ b/crypto/external/bsd/openssl/dist/README Tue Jun 16 20:00:13 2015 +0000
@@ -1,5 +1,5 @@
- OpenSSL 1.0.1n 11 Jun 2015
+ OpenSSL 1.0.1o 12 Jun 2015
Copyright (c) 1998-2011 The OpenSSL Project
Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
diff -r 67886794541a -r ff394832aded crypto/external/bsd/openssl/dist/crypto/hmac/hmac.c
--- a/crypto/external/bsd/openssl/dist/crypto/hmac/hmac.c Tue Jun 16 18:12:18 2015 +0000
+++ b/crypto/external/bsd/openssl/dist/crypto/hmac/hmac.c Tue Jun 16 20:00:13 2015 +0000
@@ -65,8 +65,6 @@
# include <openssl/fips.h>
#endif
-#define HMAC_UNINIT ((unsigned int)~0)
-
int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
const EVP_MD *md, ENGINE *impl)
{
@@ -89,6 +87,9 @@
return FIPS_hmac_init_ex(ctx, key, len, md, NULL);
}
#endif
+ /* If we are changing MD then we must have a key */
+ if (md != NULL && md != ctx->md && (key == NULL || len < 0))
+ return 0;
if (md != NULL) {
reset = 1;
@@ -99,9 +100,6 @@
return 0;
}
- if (ctx->key_length == HMAC_UNINIT && key == NULL)
- return 0;
-
if (key != NULL) {
reset = 1;
j = EVP_MD_block_size(md);
@@ -144,7 +142,6 @@
goto err;
return 1;
err:
- ctx->key_length = HMAC_UNINIT;
return 0;
}
@@ -161,7 +158,7 @@
if (FIPS_mode() && !ctx->i_ctx.engine)
return FIPS_hmac_update(ctx, data, len);
#endif
- if (ctx->key_length == HMAC_UNINIT)
+ if (!ctx->md)
return 0;
return EVP_DigestUpdate(&ctx->md_ctx, data, len);
@@ -176,7 +173,7 @@
return FIPS_hmac_final(ctx, md, len);
#endif
- if (ctx->key_length == HMAC_UNINIT)
+ if (!ctx->md)
goto err;
if (!EVP_DigestFinal_ex(&ctx->md_ctx, buf, &i))
@@ -197,7 +194,6 @@
EVP_MD_CTX_init(&ctx->i_ctx);
EVP_MD_CTX_init(&ctx->o_ctx);
EVP_MD_CTX_init(&ctx->md_ctx);
- ctx->key_length = HMAC_UNINIT;
ctx->md = NULL;
}
@@ -209,10 +205,8 @@
goto err;
if (!EVP_MD_CTX_copy(&dctx->md_ctx, &sctx->md_ctx))
goto err;
+ memcpy(dctx->key, sctx->key, HMAC_MAX_MD_CBLOCK);
dctx->key_length = sctx->key_length;
- if (sctx->key_length != HMAC_UNINIT) {
- memcpy(dctx->key, sctx->key, HMAC_MAX_MD_CBLOCK);
- }
dctx->md = sctx->md;
return 1;
err:
diff -r 67886794541a -r ff394832aded crypto/external/bsd/openssl/dist/crypto/hmac/hmactest.c
--- a/crypto/external/bsd/openssl/dist/crypto/hmac/hmactest.c Tue Jun 16 18:12:18 2015 +0000
+++ b/crypto/external/bsd/openssl/dist/crypto/hmac/hmactest.c Tue Jun 16 20:00:13 2015 +0000
@@ -233,7 +233,12 @@
err++;
goto test6;
}
- if (!HMAC_Init_ex(&ctx, NULL, 0, EVP_sha256(), NULL)) {
+ if (HMAC_Init_ex(&ctx, NULL, 0, EVP_sha256(), NULL)) {
+ printf("Should disallow changing MD without a new key (test 5)\n");
+ err++;
+ goto test6;
+ }
+ if (!HMAC_Init_ex(&ctx, test[4].key, test[4].key_len, EVP_sha256(), NULL)) {
printf("Failed to reinitialise HMAC (test 5)\n");
err++;
goto test6;
diff -r 67886794541a -r ff394832aded crypto/external/bsd/openssl/dist/crypto/opensslv.h
--- a/crypto/external/bsd/openssl/dist/crypto/opensslv.h Tue Jun 16 18:12:18 2015 +0000
+++ b/crypto/external/bsd/openssl/dist/crypto/opensslv.h Tue Jun 16 20:00:13 2015 +0000
@@ -30,11 +30,11 @@
* (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for
* major minor fix final patch/beta)
*/
-# define OPENSSL_VERSION_NUMBER 0x100010efL
+# define OPENSSL_VERSION_NUMBER 0x100010ffL
# ifdef OPENSSL_FIPS
-# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1n-fips 11 Jun 2015"
+# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1o-fips 12 Jun 2015"
# else
-# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1n 11 Jun 2015"
+# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1o 12 Jun 2015"
# endif
# define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT
diff -r 67886794541a -r ff394832aded crypto/external/bsd/openssl/dist/openssl.spec
--- a/crypto/external/bsd/openssl/dist/openssl.spec Tue Jun 16 18:12:18 2015 +0000
+++ b/crypto/external/bsd/openssl/dist/openssl.spec Tue Jun 16 20:00:13 2015 +0000
@@ -7,7 +7,7 @@
Summary: Secure Sockets Layer and cryptography libraries and tools
Name: openssl
#Version: %{libmaj}.%{libmin}.%{librel}
-Version: 1.0.1n
+Version: 1.0.1o
Source0: ftp://ftp.openssl.org/source/%{name}-%{version}.tar.gz
License: OpenSSL
Group: System Environment/Libraries
diff -r 67886794541a -r ff394832aded crypto/external/bsd/openssl/dist/ssl/t1_lib.c
--- a/crypto/external/bsd/openssl/dist/ssl/t1_lib.c Tue Jun 16 18:12:18 2015 +0000
+++ b/crypto/external/bsd/openssl/dist/ssl/t1_lib.c Tue Jun 16 20:00:13 2015 +0000
@@ -1016,12 +1016,12 @@
s->srtp_profile = NULL;
- if (data >= (d + n - 2)) {
- if (data != d + n)
- goto err;
- else
- goto ri_check;
- }
+ if (data == d + n)
+ goto ri_check;
+
+ if (data > (d + n - 2))
+ goto err;
+
n2s(data, len);
if (data > (d + n - len))
Home |
Main Index |
Thread Index |
Old Index