[Pkg-openssl-changes] r776 - in openssl/branches/jessie_stable/debian: . patches
Sebastian Andrzej Siewior
bigeasy at moszumanska.debian.org
Sun May 1 20:00:01 UTC 2016
Author: bigeasy
Date: 2016-05-01 20:00:01 +0000 (Sun, 01 May 2016)
New Revision: 776
Removed:
openssl/branches/jessie_stable/debian/patches/0001-Check-public-key-is-not-NULL.patch
openssl/branches/jessie_stable/debian/patches/0001-Fix-a-failure-to-NULL-a-pointer-freed-on-error.patch
openssl/branches/jessie_stable/debian/patches/0001-Make-DTLS-always-act-as-if-read_ahead-is-set.-The-ac.patch
openssl/branches/jessie_stable/debian/patches/0001-Remove-export-ciphers-from-the-DEFAULT-cipher-list.patch
openssl/branches/jessie_stable/debian/patches/0001-fix-warning.patch
openssl/branches/jessie_stable/debian/patches/0002-Free-up-ADB-and-CHOICE-if-already-initialised.patch
openssl/branches/jessie_stable/debian/patches/0004-Fix-ASN1_TYPE_cmp.patch
openssl/branches/jessie_stable/debian/patches/0005-PKCS-7-avoid-NULL-pointer-dereferences-with-missing-.patch
openssl/branches/jessie_stable/debian/patches/0006-Fix-reachable-assert-in-SSLv2-servers.patch
openssl/branches/jessie_stable/debian/patches/0008-Fix-a-failure-to-NULL-a-pointer-freed-on-error.patch
openssl/branches/jessie_stable/debian/patches/CVE-2015-1788.patch
openssl/branches/jessie_stable/debian/patches/CVE-2015-1789.patch
openssl/branches/jessie_stable/debian/patches/CVE-2015-1790.patch
openssl/branches/jessie_stable/debian/patches/CVE-2015-1791.patch
openssl/branches/jessie_stable/debian/patches/CVE-2015-1792.patch
openssl/branches/jessie_stable/debian/patches/CVE-2015-3194.patch
openssl/branches/jessie_stable/debian/patches/CVE-2015-3195.patch
openssl/branches/jessie_stable/debian/patches/CVE-2015-3196.patch
openssl/branches/jessie_stable/debian/patches/CVE-2015-4000.patch
openssl/branches/jessie_stable/debian/patches/CVE-2016-0702.patch
openssl/branches/jessie_stable/debian/patches/CVE-2016-0705.patch
openssl/branches/jessie_stable/debian/patches/CVE-2016-0797.patch
openssl/branches/jessie_stable/debian/patches/CVE-2016-0798.patch
openssl/branches/jessie_stable/debian/patches/CVE-2016-0799.patch
openssl/branches/jessie_stable/debian/patches/Disable-EXPORT-and-LOW-ciphers.patch
Modified:
openssl/branches/jessie_stable/debian/changelog
openssl/branches/jessie_stable/debian/patches/block_digicert_malaysia.patch
openssl/branches/jessie_stable/debian/patches/block_diginotar.patch
openssl/branches/jessie_stable/debian/patches/c_rehash-compat.patch
openssl/branches/jessie_stable/debian/patches/ca.patch
openssl/branches/jessie_stable/debian/patches/config-hurd.patch
openssl/branches/jessie_stable/debian/patches/debian-targets.patch
openssl/branches/jessie_stable/debian/patches/defaults.patch
openssl/branches/jessie_stable/debian/patches/engines-path.patch
openssl/branches/jessie_stable/debian/patches/man-dir.patch
openssl/branches/jessie_stable/debian/patches/man-section.patch
openssl/branches/jessie_stable/debian/patches/no-rpath.patch
openssl/branches/jessie_stable/debian/patches/no-symbolic.patch
openssl/branches/jessie_stable/debian/patches/openssl_fix_for_x32.patch
openssl/branches/jessie_stable/debian/patches/pic.patch
openssl/branches/jessie_stable/debian/patches/ppc64el.patch
openssl/branches/jessie_stable/debian/patches/rehash-crt.patch
openssl/branches/jessie_stable/debian/patches/series
openssl/branches/jessie_stable/debian/patches/shared-lib-ext.patch
openssl/branches/jessie_stable/debian/patches/stddef.patch
openssl/branches/jessie_stable/debian/patches/valgrind.patch
openssl/branches/jessie_stable/debian/patches/version-script.patch
Log:
Update to 1.0.1s
Refresh patches & remove applied ones
Modified: openssl/branches/jessie_stable/debian/changelog
===================================================================
--- openssl/branches/jessie_stable/debian/changelog 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/changelog 2016-05-01 20:00:01 UTC (rev 776)
@@ -1,3 +1,10 @@
+openssl (1.0.1s-1+deb8u1) UNRELEASED; urgency=medium
+
+ * Update to 1.0.1s stable release (drop applied patches and refresh existing
+ ones).
+
+ -- Sebastian Andrzej Siewior <sebastian at breakpoint.cc> Sun, 01 May 2016 21:05:30 +0200
+
openssl (1.0.1k-3+deb8u4) jessie-security; urgency=medium
* Fix CVE-2016-0797
Deleted: openssl/branches/jessie_stable/debian/patches/0001-Check-public-key-is-not-NULL.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/0001-Check-public-key-is-not-NULL.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/0001-Check-public-key-is-not-NULL.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -1,27 +0,0 @@
-From 51527f1e3564f210e984fe5b654c45d34e4f03d7 Mon Sep 17 00:00:00 2001
-From: "Dr. Stephen Henson" <steve at openssl.org>
-Date: Wed, 18 Feb 2015 00:34:59 +0000
-Subject: [PATCH] Check public key is not NULL.
-
-CVE-2015-0288
-PR#3708
-
-Reviewed-by: Matt Caswell <matt at openssl.org>
-(cherry picked from commit 28a00bcd8e318da18031b2ac8778c64147cd54f9)
----
- crypto/x509/x509_req.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-Index: openssl-1.0.1e/crypto/x509/x509_req.c
-===================================================================
---- openssl-1.0.1e.orig/crypto/x509/x509_req.c
-+++ openssl-1.0.1e/crypto/x509/x509_req.c
-@@ -92,6 +92,8 @@ X509_REQ *X509_to_X509_REQ(X509 *x, EVP_
- goto err;
-
- pktmp = X509_get_pubkey(x);
-+ if (pktmp == NULL)
-+ goto err;
- i=X509_REQ_set_pubkey(ret,pktmp);
- EVP_PKEY_free(pktmp);
- if (!i) goto err;
Deleted: openssl/branches/jessie_stable/debian/patches/0001-Fix-a-failure-to-NULL-a-pointer-freed-on-error.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/0001-Fix-a-failure-to-NULL-a-pointer-freed-on-error.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/0001-Fix-a-failure-to-NULL-a-pointer-freed-on-error.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -1,45 +0,0 @@
-From 89117535f1bb3ea72a17933b703271587d7aaf0b Mon Sep 17 00:00:00 2001
-From: Matt Caswell <matt at openssl.org>
-Date: Mon, 9 Feb 2015 11:38:41 +0000
-Subject: [PATCH] Fix a failure to NULL a pointer freed on error.
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Inspired by BoringSSL commit 517073cd4b by Eric Roman <eroman at chromium.org>
-
-CVE-2015-0209
-
-Reviewed-by: Emilia Käsper <emilia at openssl.org>
----
- crypto/ec/ec_asn1.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-Index: openssl-1.0.1k/crypto/ec/ec_asn1.c
-===================================================================
---- openssl-1.0.1k.orig/crypto/ec/ec_asn1.c
-+++ openssl-1.0.1k/crypto/ec/ec_asn1.c
-@@ -1142,8 +1142,6 @@ EC_KEY *d2i_ECPrivateKey(EC_KEY **a, con
- ERR_R_MALLOC_FAILURE);
- goto err;
- }
-- if (a)
-- *a = ret;
- }
- else
- ret = *a;
-@@ -1225,11 +1223,13 @@ EC_KEY *d2i_ECPrivateKey(EC_KEY **a, con
- ret->enc_flag |= EC_PKEY_NO_PUBKEY;
- }
-
-+ if (a)
-+ *a = ret;
- ok = 1;
- err:
- if (!ok)
- {
-- if (ret)
-+ if (ret && (a == NULL || *a != ret))
- EC_KEY_free(ret);
- ret = NULL;
- }
Deleted: openssl/branches/jessie_stable/debian/patches/0001-Make-DTLS-always-act-as-if-read_ahead-is-set.-The-ac.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/0001-Make-DTLS-always-act-as-if-read_ahead-is-set.-The-ac.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/0001-Make-DTLS-always-act-as-if-read_ahead-is-set.-The-ac.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -1,28 +0,0 @@
-From 1895583835239bc44c3f6584e48f0279ad884f3b Mon Sep 17 00:00:00 2001
-From: Matt Caswell <matt at openssl.org>
-Date: Mon, 26 Jan 2015 16:47:36 +0000
-Subject: [PATCH] Make DTLS always act as if read_ahead is set. The actual
- value of read_ahead is ignored for DTLS.
-
-RT#3657
-
-Reviewed-by: Andy Polyakov <appro at openssl.org>
-(cherry picked from commit 8dd4ad0ff5d1d07ec4b6dd5d5104131269a472aa)
----
- ssl/s3_pkt.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-Index: openssl-1.0.1e/ssl/s3_pkt.c
-===================================================================
---- openssl-1.0.1e.orig/ssl/s3_pkt.c
-+++ openssl-1.0.1e/ssl/s3_pkt.c
-@@ -217,7 +217,8 @@ int ssl3_read_n(SSL *s, int n, int max,
- return -1;
- }
-
-- if (!s->read_ahead)
-+ /* We always act like read_ahead is set for DTLS */
-+ if (!s->read_ahead && !SSL_IS_DTLS(s))
- /* ignore max parameter */
- max = n;
- else
Deleted: openssl/branches/jessie_stable/debian/patches/0001-Remove-export-ciphers-from-the-DEFAULT-cipher-list.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/0001-Remove-export-ciphers-from-the-DEFAULT-cipher-list.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/0001-Remove-export-ciphers-from-the-DEFAULT-cipher-list.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -1,81 +0,0 @@
-From bc2e18a3c818ae7e2d8c996b6648aa4ae8e3ee28 Mon Sep 17 00:00:00 2001
-From: Kurt Roeckx <kurt at roeckx.be>
-Date: Wed, 4 Mar 2015 21:57:52 +0100
-Subject: [PATCH] Remove export ciphers from the DEFAULT cipher list
-
-They are moved to the COMPLEMENTOFDEFAULT instead.
-This also fixes SSLv2 to be part of COMPLEMENTOFDEFAULT.
-
-Reviewed-by: Rich Salz <rsalz at openssl.org>
-(cherry picked from commit f417997a324037025be61737288e40e171a8218c)
-
-Conflicts:
- ssl/ssl_ciph.c
----
- CHANGES | 3 ++-
- doc/apps/ciphers.pod | 4 ++--
- ssl/ssl.h | 2 +-
- ssl/ssl_ciph.c | 11 ++++++++---
- 4 files changed, 13 insertions(+), 7 deletions(-)
-
-Index: openssl-1.0.1k/doc/apps/ciphers.pod
-===================================================================
---- openssl-1.0.1k.orig/doc/apps/ciphers.pod
-+++ openssl-1.0.1k/doc/apps/ciphers.pod
-@@ -109,8 +109,8 @@ The following is a list of all permitted
-
- =item B<DEFAULT>
-
--the default cipher list. This is determined at compile time and, as of OpenSSL
--1.0.0, is normally B<ALL:!aNULL:!eNULL>. This must be the first cipher string
-+the default cipher list. This is determined at compile time and
-+is normally B<ALL:!EXPORT:!aNULL:!eNULL:!SSLv2>. This must be the firstcipher string
- specified.
-
- =item B<COMPLEMENTOFDEFAULT>
-Index: openssl-1.0.1k/ssl/ssl.h
-===================================================================
---- openssl-1.0.1k.orig/ssl/ssl.h
-+++ openssl-1.0.1k/ssl/ssl.h
-@@ -332,7 +332,7 @@ extern "C" {
- /* The following cipher list is used by default.
- * It also is substituted when an application-defined cipher list string
- * starts with 'DEFAULT'. */
--#define SSL_DEFAULT_CIPHER_LIST "ALL:!aNULL:!eNULL:!SSLv2"
-+#define SSL_DEFAULT_CIPHER_LIST "ALL:!EXPORT:!aNULL:!eNULL:!SSLv2"
- /* As of OpenSSL 1.0.0, ssl_create_cipher_list() in ssl/ssl_ciph.c always
- * starts with a reasonable order, and all we have to do for DEFAULT is
- * throwing out anonymous and unencrypted ciphersuites!
-Index: openssl-1.0.1k/ssl/ssl_ciph.c
-===================================================================
---- openssl-1.0.1k.orig/ssl/ssl_ciph.c
-+++ openssl-1.0.1k/ssl/ssl_ciph.c
-@@ -230,7 +230,7 @@ static const SSL_CIPHER cipher_aliases[]
- {0,SSL_TXT_CMPALL,0, 0,0,SSL_eNULL,0,0,0,0,0,0},
-
- /* "COMPLEMENTOFDEFAULT" (does *not* include ciphersuites not found in ALL!) */
-- {0,SSL_TXT_CMPDEF,0, SSL_kEDH|SSL_kEECDH,SSL_aNULL,~SSL_eNULL,0,0,0,0,0,0},
-+ {0, SSL_TXT_CMPDEF, 0, 0, SSL_aNULL, ~SSL_eNULL, 0, ~SSL_SSLV2, SSL_EXP_MASK, 0, 0, 0},
-
- /* key exchange aliases
- * (some of those using only a single bit here combine
-@@ -980,6 +980,10 @@ static void ssl_cipher_apply_rule(unsign
- fprintf(stderr, "\nName: %s:\nAlgo = %08lx/%08lx/%08lx/%08lx/%08lx Algo_strength = %08lx\n", cp->name, cp->algorithm_mkey, cp->algorithm_auth, cp->algorithm_enc, cp->algorithm_mac, cp->algorithm_ssl, cp->algo_strength);
- #endif
-
-+ if (algo_strength == SSL_EXP_MASK && SSL_C_IS_EXPORT(cp))
-+ goto ok;
-+ if (alg_ssl == ~SSL_SSLV2 && cp->algorithm_ssl == SSL_SSLV2)
-+ goto ok;
- if (alg_mkey && !(alg_mkey & cp->algorithm_mkey))
- continue;
- if (alg_auth && !(alg_auth & cp->algorithm_auth))
-@@ -996,6 +1000,8 @@ static void ssl_cipher_apply_rule(unsign
- continue;
- }
-
-+ ok:
-+
- #ifdef CIPHER_DEBUG
- fprintf(stderr, "Action = %d\n", rule);
- #endif
Deleted: openssl/branches/jessie_stable/debian/patches/0001-fix-warning.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/0001-fix-warning.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/0001-fix-warning.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -1,29 +0,0 @@
-From a67303954caa923e8bf2f2bdf04882e9cbc45cc1 Mon Sep 17 00:00:00 2001
-From: "Dr. Stephen Henson" <steve at openssl.org>
-Date: Sun, 8 Mar 2015 17:31:48 +0000
-Subject: [PATCH 1/6] fix warning
-
-Reviewed-by: Richard Levitte <levitte at openssl.org>
-(cherry picked from commit d6ca1cee8b6efac5906ac66443d1ca67fe689ff8)
----
- ssl/ssl_locl.h | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-Index: openssl-1.0.1e/ssl/ssl_locl.h
-===================================================================
---- openssl-1.0.1e.orig/ssl/ssl_locl.h
-+++ openssl-1.0.1e/ssl/ssl_locl.h
-@@ -346,10 +346,10 @@
- #define SSL_AEAD 0x00000040L
-
- /* Bits for algorithm_ssl (protocol version) */
--#define SSL_SSLV2 0x00000001L
--#define SSL_SSLV3 0x00000002L
-+#define SSL_SSLV2 0x00000001UL
-+#define SSL_SSLV3 0x00000002UL
- #define SSL_TLSV1 SSL_SSLV3 /* for now */
--#define SSL_TLSV1_2 0x00000004L
-+#define SSL_TLSV1_2 0x00000004UL
-
-
- /* Bits for algorithm2 (handshake digests and other extra flags) */
Deleted: openssl/branches/jessie_stable/debian/patches/0002-Free-up-ADB-and-CHOICE-if-already-initialised.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/0002-Free-up-ADB-and-CHOICE-if-already-initialised.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/0002-Free-up-ADB-and-CHOICE-if-already-initialised.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -1,58 +0,0 @@
-From a9f34a7aac5fd89f33a34fb71e954b85fbf35875 Mon Sep 17 00:00:00 2001
-From: "Dr. Stephen Henson" <steve at openssl.org>
-Date: Mon, 23 Feb 2015 02:32:44 +0000
-Subject: [PATCH 2/6] Free up ADB and CHOICE if already initialised.
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-CVE-2015-0287
-
-Reviewed-by: Tim Hudson <tjh at openssl.org>
-Reviewed-by: Emilia Käsper <emilia at openssl.org>
----
- crypto/asn1/tasn_dec.c | 24 +++++++++++++++++++++---
- 1 file changed, 21 insertions(+), 3 deletions(-)
-
-Index: openssl-1.0.1e/crypto/asn1/tasn_dec.c
-===================================================================
---- openssl-1.0.1e.orig/crypto/asn1/tasn_dec.c
-+++ openssl-1.0.1e/crypto/asn1/tasn_dec.c
-@@ -317,9 +317,16 @@ int ASN1_item_ex_d2i(ASN1_VALUE **pval,
- if (asn1_cb && !asn1_cb(ASN1_OP_D2I_PRE, pval, it, NULL))
- goto auxerr;
-
-- /* Allocate structure */
-- if (!*pval && !ASN1_item_ex_new(pval, it))
-- {
-+ if (*pval) {
-+ /* Free up and zero CHOICE value if initialised */
-+ i = asn1_get_choice_selector(pval, it);
-+ if ((i >= 0) && (i < it->tcount)) {
-+ tt = it->templates + i;
-+ pchptr = asn1_get_field_ptr(pval, tt);
-+ ASN1_template_free(pchptr, tt);
-+ asn1_set_choice_selector(pval, -1, it);
-+ }
-+ } else if (!ASN1_item_ex_new(pval, it)) {
- ASN1err(ASN1_F_ASN1_ITEM_EX_D2I,
- ERR_R_NESTED_ASN1_ERROR);
- goto err;
-@@ -413,6 +420,17 @@ int ASN1_item_ex_d2i(ASN1_VALUE **pval,
- if (asn1_cb && !asn1_cb(ASN1_OP_D2I_PRE, pval, it, NULL))
- goto auxerr;
-
-+ /* Free up and zero any ADB found */
-+ for (i = 0, tt = it->templates; i < it->tcount; i++, tt++) {
-+ if (tt->flags & ASN1_TFLG_ADB_MASK) {
-+ const ASN1_TEMPLATE *seqtt;
-+ ASN1_VALUE **pseqval;
-+ seqtt = asn1_do_adb(pval, tt, 1);
-+ pseqval = asn1_get_field_ptr(pval, seqtt);
-+ ASN1_template_free(pseqval, seqtt);
-+ }
-+ }
-+
- /* Get each field entry */
- for (i = 0, tt = it->templates; i < it->tcount; i++, tt++)
- {
Deleted: openssl/branches/jessie_stable/debian/patches/0004-Fix-ASN1_TYPE_cmp.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/0004-Fix-ASN1_TYPE_cmp.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/0004-Fix-ASN1_TYPE_cmp.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -1,30 +0,0 @@
-From ee5a1253285e5c9f406c8b57b0686319b70c07d8 Mon Sep 17 00:00:00 2001
-From: "Dr. Stephen Henson" <steve at openssl.org>
-Date: Mon, 9 Mar 2015 23:11:45 +0000
-Subject: [PATCH 4/6] Fix ASN1_TYPE_cmp
-
-Fix segmentation violation when ASN1_TYPE_cmp is passed a boolean type. This
-can be triggered during certificate verification so could be a DoS attack
-against a client or a server enabling client authentication.
-
-CVE-2015-0286
-
-Reviewed-by: Richard Levitte <levitte at openssl.org>
----
- crypto/asn1/a_type.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-Index: openssl-1.0.1e/crypto/asn1/a_type.c
-===================================================================
---- openssl-1.0.1e.orig/crypto/asn1/a_type.c
-+++ openssl-1.0.1e/crypto/asn1/a_type.c
-@@ -124,6 +124,9 @@ int ASN1_TYPE_cmp(const ASN1_TYPE *a, co
- case V_ASN1_OBJECT:
- result = OBJ_cmp(a->value.object, b->value.object);
- break;
-+ case V_ASN1_BOOLEAN:
-+ result = a->value.boolean - b->value.boolean;
-+ break;
- case V_ASN1_NULL:
- result = 0; /* They do not have content. */
- break;
Deleted: openssl/branches/jessie_stable/debian/patches/0005-PKCS-7-avoid-NULL-pointer-dereferences-with-missing-.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/0005-PKCS-7-avoid-NULL-pointer-dereferences-with-missing-.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/0005-PKCS-7-avoid-NULL-pointer-dereferences-with-missing-.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -1,195 +0,0 @@
-From d3d52c73544bba800c2a8f5ef3376358158cf2ca Mon Sep 17 00:00:00 2001
-From: Emilia Kasper <emilia at openssl.org>
-Date: Fri, 27 Feb 2015 16:52:23 +0100
-Subject: [PATCH 5/6] PKCS#7: avoid NULL pointer dereferences with missing
- content
-
-In PKCS#7, the ASN.1 content component is optional.
-This typically applies to inner content (detached signatures),
-however we must also handle unexpected missing outer content
-correctly.
-
-This patch only addresses functions reachable from parsing,
-decryption and verification, and functions otherwise associated
-with reading potentially untrusted data.
-
-Correcting all low-level API calls requires further work.
-
-CVE-2015-0289
-
-Thanks to Michal Zalewski (Google) for reporting this issue.
-
-Reviewed-by: Steve Henson <steve at openssl.org>
----
- crypto/pkcs7/pk7_doit.c | 87 +++++++++++++++++++++++++++++++++++++++++--------
- crypto/pkcs7/pk7_lib.c | 3 ++
- 2 files changed, 76 insertions(+), 14 deletions(-)
-
-Index: openssl-1.0.1e/crypto/pkcs7/pk7_doit.c
-===================================================================
---- openssl-1.0.1e.orig/crypto/pkcs7/pk7_doit.c
-+++ openssl-1.0.1e/crypto/pkcs7/pk7_doit.c
-@@ -272,6 +272,25 @@ BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio)
- PKCS7_RECIP_INFO *ri=NULL;
- ASN1_OCTET_STRING *os=NULL;
-
-+ if (p7 == NULL) {
-+ PKCS7err(PKCS7_F_PKCS7_DATAINIT, PKCS7_R_INVALID_NULL_POINTER);
-+ return NULL;
-+ }
-+ /*
-+ * The content field in the PKCS7 ContentInfo is optional, but that really
-+ * only applies to inner content (precisely, detached signatures).
-+ *
-+ * When reading content, missing outer content is therefore treated as an
-+ * error.
-+ *
-+ * When creating content, PKCS7_content_new() must be called before
-+ * calling this method, so a NULL p7->d is always an error.
-+ */
-+ if (p7->d.ptr == NULL) {
-+ PKCS7err(PKCS7_F_PKCS7_DATAINIT, PKCS7_R_NO_CONTENT);
-+ return NULL;
-+ }
-+
- i=OBJ_obj2nid(p7->type);
- p7->state=PKCS7_S_HEADER;
-
-@@ -433,6 +452,16 @@ BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKE
- unsigned char *ek = NULL, *tkey = NULL;
- int eklen = 0, tkeylen = 0;
-
-+ if (p7 == NULL) {
-+ PKCS7err(PKCS7_F_PKCS7_DATADECODE, PKCS7_R_INVALID_NULL_POINTER);
-+ return NULL;
-+ }
-+
-+ if (p7->d.ptr == NULL) {
-+ PKCS7err(PKCS7_F_PKCS7_DATADECODE, PKCS7_R_NO_CONTENT);
-+ return NULL;
-+ }
-+
- i=OBJ_obj2nid(p7->type);
- p7->state=PKCS7_S_HEADER;
-
-@@ -747,6 +776,16 @@ int PKCS7_dataFinal(PKCS7 *p7, BIO *bio)
- STACK_OF(PKCS7_SIGNER_INFO) *si_sk=NULL;
- ASN1_OCTET_STRING *os=NULL;
-
-+ if (p7 == NULL) {
-+ PKCS7err(PKCS7_F_PKCS7_DATAFINAL, PKCS7_R_INVALID_NULL_POINTER);
-+ return 0;
-+ }
-+
-+ if (p7->d.ptr == NULL) {
-+ PKCS7err(PKCS7_F_PKCS7_DATAFINAL, PKCS7_R_NO_CONTENT);
-+ return 0;
-+ }
-+
- EVP_MD_CTX_init(&ctx_tmp);
- i=OBJ_obj2nid(p7->type);
- p7->state=PKCS7_S_HEADER;
-@@ -791,6 +830,7 @@ int PKCS7_dataFinal(PKCS7 *p7, BIO *bio)
- /* If detached data then the content is excluded */
- if(PKCS7_type_is_data(p7->d.sign->contents) && p7->detached) {
- M_ASN1_OCTET_STRING_free(os);
-+ os = NULL;
- p7->d.sign->contents->d.data = NULL;
- }
- break;
-@@ -801,6 +841,7 @@ int PKCS7_dataFinal(PKCS7 *p7, BIO *bio)
- if(PKCS7_type_is_data(p7->d.digest->contents) && p7->detached)
- {
- M_ASN1_OCTET_STRING_free(os);
-+ os = NULL;
- p7->d.digest->contents->d.data = NULL;
- }
- break;
-@@ -873,24 +914,31 @@ int PKCS7_dataFinal(PKCS7 *p7, BIO *bio)
- M_ASN1_OCTET_STRING_set(p7->d.digest->digest, md_data, md_len);
- }
-
-- if (!PKCS7_is_detached(p7) && !(os->flags & ASN1_STRING_FLAG_NDEF))
-- {
-- char *cont;
-- long contlen;
-- btmp=BIO_find_type(bio,BIO_TYPE_MEM);
-- if (btmp == NULL)
-- {
-- PKCS7err(PKCS7_F_PKCS7_DATAFINAL,PKCS7_R_UNABLE_TO_FIND_MEM_BIO);
-- goto err;
-- }
-- contlen = BIO_get_mem_data(btmp, &cont);
-- /* Mark the BIO read only then we can use its copy of the data
-- * instead of making an extra copy.
-- */
-- BIO_set_flags(btmp, BIO_FLAGS_MEM_RDONLY);
-- BIO_set_mem_eof_return(btmp, 0);
-- ASN1_STRING_set0(os, (unsigned char *)cont, contlen);
-- }
-+ if (!PKCS7_is_detached(p7)) {
-+ /*
-+ * NOTE(emilia): I think we only reach os == NULL here because detached
-+ * digested data support is broken.
-+ */
-+ if (os == NULL)
-+ goto err;
-+ if (!(os->flags & ASN1_STRING_FLAG_NDEF)) {
-+ char *cont;
-+ long contlen;
-+ btmp = BIO_find_type(bio, BIO_TYPE_MEM);
-+ if (btmp == NULL) {
-+ PKCS7err(PKCS7_F_PKCS7_DATAFINAL, PKCS7_R_UNABLE_TO_FIND_MEM_BIO);
-+ goto err;
-+ }
-+ contlen = BIO_get_mem_data(btmp, &cont);
-+ /*
-+ * Mark the BIO read only then we can use its copy of the data
-+ * instead of making an extra copy.
-+ */
-+ BIO_set_flags(btmp, BIO_FLAGS_MEM_RDONLY);
-+ BIO_set_mem_eof_return(btmp, 0);
-+ ASN1_STRING_set0(os, (unsigned char *)cont, contlen);
-+ }
-+ }
- ret=1;
- err:
- EVP_MD_CTX_cleanup(&ctx_tmp);
-@@ -965,6 +1013,16 @@ int PKCS7_dataVerify(X509_STORE *cert_st
- STACK_OF(X509) *cert;
- X509 *x509;
-
-+ if (p7 == NULL) {
-+ PKCS7err(PKCS7_F_PKCS7_DATAVERIFY, PKCS7_R_INVALID_NULL_POINTER);
-+ return 0;
-+ }
-+
-+ if (p7->d.ptr == NULL) {
-+ PKCS7err(PKCS7_F_PKCS7_DATAVERIFY, PKCS7_R_NO_CONTENT);
-+ return 0;
-+ }
-+
- if (PKCS7_type_is_signed(p7))
- {
- cert=p7->d.sign->cert;
-Index: openssl-1.0.1e/crypto/pkcs7/pk7_lib.c
-===================================================================
---- openssl-1.0.1e.orig/crypto/pkcs7/pk7_lib.c
-+++ openssl-1.0.1e/crypto/pkcs7/pk7_lib.c
-@@ -71,6 +71,7 @@ long PKCS7_ctrl(PKCS7 *p7, int cmd, long
-
- switch (cmd)
- {
-+ /* NOTE(emilia): does not support detached digested data. */
- case PKCS7_OP_SET_DETACHED_SIGNATURE:
- if (nid == NID_pkcs7_signed)
- {
-@@ -459,6 +460,8 @@ int PKCS7_set_digest(PKCS7 *p7, const EV
-
- STACK_OF(PKCS7_SIGNER_INFO) *PKCS7_get_signer_info(PKCS7 *p7)
- {
-+ if (p7 == NULL || p7->d.ptr == NULL)
-+ return NULL;
- if (PKCS7_type_is_signed(p7))
- {
- return(p7->d.sign->signer_info);
Deleted: openssl/branches/jessie_stable/debian/patches/0006-Fix-reachable-assert-in-SSLv2-servers.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/0006-Fix-reachable-assert-in-SSLv2-servers.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/0006-Fix-reachable-assert-in-SSLv2-servers.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -1,130 +0,0 @@
-From a40c1bcb8c37fbad24d8f28f0fb0204d76f0fee2 Mon Sep 17 00:00:00 2001
-From: Emilia Kasper <emilia at openssl.org>
-Date: Wed, 4 Mar 2015 09:05:02 -0800
-Subject: [PATCH 6/6] Fix reachable assert in SSLv2 servers.
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This assert is reachable for servers that support SSLv2 and export ciphers.
-Therefore, such servers can be DoSed by sending a specially crafted
-SSLv2 CLIENT-MASTER-KEY.
-
-Also fix s2_srvr.c to error out early if the key lengths are malformed.
-These lengths are sent unencrypted, so this does not introduce an oracle.
-
-CVE-2015-0293
-
-This issue was discovered by Sean Burford (Google) and Emilia Käsper of
-the OpenSSL development team.
-
-Reviewed-by: Richard Levitte <levitte at openssl.org>
-Reviewed-by: Tim Hudson <tjh at openssl.org>
----
- ssl/s2_lib.c | 2 +-
- ssl/s2_srvr.c | 57 +++++++++++++++++++++++++++++++++++++++++++++------------
- 2 files changed, 46 insertions(+), 13 deletions(-)
-
-Index: openssl-1.0.1e/ssl/s2_lib.c
-===================================================================
---- openssl-1.0.1e.orig/ssl/s2_lib.c
-+++ openssl-1.0.1e/ssl/s2_lib.c
-@@ -488,7 +488,7 @@ int ssl2_generate_key_material(SSL *s)
-
- OPENSSL_assert(s->session->master_key_length >= 0
- && s->session->master_key_length
-- < (int)sizeof(s->session->master_key));
-+ <= (int)sizeof(s->session->master_key));
- EVP_DigestUpdate(&ctx,s->session->master_key,s->session->master_key_length);
- EVP_DigestUpdate(&ctx,&c,1);
- c++;
-Index: openssl-1.0.1e/ssl/s2_srvr.c
-===================================================================
---- openssl-1.0.1e.orig/ssl/s2_srvr.c
-+++ openssl-1.0.1e/ssl/s2_srvr.c
-@@ -446,9 +446,6 @@ static int get_client_master_key(SSL *s)
- SSLerr(SSL_F_GET_CLIENT_MASTER_KEY,SSL_R_NO_PRIVATEKEY);
- return(-1);
- }
-- i=ssl_rsa_private_decrypt(s->cert,s->s2->tmp.enc,
-- &(p[s->s2->tmp.clear]),&(p[s->s2->tmp.clear]),
-- (s->s2->ssl2_rollback)?RSA_SSLV23_PADDING:RSA_PKCS1_PADDING);
-
- is_export=SSL_C_IS_EXPORT(s->session->cipher);
-
-@@ -467,21 +464,60 @@ static int get_client_master_key(SSL *s)
- else
- ek=5;
-
-+ /*
-+ * The format of the CLIENT-MASTER-KEY message is
-+ * 1 byte message type
-+ * 3 bytes cipher
-+ * 2-byte clear key length (stored in s->s2->tmp.clear)
-+ * 2-byte encrypted key length (stored in s->s2->tmp.enc)
-+ * 2-byte key args length (IV etc)
-+ * clear key
-+ * encrypted key
-+ * key args
-+ *
-+ * If the cipher is an export cipher, then the encrypted key bytes
-+ * are a fixed portion of the total key (5 or 8 bytes). The size of
-+ * this portion is in |ek|. If the cipher is not an export cipher,
-+ * then the entire key material is encrypted (i.e., clear key length
-+ * must be zero).
-+ */
-+ if ((!is_export && s->s2->tmp.clear != 0) ||
-+ (is_export && s->s2->tmp.clear + ek != EVP_CIPHER_key_length(c))) {
-+ ssl2_return_error(s, SSL2_PE_UNDEFINED_ERROR);
-+ SSLerr(SSL_F_GET_CLIENT_MASTER_KEY,SSL_R_BAD_LENGTH);
-+ return -1;
-+ }
-+ /*
-+ * The encrypted blob must decrypt to the encrypted portion of the key.
-+ * Decryption can't be expanding, so if we don't have enough encrypted
-+ * bytes to fit the key in the buffer, stop now.
-+ */
-+ if ((is_export && s->s2->tmp.enc < ek) ||
-+ (!is_export && s->s2->tmp.enc < EVP_CIPHER_key_length(c))) {
-+ ssl2_return_error(s,SSL2_PE_UNDEFINED_ERROR);
-+ SSLerr(SSL_F_GET_CLIENT_MASTER_KEY,SSL_R_LENGTH_TOO_SHORT);
-+ return -1;
-+ }
-+
-+ i = ssl_rsa_private_decrypt(s->cert, s->s2->tmp.enc,
-+ &(p[s->s2->tmp.clear]),
-+ &(p[s->s2->tmp.clear]),
-+ (s->s2->ssl2_rollback) ? RSA_SSLV23_PADDING :
-+ RSA_PKCS1_PADDING);
-+
- /* bad decrypt */
- #if 1
- /* If a bad decrypt, continue with protocol but with a
- * random master secret (Bleichenbacher attack) */
-- if ((i < 0) ||
-- ((!is_export && (i != EVP_CIPHER_key_length(c)))
-- || (is_export && ((i != ek) || (s->s2->tmp.clear+(unsigned int)i !=
-- (unsigned int)EVP_CIPHER_key_length(c))))))
-+ if ((i < 0) || ((!is_export && i != EVP_CIPHER_key_length(c))
-+ || (is_export && i != ek))) {
- {
- ERR_clear_error();
- if (is_export)
- i=ek;
- else
- i=EVP_CIPHER_key_length(c);
-- if (RAND_pseudo_bytes(p,i) <= 0)
-+ if (RAND_pseudo_bytes(&p[s->s2->tmp.clear], i) <= 0)
- return 0;
- }
- #else
-@@ -505,7 +541,8 @@ static int get_client_master_key(SSL *s)
- }
- #endif
-
-- if (is_export) i+=s->s2->tmp.clear;
-+ if (is_export)
-+ i = EVP_CIPHER_key_length(c);
-
- if (i > SSL_MAX_MASTER_KEY_LENGTH)
- {
Deleted: openssl/branches/jessie_stable/debian/patches/0008-Fix-a-failure-to-NULL-a-pointer-freed-on-error.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/0008-Fix-a-failure-to-NULL-a-pointer-freed-on-error.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/0008-Fix-a-failure-to-NULL-a-pointer-freed-on-error.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -1,73 +0,0 @@
-From a4517be9e348634ac64f9cf093131e13e8c03e38 Mon Sep 17 00:00:00 2001
-From: Matt Caswell <matt at openssl.org>
-Date: Thu, 19 Mar 2015 10:16:32 +0000
-Subject: [PATCH 08/12] Fix a failure to NULL a pointer freed on error.
-
-Reported by the LibreSSL project as a follow on to CVE-2015-0209
-
-Reviewed-by: Richard Levitte <levitte at openssl.org>
----
- crypto/asn1/x_x509.c | 12 +++++++++++-
- crypto/ec/ec_asn1.c | 7 +++++--
- 2 files changed, 16 insertions(+), 3 deletions(-)
-
-Index: openssl-1.0.1e/crypto/asn1/x_x509.c
-===================================================================
---- openssl-1.0.1e.orig/crypto/asn1/x_x509.c 2013-02-11 15:26:04.000000000 +0000
-+++ openssl-1.0.1e/crypto/asn1/x_x509.c 2015-03-19 18:07:02.689136145 +0000
-@@ -170,8 +170,14 @@
- {
- const unsigned char *q;
- X509 *ret;
-+ int freeret = 0;
-+
- /* Save start position */
- q = *pp;
-+
-+ if(!a || *a == NULL) {
-+ freeret = 1;
-+ }
- ret = d2i_X509(a, pp, length);
- /* If certificate unreadable then forget it */
- if(!ret) return NULL;
-@@ -181,7 +187,11 @@
- if(!d2i_X509_CERT_AUX(&ret->aux, pp, length)) goto err;
- return ret;
- err:
-- X509_free(ret);
-+ if(freeret) {
-+ X509_free(ret);
-+ if (a)
-+ *a = NULL;
-+ }
- return NULL;
- }
-
-Index: openssl-1.0.1e/crypto/ec/ec_asn1.c
-===================================================================
---- openssl-1.0.1e.orig/crypto/ec/ec_asn1.c 2015-03-19 18:06:21.000000000 +0000
-+++ openssl-1.0.1e/crypto/ec/ec_asn1.c 2015-03-19 18:09:11.394282947 +0000
-@@ -1358,8 +1358,6 @@
- ECerr(EC_F_D2I_ECPARAMETERS, ERR_R_MALLOC_FAILURE);
- return NULL;
- }
-- if (a)
-- *a = ret;
- }
- else
- ret = *a;
-@@ -1367,9 +1365,14 @@
- if (!d2i_ECPKParameters(&ret->group, in, len))
- {
- ECerr(EC_F_D2I_ECPARAMETERS, ERR_R_EC_LIB);
-+ if (a == NULL || *a != ret)
-+ EC_KEY_free(ret);
- return NULL;
- }
-
-+ if (a)
-+ *a = ret;
-+
- return ret;
- }
-
Deleted: openssl/branches/jessie_stable/debian/patches/CVE-2015-1788.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/CVE-2015-1788.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/CVE-2015-1788.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -1,45 +0,0 @@
-From f61bbf8da532038ed0eae16a9a11771f3da22d30 Mon Sep 17 00:00:00 2001
-From: Andy Polyakov <appro at openssl.org>
-Date: Thu, 11 Jun 2015 00:18:01 +0200
-Subject: [PATCH] bn/bn_gf2m.c: avoid infinite loop wich malformed ECParamters.
-
-CVE-2015-1788
-
-Reviewed-by: Matt Caswell <matt at openssl.org>
-(cherry picked from commit 4924b37ee01f71ae19c94a8934b80eeb2f677932)
----
- crypto/bn/bn_gf2m.c | 15 ++++++++++-----
- 1 file changed, 10 insertions(+), 5 deletions(-)
-
-Index: openssl-1.0.1k/crypto/bn/bn_gf2m.c
-===================================================================
---- openssl-1.0.1k.orig/crypto/bn/bn_gf2m.c
-+++ openssl-1.0.1k/crypto/bn/bn_gf2m.c
-@@ -568,9 +568,10 @@ int BN_GF2m_mod_inv(BIGNUM *r, const BIG
- }
- #else
- {
-- int i, ubits = BN_num_bits(u),
-- vbits = BN_num_bits(v), /* v is copy of p */
-- top = p->top;
-+ int i;
-+ int ubits = BN_num_bits(u);
-+ int vbits = BN_num_bits(v); /* v is copy of p */
-+ int top = p->top;
- BN_ULONG *udp,*bdp,*vdp,*cdp;
-
- bn_wexpand(u,top); udp = u->d;
-@@ -611,7 +612,12 @@ int BN_GF2m_mod_inv(BIGNUM *r, const BIG
- ubits--;
- }
-
-- if (ubits<=BN_BITS2 && udp[0]==1) break;
-+ if (ubits <= BN_BITS2) {
-+ if (udp[0] == 0) /* poly was reducible */
-+ goto err;
-+ if (udp[0] == 1)
-+ break;
-+ }
-
- if (ubits<vbits)
- {
Deleted: openssl/branches/jessie_stable/debian/patches/CVE-2015-1789.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/CVE-2015-1789.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/CVE-2015-1789.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -1,134 +0,0 @@
-From 370ac320301e28bb615cee80124c042649c95d14 Mon Sep 17 00:00:00 2001
-From: Emilia Kasper <emilia at openssl.org>
-Date: Wed, 8 Apr 2015 16:56:43 +0200
-Subject: [PATCH] Fix length checks in X509_cmp_time to avoid out-of-bounds
- reads.
-
-Also tighten X509_cmp_time to reject more than three fractional
-seconds in the time; and to reject trailing garbage after the offset.
-
-CVE-2015-1789
-
-Reviewed-by: Viktor Dukhovni <viktor at openssl.org>
-Reviewed-by: Richard Levitte <levitte at openssl.org>
----
- crypto/x509/x509_vfy.c | 57 +++++++++++++++++++++++++++++++++++++++++---------
- 1 file changed, 47 insertions(+), 10 deletions(-)
-
-Index: openssl-1.0.1k/crypto/x509/x509_vfy.c
-===================================================================
---- openssl-1.0.1k.orig/crypto/x509/x509_vfy.c
-+++ openssl-1.0.1k/crypto/x509/x509_vfy.c
-@@ -1712,54 +1712,93 @@ int X509_cmp_time(const ASN1_TIME *ctm,
- ASN1_TIME atm;
- long offset;
- char buff1[24],buff2[24],*p;
-- int i,j;
-+ int i,j,remaining;
-
- p=buff1;
-- i=ctm->length;
-+ remaining = ctm->length;
- str=(char *)ctm->data;
-+ /*
-+ * Note that the following (historical) code allows much more slack in the
-+ * time format than RFC5280. In RFC5280, the representation is fixed:
-+ * UTCTime: YYMMDDHHMMSSZ
-+ * GeneralizedTime: YYYYMMDDHHMMSSZ
-+ */
- if (ctm->type == V_ASN1_UTCTIME)
- {
-- if ((i < 11) || (i > 17)) return 0;
-+ /* YYMMDDHHMM[SS]Z or YYMMDDHHMM[SS](+-)hhmm */
-+ int min_length = sizeof("YYMMDDHHMMZ") - 1;
-+ int max_length = sizeof("YYMMDDHHMMSS+hhmm") - 1;
-+ if (remaining < min_length || remaining > max_length)
-+ return 0;
- memcpy(p,str,10);
- p+=10;
- str+=10;
-+ remaining -= 10;
- }
- else
- {
-- if (i < 13) return 0;
-+ /* YYYYMMDDHHMM[SS[.fff]]Z or YYYYMMDDHHMM[SS[.f[f[f]]]](+-)hhmm */
-+ int min_length = sizeof("YYYYMMDDHHMMZ") - 1;
-+ int max_length = sizeof("YYYYMMDDHHMMSS.fff+hhmm") - 1;
-+ if (remaining < min_length || remaining > max_length)
-+ return 0;
- memcpy(p,str,12);
- p+=12;
- str+=12;
-+ remaining -= 12;
- }
-
- if ((*str == 'Z') || (*str == '-') || (*str == '+'))
- { *(p++)='0'; *(p++)='0'; }
- else
- {
-+ /* SS (seconds) */
-+ if (remaining < 2)
-+ return 0;
- *(p++)= *(str++);
- *(p++)= *(str++);
-- /* Skip any fractional seconds... */
-- if (*str == '.')
-+ remaining -= 2;
-+ /*
-+ * Skip any (up to three) fractional seconds...
-+ * TODO(emilia): in RFC5280, fractional seconds are forbidden.
-+ * Can we just kill them altogether?
-+ */
-+ if (remaining && *str == '.')
- {
- str++;
-- while ((*str >= '0') && (*str <= '9')) str++;
-+ remaining--;
-+ for (i = 0; i < 3 && remaining; i++, str++, remaining--)
-+ {
-+ if (*str < '0' || *str > '9')
-+ break;
-+ }
- }
--
- }
- *(p++)='Z';
- *(p++)='\0';
-
-- if (*str == 'Z')
-- offset=0;
-- else
-- {
-- if ((*str != '+') && (*str != '-'))
-- return 0;
-- offset=((str[1]-'0')*10+(str[2]-'0'))*60;
-- offset+=(str[3]-'0')*10+(str[4]-'0');
-- if (*str == '-')
-- offset= -offset;
-- }
-+ /* We now need either a terminating 'Z' or an offset. */
-+ if (!remaining)
-+ return 0;
-+ if (*str == 'Z') {
-+ if (remaining != 1)
-+ return 0;
-+ offset=0;
-+ } else {
-+ /* (+-)HHMM */
-+ if ((*str != '+') && (*str != '-'))
-+ return 0;
-+ /* Historical behaviour: the (+-)hhmm offset is forbidden in RFC5280. */
-+ if (remaining != 5)
-+ return 0;
-+ if (str[1] < '0' || str[1] > '9' || str[2] < '0' || str[2] > '9' ||
-+ str[3] < '0' || str[3] > '9' || str[4] < '0' || str[4] > '9')
-+ return 0;
-+ offset=((str[1]-'0')*10+(str[2]-'0'))*60;
-+ offset+=(str[3]-'0')*10+(str[4]-'0');
-+ if (*str == '-')
-+ offset= -offset;
-+ }
- atm.type=ctm->type;
- atm.flags = 0;
- atm.length=sizeof(buff2);
Deleted: openssl/branches/jessie_stable/debian/patches/CVE-2015-1790.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/CVE-2015-1790.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/CVE-2015-1790.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -1,67 +0,0 @@
-From 5fbc59cac60db4d7c3172152b8bdafe0c675fabd Mon Sep 17 00:00:00 2001
-From: Emilia Kasper <emilia at openssl.org>
-Date: Tue, 12 May 2015 19:00:30 +0200
-Subject: [PATCH] PKCS#7: Fix NULL dereference with missing EncryptedContent.
-
-CVE-2015-1790
-
-Reviewed-by: Rich Salz <rsalz at openssl.org>
----
- crypto/pkcs7/pk7_doit.c | 16 +++++++++++++++-
- 1 file changed, 15 insertions(+), 1 deletion(-)
-
-Index: openssl-1.0.1k/crypto/pkcs7/pk7_doit.c
-===================================================================
---- openssl-1.0.1k.orig/crypto/pkcs7/pk7_doit.c
-+++ openssl-1.0.1k/crypto/pkcs7/pk7_doit.c
-@@ -468,6 +468,12 @@ BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKE
- switch (i)
- {
- case NID_pkcs7_signed:
-+ /*
-+ * p7->d.sign->contents is a PKCS7 structure consisting of a contentType
-+ * field and optional content.
-+ * data_body is NULL if that structure has no (=detached) content
-+ * or if the contentType is wrong (i.e., not "data").
-+ */
- data_body=PKCS7_get_octet_string(p7->d.sign->contents);
- if (!PKCS7_is_detached(p7) && data_body == NULL)
- {
-@@ -479,6 +485,7 @@ BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKE
- case NID_pkcs7_signedAndEnveloped:
- rsk=p7->d.signed_and_enveloped->recipientinfo;
- md_sk=p7->d.signed_and_enveloped->md_algs;
-+ /* data_body is NULL if the optional EncryptedContent is missing. */
- data_body=p7->d.signed_and_enveloped->enc_data->enc_data;
- enc_alg=p7->d.signed_and_enveloped->enc_data->algorithm;
- evp_cipher=EVP_get_cipherbyobj(enc_alg->algorithm);
-@@ -491,6 +498,7 @@ BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKE
- case NID_pkcs7_enveloped:
- rsk=p7->d.enveloped->recipientinfo;
- enc_alg=p7->d.enveloped->enc_data->algorithm;
-+ /* data_body is NULL if the optional EncryptedContent is missing. */
- data_body=p7->d.enveloped->enc_data->enc_data;
- evp_cipher=EVP_get_cipherbyobj(enc_alg->algorithm);
- if (evp_cipher == NULL)
-@@ -504,6 +512,12 @@ BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKE
- goto err;
- }
-
-+ /* Detached content must be supplied via in_bio instead. */
-+ if (data_body == NULL && in_bio == NULL) {
-+ PKCS7err(PKCS7_F_PKCS7_DATADECODE, PKCS7_R_NO_CONTENT);
-+ goto err;
-+ }
-+
- /* We will be checking the signature */
- if (md_sk != NULL)
- {
-@@ -660,7 +674,7 @@ BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKE
- }
-
- #if 1
-- if (PKCS7_is_detached(p7) || (in_bio != NULL))
-+ if (in_bio != NULL)
- {
- bio=in_bio;
- }
Deleted: openssl/branches/jessie_stable/debian/patches/CVE-2015-1791.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/CVE-2015-1791.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/CVE-2015-1791.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -1,222 +0,0 @@
-This is a combination of the following upstream commits:
-98ece4eebfb6cd45cc8d550c6ac0022965071afc
-dcad51bc13c9b716d9a66248bcc4038c071ff158
-708cf593587e2fda67dae9782991ff9fccc781eb
-
-
-Index: openssl-1.0.1k/ssl/s3_clnt.c
-===================================================================
---- openssl-1.0.1k.orig/ssl/s3_clnt.c
-+++ openssl-1.0.1k/ssl/s3_clnt.c
-@@ -2191,6 +2191,38 @@ int ssl3_get_new_session_ticket(SSL *s)
- }
-
- p=d=(unsigned char *)s->init_msg;
-+
-+ if (s->session->session_id_length > 0) {
-+ int i = s->session_ctx->session_cache_mode;
-+ SSL_SESSION *new_sess;
-+ /*
-+ * We reused an existing session, so we need to replace it with a new
-+ * one
-+ */
-+ if (i & SSL_SESS_CACHE_CLIENT) {
-+ /*
-+ * Remove the old session from the cache
-+ */
-+ if (i & SSL_SESS_CACHE_NO_INTERNAL_STORE) {
-+ if (s->session_ctx->remove_session_cb != NULL)
-+ s->session_ctx->remove_session_cb(s->session_ctx,
-+ s->session);
-+ } else {
-+ /* We carry on if this fails */
-+ SSL_CTX_remove_session(s->session_ctx, s->session);
-+ }
-+ }
-+
-+ if ((new_sess = ssl_session_dup(s->session, 0)) == 0) {
-+ al = SSL_AD_INTERNAL_ERROR;
-+ SSLerr(SSL_F_SSL3_GET_NEW_SESSION_TICKET, ERR_R_MALLOC_FAILURE);
-+ goto f_err;
-+ }
-+
-+ SSL_SESSION_free(s->session);
-+ s->session = new_sess;
-+ }
-+
- n2l(p, s->session->tlsext_tick_lifetime_hint);
- n2s(p, ticklen);
- /* ticket_lifetime_hint + ticket_length + ticket */
-Index: openssl-1.0.1k/ssl/ssl.h
-===================================================================
---- openssl-1.0.1k.orig/ssl/ssl.h
-+++ openssl-1.0.1k/ssl/ssl.h
-@@ -2263,6 +2263,7 @@ void ERR_load_SSL_strings(void);
- #define SSL_F_SSL_READ 223
- #define SSL_F_SSL_RSA_PRIVATE_DECRYPT 187
- #define SSL_F_SSL_RSA_PUBLIC_ENCRYPT 188
-+#define SSL_F_SSL_SESSION_DUP 348
- #define SSL_F_SSL_SESSION_NEW 189
- #define SSL_F_SSL_SESSION_PRINT_FP 190
- #define SSL_F_SSL_SESSION_SET1_ID_CONTEXT 312
-Index: openssl-1.0.1k/ssl/ssl_err.c
-===================================================================
---- openssl-1.0.1k.orig/ssl/ssl_err.c
-+++ openssl-1.0.1k/ssl/ssl_err.c
-@@ -245,6 +245,7 @@ static ERR_STRING_DATA SSL_str_functs[]=
- {ERR_FUNC(SSL_F_SSL_READ), "SSL_read"},
- {ERR_FUNC(SSL_F_SSL_RSA_PRIVATE_DECRYPT), "SSL_RSA_PRIVATE_DECRYPT"},
- {ERR_FUNC(SSL_F_SSL_RSA_PUBLIC_ENCRYPT), "SSL_RSA_PUBLIC_ENCRYPT"},
-+{ERR_FUNC(SSL_F_SSL_SESSION_DUP), "ssl_session_dup"},
- {ERR_FUNC(SSL_F_SSL_SESSION_NEW), "SSL_SESSION_new"},
- {ERR_FUNC(SSL_F_SSL_SESSION_PRINT_FP), "SSL_SESSION_print_fp"},
- {ERR_FUNC(SSL_F_SSL_SESSION_SET1_ID_CONTEXT), "SSL_SESSION_set1_id_context"},
-Index: openssl-1.0.1k/ssl/ssl_locl.h
-===================================================================
---- openssl-1.0.1k.orig/ssl/ssl_locl.h
-+++ openssl-1.0.1k/ssl/ssl_locl.h
-@@ -831,6 +831,7 @@ void ssl_sess_cert_free(SESS_CERT *sc);
- int ssl_set_peer_cert_type(SESS_CERT *c, int type);
- int ssl_get_new_session(SSL *s, int session);
- int ssl_get_prev_session(SSL *s, unsigned char *session,int len, const unsigned char *limit);
-+SSL_SESSION *ssl_session_dup(SSL_SESSION *src, int ticket);
- 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);
-Index: openssl-1.0.1k/ssl/ssl_sess.c
-===================================================================
---- openssl-1.0.1k.orig/ssl/ssl_sess.c
-+++ openssl-1.0.1k/ssl/ssl_sess.c
-@@ -224,6 +224,132 @@ SSL_SESSION *SSL_SESSION_new(void)
- return(ss);
- }
-
-+
-+/*
-+ * Create a new SSL_SESSION and duplicate the contents of |src| into it. If
-+ * ticket == 0 then no ticket information is duplicated, otherwise it is.
-+ */
-+SSL_SESSION *ssl_session_dup(SSL_SESSION *src, int ticket)
-+{
-+ SSL_SESSION *dest;
-+
-+ dest = OPENSSL_malloc(sizeof(*src));
-+ if (dest == NULL) {
-+ goto err;
-+ }
-+ memcpy(dest, src, sizeof(*dest));
-+
-+ /*
-+ * Set the various pointers to NULL so that we can call SSL_SESSION_free in
-+ * the case of an error whilst halfway through constructing dest
-+ */
-+#ifndef OPENSSL_NO_PSK
-+ dest->psk_identity_hint = NULL;
-+ dest->psk_identity = NULL;
-+#endif
-+ dest->ciphers = NULL;
-+#ifndef OPENSSL_NO_TLSEXT
-+ dest->tlsext_hostname = NULL;
-+# ifndef OPENSSL_NO_EC
-+ dest->tlsext_ecpointformatlist = NULL;
-+ dest->tlsext_ellipticcurvelist = NULL;
-+# endif
-+#endif
-+ dest->tlsext_tick = NULL;
-+#ifndef OPENSSL_NO_SRP
-+ dest->srp_username = NULL;
-+#endif
-+ memset(&dest->ex_data, 0, sizeof(dest->ex_data));
-+
-+ /* We deliberately don't copy the prev and next pointers */
-+ dest->prev = NULL;
-+ dest->next = NULL;
-+
-+ dest->references = 1;
-+
-+ if (src->sess_cert != NULL)
-+ CRYPTO_add(&src->sess_cert->references, 1, CRYPTO_LOCK_SSL_SESS_CERT);
-+
-+ if (src->peer != NULL)
-+ CRYPTO_add(&src->peer->references, 1, CRYPTO_LOCK_X509);
-+
-+#ifndef OPENSSL_NO_PSK
-+ if (src->psk_identity_hint) {
-+ dest->psk_identity_hint = BUF_strdup(src->psk_identity_hint);
-+ if (dest->psk_identity_hint == NULL) {
-+ goto err;
-+ }
-+ }
-+ if (src->psk_identity) {
-+ dest->psk_identity = BUF_strdup(src->psk_identity);
-+ if (dest->psk_identity == NULL) {
-+ goto err;
-+ }
-+ }
-+#endif
-+
-+ if(src->ciphers != NULL) {
-+ dest->ciphers = sk_SSL_CIPHER_dup(src->ciphers);
-+ if (dest->ciphers == NULL)
-+ goto err;
-+ }
-+
-+ if (!CRYPTO_dup_ex_data(CRYPTO_EX_INDEX_SSL_SESSION,
-+ &dest->ex_data, &src->ex_data)) {
-+ goto err;
-+ }
-+
-+#ifndef OPENSSL_NO_TLSEXT
-+ if (src->tlsext_hostname) {
-+ dest->tlsext_hostname = BUF_strdup(src->tlsext_hostname);
-+ if (dest->tlsext_hostname == NULL) {
-+ goto err;
-+ }
-+ }
-+# ifndef OPENSSL_NO_EC
-+ if (src->tlsext_ecpointformatlist) {
-+ dest->tlsext_ecpointformatlist =
-+ BUF_memdup(src->tlsext_ecpointformatlist,
-+ src->tlsext_ecpointformatlist_length);
-+ if (dest->tlsext_ecpointformatlist == NULL)
-+ goto err;
-+ }
-+ if (src->tlsext_ellipticcurvelist) {
-+ dest->tlsext_ellipticcurvelist =
-+ BUF_memdup(src->tlsext_ellipticcurvelist,
-+ src->tlsext_ellipticcurvelist_length);
-+ if (dest->tlsext_ellipticcurvelist == NULL)
-+ goto err;
-+ }
-+# endif
-+#endif
-+
-+ if (ticket != 0) {
-+ dest->tlsext_tick = BUF_memdup(src->tlsext_tick, src->tlsext_ticklen);
-+ if(dest->tlsext_tick == NULL)
-+ goto err;
-+ } else {
-+ dest->tlsext_tick_lifetime_hint = 0;
-+ dest->tlsext_ticklen = 0;
-+ }
-+
-+#ifndef OPENSSL_NO_SRP
-+ if (src->srp_username) {
-+ dest->srp_username = BUF_strdup(src->srp_username);
-+ if (dest->srp_username == NULL) {
-+ goto err;
-+ }
-+ }
-+#endif
-+
-+ return dest;
-+err:
-+ SSLerr(SSL_F_SSL_SESSION_DUP, ERR_R_MALLOC_FAILURE);
-+ SSL_SESSION_free(dest);
-+ return NULL;
-+}
-+
-+
- const unsigned char *SSL_SESSION_get_id(const SSL_SESSION *s, unsigned int *len)
- {
- if(len)
Deleted: openssl/branches/jessie_stable/debian/patches/CVE-2015-1792.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/CVE-2015-1792.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/CVE-2015-1792.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -1,28 +0,0 @@
-From dd90a91d8771fd1ad5083fd46a2b3da16a587757 Mon Sep 17 00:00:00 2001
-From: "Dr. Stephen Henson" <steve at openssl.org>
-Date: Fri, 5 Jun 2015 12:11:25 +0100
-Subject: [PATCH] Fix infinite loop in CMS
-
-Fix loop in do_free_upto if cmsbio is NULL: this will happen when attempting
-to verify and a digest is not recognised. Reported by Johannes Bauer.
-
-CVE-2015-1792
-
-Reviewed-by: Matt Caswell <matt at openssl.org>
----
- crypto/cms/cms_smime.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: openssl-1.0.1k/crypto/cms/cms_smime.c
-===================================================================
---- openssl-1.0.1k.orig/crypto/cms/cms_smime.c
-+++ openssl-1.0.1k/crypto/cms/cms_smime.c
-@@ -141,7 +141,7 @@ static void do_free_upto(BIO *f, BIO *up
- BIO_free(f);
- f = tbio;
- }
-- while (f != upto);
-+ while (f && f != upto);
- }
- else
- BIO_free_all(f);
Deleted: openssl/branches/jessie_stable/debian/patches/CVE-2015-3194.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/CVE-2015-3194.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/CVE-2015-3194.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -1,34 +0,0 @@
-From f81aa391f469c695e56f080dcde70e4bba3fd7be Mon Sep 17 00:00:00 2001
-From: "Dr. Stephen Henson" <steve at openssl.org>
-Date: Fri, 2 Oct 2015 13:10:29 +0100
-Subject: [PATCH 2/2] Add PSS parameter check.
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Avoid seg fault by checking mgf1 parameter is not NULL. This can be
-triggered during certificate verification so could be a DoS attack
-against a client or a server enabling client authentication.
-
-Thanks to Loïc Jonas Etienne (Qnective AG) for discovering this bug.
-
-CVE-2015-3194
-
-Reviewed-by: Matt Caswell <matt at openssl.org>
----
- crypto/rsa/rsa_ameth.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: openssl-1.0.1k/crypto/rsa/rsa_ameth.c
-===================================================================
---- openssl-1.0.1k.orig/crypto/rsa/rsa_ameth.c
-+++ openssl-1.0.1k/crypto/rsa/rsa_ameth.c
-@@ -287,7 +287,7 @@ static RSA_PSS_PARAMS *rsa_pss_decode(co
- {
- ASN1_TYPE *param = pss->maskGenAlgorithm->parameter;
- if (OBJ_obj2nid(pss->maskGenAlgorithm->algorithm) == NID_mgf1
-- && param->type == V_ASN1_SEQUENCE)
-+ && param && param->type == V_ASN1_SEQUENCE)
- {
- p = param->value.sequence->data;
- plen = param->value.sequence->length;
Deleted: openssl/branches/jessie_stable/debian/patches/CVE-2015-3195.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/CVE-2015-3195.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/CVE-2015-3195.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -1,55 +0,0 @@
-From 7c13530c14867bc09d478b30148884aa16891e15 Mon Sep 17 00:00:00 2001
-From: "Dr. Stephen Henson" <steve at openssl.org>
-Date: Tue, 10 Nov 2015 19:03:07 +0000
-Subject: [PATCH 1/2] Fix leak with ASN.1 combine.
-
-When parsing a combined structure pass a flag to the decode routine
-so on error a pointer to the parent structure is not zeroed as
-this will leak any additional components in the parent.
-
-This can leak memory in any application parsing PKCS#7 or CMS structures.
-
-CVE-2015-3195.
-
-Thanks to Adam Langley (Google/BoringSSL) for discovering this bug using
-libFuzzer.
-
-PR#4131
-
-Reviewed-by: Richard Levitte <levitte at openssl.org>
----
- crypto/asn1/tasn_dec.c | 7 +++++--
- 1 file changed, 5 insertions(+), 2 deletions(-)
-
-Index: openssl-1.0.1k/crypto/asn1/tasn_dec.c
-===================================================================
---- openssl-1.0.1k.orig/crypto/asn1/tasn_dec.c
-+++ openssl-1.0.1k/crypto/asn1/tasn_dec.c
-@@ -169,6 +169,8 @@ int ASN1_item_ex_d2i(ASN1_VALUE **pval,
- int otag;
- int ret = 0;
- ASN1_VALUE **pchptr, *ptmpval;
-+ int combine = aclass & ASN1_TFLG_COMBINE;
-+ aclass &= ~ASN1_TFLG_COMBINE;
- if (!pval)
- return 0;
- if (aux && aux->asn1_cb)
-@@ -534,7 +536,8 @@ int ASN1_item_ex_d2i(ASN1_VALUE **pval,
- auxerr:
- ASN1err(ASN1_F_ASN1_ITEM_EX_D2I, ASN1_R_AUX_ERROR);
- err:
-- ASN1_item_ex_free(pval, it);
-+ if (combine == 0)
-+ ASN1_item_ex_free(pval, it);
- if (errtt)
- ERR_add_error_data(4, "Field=", errtt->field_name,
- ", Type=", it->sname);
-@@ -762,7 +765,7 @@ static int asn1_template_noexp_d2i(ASN1_
- {
- /* Nothing special */
- ret = ASN1_item_ex_d2i(val, &p, len, ASN1_ITEM_ptr(tt->item),
-- -1, 0, opt, ctx);
-+ -1, tt->flags & ASN1_TFLG_COMBINE, opt, ctx);
- if (!ret)
- {
- ASN1err(ASN1_F_ASN1_TEMPLATE_NOEXP_D2I,
Deleted: openssl/branches/jessie_stable/debian/patches/CVE-2015-3196.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/CVE-2015-3196.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/CVE-2015-3196.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -1,72 +0,0 @@
-From d6be3124f22870f1888c532523b74ea5d89795eb Mon Sep 17 00:00:00 2001
-From: "Dr. Stephen Henson" <steve at openssl.org>
-Date: Wed, 1 Jul 2015 23:40:03 +0100
-Subject: [PATCH] Fix PSK handling.
-
-The PSK identity hint should be stored in the SSL_SESSION structure
-and not in the parent context (which will overwrite values used
-by other SSL structures with the same SSL_CTX).
-
-Use BUF_strndup when copying identity as it may not be null terminated.
-
-Reviewed-by: Tim Hudson <tjh at openssl.org>
-(cherry picked from commit 3c66a669dfc7b3792f7af0758ea26fe8502ce70c)
----
- ssl/s3_clnt.c | 17 +++--------------
- ssl/s3_srvr.c | 2 +-
- 2 files changed, 4 insertions(+), 15 deletions(-)
-
-Index: openssl-1.0.1k/ssl/s3_clnt.c
-===================================================================
---- openssl-1.0.1k.orig/ssl/s3_clnt.c
-+++ openssl-1.0.1k/ssl/s3_clnt.c
-@@ -1360,8 +1360,6 @@ int ssl3_get_key_exchange(SSL *s)
- #ifndef OPENSSL_NO_PSK
- if (alg_k & SSL_kPSK)
- {
-- char tmp_id_hint[PSK_MAX_IDENTITY_LEN+1];
--
- param_len = 2;
- if (param_len > n)
- {
-@@ -1390,16 +1388,8 @@ int ssl3_get_key_exchange(SSL *s)
- }
- param_len += i;
-
-- /* If received PSK identity hint contains NULL
-- * characters, the hint is truncated from the first
-- * NULL. p may not be ending with NULL, so create a
-- * NULL-terminated string. */
-- memcpy(tmp_id_hint, p, i);
-- memset(tmp_id_hint+i, 0, PSK_MAX_IDENTITY_LEN+1-i);
-- if (s->ctx->psk_identity_hint != NULL)
-- OPENSSL_free(s->ctx->psk_identity_hint);
-- s->ctx->psk_identity_hint = BUF_strdup(tmp_id_hint);
-- if (s->ctx->psk_identity_hint == NULL)
-+ s->session->psk_identity_hint = BUF_strndup((char *)p, i);
-+ if (s->session->psk_identity_hint == NULL)
- {
- al=SSL_AD_HANDSHAKE_FAILURE;
- SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE, ERR_R_MALLOC_FAILURE);
-@@ -3002,7 +2992,7 @@ int ssl3_send_client_key_exchange(SSL *s
- }
-
- memset(identity, 0, sizeof(identity));
-- psk_len = s->psk_client_callback(s, s->ctx->psk_identity_hint,
-+ psk_len = s->psk_client_callback(s, s->session->psk_identity_hint,
- identity, sizeof(identity) - 1,
- psk_or_pre_ms, sizeof(psk_or_pre_ms));
- if (psk_len > PSK_MAX_PSK_LEN)
-Index: openssl-1.0.1k/ssl/s3_srvr.c
-===================================================================
---- openssl-1.0.1k.orig/ssl/s3_srvr.c
-+++ openssl-1.0.1k/ssl/s3_srvr.c
-@@ -2816,7 +2816,7 @@ int ssl3_get_client_key_exchange(SSL *s)
-
- if (s->session->psk_identity != NULL)
- OPENSSL_free(s->session->psk_identity);
-- s->session->psk_identity = BUF_strdup((char *)p);
-+ s->session->psk_identity = BUF_strndup((char *)p, i);
- if (s->session->psk_identity == NULL)
- {
- SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,
Deleted: openssl/branches/jessie_stable/debian/patches/CVE-2015-4000.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/CVE-2015-4000.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/CVE-2015-4000.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -1,91 +0,0 @@
-From 63830384e90d9b36d2793d4891501ec024827433 Mon Sep 17 00:00:00 2001
-From: Emilia Kasper <emilia at openssl.org>
-Date: Tue, 19 May 2015 12:05:22 +0200
-Subject: [PATCH] client: reject handshakes with DH parameters < 768 bits.
-
-Since the client has no way of communicating her supported parameter
-range to the server, connections to servers that choose weak DH will
-simply fail.
-
-Reviewed-by: Kurt Roeckx <kurt at openssl.org>
----
- CHANGES | 3 ++-
- ssl/s3_clnt.c | 22 ++++++++++++++++------
- ssl/ssl.h | 1 +
- ssl/ssl_err.c | 1 +
- 4 files changed, 20 insertions(+), 7 deletions(-)
-
-Index: openssl-1.0.1k/ssl/s3_clnt.c
-===================================================================
---- openssl-1.0.1k.orig/ssl/s3_clnt.c
-+++ openssl-1.0.1k/ssl/s3_clnt.c
-@@ -3425,25 +3425,32 @@ int ssl3_check_cert_and_algorithm(SSL *s
- }
- #endif
- #ifndef OPENSSL_NO_DH
-- if ((alg_k & SSL_kEDH) &&
-- !(has_bits(i,EVP_PK_DH|EVP_PKT_EXCH) || (dh != NULL)))
-- {
-- SSLerr(SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM,SSL_R_MISSING_DH_KEY);
-- goto f_err;
-- }
-- else if ((alg_k & SSL_kDHr) && !has_bits(i,EVP_PK_DH|EVP_PKS_RSA))
-- {
-- SSLerr(SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM,SSL_R_MISSING_DH_RSA_CERT);
-- goto f_err;
-- }
-+ if ((alg_k & SSL_kEDH) && dh == NULL) {
-+ SSLerr(SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM, ERR_R_INTERNAL_ERROR);
-+ goto f_err;
-+ }
-+ if ((alg_k & SSL_kDHr) && !has_bits(i, EVP_PK_DH | EVP_PKS_RSA)) {
-+ SSLerr(SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM,
-+ SSL_R_MISSING_DH_RSA_CERT);
-+ goto f_err;
-+ }
- #ifndef OPENSSL_NO_DSA
-- else if ((alg_k & SSL_kDHd) && !has_bits(i,EVP_PK_DH|EVP_PKS_DSA))
-+ if ((alg_k & SSL_kDHd) && !has_bits(i,EVP_PK_DH|EVP_PKS_DSA))
- {
- SSLerr(SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM,SSL_R_MISSING_DH_DSA_CERT);
- goto f_err;
- }
- #endif
--#endif
-+ /* Check DHE only: static DH not implemented. */
-+ if (alg_k & SSL_kEDH) {
-+ int dh_size = BN_num_bits(dh->p);
-+ if ((!SSL_C_IS_EXPORT(s->s3->tmp.new_cipher) && dh_size < 768)
-+ || (SSL_C_IS_EXPORT(s->s3->tmp.new_cipher) && dh_size < 512)) {
-+ SSLerr(SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM, SSL_R_DH_KEY_TOO_SMALL);
-+ goto f_err;
-+ }
-+ }
-+#endif /* !OPENSSL_NO_DH */
-
- if (SSL_C_IS_EXPORT(s->s3->tmp.new_cipher) && !has_bits(i,EVP_PKT_EXP))
- {
-Index: openssl-1.0.1k/ssl/ssl.h
-===================================================================
---- openssl-1.0.1k.orig/ssl/ssl.h
-+++ openssl-1.0.1k/ssl/ssl.h
-@@ -2378,6 +2378,7 @@ void ERR_load_SSL_strings(void);
- #define SSL_R_DATA_LENGTH_TOO_LONG 146
- #define SSL_R_DECRYPTION_FAILED 147
- #define SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC 281
-+#define SSL_R_DH_KEY_TOO_SMALL 372
- #define SSL_R_DH_PUBLIC_VALUE_LENGTH_IS_WRONG 148
- #define SSL_R_DIGEST_CHECK_FAILED 149
- #define SSL_R_DTLS_MESSAGE_TOO_BIG 334
-Index: openssl-1.0.1k/ssl/ssl_err.c
-===================================================================
---- openssl-1.0.1k.orig/ssl/ssl_err.c
-+++ openssl-1.0.1k/ssl/ssl_err.c
-@@ -363,6 +363,7 @@ static ERR_STRING_DATA SSL_str_reasons[]
- {ERR_REASON(SSL_R_DATA_LENGTH_TOO_LONG) ,"data length too long"},
- {ERR_REASON(SSL_R_DECRYPTION_FAILED) ,"decryption failed"},
- {ERR_REASON(SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC),"decryption failed or bad record mac"},
-+{ERR_REASON(SSL_R_DH_KEY_TOO_SMALL), "dh key too small"},
- {ERR_REASON(SSL_R_DH_PUBLIC_VALUE_LENGTH_IS_WRONG),"dh public value length is wrong"},
- {ERR_REASON(SSL_R_DIGEST_CHECK_FAILED) ,"digest check failed"},
- {ERR_REASON(SSL_R_DTLS_MESSAGE_TOO_BIG) ,"dtls message too big"},
Deleted: openssl/branches/jessie_stable/debian/patches/CVE-2016-0702.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/CVE-2016-0702.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/CVE-2016-0702.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -1,892 +0,0 @@
-Index: openssl-1.0.1k/crypto/bn/asm/x86_64-mont5.pl
-===================================================================
---- openssl-1.0.1k.orig/crypto/bn/asm/x86_64-mont5.pl
-+++ openssl-1.0.1k/crypto/bn/asm/x86_64-mont5.pl
-@@ -66,60 +66,113 @@ bn_mul_mont_gather5:
- .align 16
- .Lmul_enter:
- mov ${num}d,${num}d
-- mov `($win64?56:8)`(%rsp),%r10d # load 7th argument
-+ movd `($win64?56:8)`(%rsp),%xmm5 # load 7th argument
-+ lea .Linc(%rip),%r10
- push %rbx
- push %rbp
- push %r12
- push %r13
- push %r14
- push %r15
--___
--$code.=<<___ if ($win64);
-- lea -0x28(%rsp),%rsp
-- movaps %xmm6,(%rsp)
-- movaps %xmm7,0x10(%rsp)
-+
- .Lmul_alloca:
--___
--$code.=<<___;
- mov %rsp,%rax
- lea 2($num),%r11
- neg %r11
-- lea (%rsp,%r11,8),%rsp # tp=alloca(8*(num+2))
-+ lea -264(%rsp,%r11,8),%rsp # tp=alloca(8*(num+2)+256+8)
- and \$-1024,%rsp # minimize TLB usage
-
- mov %rax,8(%rsp,$num,8) # tp[num+1]=%rsp
- .Lmul_body:
-- mov $bp,%r12 # reassign $bp
-+ lea 128($bp),%r12 # reassign $bp (+size optimization)
- ___
- $bp="%r12";
- $STRIDE=2**5*8; # 5 is "window size"
- $N=$STRIDE/4; # should match cache line size
- $code.=<<___;
-- mov %r10,%r11
-- shr \$`log($N/8)/log(2)`,%r10
-- and \$`$N/8-1`,%r11
-- not %r10
-- lea .Lmagic_masks(%rip),%rax
-- and \$`2**5/($N/8)-1`,%r10 # 5 is "window size"
-- lea 96($bp,%r11,8),$bp # pointer within 1st cache line
-- movq 0(%rax,%r10,8),%xmm4 # set of masks denoting which
-- movq 8(%rax,%r10,8),%xmm5 # cache line contains element
-- movq 16(%rax,%r10,8),%xmm6 # denoted by 7th argument
-- movq 24(%rax,%r10,8),%xmm7
--
-- movq `0*$STRIDE/4-96`($bp),%xmm0
-- movq `1*$STRIDE/4-96`($bp),%xmm1
-- pand %xmm4,%xmm0
-- movq `2*$STRIDE/4-96`($bp),%xmm2
-- pand %xmm5,%xmm1
-- movq `3*$STRIDE/4-96`($bp),%xmm3
-- pand %xmm6,%xmm2
-- por %xmm1,%xmm0
-- pand %xmm7,%xmm3
-+ movdqa 0(%r10),%xmm0 # 00000001000000010000000000000000
-+ movdqa 16(%r10),%xmm1 # 00000002000000020000000200000002
-+ lea 24-112(%rsp,$num,8),%r10# place the mask after tp[num+3] (+ICache optimization)
-+ and \$-16,%r10
-+
-+ pshufd \$0,%xmm5,%xmm5 # broadcast index
-+ movdqa %xmm1,%xmm4
-+ movdqa %xmm1,%xmm2
-+___
-+########################################################################
-+# calculate mask by comparing 0..31 to index and save result to stack
-+#
-+$code.=<<___;
-+ paddd %xmm0,%xmm1
-+ pcmpeqd %xmm5,%xmm0 # compare to 1,0
-+ .byte 0x67
-+ movdqa %xmm4,%xmm3
-+___
-+for($k=0;$k<$STRIDE/16-4;$k+=4) {
-+$code.=<<___;
-+ paddd %xmm1,%xmm2
-+ pcmpeqd %xmm5,%xmm1 # compare to 3,2
-+ movdqa %xmm0,`16*($k+0)+112`(%r10)
-+ movdqa %xmm4,%xmm0
-+
-+ paddd %xmm2,%xmm3
-+ pcmpeqd %xmm5,%xmm2 # compare to 5,4
-+ movdqa %xmm1,`16*($k+1)+112`(%r10)
-+ movdqa %xmm4,%xmm1
-+
-+ paddd %xmm3,%xmm0
-+ pcmpeqd %xmm5,%xmm3 # compare to 7,6
-+ movdqa %xmm2,`16*($k+2)+112`(%r10)
-+ movdqa %xmm4,%xmm2
-+
-+ paddd %xmm0,%xmm1
-+ pcmpeqd %xmm5,%xmm0
-+ movdqa %xmm3,`16*($k+3)+112`(%r10)
-+ movdqa %xmm4,%xmm3
-+___
-+}
-+$code.=<<___; # last iteration can be optimized
-+ paddd %xmm1,%xmm2
-+ pcmpeqd %xmm5,%xmm1
-+ movdqa %xmm0,`16*($k+0)+112`(%r10)
-+
-+ paddd %xmm2,%xmm3
-+ .byte 0x67
-+ pcmpeqd %xmm5,%xmm2
-+ movdqa %xmm1,`16*($k+1)+112`(%r10)
-+
-+ pcmpeqd %xmm5,%xmm3
-+ movdqa %xmm2,`16*($k+2)+112`(%r10)
-+ pand `16*($k+0)-128`($bp),%xmm0 # while it's still in register
-+
-+ pand `16*($k+1)-128`($bp),%xmm1
-+ pand `16*($k+2)-128`($bp),%xmm2
-+ movdqa %xmm3,`16*($k+3)+112`(%r10)
-+ pand `16*($k+3)-128`($bp),%xmm3
- por %xmm2,%xmm0
-+ por %xmm3,%xmm1
-+___
-+for($k=0;$k<$STRIDE/16-4;$k+=4) {
-+$code.=<<___;
-+ movdqa `16*($k+0)-128`($bp),%xmm4
-+ movdqa `16*($k+1)-128`($bp),%xmm5
-+ movdqa `16*($k+2)-128`($bp),%xmm2
-+ pand `16*($k+0)+112`(%r10),%xmm4
-+ movdqa `16*($k+3)-128`($bp),%xmm3
-+ pand `16*($k+1)+112`(%r10),%xmm5
-+ por %xmm4,%xmm0
-+ pand `16*($k+2)+112`(%r10),%xmm2
-+ por %xmm5,%xmm1
-+ pand `16*($k+3)+112`(%r10),%xmm3
-+ por %xmm2,%xmm0
-+ por %xmm3,%xmm1
-+___
-+}
-+$code.=<<___;
-+ por %xmm1,%xmm0
-+ pshufd \$0x4e,%xmm0,%xmm1
-+ por %xmm1,%xmm0
- lea $STRIDE($bp),$bp
-- por %xmm3,%xmm0
--
- movq %xmm0,$m0 # m0=bp[0]
-
- mov ($n0),$n0 # pull n0[0] value
-@@ -128,29 +181,14 @@ $code.=<<___;
- xor $i,$i # i=0
- xor $j,$j # j=0
-
-- movq `0*$STRIDE/4-96`($bp),%xmm0
-- movq `1*$STRIDE/4-96`($bp),%xmm1
-- pand %xmm4,%xmm0
-- movq `2*$STRIDE/4-96`($bp),%xmm2
-- pand %xmm5,%xmm1
--
- mov $n0,$m1
- mulq $m0 # ap[0]*bp[0]
- mov %rax,$lo0
- mov ($np),%rax
-
-- movq `3*$STRIDE/4-96`($bp),%xmm3
-- pand %xmm6,%xmm2
-- por %xmm1,%xmm0
-- pand %xmm7,%xmm3
--
- imulq $lo0,$m1 # "tp[0]"*n0
- mov %rdx,$hi0
-
-- por %xmm2,%xmm0
-- lea $STRIDE($bp),$bp
-- por %xmm3,%xmm0
--
- mulq $m1 # np[0]*m1
- add %rax,$lo0 # discarded
- mov 8($ap),%rax
-@@ -183,8 +221,6 @@ $code.=<<___;
- cmp $num,$j
- jne .L1st
-
-- movq %xmm0,$m0 # bp[1]
--
- add %rax,$hi1
- mov ($ap),%rax # ap[0]
- adc \$0,%rdx
-@@ -204,33 +240,46 @@ $code.=<<___;
- jmp .Louter
- .align 16
- .Louter:
-+ lea 24+128(%rsp,$num,8),%rdx # where 256-byte mask is (+size optimization)
-+ and \$-16,%rdx
-+ pxor %xmm4,%xmm4
-+ pxor %xmm5,%xmm5
-+___
-+for($k=0;$k<$STRIDE/16;$k+=4) {
-+$code.=<<___;
-+ movdqa `16*($k+0)-128`($bp),%xmm0
-+ movdqa `16*($k+1)-128`($bp),%xmm1
-+ movdqa `16*($k+2)-128`($bp),%xmm2
-+ movdqa `16*($k+3)-128`($bp),%xmm3
-+ pand `16*($k+0)-128`(%rdx),%xmm0
-+ pand `16*($k+1)-128`(%rdx),%xmm1
-+ por %xmm0,%xmm4
-+ pand `16*($k+2)-128`(%rdx),%xmm2
-+ por %xmm1,%xmm5
-+ pand `16*($k+3)-128`(%rdx),%xmm3
-+ por %xmm2,%xmm4
-+ por %xmm3,%xmm5
-+___
-+}
-+$code.=<<___;
-+ por %xmm5,%xmm4
-+ pshufd \$0x4e,%xmm4,%xmm0
-+ por %xmm4,%xmm0
-+ lea $STRIDE($bp),$bp
-+ movq %xmm0,$m0 # m0=bp[i]
-+
- xor $j,$j # j=0
- mov $n0,$m1
- mov (%rsp),$lo0
-
-- movq `0*$STRIDE/4-96`($bp),%xmm0
-- movq `1*$STRIDE/4-96`($bp),%xmm1
-- pand %xmm4,%xmm0
-- movq `2*$STRIDE/4-96`($bp),%xmm2
-- pand %xmm5,%xmm1
--
- mulq $m0 # ap[0]*bp[i]
- add %rax,$lo0 # ap[0]*bp[i]+tp[0]
- mov ($np),%rax
- adc \$0,%rdx
-
-- movq `3*$STRIDE/4-96`($bp),%xmm3
-- pand %xmm6,%xmm2
-- por %xmm1,%xmm0
-- pand %xmm7,%xmm3
--
- imulq $lo0,$m1 # tp[0]*n0
- mov %rdx,$hi0
-
-- por %xmm2,%xmm0
-- lea $STRIDE($bp),$bp
-- por %xmm3,%xmm0
--
- mulq $m1 # np[0]*m1
- add %rax,$lo0 # discarded
- mov 8($ap),%rax
-@@ -266,8 +315,6 @@ $code.=<<___;
- cmp $num,$j
- jne .Linner
-
-- movq %xmm0,$m0 # bp[i+1]
--
- add %rax,$hi1
- mov ($ap),%rax # ap[0]
- adc \$0,%rdx
-@@ -321,13 +368,7 @@ $code.=<<___;
-
- mov 8(%rsp,$num,8),%rsi # restore %rsp
- mov \$1,%rax
--___
--$code.=<<___ if ($win64);
-- movaps (%rsi),%xmm6
-- movaps 0x10(%rsi),%xmm7
-- lea 0x28(%rsi),%rsi
--___
--$code.=<<___;
-+
- mov (%rsi),%r15
- mov 8(%rsi),%r14
- mov 16(%rsi),%r13
-@@ -348,91 +389,130 @@ $code.=<<___;
- bn_mul4x_mont_gather5:
- .Lmul4x_enter:
- mov ${num}d,${num}d
-- mov `($win64?56:8)`(%rsp),%r10d # load 7th argument
-+ movd `($win64?56:8)`(%rsp),%xmm5 # load 7th argument
-+ lea .Linc(%rip),%r10
- push %rbx
- push %rbp
- push %r12
- push %r13
- push %r14
- push %r15
--___
--$code.=<<___ if ($win64);
-- lea -0x28(%rsp),%rsp
-- movaps %xmm6,(%rsp)
-- movaps %xmm7,0x10(%rsp)
-+
- .Lmul4x_alloca:
--___
--$code.=<<___;
- mov %rsp,%rax
- lea 4($num),%r11
- neg %r11
-- lea (%rsp,%r11,8),%rsp # tp=alloca(8*(num+4))
-+ lea -256(%rsp,%r11,8),%rsp # tp=alloca(8*(num+4)+256)
- and \$-1024,%rsp # minimize TLB usage
-
- mov %rax,8(%rsp,$num,8) # tp[num+1]=%rsp
- .Lmul4x_body:
- mov $rp,16(%rsp,$num,8) # tp[num+2]=$rp
-- mov %rdx,%r12 # reassign $bp
-+ lea 128(%rdx),%r12 # reassign $bp (+size optimization)
- ___
- $bp="%r12";
- $STRIDE=2**5*8; # 5 is "window size"
- $N=$STRIDE/4; # should match cache line size
- $code.=<<___;
-- mov %r10,%r11
-- shr \$`log($N/8)/log(2)`,%r10
-- and \$`$N/8-1`,%r11
-- not %r10
-- lea .Lmagic_masks(%rip),%rax
-- and \$`2**5/($N/8)-1`,%r10 # 5 is "window size"
-- lea 96($bp,%r11,8),$bp # pointer within 1st cache line
-- movq 0(%rax,%r10,8),%xmm4 # set of masks denoting which
-- movq 8(%rax,%r10,8),%xmm5 # cache line contains element
-- movq 16(%rax,%r10,8),%xmm6 # denoted by 7th argument
-- movq 24(%rax,%r10,8),%xmm7
--
-- movq `0*$STRIDE/4-96`($bp),%xmm0
-- movq `1*$STRIDE/4-96`($bp),%xmm1
-- pand %xmm4,%xmm0
-- movq `2*$STRIDE/4-96`($bp),%xmm2
-- pand %xmm5,%xmm1
-- movq `3*$STRIDE/4-96`($bp),%xmm3
-- pand %xmm6,%xmm2
-- por %xmm1,%xmm0
-- pand %xmm7,%xmm3
-+ movdqa 0(%r10),%xmm0 # 00000001000000010000000000000000
-+ movdqa 16(%r10),%xmm1 # 00000002000000020000000200000002
-+ lea 32-112(%rsp,$num,8),%r10# place the mask after tp[num+4] (+ICache optimization)
-+
-+ pshufd \$0,%xmm5,%xmm5 # broadcast index
-+ movdqa %xmm1,%xmm4
-+ .byte 0x67,0x67
-+ movdqa %xmm1,%xmm2
-+___
-+########################################################################
-+# calculate mask by comparing 0..31 to index and save result to stack
-+#
-+$code.=<<___;
-+ paddd %xmm0,%xmm1
-+ pcmpeqd %xmm5,%xmm0 # compare to 1,0
-+ .byte 0x67
-+ movdqa %xmm4,%xmm3
-+___
-+for($k=0;$k<$STRIDE/16-4;$k+=4) {
-+$code.=<<___;
-+ paddd %xmm1,%xmm2
-+ pcmpeqd %xmm5,%xmm1 # compare to 3,2
-+ movdqa %xmm0,`16*($k+0)+112`(%r10)
-+ movdqa %xmm4,%xmm0
-+
-+ paddd %xmm2,%xmm3
-+ pcmpeqd %xmm5,%xmm2 # compare to 5,4
-+ movdqa %xmm1,`16*($k+1)+112`(%r10)
-+ movdqa %xmm4,%xmm1
-+
-+ paddd %xmm3,%xmm0
-+ pcmpeqd %xmm5,%xmm3 # compare to 7,6
-+ movdqa %xmm2,`16*($k+2)+112`(%r10)
-+ movdqa %xmm4,%xmm2
-+
-+ paddd %xmm0,%xmm1
-+ pcmpeqd %xmm5,%xmm0
-+ movdqa %xmm3,`16*($k+3)+112`(%r10)
-+ movdqa %xmm4,%xmm3
-+___
-+}
-+$code.=<<___; # last iteration can be optimized
-+ paddd %xmm1,%xmm2
-+ pcmpeqd %xmm5,%xmm1
-+ movdqa %xmm0,`16*($k+0)+112`(%r10)
-+
-+ paddd %xmm2,%xmm3
-+ .byte 0x67
-+ pcmpeqd %xmm5,%xmm2
-+ movdqa %xmm1,`16*($k+1)+112`(%r10)
-+
-+ pcmpeqd %xmm5,%xmm3
-+ movdqa %xmm2,`16*($k+2)+112`(%r10)
-+ pand `16*($k+0)-128`($bp),%xmm0 # while it's still in register
-+
-+ pand `16*($k+1)-128`($bp),%xmm1
-+ pand `16*($k+2)-128`($bp),%xmm2
-+ movdqa %xmm3,`16*($k+3)+112`(%r10)
-+ pand `16*($k+3)-128`($bp),%xmm3
-+ por %xmm2,%xmm0
-+ por %xmm3,%xmm1
-+___
-+for($k=0;$k<$STRIDE/16-4;$k+=4) {
-+$code.=<<___;
-+ movdqa `16*($k+0)-128`($bp),%xmm4
-+ movdqa `16*($k+1)-128`($bp),%xmm5
-+ movdqa `16*($k+2)-128`($bp),%xmm2
-+ pand `16*($k+0)+112`(%r10),%xmm4
-+ movdqa `16*($k+3)-128`($bp),%xmm3
-+ pand `16*($k+1)+112`(%r10),%xmm5
-+ por %xmm4,%xmm0
-+ pand `16*($k+2)+112`(%r10),%xmm2
-+ por %xmm5,%xmm1
-+ pand `16*($k+3)+112`(%r10),%xmm3
- por %xmm2,%xmm0
-+ por %xmm3,%xmm1
-+___
-+}
-+$code.=<<___;
-+ por %xmm1,%xmm0
-+ pshufd \$0x4e,%xmm0,%xmm1
-+ por %xmm1,%xmm0
- lea $STRIDE($bp),$bp
-- por %xmm3,%xmm0
--
- movq %xmm0,$m0 # m0=bp[0]
-+
- mov ($n0),$n0 # pull n0[0] value
- mov ($ap),%rax
-
- xor $i,$i # i=0
- xor $j,$j # j=0
-
-- movq `0*$STRIDE/4-96`($bp),%xmm0
-- movq `1*$STRIDE/4-96`($bp),%xmm1
-- pand %xmm4,%xmm0
-- movq `2*$STRIDE/4-96`($bp),%xmm2
-- pand %xmm5,%xmm1
--
- mov $n0,$m1
- mulq $m0 # ap[0]*bp[0]
- mov %rax,$A[0]
- mov ($np),%rax
-
-- movq `3*$STRIDE/4-96`($bp),%xmm3
-- pand %xmm6,%xmm2
-- por %xmm1,%xmm0
-- pand %xmm7,%xmm3
--
- imulq $A[0],$m1 # "tp[0]"*n0
- mov %rdx,$A[1]
-
-- por %xmm2,%xmm0
-- lea $STRIDE($bp),$bp
-- por %xmm3,%xmm0
--
- mulq $m1 # np[0]*m1
- add %rax,$A[0] # discarded
- mov 8($ap),%rax
-@@ -550,8 +630,6 @@ $code.=<<___;
- mov $N[1],-16(%rsp,$j,8) # tp[j-1]
- mov %rdx,$N[0]
-
-- movq %xmm0,$m0 # bp[1]
--
- xor $N[1],$N[1]
- add $A[0],$N[0]
- adc \$0,$N[1]
-@@ -561,12 +639,34 @@ $code.=<<___;
- lea 1($i),$i # i++
- .align 4
- .Louter4x:
-+ lea 32+128(%rsp,$num,8),%rdx # where 256-byte mask is (+size optimization)
-+ pxor %xmm4,%xmm4
-+ pxor %xmm5,%xmm5
-+___
-+for($k=0;$k<$STRIDE/16;$k+=4) {
-+$code.=<<___;
-+ movdqa `16*($k+0)-128`($bp),%xmm0
-+ movdqa `16*($k+1)-128`($bp),%xmm1
-+ movdqa `16*($k+2)-128`($bp),%xmm2
-+ movdqa `16*($k+3)-128`($bp),%xmm3
-+ pand `16*($k+0)-128`(%rdx),%xmm0
-+ pand `16*($k+1)-128`(%rdx),%xmm1
-+ por %xmm0,%xmm4
-+ pand `16*($k+2)-128`(%rdx),%xmm2
-+ por %xmm1,%xmm5
-+ pand `16*($k+3)-128`(%rdx),%xmm3
-+ por %xmm2,%xmm4
-+ por %xmm3,%xmm5
-+___
-+}
-+$code.=<<___;
-+ por %xmm5,%xmm4
-+ pshufd \$0x4e,%xmm4,%xmm0
-+ por %xmm4,%xmm0
-+ lea $STRIDE($bp),$bp
-+ movq %xmm0,$m0 # m0=bp[i]
-+
- xor $j,$j # j=0
-- movq `0*$STRIDE/4-96`($bp),%xmm0
-- movq `1*$STRIDE/4-96`($bp),%xmm1
-- pand %xmm4,%xmm0
-- movq `2*$STRIDE/4-96`($bp),%xmm2
-- pand %xmm5,%xmm1
-
- mov (%rsp),$A[0]
- mov $n0,$m1
-@@ -575,18 +675,9 @@ $code.=<<___;
- mov ($np),%rax
- adc \$0,%rdx
-
-- movq `3*$STRIDE/4-96`($bp),%xmm3
-- pand %xmm6,%xmm2
-- por %xmm1,%xmm0
-- pand %xmm7,%xmm3
--
- imulq $A[0],$m1 # tp[0]*n0
- mov %rdx,$A[1]
-
-- por %xmm2,%xmm0
-- lea $STRIDE($bp),$bp
-- por %xmm3,%xmm0
--
- mulq $m1 # np[0]*m1
- add %rax,$A[0] # "$N[0]", discarded
- mov 8($ap),%rax
-@@ -718,7 +809,6 @@ $code.=<<___;
- mov $N[0],-24(%rsp,$j,8) # tp[j-1]
- mov %rdx,$N[0]
-
-- movq %xmm0,$m0 # bp[i+1]
- mov $N[1],-16(%rsp,$j,8) # tp[j-1]
-
- xor $N[1],$N[1]
-@@ -809,13 +899,7 @@ ___
- $code.=<<___;
- mov 8(%rsp,$num,8),%rsi # restore %rsp
- mov \$1,%rax
--___
--$code.=<<___ if ($win64);
-- movaps (%rsi),%xmm6
-- movaps 0x10(%rsi),%xmm7
-- lea 0x28(%rsi),%rsi
--___
--$code.=<<___;
-+
- mov (%rsi),%r15
- mov 8(%rsi),%r14
- mov 16(%rsi),%r13
-@@ -830,8 +914,8 @@ ___
- }}}
-
- {
--my ($inp,$num,$tbl,$idx)=$win64?("%rcx","%rdx","%r8", "%r9") : # Win64 order
-- ("%rdi","%rsi","%rdx","%rcx"); # Unix order
-+my ($inp,$num,$tbl,$idx)=$win64?("%rcx","%rdx","%r8", "%r9d") : # Win64 order
-+ ("%rdi","%rsi","%rdx","%ecx"); # Unix order
- my $out=$inp;
- my $STRIDE=2**5*8;
- my $N=$STRIDE/4;
-@@ -859,53 +943,89 @@ bn_scatter5:
- .type bn_gather5,\@abi-omnipotent
- .align 16
- bn_gather5:
--___
--$code.=<<___ if ($win64);
--.LSEH_begin_bn_gather5:
-+.LSEH_begin_bn_gather5: # Win64 thing, but harmless in other cases
- # I can't trust assembler to use specific encoding:-(
-- .byte 0x48,0x83,0xec,0x28 #sub \$0x28,%rsp
-- .byte 0x0f,0x29,0x34,0x24 #movaps %xmm6,(%rsp)
-- .byte 0x0f,0x29,0x7c,0x24,0x10 #movdqa %xmm7,0x10(%rsp)
--___
--$code.=<<___;
-- mov $idx,%r11
-- shr \$`log($N/8)/log(2)`,$idx
-- and \$`$N/8-1`,%r11
-- not $idx
-- lea .Lmagic_masks(%rip),%rax
-- and \$`2**5/($N/8)-1`,$idx # 5 is "window size"
-- lea 96($tbl,%r11,8),$tbl # pointer within 1st cache line
-- movq 0(%rax,$idx,8),%xmm4 # set of masks denoting which
-- movq 8(%rax,$idx,8),%xmm5 # cache line contains element
-- movq 16(%rax,$idx,8),%xmm6 # denoted by 7th argument
-- movq 24(%rax,$idx,8),%xmm7
-+ .byte 0x4c,0x8d,0x14,0x24 # lea (%rsp),%r10
-+ .byte 0x48,0x81,0xec,0x08,0x01,0x00,0x00 # sub $0x108,%rsp
-+ lea .Linc(%rip),%rax
-+ and \$-16,%rsp # shouldn't be formally required
-+
-+ movd $idx,%xmm5
-+ movdqa 0(%rax),%xmm0 # 00000001000000010000000000000000
-+ movdqa 16(%rax),%xmm1 # 00000002000000020000000200000002
-+ lea 128($tbl),%r11 # size optimization
-+ lea 128(%rsp),%rax # size optimization
-+
-+ pshufd \$0,%xmm5,%xmm5 # broadcast $idx
-+ movdqa %xmm1,%xmm4
-+ movdqa %xmm1,%xmm2
-+___
-+########################################################################
-+# calculate mask by comparing 0..31 to $idx and save result to stack
-+#
-+for($i=0;$i<$STRIDE/16;$i+=4) {
-+$code.=<<___;
-+ paddd %xmm0,%xmm1
-+ pcmpeqd %xmm5,%xmm0 # compare to 1,0
-+___
-+$code.=<<___ if ($i);
-+ movdqa %xmm3,`16*($i-1)-128`(%rax)
-+___
-+$code.=<<___;
-+ movdqa %xmm4,%xmm3
-+
-+ paddd %xmm1,%xmm2
-+ pcmpeqd %xmm5,%xmm1 # compare to 3,2
-+ movdqa %xmm0,`16*($i+0)-128`(%rax)
-+ movdqa %xmm4,%xmm0
-+
-+ paddd %xmm2,%xmm3
-+ pcmpeqd %xmm5,%xmm2 # compare to 5,4
-+ movdqa %xmm1,`16*($i+1)-128`(%rax)
-+ movdqa %xmm4,%xmm1
-+
-+ paddd %xmm3,%xmm0
-+ pcmpeqd %xmm5,%xmm3 # compare to 7,6
-+ movdqa %xmm2,`16*($i+2)-128`(%rax)
-+ movdqa %xmm4,%xmm2
-+___
-+}
-+$code.=<<___;
-+ movdqa %xmm3,`16*($i-1)-128`(%rax)
- jmp .Lgather
--.align 16
--.Lgather:
-- movq `0*$STRIDE/4-96`($tbl),%xmm0
-- movq `1*$STRIDE/4-96`($tbl),%xmm1
-- pand %xmm4,%xmm0
-- movq `2*$STRIDE/4-96`($tbl),%xmm2
-- pand %xmm5,%xmm1
-- movq `3*$STRIDE/4-96`($tbl),%xmm3
-- pand %xmm6,%xmm2
-- por %xmm1,%xmm0
-- pand %xmm7,%xmm3
-- por %xmm2,%xmm0
-- lea $STRIDE($tbl),$tbl
-- por %xmm3,%xmm0
-
-+.align 32
-+.Lgather:
-+ pxor %xmm4,%xmm4
-+ pxor %xmm5,%xmm5
-+___
-+for($i=0;$i<$STRIDE/16;$i+=4) {
-+$code.=<<___;
-+ movdqa `16*($i+0)-128`(%r11),%xmm0
-+ movdqa `16*($i+1)-128`(%r11),%xmm1
-+ movdqa `16*($i+2)-128`(%r11),%xmm2
-+ pand `16*($i+0)-128`(%rax),%xmm0
-+ movdqa `16*($i+3)-128`(%r11),%xmm3
-+ pand `16*($i+1)-128`(%rax),%xmm1
-+ por %xmm0,%xmm4
-+ pand `16*($i+2)-128`(%rax),%xmm2
-+ por %xmm1,%xmm5
-+ pand `16*($i+3)-128`(%rax),%xmm3
-+ por %xmm2,%xmm4
-+ por %xmm3,%xmm5
-+___
-+}
-+$code.=<<___;
-+ por %xmm5,%xmm4
-+ lea $STRIDE(%r11),%r11
-+ pshufd \$0x4e,%xmm4,%xmm0
-+ por %xmm4,%xmm0
- movq %xmm0,($out) # m0=bp[0]
- lea 8($out),$out
- sub \$1,$num
- jnz .Lgather
--___
--$code.=<<___ if ($win64);
-- movaps (%rsp),%xmm6
-- movaps 0x10(%rsp),%xmm7
-- lea 0x28(%rsp),%rsp
--___
--$code.=<<___;
-+
-+ lea (%r10),%rsp
- ret
- .LSEH_end_bn_gather5:
- .size bn_gather5,.-bn_gather5
-@@ -913,9 +1033,9 @@ ___
- }
- $code.=<<___;
- .align 64
--.Lmagic_masks:
-- .long 0,0, 0,0, 0,0, -1,-1
-- .long 0,0, 0,0, 0,0, 0,0
-+.Linc:
-+ .long 0,0, 1,1
-+ .long 2,2, 2,2
- .asciz "Montgomery Multiplication with scatter/gather for x86_64, CRYPTOGAMS by <appro\@openssl.org>"
- ___
-
-@@ -954,7 +1074,7 @@ mul_handler:
- cmp %r10,%rbx # context->Rip<end of prologue label
- jb .Lcommon_seh_tail
-
-- lea `40+48`(%rax),%rax
-+ lea 48(%rax),%rax
-
- mov 4(%r11),%r10d # HandlerData[1]
- lea (%rsi,%r10),%r10 # end of alloca label
-@@ -971,9 +1091,7 @@ mul_handler:
- mov 192($context),%r10 # pull $num
- mov 8(%rax,%r10,8),%rax # pull saved stack pointer
-
-- movaps (%rax),%xmm0
-- movaps 16(%rax),%xmm1
-- lea `40+48`(%rax),%rax
-+ lea 48(%rax),%rax
-
- mov -8(%rax),%rbx
- mov -16(%rax),%rbp
-@@ -987,8 +1105,6 @@ mul_handler:
- mov %r13,224($context) # restore context->R13
- mov %r14,232($context) # restore context->R14
- mov %r15,240($context) # restore context->R15
-- movups %xmm0,512($context) # restore context->Xmm6
-- movups %xmm1,528($context) # restore context->Xmm7
-
- .Lcommon_seh_tail:
- mov 8(%rax),%rdi
-@@ -1057,10 +1173,9 @@ mul_handler:
- .rva .Lmul4x_alloca,.Lmul4x_body,.Lmul4x_epilogue # HandlerData[]
- .align 8
- .LSEH_info_bn_gather5:
-- .byte 0x01,0x0d,0x05,0x00
-- .byte 0x0d,0x78,0x01,0x00 #movaps 0x10(rsp),xmm7
-- .byte 0x08,0x68,0x00,0x00 #movaps (rsp),xmm6
-- .byte 0x04,0x42,0x00,0x00 #sub rsp,0x28
-+ .byte 0x01,0x0b,0x03,0x0a
-+ .byte 0x0b,0x01,0x21,0x00 # sub rsp,0x108
-+ .byte 0x04,0xa3,0x00,0x00 # lea r10,(rsp), set_frame r10
- .align 8
- ___
- }
-Index: openssl-1.0.1k/crypto/bn/bn_exp.c
-===================================================================
---- openssl-1.0.1k.orig/crypto/bn/bn_exp.c
-+++ openssl-1.0.1k/crypto/bn/bn_exp.c
-@@ -111,6 +111,7 @@
-
-
- #include "cryptlib.h"
-+#include "constant_time_locl.h"
- #include "bn_lcl.h"
-
- #include <stdlib.h>
-@@ -534,31 +535,67 @@ err:
- * as cache lines are concerned. The following functions are used to transfer a BIGNUM
- * from/to that table. */
-
--static int MOD_EXP_CTIME_COPY_TO_PREBUF(const BIGNUM *b, int top, unsigned char *buf, int idx, int width)
-+static int MOD_EXP_CTIME_COPY_TO_PREBUF(const BIGNUM *b, int top, unsigned char *buf, int idx, int window)
- {
-- size_t i, j;
-+ int i, j;
-+ int width = 1 << window;
-+ BN_ULONG *table = (BN_ULONG *)buf;
-
- if (top > b->top)
- top = b->top; /* this works because 'buf' is explicitly zeroed */
-- for (i = 0, j=idx; i < top * sizeof b->d[0]; i++, j+=width)
-- {
-- buf[j] = ((unsigned char*)b->d)[i];
-- }
-+ for (i = 0, j = idx; i < top; i++, j += width) {
-+ table[j] = b->d[i];
-+ }
-
- return 1;
- }
-
--static int MOD_EXP_CTIME_COPY_FROM_PREBUF(BIGNUM *b, int top, unsigned char *buf, int idx, int width)
-+static int MOD_EXP_CTIME_COPY_FROM_PREBUF(BIGNUM *b, int top, unsigned char *buf, int idx, int window)
- {
-- size_t i, j;
-+ int i, j;
-+ int width = 1 << window;
-+ volatile BN_ULONG *table = (volatile BN_ULONG *)buf;
-
- if (bn_wexpand(b, top) == NULL)
- return 0;
-
-- for (i=0, j=idx; i < top * sizeof b->d[0]; i++, j+=width)
-- {
-- ((unsigned char*)b->d)[i] = buf[j];
-- }
-+ if (window <= 3) {
-+ for (i = 0; i < top; i++, table += width) {
-+ BN_ULONG acc = 0;
-+
-+ for (j = 0; j < width; j++) {
-+ acc |= table[j] &
-+ ((BN_ULONG)0 - (constant_time_eq_int(j,idx)&1));
-+ }
-+
-+ b->d[i] = acc;
-+ }
-+ } else {
-+ int xstride = 1 << (window - 2);
-+ BN_ULONG y0, y1, y2, y3;
-+
-+ i = idx >> (window - 2); /* equivalent of idx / xstride */
-+ idx &= xstride - 1; /* equivalent of idx % xstride */
-+
-+ y0 = (BN_ULONG)0 - (constant_time_eq_int(i,0)&1);
-+ y1 = (BN_ULONG)0 - (constant_time_eq_int(i,1)&1);
-+ y2 = (BN_ULONG)0 - (constant_time_eq_int(i,2)&1);
-+ y3 = (BN_ULONG)0 - (constant_time_eq_int(i,3)&1);
-+
-+ for (i = 0; i < top; i++, table += width) {
-+ BN_ULONG acc = 0;
-+
-+ for (j = 0; j < xstride; j++) {
-+ acc |= ( (table[j + 0 * xstride] & y0) |
-+ (table[j + 1 * xstride] & y1) |
-+ (table[j + 2 * xstride] & y2) |
-+ (table[j + 3 * xstride] & y3) )
-+ & ((BN_ULONG)0 - (constant_time_eq_int(j,idx)&1));
-+ }
-+
-+ b->d[i] = acc;
-+ }
-+ }
-
- b->top = top;
- bn_correct_top(b);
-@@ -767,8 +804,8 @@ int BN_mod_exp_mont_consttime(BIGNUM *rr
- else
- #endif
- {
-- if (!MOD_EXP_CTIME_COPY_TO_PREBUF(&tmp, top, powerbuf, 0, numPowers)) goto err;
-- if (!MOD_EXP_CTIME_COPY_TO_PREBUF(&am, top, powerbuf, 1, numPowers)) goto err;
-+ if (!MOD_EXP_CTIME_COPY_TO_PREBUF(&tmp, top, powerbuf, 0, window)) goto err;
-+ if (!MOD_EXP_CTIME_COPY_TO_PREBUF(&am, top, powerbuf, 1, window)) goto err;
-
- /* If the window size is greater than 1, then calculate
- * val[i=2..2^winsize-1]. Powers are computed as a*a^(i-1)
-@@ -778,20 +815,20 @@ int BN_mod_exp_mont_consttime(BIGNUM *rr
- if (window > 1)
- {
- if (!BN_mod_mul_montgomery(&tmp,&am,&am,mont,ctx)) goto err;
-- if (!MOD_EXP_CTIME_COPY_TO_PREBUF(&tmp, top, powerbuf, 2, numPowers)) goto err;
-+ if (!MOD_EXP_CTIME_COPY_TO_PREBUF(&tmp, top, powerbuf, 2, window)) goto err;
- for (i=3; i<numPowers; i++)
- {
- /* Calculate a^i = a^(i-1) * a */
- if (!BN_mod_mul_montgomery(&tmp,&am,&tmp,mont,ctx))
- goto err;
-- if (!MOD_EXP_CTIME_COPY_TO_PREBUF(&tmp, top, powerbuf, i, numPowers)) goto err;
-+ if (!MOD_EXP_CTIME_COPY_TO_PREBUF(&tmp, top, powerbuf, i, window)) goto err;
- }
- }
-
- bits--;
- for (wvalue=0, i=bits%window; i>=0; i--,bits--)
- wvalue = (wvalue<<1)+BN_is_bit_set(p,bits);
-- if (!MOD_EXP_CTIME_COPY_FROM_PREBUF(&tmp,top,powerbuf,wvalue,numPowers)) goto err;
-+ if (!MOD_EXP_CTIME_COPY_FROM_PREBUF(&tmp,top,powerbuf,wvalue,window)) goto err;
-
- /* Scan the exponent one window at a time starting from the most
- * significant bits.
-@@ -808,7 +845,7 @@ int BN_mod_exp_mont_consttime(BIGNUM *rr
- }
-
- /* Fetch the appropriate pre-computed value from the pre-buf */
-- if (!MOD_EXP_CTIME_COPY_FROM_PREBUF(&am, top, powerbuf, wvalue, numPowers)) goto err;
-+ if (!MOD_EXP_CTIME_COPY_FROM_PREBUF(&am, top, powerbuf, wvalue, window)) goto err;
-
- /* Multiply the result into the intermediate result */
- if (!BN_mod_mul_montgomery(&tmp,&tmp,&am,mont,ctx)) goto err;
-Index: openssl-1.0.1k/crypto/perlasm/x86_64-xlate.pl
-===================================================================
---- openssl-1.0.1k.orig/crypto/perlasm/x86_64-xlate.pl
-+++ openssl-1.0.1k/crypto/perlasm/x86_64-xlate.pl
-@@ -121,7 +121,7 @@ my %globals;
- $self->{sz} = "";
- } elsif ($self->{op} =~ /^v/) { # VEX
- $self->{sz} = "";
-- } elsif ($self->{op} =~ /movq/ && $line =~ /%xmm/) {
-+ } elsif ($self->{op} =~ /mov[dq]/ && $line =~ /%xmm/) {
- $self->{sz} = "";
- } elsif ($self->{op} =~ /([a-z]{3,})([qlwb])$/) {
- $self->{op} = $1;
Deleted: openssl/branches/jessie_stable/debian/patches/CVE-2016-0705.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/CVE-2016-0705.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/CVE-2016-0705.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -1,66 +0,0 @@
-From 6c88c71b4e4825c7bc0489306d062d017634eb88 Mon Sep 17 00:00:00 2001
-From: "Dr. Stephen Henson" <steve at openssl.org>
-Date: Thu, 18 Feb 2016 12:47:23 +0000
-Subject: [PATCH] Fix double free in DSA private key parsing.
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Fix double free bug when parsing malformed DSA private keys.
-
-Thanks to Adam Langley (Google/BoringSSL) for discovering this bug using
-libFuzzer.
-
-CVE-2016-0705
-
-Reviewed-by: Emilia Käsper <emilia at openssl.org>
----
- crypto/dsa/dsa_ameth.c | 20 ++++++++++----------
- 1 file changed, 10 insertions(+), 10 deletions(-)
-
-Index: openssl-1.0.1k/crypto/dsa/dsa_ameth.c
-===================================================================
---- openssl-1.0.1k.orig/crypto/dsa/dsa_ameth.c
-+++ openssl-1.0.1k/crypto/dsa/dsa_ameth.c
-@@ -201,6 +201,8 @@ static int dsa_priv_decode(EVP_PKEY *pke
- STACK_OF(ASN1_TYPE) *ndsa = NULL;
- DSA *dsa = NULL;
-
-+ int ret = 0;
-+
- if (!PKCS8_pkey_get0(NULL, &p, &pklen, &palg, p8))
- return 0;
- X509_ALGOR_get0(NULL, &ptype, &pval, palg);
-@@ -281,23 +283,21 @@ static int dsa_priv_decode(EVP_PKEY *pke
- }
-
- EVP_PKEY_assign_DSA(pkey, dsa);
-- BN_CTX_free (ctx);
-- if(ndsa)
-- sk_ASN1_TYPE_pop_free(ndsa, ASN1_TYPE_free);
-- else
-- ASN1_INTEGER_free(privkey);
-
-- return 1;
-+ ret = 1;
-+ goto done;
-
- decerr:
- DSAerr(DSA_F_DSA_PRIV_DECODE, EVP_R_DECODE_ERROR);
- dsaerr:
-- BN_CTX_free (ctx);
-- if (privkey)
-- ASN1_INTEGER_free(privkey);
-- sk_ASN1_TYPE_pop_free(ndsa, ASN1_TYPE_free);
- DSA_free(dsa);
-- return 0;
-+ done:
-+ BN_CTX_free (ctx);
-+ if (ndsa)
-+ sk_ASN1_TYPE_pop_free(ndsa, ASN1_TYPE_free);
-+ else
-+ ASN1_INTEGER_free(privkey);
-+ return ret;
- }
-
- static int dsa_priv_encode(PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pkey)
Deleted: openssl/branches/jessie_stable/debian/patches/CVE-2016-0797.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/CVE-2016-0797.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/CVE-2016-0797.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -1,98 +0,0 @@
-From 8f8d7d2796ca710184453ba4a300ad7d54d7f1a1 Mon Sep 17 00:00:00 2001
-From: Matt Caswell <matt at openssl.org>
-Date: Mon, 22 Feb 2016 10:27:18 +0000
-Subject: [PATCH] Fix BN_hex2bn/BN_dec2bn NULL ptr/heap corruption
-
----
- crypto/bn/bn.h | 14 ++++++++++++--
- crypto/bn/bn_print.c | 13 +++++++++----
- 2 files changed, 21 insertions(+), 6 deletions(-)
-
-Index: openssl-1.0.1k/crypto/bn/bn.h
-===================================================================
---- openssl-1.0.1k.orig/crypto/bn/bn.h
-+++ openssl-1.0.1k/crypto/bn/bn.h
-@@ -125,6 +125,7 @@
- #ifndef HEADER_BN_H
- #define HEADER_BN_H
-
-+#include <limits.h>
- #include <openssl/e_os2.h>
- #ifndef OPENSSL_NO_FP_API
- #include <stdio.h> /* FILE */
-@@ -696,8 +697,17 @@ const BIGNUM *BN_get0_nist_prime_521(voi
-
- /* library internal functions */
-
--#define bn_expand(a,bits) ((((((bits+BN_BITS2-1))/BN_BITS2)) <= (a)->dmax)?\
-- (a):bn_expand2((a),(bits+BN_BITS2-1)/BN_BITS2))
-+# define bn_expand(a,bits) \
-+ ( \
-+ bits > (INT_MAX - BN_BITS2 + 1) ? \
-+ NULL \
-+ : \
-+ (((bits+BN_BITS2-1)/BN_BITS2) <= (a)->dmax) ? \
-+ (a) \
-+ : \
-+ bn_expand2((a),(bits+BN_BITS2-1)/BN_BITS2) \
-+ )
-+
- #define bn_wexpand(a,words) (((words) <= (a)->dmax)?(a):bn_expand2((a),(words)))
- BIGNUM *bn_expand2(BIGNUM *a, int words);
- #ifndef OPENSSL_NO_DEPRECATED
-Index: openssl-1.0.1k/crypto/bn/bn_print.c
-===================================================================
---- openssl-1.0.1k.orig/crypto/bn/bn_print.c
-+++ openssl-1.0.1k/crypto/bn/bn_print.c
-@@ -58,6 +58,7 @@
-
- #include <stdio.h>
- #include <ctype.h>
-+#include <limits.h>
- #include "cryptlib.h"
- #include <openssl/buffer.h>
- #include "bn_lcl.h"
-@@ -180,8 +181,10 @@ int BN_hex2bn(BIGNUM **bn, const char *a
-
- if (*a == '-') { neg=1; a++; }
-
-- for (i=0; isxdigit((unsigned char) a[i]); i++)
-- ;
-+ for (i = 0; i <= (INT_MAX/4) && isxdigit((unsigned char)a[i]); i++)
-+ ;
-+ if (i > INT_MAX/4)
-+ goto err;
-
- num=i+neg;
- if (bn == NULL) return(num);
-@@ -197,7 +200,7 @@ int BN_hex2bn(BIGNUM **bn, const char *a
- BN_zero(ret);
- }
-
-- /* i is the number of hex digests; */
-+ /* i is the number of hex digits */
- if (bn_expand(ret,i*4) == NULL) goto err;
-
- j=i; /* least significant 'hex' */
-@@ -246,8 +249,10 @@ int BN_dec2bn(BIGNUM **bn, const char *a
- if ((a == NULL) || (*a == '\0')) return(0);
- if (*a == '-') { neg=1; a++; }
-
-- for (i=0; isdigit((unsigned char) a[i]); i++)
-- ;
-+ for (i = 0; i <= (INT_MAX/4) && isdigit((unsigned char)a[i]); i++)
-+ ;
-+ if (i > INT_MAX/4)
-+ goto err;
-
- num=i+neg;
- if (bn == NULL) return(num);
-@@ -264,7 +269,7 @@ int BN_dec2bn(BIGNUM **bn, const char *a
- BN_zero(ret);
- }
-
-- /* i is the number of digests, a bit of an over expand; */
-+ /* i is the number of digits, a bit of an over expand */
- if (bn_expand(ret,i*4) == NULL) goto err;
-
- j=BN_DEC_NUM-(i%BN_DEC_NUM);
Deleted: openssl/branches/jessie_stable/debian/patches/CVE-2016-0798.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/CVE-2016-0798.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/CVE-2016-0798.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -1,263 +0,0 @@
-From 259b664f950c2ba66fbf4b0fe5281327904ead21 Mon Sep 17 00:00:00 2001
-From: Emilia Kasper <emilia at openssl.org>
-Date: Wed, 24 Feb 2016 12:59:59 +0100
-Subject: [PATCH] CVE-2016-0798: avoid memory leak in SRP
-
-The SRP user database lookup method SRP_VBASE_get_by_user had confusing
-memory management semantics; the returned pointer was sometimes newly
-allocated, and sometimes owned by the callee. The calling code has no
-way of distinguishing these two cases.
-
-Specifically, SRP servers that configure a secret seed to hide valid
-login information are vulnerable to a memory leak: an attacker
-connecting with an invalid username can cause a memory leak of around
-300 bytes per connection.
-
-Servers that do not configure SRP, or configure SRP but do not configure
-a seed are not vulnerable.
-
-In Apache, the seed directive is known as SSLSRPUnknownUserSeed.
-
-To mitigate the memory leak, the seed handling in SRP_VBASE_get_by_user
-is now disabled even if the user has configured a seed.
-
-Applications are advised to migrate to SRP_VBASE_get1_by_user. However,
-note that OpenSSL makes no strong guarantees about the
-indistinguishability of valid and invalid logins. In particular,
-computations are currently not carried out in constant time.
-
-Reviewed-by: Rich Salz <rsalz at openssl.org>
----
- CHANGES | 19 ++++++++++++++++++
- apps/s_server.c | 49 +++++++++++++++++++++++++++-----------------
- crypto/srp/srp.h | 10 +++++++++
- crypto/srp/srp_vfy.c | 57 +++++++++++++++++++++++++++++++++++++++++++++++-----
- util/libeay.num | 2 ++
- 5 files changed, 114 insertions(+), 23 deletions(-)
-
-Index: openssl-1.0.1k/apps/s_server.c
-===================================================================
---- openssl-1.0.1k.orig/apps/s_server.c
-+++ openssl-1.0.1k/apps/s_server.c
-@@ -395,6 +395,8 @@ typedef struct srpsrvparm_st
- static int MS_CALLBACK ssl_srp_server_param_cb(SSL *s, int *ad, void *arg)
- {
- srpsrvparm *p = (srpsrvparm *)arg;
-+ int ret = SSL3_AL_FATAL;
-+
- if (p->login == NULL && p->user == NULL )
- {
- p->login = SSL_get_srp_username(s);
-@@ -405,19 +407,22 @@ static int MS_CALLBACK ssl_srp_server_pa
- if (p->user == NULL)
- {
- BIO_printf(bio_err, "User %s doesn't exist\n", p->login);
-- return SSL3_AL_FATAL;
-+ goto err;
- }
- if (SSL_set_srp_server_param(s, p->user->N, p->user->g, p->user->s, p->user->v,
- p->user->info) < 0)
- {
- *ad = SSL_AD_INTERNAL_ERROR;
-- return SSL3_AL_FATAL;
-+ goto err;
- }
- BIO_printf(bio_err, "SRP parameters set: username = \"%s\" info=\"%s\" \n", p->login,p->user->info);
-- /* need to check whether there are memory leaks */
-+ ret = SSL_ERROR_NONE;
-+
-+err:
-+ SRP_user_pwd_free(p->user);
- p->user = NULL;
- p->login = NULL;
-- return SSL_ERROR_NONE;
-+ return ret;
- }
-
- #endif
-@@ -2284,7 +2289,8 @@ static int sv_body(char *hostname, int s
- while (SSL_get_error(con,k) == SSL_ERROR_WANT_X509_LOOKUP)
- {
- BIO_printf(bio_s_out,"LOOKUP renego during write\n");
-- srp_callback_parm.user = SRP_VBASE_get_by_user(srp_callback_parm.vb, srp_callback_parm.login);
-+ SRP_user_pwd_free(srp_callback_parm.user);
-+ srp_callback_parm.user = SRP_VBASE_get1_by_user(srp_callback_parm.vb, srp_callback_parm.login);
- if (srp_callback_parm.user)
- BIO_printf(bio_s_out,"LOOKUP done %s\n",srp_callback_parm.user->info);
- else
-@@ -2343,7 +2349,8 @@ again:
- while (SSL_get_error(con,i) == SSL_ERROR_WANT_X509_LOOKUP)
- {
- BIO_printf(bio_s_out,"LOOKUP renego during read\n");
-- srp_callback_parm.user = SRP_VBASE_get_by_user(srp_callback_parm.vb, srp_callback_parm.login);
-+ SRP_user_pwd_free(srp_callback_parm.user);
-+ srp_callback_parm.user = SRP_VBASE_get1_by_user(srp_callback_parm.vb, srp_callback_parm.login);
- if (srp_callback_parm.user)
- BIO_printf(bio_s_out,"LOOKUP done %s\n",srp_callback_parm.user->info);
- else
-@@ -2432,7 +2439,8 @@ static int init_ssl_connection(SSL *con)
- while (i <= 0 && SSL_get_error(con,i) == SSL_ERROR_WANT_X509_LOOKUP)
- {
- BIO_printf(bio_s_out,"LOOKUP during accept %s\n",srp_callback_parm.login);
-- srp_callback_parm.user = SRP_VBASE_get_by_user(srp_callback_parm.vb, srp_callback_parm.login);
-+ SRP_user_pwd_free(srp_callback_parm.user);
-+ srp_callback_parm.user = SRP_VBASE_get1_by_user(srp_callback_parm.vb, srp_callback_parm.login);
- if (srp_callback_parm.user)
- BIO_printf(bio_s_out,"LOOKUP done %s\n",srp_callback_parm.user->info);
- else
-@@ -2674,7 +2682,8 @@ static int www_body(char *hostname, int
- while (i <= 0 && SSL_get_error(con,i) == SSL_ERROR_WANT_X509_LOOKUP)
- {
- BIO_printf(bio_s_out,"LOOKUP during accept %s\n",srp_callback_parm.login);
-- srp_callback_parm.user = SRP_VBASE_get_by_user(srp_callback_parm.vb, srp_callback_parm.login);
-+ SRP_user_pwd_free(srp_callback_parm.user);
-+ srp_callback_parm.user = SRP_VBASE_get1_by_user(srp_callback_parm.vb, srp_callback_parm.login);
- if (srp_callback_parm.user)
- BIO_printf(bio_s_out,"LOOKUP done %s\n",srp_callback_parm.user->info);
- else
-Index: openssl-1.0.1k/crypto/srp/srp.h
-===================================================================
---- openssl-1.0.1k.orig/crypto/srp/srp.h
-+++ openssl-1.0.1k/crypto/srp/srp.h
-@@ -83,16 +83,21 @@ DECLARE_STACK_OF(SRP_gN_cache)
-
- typedef struct SRP_user_pwd_st
- {
-+ /* Owned by us. */
- char *id;
- BIGNUM *s;
- BIGNUM *v;
-+ /* Not owned by us. */
- const BIGNUM *g;
- const BIGNUM *N;
-+ /* Owned by us. */
- char *info;
- } SRP_user_pwd;
-
- DECLARE_STACK_OF(SRP_user_pwd)
-
-+void SRP_user_pwd_free(SRP_user_pwd *user_pwd);
-+
- typedef struct SRP_VBASE_st
- {
- STACK_OF(SRP_user_pwd) *users_pwd;
-@@ -118,6 +123,12 @@ SRP_VBASE *SRP_VBASE_new(char *seed_key)
- int SRP_VBASE_free(SRP_VBASE *vb);
- int SRP_VBASE_init(SRP_VBASE *vb, char * verifier_file);
- SRP_user_pwd *SRP_VBASE_get_by_user(SRP_VBASE *vb, char *username);
-+
-+/* This method ignores the configured seed and fails for an unknown user. */
-+SRP_user_pwd *SRP_VBASE_get_by_user(SRP_VBASE *vb, char *username);
-+/* NOTE: unlike in SRP_VBASE_get_by_user, caller owns the returned pointer.*/
-+SRP_user_pwd *SRP_VBASE_get1_by_user(SRP_VBASE *vb, char *username);
-+
- char *SRP_create_verifier(const char *user, const char *pass, char **salt,
- char **verifier, const char *N, const char *g);
- int SRP_create_verifier_BN(const char *user, const char *pass, BIGNUM **salt, BIGNUM **verifier, BIGNUM *N, BIGNUM *g);
-Index: openssl-1.0.1k/crypto/srp/srp_vfy.c
-===================================================================
---- openssl-1.0.1k.orig/crypto/srp/srp_vfy.c
-+++ openssl-1.0.1k/crypto/srp/srp_vfy.c
-@@ -182,7 +182,7 @@ static char *t_tob64(char *dst, const un
- return olddst;
- }
-
--static void SRP_user_pwd_free(SRP_user_pwd *user_pwd)
-+void SRP_user_pwd_free(SRP_user_pwd *user_pwd)
- {
- if (user_pwd == NULL)
- return;
-@@ -244,6 +244,24 @@ static int SRP_user_pwd_set_sv_BN(SRP_us
- return (vinfo->s != NULL && vinfo->v != NULL) ;
- }
-
-+static SRP_user_pwd *srp_user_pwd_dup(SRP_user_pwd *src)
-+{
-+ SRP_user_pwd *ret;
-+
-+ if (src == NULL)
-+ return NULL;
-+ if ((ret = SRP_user_pwd_new()) == NULL)
-+ return NULL;
-+
-+ SRP_user_pwd_set_gN(ret, src->g, src->N);
-+ if (!SRP_user_pwd_set_ids(ret, src->id, src->info)
-+ || !SRP_user_pwd_set_sv_BN(ret, BN_dup(src->s), BN_dup(src->v))) {
-+ SRP_user_pwd_free(ret);
-+ return NULL;
-+ }
-+ return ret;
-+}
-+
- SRP_VBASE *SRP_VBASE_new(char *seed_key)
- {
- SRP_VBASE *vb = (SRP_VBASE *) OPENSSL_malloc(sizeof(SRP_VBASE));
-@@ -475,22 +493,51 @@ int SRP_VBASE_init(SRP_VBASE *vb, char *
- }
-
-
--SRP_user_pwd *SRP_VBASE_get_by_user(SRP_VBASE *vb, char *username)
-+static SRP_user_pwd *find_user(SRP_VBASE *vb, char *username)
- {
- int i;
- SRP_user_pwd *user;
-- unsigned char digv[SHA_DIGEST_LENGTH];
-- unsigned char digs[SHA_DIGEST_LENGTH];
-- EVP_MD_CTX ctxt;
-
- if (vb == NULL)
- return NULL;
-+
- for(i = 0; i < sk_SRP_user_pwd_num(vb->users_pwd); i++)
- {
- user = sk_SRP_user_pwd_value(vb->users_pwd, i);
- if (strcmp(user->id,username)==0)
- return user;
- }
-+
-+ return NULL;
-+ }
-+
-+/*
-+ * This method ignores the configured seed and fails for an unknown user.
-+ * Ownership of the returned pointer is not released to the caller.
-+ * In other words, caller must not free the result.
-+ */
-+SRP_user_pwd *SRP_VBASE_get_by_user(SRP_VBASE *vb, char *username)
-+{
-+ return find_user(vb, username);
-+}
-+
-+/*
-+ * Ownership of the returned pointer is released to the caller.
-+ * In other words, caller must free the result once done.
-+ */
-+SRP_user_pwd *SRP_VBASE_get1_by_user(SRP_VBASE *vb, char *username)
-+{
-+ SRP_user_pwd *user;
-+ unsigned char digv[SHA_DIGEST_LENGTH];
-+ unsigned char digs[SHA_DIGEST_LENGTH];
-+ EVP_MD_CTX ctxt;
-+
-+ if (vb == NULL)
-+ return NULL;
-+
-+ if ((user = find_user(vb, username)) != NULL)
-+ return srp_user_pwd_dup(user);
-+
- if ((vb->seed_key == NULL) ||
- (vb->default_g == NULL) ||
- (vb->default_N == NULL))
-Index: openssl-1.0.1k/util/libeay.num
-===================================================================
---- openssl-1.0.1k.orig/util/libeay.num
-+++ openssl-1.0.1k/util/libeay.num
-@@ -1806,6 +1806,8 @@ d2i_ASN1_SET_OF_PKCS12_SAFEBAG
- ASN1_UTCTIME_get 2350 NOEXIST::FUNCTION:
- X509_REQ_digest 2362 EXIST::FUNCTION:EVP
- X509_CRL_digest 2391 EXIST::FUNCTION:EVP
-+SRP_VBASE_get1_by_user 2393 EXIST::FUNCTION:SRP
-+SRP_user_pwd_free 2394 EXIST::FUNCTION:SRP
- d2i_ASN1_SET_OF_PKCS7 2397 NOEXIST::FUNCTION:
- X509_ALGOR_cmp 2398 EXIST::FUNCTION:
- EVP_CIPHER_CTX_set_key_length 2399 EXIST::FUNCTION:
Deleted: openssl/branches/jessie_stable/debian/patches/CVE-2016-0799.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/CVE-2016-0799.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/CVE-2016-0799.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -1,449 +0,0 @@
-From 578b956fe741bf8e84055547b1e83c28dd902c73 Mon Sep 17 00:00:00 2001
-From: Matt Caswell <matt at openssl.org>
-Date: Thu, 25 Feb 2016 13:09:46 +0000
-Subject: [PATCH] Fix memory issues in BIO_*printf functions
-
-The internal |fmtstr| function used in processing a "%s" format string
-in the BIO_*printf functions could overflow while calculating the length
-of a string and cause an OOB read when printing very long strings.
-
-Additionally the internal |doapr_outch| function can attempt to write to
-an OOB memory location (at an offset from the NULL pointer) in the event of
-a memory allocation failure. In 1.0.2 and below this could be caused where
-the size of a buffer to be allocated is greater than INT_MAX. E.g. this
-could be in processing a very long "%s" format string. Memory leaks can also
-occur.
-
-These issues will only occur on certain platforms where sizeof(size_t) >
-sizeof(int). E.g. many 64 bit systems. The first issue may mask the second
-issue dependent on compiler behaviour.
-
-These problems could enable attacks where large amounts of untrusted data
-is passed to the BIO_*printf functions. If applications use these functions
-in this way then they could be vulnerable. OpenSSL itself uses these
-functions when printing out human-readable dumps of ASN.1 data. Therefore
-applications that print this data could be vulnerable if the data is from
-untrusted sources. OpenSSL command line applications could also be
-vulnerable where they print out ASN.1 data, or if untrusted data is passed
-as command line arguments.
-
-Libssl is not considered directly vulnerable. Additionally certificates etc
-received via remote connections via libssl are also unlikely to be able to
-trigger these issues because of message size limits enforced within libssl.
-
-CVE-2016-0799
-
-Issue reported by Guido Vranken.
-
-Reviewed-by: Andy Polyakov <appro at openssl.org>
----
- crypto/bio/b_print.c | 187 ++++++++++++++++++++++++++++++++-------------------
- 1 file changed, 116 insertions(+), 71 deletions(-)
-
-Index: openssl-1.0.1k/crypto/bio/b_print.c
-===================================================================
---- openssl-1.0.1k.orig/crypto/bio/b_print.c
-+++ openssl-1.0.1k/crypto/bio/b_print.c
-@@ -125,14 +125,14 @@
- #define LLONG long
- #endif
-
--static void fmtstr (char **, char **, size_t *, size_t *,
-+static int fmtstr (char **, char **, size_t *, size_t *,
- const char *, int, int, int);
--static void fmtint (char **, char **, size_t *, size_t *,
-+static int fmtint (char **, char **, size_t *, size_t *,
- LLONG, int, int, int, int);
--static void fmtfp (char **, char **, size_t *, size_t *,
-+static int fmtfp (char **, char **, size_t *, size_t *,
- LDOUBLE, int, int, int);
--static void doapr_outch (char **, char **, size_t *, size_t *, int);
--static void _dopr(char **sbuffer, char **buffer,
-+static int doapr_outch (char **, char **, size_t *, size_t *, int);
-+static int _dopr(char **sbuffer, char **buffer,
- size_t *maxlen, size_t *retlen, int *truncated,
- const char *format, va_list args);
-
-@@ -165,7 +165,7 @@ static void _dopr(char **sbuffer, char *
- #define char_to_int(p) (p - '0')
- #define OSSL_MAX(p,q) ((p >= q) ? p : q)
-
--static void
-+static int
- _dopr(
- char **sbuffer,
- char **buffer,
-@@ -200,7 +200,8 @@ _dopr(
- if (ch == '%')
- state = DP_S_FLAGS;
- else
-- doapr_outch(sbuffer,buffer, &currlen, maxlen, ch);
-+ if(!doapr_outch(sbuffer, buffer, &currlen, maxlen, ch))
-+ return 0;
- ch = *format++;
- break;
- case DP_S_FLAGS:
-@@ -306,8 +307,9 @@ _dopr(
- value = va_arg(args, int);
- break;
- }
-- fmtint(sbuffer, buffer, &currlen, maxlen,
-- value, 10, min, max, flags);
-+ if (!fmtint(sbuffer, buffer, &currlen, maxlen, value, 10, min,
-+ max, flags))
-+ return 0;
- break;
- case 'X':
- flags |= DP_F_UP;
-@@ -332,17 +334,19 @@ _dopr(
- unsigned int);
- break;
- }
-- fmtint(sbuffer, buffer, &currlen, maxlen, value,
-- ch == 'o' ? 8 : (ch == 'u' ? 10 : 16),
-- min, max, flags);
-+ if (!fmtint(sbuffer, buffer, &currlen, maxlen, value,
-+ ch == 'o' ? 8 : (ch == 'u' ? 10 : 16),
-+ min, max, flags))
-+ return 0;
- break;
- case 'f':
- if (cflags == DP_C_LDOUBLE)
- fvalue = va_arg(args, LDOUBLE);
- else
- fvalue = va_arg(args, double);
-- fmtfp(sbuffer, buffer, &currlen, maxlen,
-- fvalue, min, max, flags);
-+ if (!fmtfp(sbuffer, buffer, &currlen, maxlen, fvalue, min, max,
-+ flags))
-+ return 0;
- break;
- case 'E':
- flags |= DP_F_UP;
-@@ -361,8 +365,9 @@ _dopr(
- fvalue = va_arg(args, double);
- break;
- case 'c':
-- doapr_outch(sbuffer, buffer, &currlen, maxlen,
-- va_arg(args, int));
-+ if(!doapr_outch(sbuffer, buffer, &currlen, maxlen,
-+ va_arg(args, int)))
-+ return 0;
- break;
- case 's':
- strvalue = va_arg(args, char *);
-@@ -372,13 +377,15 @@ _dopr(
- else
- max = *maxlen;
- }
-- fmtstr(sbuffer, buffer, &currlen, maxlen, strvalue,
-- flags, min, max);
-+ if (!fmtstr(sbuffer, buffer, &currlen, maxlen, strvalue,
-+ flags, min, max))
-+ return 0;
- break;
- case 'p':
- value = (long)va_arg(args, void *);
-- fmtint(sbuffer, buffer, &currlen, maxlen,
-- value, 16, min, max, flags|DP_F_NUM);
-+ if (!fmtint(sbuffer, buffer, &currlen, maxlen,
-+ value, 16, min, max, flags | DP_F_NUM))
-+ return 0;
- break;
- case 'n': /* XXX */
- if (cflags == DP_C_SHORT) {
-@@ -400,7 +407,8 @@ _dopr(
- }
- break;
- case '%':
-- doapr_outch(sbuffer, buffer, &currlen, maxlen, ch);
-+ if(!doapr_outch(sbuffer, buffer, &currlen, maxlen, ch))
-+ return 0;
- break;
- case 'w':
- /* not supported yet, treat as next char */
-@@ -424,12 +432,13 @@ _dopr(
- *truncated = (currlen > *maxlen - 1);
- if (*truncated)
- currlen = *maxlen - 1;
-- doapr_outch(sbuffer, buffer, &currlen, maxlen, '\0');
-+ if(!doapr_outch(sbuffer, buffer, &currlen, maxlen, '\0'))
-+ return 0;
- *retlen = currlen - 1;
-- return;
-+ return 1;
- }
-
--static void
-+static int
- fmtstr(
- char **sbuffer,
- char **buffer,
-@@ -440,36 +449,44 @@ fmtstr(
- int min,
- int max)
- {
-- int padlen, strln;
-+ int padlen;
-+ size_t strln;
- int cnt = 0;
-
- if (value == 0)
- value = "<NULL>";
-- for (strln = 0; value[strln]; ++strln)
-- ;
-+
-+ strln = strlen(value);
-+ if (strln > INT_MAX)
-+ strln = INT_MAX;
-+
- padlen = min - strln;
-- if (padlen < 0)
-+ if (min < 0 || padlen < 0)
- padlen = 0;
- if (flags & DP_F_MINUS)
- padlen = -padlen;
-
- while ((padlen > 0) && (cnt < max)) {
-- doapr_outch(sbuffer, buffer, currlen, maxlen, ' ');
-+ if(!doapr_outch(sbuffer, buffer, currlen, maxlen, ' '))
-+ return 0;
- --padlen;
- ++cnt;
- }
- while (*value && (cnt < max)) {
-- doapr_outch(sbuffer, buffer, currlen, maxlen, *value++);
-+ if(!doapr_outch(sbuffer, buffer, currlen, maxlen, *value++))
-+ return 0;
- ++cnt;
- }
- while ((padlen < 0) && (cnt < max)) {
-- doapr_outch(sbuffer, buffer, currlen, maxlen, ' ');
-+ if(!doapr_outch(sbuffer, buffer, currlen, maxlen, ' '))
-+ return 0;
- ++padlen;
- ++cnt;
- }
-+ return 1;
- }
-
--static void
-+static int
- fmtint(
- char **sbuffer,
- char **buffer,
-@@ -533,37 +550,44 @@ fmtint(
-
- /* spaces */
- while (spadlen > 0) {
-- doapr_outch(sbuffer, buffer, currlen, maxlen, ' ');
-+ if(!doapr_outch(sbuffer, buffer, currlen, maxlen, ' '))
-+ return 0;
- --spadlen;
- }
-
- /* sign */
- if (signvalue)
-- doapr_outch(sbuffer, buffer, currlen, maxlen, signvalue);
-+ if(!doapr_outch(sbuffer, buffer, currlen, maxlen, signvalue))
-+ return 0;
-
- /* prefix */
- while (*prefix) {
-- doapr_outch(sbuffer, buffer, currlen, maxlen, *prefix);
-+ if(!doapr_outch(sbuffer, buffer, currlen, maxlen, *prefix))
-+ return 0;
- prefix++;
- }
-
- /* zeros */
- if (zpadlen > 0) {
- while (zpadlen > 0) {
-- doapr_outch(sbuffer, buffer, currlen, maxlen, '0');
-+ if(!doapr_outch(sbuffer, buffer, currlen, maxlen, '0'))
-+ return 0;
- --zpadlen;
- }
- }
- /* digits */
-- while (place > 0)
-- doapr_outch(sbuffer, buffer, currlen, maxlen, convert[--place]);
-+ while (place > 0) {
-+ if (!doapr_outch(sbuffer, buffer, currlen, maxlen, convert[--place]))
-+ return 0;
-+ }
-
- /* left justified spaces */
- while (spadlen < 0) {
-- doapr_outch(sbuffer, buffer, currlen, maxlen, ' ');
-+ if (!doapr_outch(sbuffer, buffer, currlen, maxlen, ' '))
-+ return 0;
- ++spadlen;
- }
-- return;
-+ return 1;
- }
-
- static LDOUBLE
-@@ -597,7 +621,7 @@ roundv(LDOUBLE value)
- return intpart;
- }
-
--static void
-+static int
- fmtfp(
- char **sbuffer,
- char **buffer,
-@@ -682,47 +706,60 @@ fmtfp(
-
- if ((flags & DP_F_ZERO) && (padlen > 0)) {
- if (signvalue) {
-- doapr_outch(sbuffer, buffer, currlen, maxlen, signvalue);
-+ if (!doapr_outch(sbuffer, buffer, currlen, maxlen, signvalue))
-+ return 0;
- --padlen;
- signvalue = 0;
- }
- while (padlen > 0) {
-- doapr_outch(sbuffer, buffer, currlen, maxlen, '0');
-+ if (!doapr_outch(sbuffer, buffer, currlen, maxlen, '0'))
-+ return 0;
- --padlen;
- }
- }
- while (padlen > 0) {
-- doapr_outch(sbuffer, buffer, currlen, maxlen, ' ');
-+ if (!doapr_outch(sbuffer, buffer, currlen, maxlen, ' '))
-+ return 0;
- --padlen;
- }
-- if (signvalue)
-- doapr_outch(sbuffer, buffer, currlen, maxlen, signvalue);
-+ if (signvalue && !doapr_outch(sbuffer, buffer, currlen, maxlen, signvalue))
-+ return 0;
-
-- while (iplace > 0)
-- doapr_outch(sbuffer, buffer, currlen, maxlen, iconvert[--iplace]);
-+ while (iplace > 0) {
-+ if (!doapr_outch(sbuffer, buffer, currlen, maxlen, iconvert[--iplace]))
-+ return 0;
-+ }
-
- /*
- * Decimal point. This should probably use locale to find the correct
- * char to print out.
- */
- if (max > 0 || (flags & DP_F_NUM)) {
-- doapr_outch(sbuffer, buffer, currlen, maxlen, '.');
-+ if (!doapr_outch(sbuffer, buffer, currlen, maxlen, '.'))
-+ return 0;
-
-- while (fplace > 0)
-- doapr_outch(sbuffer, buffer, currlen, maxlen, fconvert[--fplace]);
-+ while (fplace > 0) {
-+ if (!doapr_outch(sbuffer, buffer, currlen, maxlen, fconvert[--fplace]))
-+ return 0;
-+ }
- }
- while (zpadlen > 0) {
-- doapr_outch(sbuffer, buffer, currlen, maxlen, '0');
-+ if (!doapr_outch(sbuffer, buffer, currlen, maxlen, '0'))
-+ return 0;
- --zpadlen;
- }
-
- while (padlen < 0) {
-- doapr_outch(sbuffer, buffer, currlen, maxlen, ' ');
-+ if (!doapr_outch(sbuffer, buffer, currlen, maxlen, ' '))
-+ return 0;
- ++padlen;
- }
-+ return 1;
- }
-
--static void
-+#define BUFFER_INC 1024
-+
-+static int
- doapr_outch(
- char **sbuffer,
- char **buffer,
-@@ -733,24 +770,27 @@ doapr_outch(
- /* If we haven't at least one buffer, someone has doe a big booboo */
- assert(*sbuffer != NULL || buffer != NULL);
-
-- if (buffer) {
-- while (*currlen >= *maxlen) {
-- if (*buffer == NULL) {
-- if (*maxlen == 0)
-- *maxlen = 1024;
-- *buffer = OPENSSL_malloc(*maxlen);
-- if (*currlen > 0) {
-- assert(*sbuffer != NULL);
-- memcpy(*buffer, *sbuffer, *currlen);
-- }
-- *sbuffer = NULL;
-- } else {
-- *maxlen += 1024;
-- *buffer = OPENSSL_realloc(*buffer, *maxlen);
-- }
-- }
-- /* What to do if *buffer is NULL? */
-- assert(*sbuffer != NULL || *buffer != NULL);
-+ if (buffer && *currlen == *maxlen) {
-+ if (*maxlen > INT_MAX - BUFFER_INC)
-+ return 0;
-+
-+ *maxlen += BUFFER_INC;
-+ if (*buffer == NULL) {
-+ *buffer = OPENSSL_malloc(*maxlen);
-+ if (*buffer == NULL)
-+ return 0;
-+ if (*currlen > 0) {
-+ assert(*sbuffer != NULL);
-+ memcpy(*buffer, *sbuffer, *currlen);
-+ }
-+ *sbuffer = NULL;
-+ } else {
-+ char *tmpbuf;
-+ tmpbuf = OPENSSL_realloc(*buffer, *maxlen);
-+ if (tmpbuf == NULL)
-+ return 0;
-+ *buffer = tmpbuf;
-+ }
- }
-
- if (*currlen < *maxlen) {
-@@ -760,7 +800,7 @@ doapr_outch(
- (*buffer)[(*currlen)++] = (char)c;
- }
-
-- return;
-+ return 1;
- }
-
- /***************************************************************************/
-@@ -792,8 +832,11 @@ int BIO_vprintf (BIO *bio, const char *f
-
- dynbuf = NULL;
- CRYPTO_push_info("doapr()");
-- _dopr(&hugebufp, &dynbuf, &hugebufsize,
-- &retlen, &ignored, format, args);
-+ if (!_dopr(&hugebufp, &dynbuf, &hugebufsize,
-+ &retlen, &ignored, format, args)) {
-+ OPENSSL_free(dynbuf);
-+ return -1;
-+ }
- if (dynbuf)
- {
- ret=BIO_write(bio, dynbuf, (int)retlen);
-@@ -829,7 +872,8 @@ int BIO_vsnprintf(char *buf, size_t n, c
- size_t retlen;
- int truncated;
-
-- _dopr(&buf, NULL, &n, &retlen, &truncated, format, args);
-+ if(!_dopr(&buf, NULL, &n, &retlen, &truncated, format, args))
-+ return -1;
-
- if (truncated)
- /* In case of truncation, return -1 like traditional snprintf.
Deleted: openssl/branches/jessie_stable/debian/patches/Disable-EXPORT-and-LOW-ciphers.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/Disable-EXPORT-and-LOW-ciphers.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/Disable-EXPORT-and-LOW-ciphers.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -1,622 +0,0 @@
-Index: openssl-1.0.1k/doc/apps/ciphers.pod
-===================================================================
---- openssl-1.0.1k.orig/doc/apps/ciphers.pod
-+++ openssl-1.0.1k/doc/apps/ciphers.pod
-@@ -139,34 +139,46 @@ than 128 bits, and some cipher suites wi
-
- =item B<LOW>
-
--"low" encryption cipher suites, currently those using 64 or 56 bit encryption algorithms
--but excluding export cipher suites.
-+Low strength encryption cipher suites, currently those using 64 or 56 bit
-+encryption algorithms but excluding export cipher suites.
-+These are disabled in default builds.
-
- =item B<EXP>, B<EXPORT>
-
--export encryption algorithms. Including 40 and 56 bits algorithms.
-+Export strength encryption algorithms. Including 40 and 56 bits algorithms.
-+These are disabled in default builds.
-
- =item B<EXPORT40>
-
--40 bit export encryption algorithms
-+40-bit export encryption algorithms
-+These are disabled in default builds.
-
- =item B<EXPORT56>
-
--56 bit export encryption algorithms. In OpenSSL 0.9.8c and later the set of
-+56-bit export encryption algorithms. In OpenSSL 0.9.8c and later the set of
- 56 bit export ciphers is empty unless OpenSSL has been explicitly configured
- with support for experimental ciphers.
-+These are disabled in default builds.
-
- =item B<eNULL>, B<NULL>
-
--the "NULL" ciphers that is those offering no encryption. Because these offer no
--encryption at all and are a security risk they are disabled unless explicitly
--included.
-+The "NULL" ciphers that is those offering no encryption. Because these offer no
-+encryption at all and are a security risk they are not enabled via either the
-+B<DEFAULT> or B<ALL> cipher strings.
-+Be careful when building cipherlists out of lower-level primitives such as
-+B<kRSA> or B<aECDSA> as these do overlap with the B<eNULL> ciphers.
-+When in doubt, include B<!eNULL> in your cipherlist.
-
- =item B<aNULL>
-
--the cipher suites offering no authentication. This is currently the anonymous
-+The cipher suites offering no authentication. This is currently the anonymous
- DH algorithms and anonymous ECDH algorithms. These cipher suites are vulnerable
- to a "man in the middle" attack and so their use is normally discouraged.
-+These are excluded from the B<DEFAULT> ciphers, but included in the B<ALL>
-+ciphers.
-+Be careful when building cipherlists out of lower-level primitives such as
-+B<kDHE> or B<AES> as these do overlap with the B<aNULL> ciphers.
-+When in doubt, include B<!aNULL> in your cipherlist.
-
- =item B<kRSA>, B<RSA>
-
-Index: openssl-1.0.1k/ssl/s3_lib.c
-===================================================================
---- openssl-1.0.1k.orig/ssl/s3_lib.c
-+++ openssl-1.0.1k/ssl/s3_lib.c
-@@ -202,22 +202,6 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]
- 0,
- },
-
--/* Cipher 03 */
-- {
-- 1,
-- SSL3_TXT_RSA_RC4_40_MD5,
-- SSL3_CK_RSA_RC4_40_MD5,
-- SSL_kRSA,
-- SSL_aRSA,
-- SSL_RC4,
-- SSL_MD5,
-- SSL_SSLV3,
-- SSL_EXPORT|SSL_EXP40,
-- SSL_HANDSHAKE_MAC_DEFAULT|TLS1_PRF,
-- 40,
-- 128,
-- },
--
- /* Cipher 04 */
- {
- 1,
-@@ -250,22 +234,6 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]
- 128,
- },
-
--/* Cipher 06 */
-- {
-- 1,
-- SSL3_TXT_RSA_RC2_40_MD5,
-- SSL3_CK_RSA_RC2_40_MD5,
-- SSL_kRSA,
-- SSL_aRSA,
-- SSL_RC2,
-- SSL_MD5,
-- SSL_SSLV3,
-- SSL_EXPORT|SSL_EXP40,
-- SSL_HANDSHAKE_MAC_DEFAULT|TLS1_PRF,
-- 40,
-- 128,
-- },
--
- /* Cipher 07 */
- #ifndef OPENSSL_NO_IDEA
- {
-@@ -284,38 +252,6 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]
- },
- #endif
-
--/* Cipher 08 */
-- {
-- 1,
-- SSL3_TXT_RSA_DES_40_CBC_SHA,
-- SSL3_CK_RSA_DES_40_CBC_SHA,
-- SSL_kRSA,
-- SSL_aRSA,
-- SSL_DES,
-- SSL_SHA1,
-- SSL_SSLV3,
-- SSL_EXPORT|SSL_EXP40,
-- SSL_HANDSHAKE_MAC_DEFAULT|TLS1_PRF,
-- 40,
-- 56,
-- },
--
--/* Cipher 09 */
-- {
-- 1,
-- SSL3_TXT_RSA_DES_64_CBC_SHA,
-- SSL3_CK_RSA_DES_64_CBC_SHA,
-- SSL_kRSA,
-- SSL_aRSA,
-- SSL_DES,
-- SSL_SHA1,
-- SSL_SSLV3,
-- SSL_NOT_EXP|SSL_LOW,
-- SSL_HANDSHAKE_MAC_DEFAULT|TLS1_PRF,
-- 56,
-- 56,
-- },
--
- /* Cipher 0A */
- {
- 1,
-@@ -332,39 +268,6 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]
- 168,
- },
-
--/* The DH ciphers */
--/* Cipher 0B */
-- {
-- 0,
-- SSL3_TXT_DH_DSS_DES_40_CBC_SHA,
-- SSL3_CK_DH_DSS_DES_40_CBC_SHA,
-- SSL_kDHd,
-- SSL_aDH,
-- SSL_DES,
-- SSL_SHA1,
-- SSL_SSLV3,
-- SSL_EXPORT|SSL_EXP40,
-- SSL_HANDSHAKE_MAC_DEFAULT|TLS1_PRF,
-- 40,
-- 56,
-- },
--
--/* Cipher 0C */
-- {
-- 0, /* not implemented (non-ephemeral DH) */
-- SSL3_TXT_DH_DSS_DES_64_CBC_SHA,
-- SSL3_CK_DH_DSS_DES_64_CBC_SHA,
-- SSL_kDHd,
-- SSL_aDH,
-- SSL_DES,
-- SSL_SHA1,
-- SSL_SSLV3,
-- SSL_NOT_EXP|SSL_LOW,
-- SSL_HANDSHAKE_MAC_DEFAULT|TLS1_PRF,
-- 56,
-- 56,
-- },
--
- /* Cipher 0D */
- {
- 0, /* not implemented (non-ephemeral DH) */
-@@ -381,38 +284,6 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]
- 168,
- },
-
--/* Cipher 0E */
-- {
-- 0, /* not implemented (non-ephemeral DH) */
-- SSL3_TXT_DH_RSA_DES_40_CBC_SHA,
-- SSL3_CK_DH_RSA_DES_40_CBC_SHA,
-- SSL_kDHr,
-- SSL_aDH,
-- SSL_DES,
-- SSL_SHA1,
-- SSL_SSLV3,
-- SSL_EXPORT|SSL_EXP40,
-- SSL_HANDSHAKE_MAC_DEFAULT|TLS1_PRF,
-- 40,
-- 56,
-- },
--
--/* Cipher 0F */
-- {
-- 0, /* not implemented (non-ephemeral DH) */
-- SSL3_TXT_DH_RSA_DES_64_CBC_SHA,
-- SSL3_CK_DH_RSA_DES_64_CBC_SHA,
-- SSL_kDHr,
-- SSL_aDH,
-- SSL_DES,
-- SSL_SHA1,
-- SSL_SSLV3,
-- SSL_NOT_EXP|SSL_LOW,
-- SSL_HANDSHAKE_MAC_DEFAULT|TLS1_PRF,
-- 56,
-- 56,
-- },
--
- /* Cipher 10 */
- {
- 0, /* not implemented (non-ephemeral DH) */
-@@ -430,38 +301,6 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]
- },
-
- /* The Ephemeral DH ciphers */
--/* Cipher 11 */
-- {
-- 1,
-- SSL3_TXT_EDH_DSS_DES_40_CBC_SHA,
-- SSL3_CK_EDH_DSS_DES_40_CBC_SHA,
-- SSL_kEDH,
-- SSL_aDSS,
-- SSL_DES,
-- SSL_SHA1,
-- SSL_SSLV3,
-- SSL_EXPORT|SSL_EXP40,
-- SSL_HANDSHAKE_MAC_DEFAULT|TLS1_PRF,
-- 40,
-- 56,
-- },
--
--/* Cipher 12 */
-- {
-- 1,
-- SSL3_TXT_EDH_DSS_DES_64_CBC_SHA,
-- SSL3_CK_EDH_DSS_DES_64_CBC_SHA,
-- SSL_kEDH,
-- SSL_aDSS,
-- SSL_DES,
-- SSL_SHA1,
-- SSL_SSLV3,
-- SSL_NOT_EXP|SSL_LOW,
-- SSL_HANDSHAKE_MAC_DEFAULT|TLS1_PRF,
-- 56,
-- 56,
-- },
--
- /* Cipher 13 */
- {
- 1,
-@@ -478,38 +317,6 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]
- 168,
- },
-
--/* Cipher 14 */
-- {
-- 1,
-- SSL3_TXT_EDH_RSA_DES_40_CBC_SHA,
-- SSL3_CK_EDH_RSA_DES_40_CBC_SHA,
-- SSL_kEDH,
-- SSL_aRSA,
-- SSL_DES,
-- SSL_SHA1,
-- SSL_SSLV3,
-- SSL_EXPORT|SSL_EXP40,
-- SSL_HANDSHAKE_MAC_DEFAULT|TLS1_PRF,
-- 40,
-- 56,
-- },
--
--/* Cipher 15 */
-- {
-- 1,
-- SSL3_TXT_EDH_RSA_DES_64_CBC_SHA,
-- SSL3_CK_EDH_RSA_DES_64_CBC_SHA,
-- SSL_kEDH,
-- SSL_aRSA,
-- SSL_DES,
-- SSL_SHA1,
-- SSL_SSLV3,
-- SSL_NOT_EXP|SSL_LOW,
-- SSL_HANDSHAKE_MAC_DEFAULT|TLS1_PRF,
-- 56,
-- 56,
-- },
--
- /* Cipher 16 */
- {
- 1,
-@@ -526,22 +333,6 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]
- 168,
- },
-
--/* Cipher 17 */
-- {
-- 1,
-- SSL3_TXT_ADH_RC4_40_MD5,
-- SSL3_CK_ADH_RC4_40_MD5,
-- SSL_kEDH,
-- SSL_aNULL,
-- SSL_RC4,
-- SSL_MD5,
-- SSL_SSLV3,
-- SSL_EXPORT|SSL_EXP40,
-- SSL_HANDSHAKE_MAC_DEFAULT|TLS1_PRF,
-- 40,
-- 128,
-- },
--
- /* Cipher 18 */
- {
- 1,
-@@ -558,38 +349,6 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]
- 128,
- },
-
--/* Cipher 19 */
-- {
-- 1,
-- SSL3_TXT_ADH_DES_40_CBC_SHA,
-- SSL3_CK_ADH_DES_40_CBC_SHA,
-- SSL_kEDH,
-- SSL_aNULL,
-- SSL_DES,
-- SSL_SHA1,
-- SSL_SSLV3,
-- SSL_EXPORT|SSL_EXP40,
-- SSL_HANDSHAKE_MAC_DEFAULT|TLS1_PRF,
-- 40,
-- 128,
-- },
--
--/* Cipher 1A */
-- {
-- 1,
-- SSL3_TXT_ADH_DES_64_CBC_SHA,
-- SSL3_CK_ADH_DES_64_CBC_SHA,
-- SSL_kEDH,
-- SSL_aNULL,
-- SSL_DES,
-- SSL_SHA1,
-- SSL_SSLV3,
-- SSL_NOT_EXP|SSL_LOW,
-- SSL_HANDSHAKE_MAC_DEFAULT|TLS1_PRF,
-- 56,
-- 56,
-- },
--
- /* Cipher 1B */
- {
- 1,
-@@ -659,22 +418,6 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]
-
- #ifndef OPENSSL_NO_KRB5
- /* The Kerberos ciphers*/
--/* Cipher 1E */
-- {
-- 1,
-- SSL3_TXT_KRB5_DES_64_CBC_SHA,
-- SSL3_CK_KRB5_DES_64_CBC_SHA,
-- SSL_kKRB5,
-- SSL_aKRB5,
-- SSL_DES,
-- SSL_SHA1,
-- SSL_SSLV3,
-- SSL_NOT_EXP|SSL_LOW,
-- SSL_HANDSHAKE_MAC_DEFAULT|TLS1_PRF,
-- 56,
-- 56,
-- },
--
- /* Cipher 1F */
- {
- 1,
-@@ -723,22 +466,6 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]
- 128,
- },
-
--/* Cipher 22 */
-- {
-- 1,
-- SSL3_TXT_KRB5_DES_64_CBC_MD5,
-- SSL3_CK_KRB5_DES_64_CBC_MD5,
-- SSL_kKRB5,
-- SSL_aKRB5,
-- SSL_DES,
-- SSL_MD5,
-- SSL_SSLV3,
-- SSL_NOT_EXP|SSL_LOW,
-- SSL_HANDSHAKE_MAC_DEFAULT|TLS1_PRF,
-- 56,
-- 56,
-- },
--
- /* Cipher 23 */
- {
- 1,
-@@ -786,102 +513,6 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]
- 128,
- 128,
- },
--
--/* Cipher 26 */
-- {
-- 1,
-- SSL3_TXT_KRB5_DES_40_CBC_SHA,
-- SSL3_CK_KRB5_DES_40_CBC_SHA,
-- SSL_kKRB5,
-- SSL_aKRB5,
-- SSL_DES,
-- SSL_SHA1,
-- SSL_SSLV3,
-- SSL_EXPORT|SSL_EXP40,
-- SSL_HANDSHAKE_MAC_DEFAULT|TLS1_PRF,
-- 40,
-- 56,
-- },
--
--/* Cipher 27 */
-- {
-- 1,
-- SSL3_TXT_KRB5_RC2_40_CBC_SHA,
-- SSL3_CK_KRB5_RC2_40_CBC_SHA,
-- SSL_kKRB5,
-- SSL_aKRB5,
-- SSL_RC2,
-- SSL_SHA1,
-- SSL_SSLV3,
-- SSL_EXPORT|SSL_EXP40,
-- SSL_HANDSHAKE_MAC_DEFAULT|TLS1_PRF,
-- 40,
-- 128,
-- },
--
--/* Cipher 28 */
-- {
-- 1,
-- SSL3_TXT_KRB5_RC4_40_SHA,
-- SSL3_CK_KRB5_RC4_40_SHA,
-- SSL_kKRB5,
-- SSL_aKRB5,
-- SSL_RC4,
-- SSL_SHA1,
-- SSL_SSLV3,
-- SSL_EXPORT|SSL_EXP40,
-- SSL_HANDSHAKE_MAC_DEFAULT|TLS1_PRF,
-- 40,
-- 128,
-- },
--
--/* Cipher 29 */
-- {
-- 1,
-- SSL3_TXT_KRB5_DES_40_CBC_MD5,
-- SSL3_CK_KRB5_DES_40_CBC_MD5,
-- SSL_kKRB5,
-- SSL_aKRB5,
-- SSL_DES,
-- SSL_MD5,
-- SSL_SSLV3,
-- SSL_EXPORT|SSL_EXP40,
-- SSL_HANDSHAKE_MAC_DEFAULT|TLS1_PRF,
-- 40,
-- 56,
-- },
--
--/* Cipher 2A */
-- {
-- 1,
-- SSL3_TXT_KRB5_RC2_40_CBC_MD5,
-- SSL3_CK_KRB5_RC2_40_CBC_MD5,
-- SSL_kKRB5,
-- SSL_aKRB5,
-- SSL_RC2,
-- SSL_MD5,
-- SSL_SSLV3,
-- SSL_EXPORT|SSL_EXP40,
-- SSL_HANDSHAKE_MAC_DEFAULT|TLS1_PRF,
-- 40,
-- 128,
-- },
--
--/* Cipher 2B */
-- {
-- 1,
-- SSL3_TXT_KRB5_RC4_40_MD5,
-- SSL3_CK_KRB5_RC4_40_MD5,
-- SSL_kKRB5,
-- SSL_aKRB5,
-- SSL_RC4,
-- SSL_MD5,
-- SSL_SSLV3,
-- SSL_EXPORT|SSL_EXP40,
-- SSL_HANDSHAKE_MAC_DEFAULT|TLS1_PRF,
-- 40,
-- 128,
-- },
- #endif /* OPENSSL_NO_KRB5 */
-
- /* New AES ciphersuites */
-@@ -1270,104 +901,6 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]
-
- #if TLS1_ALLOW_EXPERIMENTAL_CIPHERSUITES
- /* New TLS Export CipherSuites from expired ID */
--#if 0
-- /* Cipher 60 */
-- {
-- 1,
-- TLS1_TXT_RSA_EXPORT1024_WITH_RC4_56_MD5,
-- TLS1_CK_RSA_EXPORT1024_WITH_RC4_56_MD5,
-- SSL_kRSA,
-- SSL_aRSA,
-- SSL_RC4,
-- SSL_MD5,
-- SSL_TLSV1,
-- SSL_EXPORT|SSL_EXP56,
-- SSL_HANDSHAKE_MAC_DEFAULT|TLS1_PRF,
-- 56,
-- 128,
-- },
--
-- /* Cipher 61 */
-- {
-- 1,
-- TLS1_TXT_RSA_EXPORT1024_WITH_RC2_CBC_56_MD5,
-- TLS1_CK_RSA_EXPORT1024_WITH_RC2_CBC_56_MD5,
-- SSL_kRSA,
-- SSL_aRSA,
-- SSL_RC2,
-- SSL_MD5,
-- SSL_TLSV1,
-- SSL_EXPORT|SSL_EXP56,
-- SSL_HANDSHAKE_MAC_DEFAULT|TLS1_PRF,
-- 56,
-- 128,
-- },
--#endif
--
-- /* Cipher 62 */
-- {
-- 1,
-- TLS1_TXT_RSA_EXPORT1024_WITH_DES_CBC_SHA,
-- TLS1_CK_RSA_EXPORT1024_WITH_DES_CBC_SHA,
-- SSL_kRSA,
-- SSL_aRSA,
-- SSL_DES,
-- SSL_SHA1,
-- SSL_TLSV1,
-- SSL_EXPORT|SSL_EXP56,
-- SSL_HANDSHAKE_MAC_DEFAULT|TLS1_PRF,
-- 56,
-- 56,
-- },
--
-- /* Cipher 63 */
-- {
-- 1,
-- TLS1_TXT_DHE_DSS_EXPORT1024_WITH_DES_CBC_SHA,
-- TLS1_CK_DHE_DSS_EXPORT1024_WITH_DES_CBC_SHA,
-- SSL_kEDH,
-- SSL_aDSS,
-- SSL_DES,
-- SSL_SHA1,
-- SSL_TLSV1,
-- SSL_EXPORT|SSL_EXP56,
-- SSL_HANDSHAKE_MAC_DEFAULT|TLS1_PRF,
-- 56,
-- 56,
-- },
--
-- /* Cipher 64 */
-- {
-- 1,
-- TLS1_TXT_RSA_EXPORT1024_WITH_RC4_56_SHA,
-- TLS1_CK_RSA_EXPORT1024_WITH_RC4_56_SHA,
-- SSL_kRSA,
-- SSL_aRSA,
-- SSL_RC4,
-- SSL_SHA1,
-- SSL_TLSV1,
-- SSL_EXPORT|SSL_EXP56,
-- SSL_HANDSHAKE_MAC_DEFAULT|TLS1_PRF,
-- 56,
-- 128,
-- },
--
-- /* Cipher 65 */
-- {
-- 1,
-- TLS1_TXT_DHE_DSS_EXPORT1024_WITH_RC4_56_SHA,
-- TLS1_CK_DHE_DSS_EXPORT1024_WITH_RC4_56_SHA,
-- SSL_kEDH,
-- SSL_aDSS,
-- SSL_RC4,
-- SSL_SHA1,
-- SSL_TLSV1,
-- SSL_EXPORT|SSL_EXP56,
-- SSL_HANDSHAKE_MAC_DEFAULT|TLS1_PRF,
-- 56,
-- 128,
-- },
--
- /* Cipher 66 */
- {
- 1,
Modified: openssl/branches/jessie_stable/debian/patches/block_digicert_malaysia.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/block_digicert_malaysia.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/block_digicert_malaysia.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -5,22 +5,24 @@
Origin: vendor
Last-Update: 2011-11-05
-Index: openssl-1.0.0e/crypto/x509/x509_vfy.c
-===================================================================
---- openssl-1.0.0e.orig/crypto/x509/x509_vfy.c
-+++ openssl-1.0.0e/crypto/x509/x509_vfy.c
-@@ -833,10 +833,11 @@ static int check_ca_blacklist(X509_STORE
- for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--)
- {
+---
+ crypto/x509/x509_vfy.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+--- a/crypto/x509/x509_vfy.c
++++ b/crypto/x509/x509_vfy.c
+@@ -855,10 +855,11 @@ static int check_ca_blacklist(X509_STORE
+ /* Check all certificates against the blacklist */
+ for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--) {
x = sk_X509_value(ctx->chain, i);
- /* Mark DigiNotar certificates as revoked, no matter
- * where in the chain they are.
+ /* Mark certificates containing the following names as
+ * revoked, no matter where in the chain they are.
*/
-- if (x->name && strstr(x->name, "DigiNotar"))
+- if (x->name && strstr(x->name, "DigiNotar")) {
+ if (x->name && (strstr(x->name, "DigiNotar") ||
-+ strstr(x->name, "Digicert Sdn. Bhd.")))
- {
++ strstr(x->name, "Digicert Sdn. Bhd."))) {
ctx->error = X509_V_ERR_CERT_REVOKED;
ctx->error_depth = i;
+ ctx->current_cert = x;
Modified: openssl/branches/jessie_stable/debian/patches/block_diginotar.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/block_diginotar.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/block_diginotar.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -10,10 +10,12 @@
This is not meant as final patch.
-Index: openssl-1.0.0d/crypto/x509/x509_vfy.c
-===================================================================
---- openssl-1.0.0d.orig/crypto/x509/x509_vfy.c
-+++ openssl-1.0.0d/crypto/x509/x509_vfy.c
+---
+ crypto/x509/x509_vfy.c | 26 ++++++++++++++++++++++++++
+ 1 file changed, 26 insertions(+)
+
+--- a/crypto/x509/x509_vfy.c
++++ b/crypto/x509/x509_vfy.c
@@ -117,6 +117,7 @@ static int check_trust(X509_STORE_CTX *c
static int check_revocation(X509_STORE_CTX *ctx);
static int check_cert(X509_STORE_CTX *ctx);
@@ -21,44 +23,43 @@
+static int check_ca_blacklist(X509_STORE_CTX *ctx);
static int get_crl_score(X509_STORE_CTX *ctx, X509 **pissuer,
- unsigned int *preasons,
-@@ -374,6 +375,9 @@ int X509_verify_cert(X509_STORE_CTX *ctx
- ok=internal_verify(ctx);
- if(!ok) goto end;
+ unsigned int *preasons, X509_CRL *crl, X509 *x);
+@@ -409,6 +410,10 @@ int X509_verify_cert(X509_STORE_CTX *ctx
+ if (!ok)
+ goto end;
-+ ok = check_ca_blacklist(ctx);
-+ if(!ok) goto end;
++ ok = check_ca_blacklist(ctx);
++ if(!ok)
++ goto end;
+
#ifndef OPENSSL_NO_RFC3779
- /* RFC 3779 path validation, now that CRL check has been done */
- ok = v3_asid_validate_path(ctx);
-@@ -820,6 +824,29 @@ static int check_crl_time(X509_STORE_CTX
- return 1;
- }
+ /* RFC 3779 path validation, now that CRL check has been done */
+ ok = v3_asid_validate_path(ctx);
+@@ -843,6 +848,27 @@ static int check_crl_time(X509_STORE_CTX
+ return 1;
+ }
+static int check_ca_blacklist(X509_STORE_CTX *ctx)
-+ {
++{
+ X509 *x;
+ int i;
+ /* Check all certificates against the blacklist */
-+ for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--)
-+ {
++ for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--) {
+ x = sk_X509_value(ctx->chain, i);
+ /* Mark DigiNotar certificates as revoked, no matter
+ * where in the chain they are.
+ */
-+ if (x->name && strstr(x->name, "DigiNotar"))
-+ {
++ if (x->name && strstr(x->name, "DigiNotar")) {
+ ctx->error = X509_V_ERR_CERT_REVOKED;
+ ctx->error_depth = i;
+ ctx->current_cert = x;
+ if (!ctx->verify_cb(0,ctx))
+ return 0;
-+ }
+ }
++ }
+ return 1;
-+ }
++}
+
static int get_crl_sk(X509_STORE_CTX *ctx, X509_CRL **pcrl, X509_CRL **pdcrl,
- X509 **pissuer, int *pscore, unsigned int *preasons,
- STACK_OF(X509_CRL) *crls)
+ X509 **pissuer, int *pscore, unsigned int *preasons,
+ STACK_OF(X509_CRL) *crls)
Modified: openssl/branches/jessie_stable/debian/patches/c_rehash-compat.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/c_rehash-compat.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/c_rehash-compat.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -5,13 +5,11 @@
---
tools/c_rehash.in | 8 +++++++-
- 1 files changed, 7 insertions(+), 1 deletions(-)
+ 1 file changed, 7 insertions(+), 1 deletion(-)
-Index: openssl-1.0.0d/tools/c_rehash.in
-===================================================================
---- openssl-1.0.0d.orig/tools/c_rehash.in 2011-04-13 20:41:28.000000000 +0000
-+++ openssl-1.0.0d/tools/c_rehash.in 2011-04-13 20:41:28.000000000 +0000
-@@ -86,6 +86,7 @@
+--- a/tools/c_rehash.in
++++ b/tools/c_rehash.in
+@@ -86,6 +86,7 @@ sub hash_dir {
}
}
link_hash_cert($fname) if($cert);
@@ -19,7 +17,7 @@
link_hash_crl($fname) if($crl);
}
}
-@@ -119,8 +120,9 @@
+@@ -119,8 +120,9 @@ sub check_file {
sub link_hash_cert {
my $fname = $_[0];
@@ -30,7 +28,7 @@
chomp $hash;
chomp $fprint;
$fprint =~ s/^.*=//;
-@@ -150,6 +152,10 @@
+@@ -150,6 +152,10 @@ sub link_hash_cert {
$hashlist{$hash} = $fprint;
}
Modified: openssl/branches/jessie_stable/debian/patches/ca.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/ca.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/ca.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -1,8 +1,10 @@
-Index: openssl-0.9.8m/apps/CA.pl.in
-===================================================================
---- openssl-0.9.8m.orig/apps/CA.pl.in 2006-04-28 00:28:51.000000000 +0000
-+++ openssl-0.9.8m/apps/CA.pl.in 2010-02-27 00:36:51.000000000 +0000
-@@ -65,6 +65,7 @@
+---
+ apps/CA.pl.in | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/apps/CA.pl.in
++++ b/apps/CA.pl.in
+@@ -65,6 +65,7 @@ if(defined $ENV{OPENSSL}) {
foreach (@ARGV) {
if ( /^(-\?|-h|-help)$/ ) {
print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n";
@@ -10,7 +12,7 @@
exit 0;
} elsif (/^-newcert$/) {
# create a certificate
-@@ -165,6 +166,7 @@
+@@ -165,6 +166,7 @@ foreach (@ARGV) {
} else {
print STDERR "Unknown arg $_\n";
print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n";
Modified: openssl/branches/jessie_stable/debian/patches/config-hurd.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/config-hurd.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/config-hurd.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -1,8 +1,10 @@
-Index: openssl-1.0.0c/config
-===================================================================
---- openssl-1.0.0c.orig/config 2010-12-12 16:09:43.000000000 +0100
-+++ openssl-1.0.0c/config 2010-12-12 16:09:48.000000000 +0100
-@@ -170,8 +170,8 @@
+---
+ config | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/config
++++ b/config
+@@ -170,8 +170,8 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${
echo "${MACHINE}-whatever-linux1"; exit 0
;;
Modified: openssl/branches/jessie_stable/debian/patches/debian-targets.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/debian-targets.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/debian-targets.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -1,8 +1,10 @@
-Index: openssl-1.0.1e/Configure
-===================================================================
---- openssl-1.0.1e.orig/Configure 2013-08-24 07:46:42.292313320 +0000
-+++ openssl-1.0.1e/Configure 2013-08-24 07:49:19.252316478 +0000
-@@ -105,6 +105,10 @@
+---
+ Configure | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 53 insertions(+)
+
+--- a/Configure
++++ b/Configure
+@@ -109,6 +109,10 @@ my $usage="Usage: Configure [no-<cipher>
my $gcc_devteam_warn = "-Wall -pedantic -DPEDANTIC -Wno-long-long -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Werror -DCRYPTO_MDEBUG_ALL -DCRYPTO_MDEBUG_ABORT -DREF_CHECK -DOPENSSL_NO_DEPRECATED";
@@ -10,10 +12,10 @@
+my $debian_cflags = `dpkg-buildflags --get CFLAGS` . `dpkg-buildflags --get CPPFLAGS` . `dpkg-buildflags --get LDFLAGS` . "-Wa,--noexecstack -Wall";
+$debian_cflags =~ s/\n/ /g;
+
- my $strict_warnings = 0;
+ # Warn that "make depend" should be run?
+ my $warn_make_depend = 0;
- my $x86_gcc_des="DES_PTR DES_RISC1 DES_UNROLL";
-@@ -340,6 +346,55 @@
+@@ -350,6 +354,55 @@ my %table=(
"osf1-alpha-cc", "cc:-std1 -tune host -O4 -readonly_strings::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${alpha_asm}:dlfcn:alpha-osf1-shared:::.so",
"tru64-alpha-cc", "cc:-std1 -tune host -fast -readonly_strings::-pthread:::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${alpha_asm}:dlfcn:alpha-osf1-shared::-msym:.so",
Modified: openssl/branches/jessie_stable/debian/patches/defaults.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/defaults.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/defaults.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -2,12 +2,30 @@
Subject: Change default bit size and digest
Date: Fri, 01 Nov 2013 20:47:14 +0100
-Index: openssl-1.0.1e/apps/openssl.cnf
-===================================================================
---- openssl-1.0.1e.orig/apps/openssl.cnf 2013-12-22 15:36:37.179274819 +0100
-+++ openssl-1.0.1e/apps/openssl.cnf 2013-12-22 15:36:37.175274904 +0100
-@@ -103,7 +103,7 @@
+---
+ apps/genrsa.c | 2 +-
+ apps/openssl.cnf | 2 +-
+ crypto/dsa/dsa_ameth.c | 2 +-
+ crypto/ec/ec_ameth.c | 2 +-
+ crypto/hmac/hm_ameth.c | 2 +-
+ crypto/rsa/rsa_ameth.c | 2 +-
+ 6 files changed, 6 insertions(+), 6 deletions(-)
+
+--- a/apps/genrsa.c
++++ b/apps/genrsa.c
+@@ -80,7 +80,7 @@
+ # include <openssl/pem.h>
+ # include <openssl/rand.h>
+-# define DEFBITS 1024
++# define DEFBITS 2048
+ # undef PROG
+ # define PROG genrsa_main
+
+--- a/apps/openssl.cnf
++++ b/apps/openssl.cnf
+@@ -103,7 +103,7 @@ emailAddress = optional
+
####################################################################
[ req ]
-default_bits = 1024
@@ -15,103 +33,47 @@
default_keyfile = privkey.pem
distinguished_name = req_distinguished_name
attributes = req_attributes
-Index: openssl-1.0.1e/crypto/dsa/dsa_ameth.c
-===================================================================
---- openssl-1.0.1e.orig/crypto/dsa/dsa_ameth.c 2013-12-22 15:36:37.179274819 +0100
-+++ openssl-1.0.1e/crypto/dsa/dsa_ameth.c 2013-12-22 15:36:37.175274904 +0100
-@@ -628,7 +628,7 @@
+--- a/crypto/dsa/dsa_ameth.c
++++ b/crypto/dsa/dsa_ameth.c
+@@ -605,7 +605,7 @@ static int dsa_pkey_ctrl(EVP_PKEY *pkey,
#endif
- case ASN1_PKEY_CTRL_DEFAULT_MD_NID:
-- *(int *)arg2 = NID_sha1;
-+ *(int *)arg2 = NID_sha256;
- return 2;
+ case ASN1_PKEY_CTRL_DEFAULT_MD_NID:
+- *(int *)arg2 = NID_sha1;
++ *(int *)arg2 = NID_sha256;
+ return 2;
- default:
-Index: openssl-1.0.1e/crypto/ec/ec_ameth.c
-===================================================================
---- openssl-1.0.1e.orig/crypto/ec/ec_ameth.c 2013-12-22 15:36:37.179274819 +0100
-+++ openssl-1.0.1e/crypto/ec/ec_ameth.c 2013-12-22 15:36:37.175274904 +0100
-@@ -615,7 +615,7 @@
+ default:
+--- a/crypto/ec/ec_ameth.c
++++ b/crypto/ec/ec_ameth.c
+@@ -583,7 +583,7 @@ static int ec_pkey_ctrl(EVP_PKEY *pkey,
#endif
- case ASN1_PKEY_CTRL_DEFAULT_MD_NID:
-- *(int *)arg2 = NID_sha1;
-+ *(int *)arg2 = NID_sha256;
- return 2;
+ case ASN1_PKEY_CTRL_DEFAULT_MD_NID:
+- *(int *)arg2 = NID_sha1;
++ *(int *)arg2 = NID_sha256;
+ return 2;
- default:
-Index: openssl-1.0.1e/crypto/hmac/hm_ameth.c
-===================================================================
---- openssl-1.0.1e.orig/crypto/hmac/hm_ameth.c 2013-12-22 15:36:37.179274819 +0100
-+++ openssl-1.0.1e/crypto/hmac/hm_ameth.c 2013-12-22 15:36:37.175274904 +0100
-@@ -89,7 +89,7 @@
- switch (op)
- {
- case ASN1_PKEY_CTRL_DEFAULT_MD_NID:
-- *(int *)arg2 = NID_sha1;
-+ *(int *)arg2 = NID_sha256;
- return 1;
+ default:
+--- a/crypto/hmac/hm_ameth.c
++++ b/crypto/hmac/hm_ameth.c
+@@ -87,7 +87,7 @@ static int hmac_pkey_ctrl(EVP_PKEY *pkey
+ {
+ switch (op) {
+ case ASN1_PKEY_CTRL_DEFAULT_MD_NID:
+- *(int *)arg2 = NID_sha1;
++ *(int *)arg2 = NID_sha256;
+ return 1;
- default:
-Index: openssl-1.0.1e/crypto/rsa/rsa_ameth.c
-===================================================================
---- openssl-1.0.1e.orig/crypto/rsa/rsa_ameth.c 2013-12-22 15:36:37.179274819 +0100
-+++ openssl-1.0.1e/crypto/rsa/rsa_ameth.c 2013-12-22 15:36:37.175274904 +0100
-@@ -435,7 +435,7 @@
+ default:
+--- a/crypto/rsa/rsa_ameth.c
++++ b/crypto/rsa/rsa_ameth.c
+@@ -411,7 +411,7 @@ static int rsa_pkey_ctrl(EVP_PKEY *pkey,
#endif
- case ASN1_PKEY_CTRL_DEFAULT_MD_NID:
-- *(int *)arg2 = NID_sha1;
-+ *(int *)arg2 = NID_sha256;
- return 1;
+ case ASN1_PKEY_CTRL_DEFAULT_MD_NID:
+- *(int *)arg2 = NID_sha1;
++ *(int *)arg2 = NID_sha256;
+ return 1;
- default:
-Index: openssl-1.0.1e/apps/gendh.c
-===================================================================
---- openssl-1.0.1e.orig/apps/gendh.c 2013-12-22 15:36:37.179274819 +0100
-+++ openssl-1.0.1e/apps/gendh.c 2013-12-22 15:36:37.175274904 +0100
-@@ -78,7 +78,7 @@
- #include <openssl/x509.h>
- #include <openssl/pem.h>
-
--#define DEFBITS 512
-+#define DEFBITS 2048
- #undef PROG
- #define PROG gendh_main
-
-Index: openssl-1.0.1e/apps/genrsa.c
-===================================================================
---- openssl-1.0.1e.orig/apps/genrsa.c 2013-12-22 15:36:37.179274819 +0100
-+++ openssl-1.0.1e/apps/genrsa.c 2013-12-22 15:36:37.175274904 +0100
-@@ -78,7 +78,7 @@
- #include <openssl/pem.h>
- #include <openssl/rand.h>
-
--#define DEFBITS 1024
-+#define DEFBITS 2048
- #undef PROG
- #define PROG genrsa_main
-
-Index: openssl-1.0.1e/apps/dhparam.c
-===================================================================
---- openssl-1.0.1e.orig/apps/dhparam.c 2013-12-22 15:37:05.438669443 +0100
-+++ openssl-1.0.1e/apps/dhparam.c 2013-12-22 15:38:18.417105946 +0100
-@@ -130,7 +130,7 @@
- #undef PROG
- #define PROG dhparam_main
-
--#define DEFBITS 512
-+#define DEFBITS 2048
-
- /* -inform arg - input format - default PEM (DER or PEM)
- * -outform arg - output format - default PEM
-@@ -253,7 +253,7 @@
- BIO_printf(bio_err," -C Output C code\n");
- BIO_printf(bio_err," -2 generate parameters using 2 as the generator value\n");
- BIO_printf(bio_err," -5 generate parameters using 5 as the generator value\n");
-- BIO_printf(bio_err," numbits number of bits in to generate (default 512)\n");
-+ BIO_printf(bio_err," numbits number of bits in to generate (default 2048)\n");
- #ifndef OPENSSL_NO_ENGINE
- BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
- #endif
+ default:
Modified: openssl/branches/jessie_stable/debian/patches/engines-path.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/engines-path.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/engines-path.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -1,8 +1,24 @@
-Index: openssl-1.0.0c/Makefile.org
-===================================================================
---- openssl-1.0.0c.orig/Makefile.org 2010-01-27 17:06:58.000000000 +0100
-+++ openssl-1.0.0c/Makefile.org 2010-12-13 19:41:03.000000000 +0100
-@@ -497,7 +497,7 @@
+---
+ Configure | 2 +-
+ Makefile.org | 2 +-
+ engines/Makefile | 10 +++++-----
+ engines/ccgost/Makefile | 6 +++---
+ 4 files changed, 10 insertions(+), 10 deletions(-)
+
+--- a/Configure
++++ b/Configure
+@@ -1866,7 +1866,7 @@ while (<IN>)
+ }
+ elsif (/^#define\s+ENGINESDIR/)
+ {
+- my $foo = "$prefix/$libdir/engines";
++ my $foo = "$prefix/$libdir/openssl-1.0.0/engines";
+ $foo =~ s/\\/\\\\/g;
+ print OUT "#define ENGINESDIR \"$foo\"\n";
+ }
+--- a/Makefile.org
++++ b/Makefile.org
+@@ -543,7 +543,7 @@ install: all install_docs install_sw
install_sw:
@$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \
@@ -11,11 +27,9 @@
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig \
$(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
$(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
-Index: openssl-1.0.0c/engines/Makefile
-===================================================================
---- openssl-1.0.0c.orig/engines/Makefile 2010-08-24 23:46:34.000000000 +0200
-+++ openssl-1.0.0c/engines/Makefile 2010-12-12 19:16:22.000000000 +0100
-@@ -107,7 +107,7 @@
+--- a/engines/Makefile
++++ b/engines/Makefile
+@@ -107,7 +107,7 @@ lib: $(LIBOBJ)
@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
@if [ -n "$(SHARED_LIBS)" ]; then \
set -e; \
@@ -24,7 +38,7 @@
for l in $(LIBNAMES); do \
( echo installing $$l; \
pfx=lib; \
-@@ -119,13 +119,13 @@
+@@ -119,13 +119,13 @@ lib: $(LIBOBJ)
*DSO_WIN32*) sfx="eay32.dll"; pfx=;; \
*) sfx=".bad";; \
esac; \
@@ -42,24 +56,9 @@
done; \
fi
@target=install; $(RECURSIVE_MAKE)
-Index: openssl-1.0.0c/Configure
-===================================================================
---- openssl-1.0.0c.orig/Configure 2010-12-12 19:16:22.000000000 +0100
-+++ openssl-1.0.0c/Configure 2010-12-13 19:40:53.000000000 +0100
-@@ -1732,7 +1732,7 @@
- }
- elsif (/^#define\s+ENGINESDIR/)
- {
-- my $foo = "$prefix/$libdir/engines";
-+ my $foo = "$prefix/$libdir/openssl-1.0.0/engines";
- $foo =~ s/\\/\\\\/g;
- print OUT "#define ENGINESDIR \"$foo\"\n";
- }
-Index: openssl-1.0.0c/engines/ccgost/Makefile
-===================================================================
---- openssl-1.0.0c.orig/engines/ccgost/Makefile 2010-12-13 19:41:14.000000000 +0100
-+++ openssl-1.0.0c/engines/ccgost/Makefile 2010-12-13 19:42:21.000000000 +0100
-@@ -53,13 +53,13 @@
+--- a/engines/ccgost/Makefile
++++ b/engines/ccgost/Makefile
+@@ -53,13 +53,13 @@ lib: $(LIBOBJ)
*DSO_WIN32*) sfx="eay32.dll"; pfx=;; \
*) sfx=".bad";; \
esac; \
Modified: openssl/branches/jessie_stable/debian/patches/man-dir.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/man-dir.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/man-dir.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -1,8 +1,10 @@
-Index: openssl-1.0.0c/Makefile.org
-===================================================================
---- openssl-1.0.0c.orig/Makefile.org 2010-12-12 16:11:27.000000000 +0100
-+++ openssl-1.0.0c/Makefile.org 2010-12-12 16:11:37.000000000 +0100
-@@ -131,7 +131,7 @@
+---
+ Makefile.org | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/Makefile.org
++++ b/Makefile.org
+@@ -157,7 +157,7 @@ TESTS = alltests
MAKEFILE= Makefile
Modified: openssl/branches/jessie_stable/debian/patches/man-section.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/man-section.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/man-section.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -1,8 +1,10 @@
-Index: openssl-1.0.0c/Makefile.org
-===================================================================
---- openssl-1.0.0c.orig/Makefile.org 2010-12-12 16:11:37.000000000 +0100
-+++ openssl-1.0.0c/Makefile.org 2010-12-12 16:13:28.000000000 +0100
-@@ -134,7 +134,8 @@
+---
+ Makefile.org | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+--- a/Makefile.org
++++ b/Makefile.org
+@@ -160,7 +160,8 @@ MAKEFILE= Makefile
MANDIR=/usr/share/man
MAN1=1
MAN3=3
@@ -12,7 +14,7 @@
HTMLSUFFIX=html
HTMLDIR=$(OPENSSLDIR)/html
SHELL=/bin/sh
-@@ -606,7 +607,7 @@
+@@ -642,7 +643,7 @@ install: all install_docs install_sw
echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
(cd `$(PERL) util/dirname.pl $$i`; \
sh -c "$$pod2man \
@@ -21,7 +23,7 @@
--release=$(VERSION) `basename $$i`") \
> $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
$(PERL) util/extract-names.pl < $$i | \
-@@ -623,7 +624,7 @@
+@@ -659,7 +660,7 @@ install: all install_docs install_sw
echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
(cd `$(PERL) util/dirname.pl $$i`; \
sh -c "$$pod2man \
Modified: openssl/branches/jessie_stable/debian/patches/no-rpath.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/no-rpath.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/no-rpath.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -1,8 +1,10 @@
-Index: openssl-1.0.0c/Makefile.shared
-===================================================================
---- openssl-1.0.0c.orig/Makefile.shared 2010-08-21 13:36:49.000000000 +0200
-+++ openssl-1.0.0c/Makefile.shared 2010-12-12 16:13:36.000000000 +0100
-@@ -153,7 +153,7 @@
+---
+ Makefile.shared | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/Makefile.shared
++++ b/Makefile.shared
+@@ -153,7 +153,7 @@ DO_GNU_SO=$(CALC_VERSIONS); \
NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"
Modified: openssl/branches/jessie_stable/debian/patches/no-symbolic.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/no-symbolic.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/no-symbolic.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -1,8 +1,10 @@
-Index: openssl-1.0.0c/Makefile.shared
-===================================================================
---- openssl-1.0.0c.orig/Makefile.shared 2010-12-12 16:13:36.000000000 +0100
-+++ openssl-1.0.0c/Makefile.shared 2010-12-12 16:13:44.000000000 +0100
-@@ -151,7 +151,7 @@
+---
+ Makefile.shared | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/Makefile.shared
++++ b/Makefile.shared
+@@ -151,7 +151,7 @@ DO_GNU_SO=$(CALC_VERSIONS); \
SHLIB_SUFFIX=; \
ALLSYMSFLAGS='-Wl,--whole-archive'; \
NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
Modified: openssl/branches/jessie_stable/debian/patches/openssl_fix_for_x32.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/openssl_fix_for_x32.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/openssl_fix_for_x32.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -1,39 +1,41 @@
-Index: openssl-1.0.1j/crypto/bn/asm/x86_64-gcc.c
-===================================================================
---- openssl-1.0.1j.orig/crypto/bn/asm/x86_64-gcc.c
-+++ openssl-1.0.1j/crypto/bn/asm/x86_64-gcc.c
+---
+ crypto/bn/asm/x86_64-gcc.c | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+--- a/crypto/bn/asm/x86_64-gcc.c
++++ b/crypto/bn/asm/x86_64-gcc.c
@@ -55,7 +55,7 @@
* machine.
*/
--#ifdef _WIN64
+-# ifdef _WIN64
+#if defined _WIN64 || !defined __LP64__
- #define BN_ULONG unsigned long long
- #else
- #define BN_ULONG unsigned long
-@@ -192,9 +192,9 @@ BN_ULONG bn_add_words (BN_ULONG *rp, con
- asm volatile (
- " subq %2,%2 \n"
- ".p2align 4 \n"
-- "1: movq (%4,%2,8),%0 \n"
-- " adcq (%5,%2,8),%0 \n"
-- " movq %0,(%3,%2,8) \n"
-+ "1: movq (%q4,%2,8),%0 \n"
-+ " adcq (%q5,%2,8),%0 \n"
-+ " movq %0,(%q3,%2,8) \n"
- " leaq 1(%2),%2 \n"
- " loop 1b \n"
- " sbbq %0,%0 \n"
-@@ -215,9 +215,9 @@ BN_ULONG bn_sub_words (BN_ULONG *rp, con
- asm volatile (
- " subq %2,%2 \n"
- ".p2align 4 \n"
-- "1: movq (%4,%2,8),%0 \n"
-- " sbbq (%5,%2,8),%0 \n"
-- " movq %0,(%3,%2,8) \n"
-+ "1: movq (%q4,%2,8),%0 \n"
-+ " sbbq (%q5,%2,8),%0 \n"
-+ " movq %0,(%q3,%2,8) \n"
- " leaq 1(%2),%2 \n"
- " loop 1b \n"
- " sbbq %0,%0 \n"
+ # define BN_ULONG unsigned long long
+ # else
+ # define BN_ULONG unsigned long
+@@ -211,9 +211,9 @@ BN_ULONG bn_add_words(BN_ULONG *rp, cons
+
+ asm volatile (" subq %2,%2 \n"
+ ".p2align 4 \n"
+- "1: movq (%4,%2,8),%0 \n"
+- " adcq (%5,%2,8),%0 \n"
+- " movq %0,(%3,%2,8) \n"
++ "1: movq (%q4,%2,8),%0 \n"
++ " adcq (%q5,%2,8),%0 \n"
++ " movq %0,(%q3,%2,8) \n"
+ " leaq 1(%2),%2 \n"
+ " loop 1b \n"
+ " sbbq %0,%0 \n":"=&a" (ret), "+c"(n),
+@@ -235,9 +235,9 @@ BN_ULONG bn_sub_words(BN_ULONG *rp, cons
+
+ asm volatile (" subq %2,%2 \n"
+ ".p2align 4 \n"
+- "1: movq (%4,%2,8),%0 \n"
+- " sbbq (%5,%2,8),%0 \n"
+- " movq %0,(%3,%2,8) \n"
++ "1: movq (%q4,%2,8),%0 \n"
++ " sbbq (%q5,%2,8),%0 \n"
++ " movq %0,(%q3,%2,8) \n"
+ " leaq 1(%2),%2 \n"
+ " loop 1b \n"
+ " sbbq %0,%0 \n":"=&a" (ret), "+c"(n),
Modified: openssl/branches/jessie_stable/debian/patches/pic.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/pic.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/pic.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -1,8 +1,13 @@
-Index: openssl-1.0.1c/crypto/des/asm/desboth.pl
-===================================================================
---- openssl-1.0.1c.orig/crypto/des/asm/desboth.pl 2001-10-24 23:20:56.000000000 +0200
-+++ openssl-1.0.1c/crypto/des/asm/desboth.pl 2012-07-29 14:15:26.000000000 +0200
-@@ -16,6 +16,11 @@
+---
+ crypto/des/asm/desboth.pl | 17 ++++++++++++++---
+ crypto/perlasm/cbc.pl | 24 ++++++++++++++++++++----
+ crypto/perlasm/x86gas.pl | 16 ++++++++++++++++
+ crypto/x86cpuid.pl | 10 +++++-----
+ 4 files changed, 55 insertions(+), 12 deletions(-)
+
+--- a/crypto/des/asm/desboth.pl
++++ b/crypto/des/asm/desboth.pl
+@@ -16,6 +16,11 @@ sub DES_encrypt3
&push("edi");
@@ -14,7 +19,7 @@
&comment("");
&comment("Load the data words");
&mov($L,&DWP(0,"ebx","",0));
-@@ -47,15 +52,21 @@
+@@ -47,15 +52,21 @@ sub DES_encrypt3
&mov(&swtmp(2), (DWC(($enc)?"1":"0")));
&mov(&swtmp(1), "eax");
&mov(&swtmp(0), "ebx");
@@ -39,11 +44,9 @@
&stack_pop(3);
&mov($L,&DWP(0,"ebx","",0));
-Index: openssl-1.0.1c/crypto/perlasm/cbc.pl
-===================================================================
---- openssl-1.0.1c.orig/crypto/perlasm/cbc.pl 2011-07-13 08:22:46.000000000 +0200
-+++ openssl-1.0.1c/crypto/perlasm/cbc.pl 2012-07-29 14:15:26.000000000 +0200
-@@ -122,7 +122,11 @@
+--- a/crypto/perlasm/cbc.pl
++++ b/crypto/perlasm/cbc.pl
+@@ -122,7 +122,11 @@ sub cbc
&mov(&DWP($data_off,"esp","",0), "eax"); # put in array for call
&mov(&DWP($data_off+4,"esp","",0), "ebx"); #
@@ -56,7 +59,7 @@
&mov("eax", &DWP($data_off,"esp","",0));
&mov("ebx", &DWP($data_off+4,"esp","",0));
-@@ -185,7 +189,11 @@
+@@ -185,7 +189,11 @@ sub cbc
&mov(&DWP($data_off,"esp","",0), "eax"); # put in array for call
&mov(&DWP($data_off+4,"esp","",0), "ebx"); #
@@ -69,7 +72,7 @@
&mov("eax", &DWP($data_off,"esp","",0));
&mov("ebx", &DWP($data_off+4,"esp","",0));
-@@ -218,7 +226,11 @@
+@@ -218,7 +226,11 @@ sub cbc
&mov(&DWP($data_off,"esp","",0), "eax"); # put back
&mov(&DWP($data_off+4,"esp","",0), "ebx"); #
@@ -82,7 +85,7 @@
&mov("eax", &DWP($data_off,"esp","",0)); # get return
&mov("ebx", &DWP($data_off+4,"esp","",0)); #
-@@ -261,7 +273,11 @@
+@@ -261,7 +273,11 @@ sub cbc
&mov(&DWP($data_off,"esp","",0), "eax"); # put back
&mov(&DWP($data_off+4,"esp","",0), "ebx"); #
@@ -95,11 +98,9 @@
&mov("eax", &DWP($data_off,"esp","",0)); # get return
&mov("ebx", &DWP($data_off+4,"esp","",0)); #
-Index: openssl-1.0.1c/crypto/perlasm/x86gas.pl
-===================================================================
---- openssl-1.0.1c.orig/crypto/perlasm/x86gas.pl 2011-12-09 20:16:35.000000000 +0100
-+++ openssl-1.0.1c/crypto/perlasm/x86gas.pl 2012-07-29 14:15:26.000000000 +0200
-@@ -161,6 +161,7 @@
+--- a/crypto/perlasm/x86gas.pl
++++ b/crypto/perlasm/x86gas.pl
+@@ -161,6 +161,7 @@ sub ::file_end
if ($::macosx) { push (@out,"$tmp,2\n"); }
elsif ($::elf) { push (@out,"$tmp,4\n"); }
else { push (@out,"$tmp\n"); }
@@ -107,7 +108,7 @@
}
push(@out,$initseg) if ($initseg);
}
-@@ -218,8 +219,23 @@
+@@ -218,8 +219,23 @@ sub ::initseg
elsif ($::elf)
{ $initseg.=<<___;
.section .init
@@ -131,11 +132,9 @@
}
elsif ($::coff)
{ $initseg.=<<___; # applies to both Cygwin and Mingw
-Index: openssl-1.0.1c/crypto/x86cpuid.pl
-===================================================================
---- openssl-1.0.1c.orig/crypto/x86cpuid.pl 2012-02-28 15:20:34.000000000 +0100
-+++ openssl-1.0.1c/crypto/x86cpuid.pl 2012-07-29 14:15:26.000000000 +0200
-@@ -8,6 +8,8 @@
+--- a/crypto/x86cpuid.pl
++++ b/crypto/x86cpuid.pl
+@@ -8,6 +8,8 @@ require "x86asm.pl";
for (@ARGV) { $sse2=1 if (/-DOPENSSL_IA32_SSE2/); }
@@ -144,7 +143,7 @@
&function_begin("OPENSSL_ia32_cpuid");
&xor ("edx","edx");
&pushf ();
-@@ -139,9 +141,7 @@
+@@ -141,9 +143,7 @@ for (@ARGV) { $sse2=1 if (/-DOPENSSL_IA3
&set_label("nocpuid");
&function_end("OPENSSL_ia32_cpuid");
@@ -155,7 +154,7 @@
&xor ("eax","eax");
&xor ("edx","edx");
&picmeup("ecx","OPENSSL_ia32cap_P");
-@@ -155,7 +155,7 @@
+@@ -157,7 +157,7 @@ for (@ARGV) { $sse2=1 if (/-DOPENSSL_IA3
# This works in Ring 0 only [read DJGPP+MS-DOS+privileged DPMI host],
# but it's safe to call it on any [supported] 32-bit platform...
# Just check for [non-]zero return value...
@@ -164,7 +163,7 @@
&picmeup("ecx","OPENSSL_ia32cap_P");
&bt (&DWP(0,"ecx"),4);
&jnc (&label("nohalt")); # no TSC
-@@ -222,7 +222,7 @@
+@@ -224,7 +224,7 @@ for (@ARGV) { $sse2=1 if (/-DOPENSSL_IA3
&ret ();
&function_end_B("OPENSSL_far_spin");
Modified: openssl/branches/jessie_stable/debian/patches/ppc64el.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/ppc64el.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/ppc64el.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -1,8 +1,13 @@
-Index: openssl-1.0.1g/crypto/aes/asm/aes-ppc.pl
-===================================================================
---- openssl-1.0.1g.orig/crypto/aes/asm/aes-ppc.pl 2014-03-17 16:14:20.000000000 +0000
-+++ openssl-1.0.1g/crypto/aes/asm/aes-ppc.pl 2014-04-23 19:22:08.000000000 +0000
-@@ -45,6 +45,8 @@
+---
+ crypto/aes/asm/aes-ppc.pl | 113 ++++++++++++++++++++++++++++++++++++++-----
+ crypto/perlasm/ppc-xlate.pl | 45 ++++++++++++++---
+ crypto/sha/asm/sha1-ppc.pl | 30 +++++++++--
+ crypto/sha/asm/sha512-ppc.pl | 107 ++++++++++++++++++++++++----------------
+ 4 files changed, 229 insertions(+), 66 deletions(-)
+
+--- a/crypto/aes/asm/aes-ppc.pl
++++ b/crypto/aes/asm/aes-ppc.pl
+@@ -45,6 +45,8 @@ if ($flavour =~ /64/) {
$PUSH ="stw";
} else { die "nonsense $flavour"; }
@@ -11,7 +16,7 @@
$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
( $xlate="${dir}ppc-xlate.pl" and -f $xlate ) or
( $xlate="${dir}../../perlasm/ppc-xlate.pl" and -f $xlate) or
-@@ -68,7 +70,7 @@
+@@ -68,7 +70,7 @@ sub _data_word()
$Tbl0="r3";
$Tbl1="r6";
$Tbl2="r7";
@@ -20,7 +25,7 @@
$s0="r8";
$s1="r9";
-@@ -76,7 +78,7 @@
+@@ -76,7 +78,7 @@ sub _data_word()
$s3="r11";
$t0="r12";
@@ -29,7 +34,7 @@
$t2="r14";
$t3="r15";
-@@ -100,9 +102,6 @@
+@@ -100,9 +102,6 @@ sub _data_word()
$acc14="r30";
$acc15="r31";
@@ -39,7 +44,7 @@
$mask80=$Tbl2;
$mask1b=$Tbl3;
-@@ -337,8 +336,7 @@
+@@ -337,8 +336,7 @@ else { die if ($Tbl3 ne "r2"); $Tbl3=$t
$STU $sp,-$FRAME($sp)
mflr r0
@@ -49,7 +54,7 @@
$PUSH r14,`$FRAME-$SIZE_T*18`($sp)
$PUSH r15,`$FRAME-$SIZE_T*17`($sp)
$PUSH r16,`$FRAME-$SIZE_T*16`($sp)
-@@ -365,16 +363,61 @@
+@@ -365,16 +363,61 @@ else { die if ($Tbl3 ne "r2"); $Tbl3=$t
bne Lenc_unaligned
Lenc_unaligned_ok:
@@ -111,7 +116,7 @@
b Lenc_done
Lenc_unaligned:
-@@ -417,6 +460,7 @@
+@@ -417,6 +460,7 @@ else { die if ($Tbl3 ne "r2"); $Tbl3=$t
bl LAES_Te
bl Lppc_AES_encrypt_compact
@@ -119,7 +124,7 @@
extrwi $acc00,$s0,8,0
extrwi $acc01,$s0,8,8
-@@ -449,8 +493,6 @@
+@@ -449,8 +493,6 @@ else { die if ($Tbl3 ne "r2"); $Tbl3=$t
Lenc_done:
$POP r0,`$FRAME+$LRSAVE`($sp)
@@ -128,7 +133,7 @@
$POP r14,`$FRAME-$SIZE_T*18`($sp)
$POP r15,`$FRAME-$SIZE_T*17`($sp)
$POP r16,`$FRAME-$SIZE_T*16`($sp)
-@@ -764,6 +806,7 @@
+@@ -764,6 +806,7 @@ else { die if ($Tbl3 ne "r2"); $Tbl3=$t
blr
.long 0
.byte 0,12,0x14,0,0,0,0,0
@@ -136,7 +141,7 @@
.globl .AES_decrypt
.align 7
-@@ -771,8 +814,7 @@
+@@ -771,8 +814,7 @@ else { die if ($Tbl3 ne "r2"); $Tbl3=$t
$STU $sp,-$FRAME($sp)
mflr r0
@@ -146,7 +151,7 @@
$PUSH r14,`$FRAME-$SIZE_T*18`($sp)
$PUSH r15,`$FRAME-$SIZE_T*17`($sp)
$PUSH r16,`$FRAME-$SIZE_T*16`($sp)
-@@ -799,16 +841,61 @@
+@@ -799,16 +841,61 @@ else { die if ($Tbl3 ne "r2"); $Tbl3=$t
bne Ldec_unaligned
Ldec_unaligned_ok:
@@ -208,7 +213,7 @@
b Ldec_done
Ldec_unaligned:
-@@ -851,6 +938,7 @@
+@@ -851,6 +938,7 @@ else { die if ($Tbl3 ne "r2"); $Tbl3=$t
bl LAES_Td
bl Lppc_AES_decrypt_compact
@@ -216,7 +221,7 @@
extrwi $acc00,$s0,8,0
extrwi $acc01,$s0,8,8
-@@ -883,8 +971,6 @@
+@@ -883,8 +971,6 @@ else { die if ($Tbl3 ne "r2"); $Tbl3=$t
Ldec_done:
$POP r0,`$FRAME+$LRSAVE`($sp)
@@ -225,7 +230,7 @@
$POP r14,`$FRAME-$SIZE_T*18`($sp)
$POP r15,`$FRAME-$SIZE_T*17`($sp)
$POP r16,`$FRAME-$SIZE_T*16`($sp)
-@@ -1355,6 +1441,7 @@
+@@ -1355,6 +1441,7 @@ else { die if ($Tbl3 ne "r2"); $Tbl3=$t
blr
.long 0
.byte 0,12,0x14,0,0,0,0,0
@@ -233,11 +238,9 @@
.asciz "AES for PPC, CRYPTOGAMS by <appro\@openssl.org>"
.align 7
-Index: openssl-1.0.1g/crypto/perlasm/ppc-xlate.pl
-===================================================================
---- openssl-1.0.1g.orig/crypto/perlasm/ppc-xlate.pl 2014-03-17 16:14:20.000000000 +0000
-+++ openssl-1.0.1g/crypto/perlasm/ppc-xlate.pl 2014-04-23 19:14:44.000000000 +0000
-@@ -27,7 +27,8 @@
+--- a/crypto/perlasm/ppc-xlate.pl
++++ b/crypto/perlasm/ppc-xlate.pl
+@@ -27,7 +27,8 @@ my $globl = sub {
/osx/ && do { $name = "_$name";
last;
};
@@ -247,7 +250,7 @@
$ret .= ".type $name,\@function";
last;
};
-@@ -37,7 +38,6 @@
+@@ -37,7 +38,6 @@ my $globl = sub {
$ret .= ".align 3\n";
$ret .= "$name:\n";
$ret .= ".quad .$name,.TOC.\@tocbase,0\n";
@@ -255,7 +258,7 @@
$ret .= ".previous\n";
$name = ".$name";
-@@ -50,7 +50,9 @@
+@@ -50,7 +50,9 @@ my $globl = sub {
$ret;
};
my $text = sub {
@@ -266,7 +269,7 @@
};
my $machine = sub {
my $junk = shift;
-@@ -62,9 +64,12 @@
+@@ -62,9 +64,12 @@ my $machine = sub {
".machine $arch";
};
my $size = sub {
@@ -281,7 +284,7 @@
}
else
{ ""; }
-@@ -77,6 +82,25 @@
+@@ -77,6 +82,25 @@ my $asciz = sub {
else
{ ""; }
};
@@ -307,7 +310,7 @@
################################################################
# simplified mnemonics not handled by at least one assembler
-@@ -122,6 +146,10 @@
+@@ -122,6 +146,10 @@ my $extrdi = sub {
$b = ($b+$n)&63; $n = 64-$n;
" rldicl $ra,$rs,$b,$n";
};
@@ -318,7 +321,7 @@
while($line=<>) {
-@@ -138,7 +166,10 @@
+@@ -138,7 +166,10 @@ while($line=<>) {
{
$line =~ s|(^[\.\w]+)\:\s*||;
my $label = $1;
@@ -330,7 +333,7 @@
}
{
-@@ -147,7 +178,7 @@
+@@ -147,7 +178,7 @@ while($line=<>) {
my $mnemonic = $2;
my $f = $3;
my $opcode = eval("\$$mnemonic");
@@ -339,11 +342,9 @@
if (ref($opcode) eq 'CODE') { $line = &$opcode($f,split(',',$line)); }
elsif ($mnemonic) { $line = $c.$mnemonic.$f."\t".$line; }
}
-Index: openssl-1.0.1g/crypto/sha/asm/sha1-ppc.pl
-===================================================================
---- openssl-1.0.1g.orig/crypto/sha/asm/sha1-ppc.pl 2014-03-17 16:14:20.000000000 +0000
-+++ openssl-1.0.1g/crypto/sha/asm/sha1-ppc.pl 2014-04-23 19:01:35.000000000 +0000
-@@ -38,6 +38,14 @@
+--- a/crypto/sha/asm/sha1-ppc.pl
++++ b/crypto/sha/asm/sha1-ppc.pl
+@@ -38,6 +38,14 @@ if ($flavour =~ /64/) {
$PUSH ="stw";
} else { die "nonsense $flavour"; }
@@ -358,7 +359,7 @@
$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
( $xlate="${dir}ppc-xlate.pl" and -f $xlate ) or
( $xlate="${dir}../../perlasm/ppc-xlate.pl" and -f $xlate) or
-@@ -68,14 +76,28 @@
+@@ -68,14 +76,28 @@ open STDOUT,"| $^X $xlate $flavour ".shi
@X=("r16","r17","r18","r19","r20","r21","r22","r23",
"r24","r25","r26","r27","r28","r29","r30","r31");
@@ -391,11 +392,9 @@
add $f,$K,$e
rotlwi $e,$a,5
add $f,$f, at X[$i]
-Index: openssl-1.0.1g/crypto/sha/asm/sha512-ppc.pl
-===================================================================
---- openssl-1.0.1g.orig/crypto/sha/asm/sha512-ppc.pl 2014-03-17 16:14:20.000000000 +0000
-+++ openssl-1.0.1g/crypto/sha/asm/sha512-ppc.pl 2014-04-23 19:12:46.000000000 +0000
-@@ -56,6 +56,12 @@
+--- a/crypto/sha/asm/sha512-ppc.pl
++++ b/crypto/sha/asm/sha512-ppc.pl
+@@ -56,6 +56,12 @@ if ($flavour =~ /64/) {
$PUSH="stw";
} else { die "nonsense $flavour"; }
@@ -408,7 +407,7 @@
$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
( $xlate="${dir}ppc-xlate.pl" and -f $xlate ) or
( $xlate="${dir}../../perlasm/ppc-xlate.pl" and -f $xlate) or
-@@ -314,16 +320,33 @@
+@@ -314,16 +320,33 @@ my ($i,$a,$b,$c,$d,$e,$f,$g,$h)=@_;
Lsha2_block_private:
___
for($i=0;$i<16;$i++) {
@@ -444,7 +443,7 @@
&ROUND_00_15($i, at V);
unshift(@V,pop(@V));
}
-@@ -395,46 +418,46 @@
+@@ -395,46 +418,46 @@ for(;$i<32;$i++) {
.space `64-9*4`
___
$code.=<<___ if ($SZ==8);
Modified: openssl/branches/jessie_stable/debian/patches/rehash-crt.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/rehash-crt.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/rehash-crt.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -1,8 +1,10 @@
-Index: openssl-1.0.0c/tools/c_rehash.in
-===================================================================
---- openssl-1.0.0c.orig/tools/c_rehash.in 2010-04-15 01:07:28.000000000 +0200
-+++ openssl-1.0.0c/tools/c_rehash.in 2010-12-12 17:10:51.000000000 +0100
-@@ -75,12 +75,15 @@
+---
+ tools/c_rehash.in | 12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+--- a/tools/c_rehash.in
++++ b/tools/c_rehash.in
+@@ -75,12 +75,15 @@ sub hash_dir {
}
}
closedir DIR;
@@ -21,7 +23,7 @@
}
link_hash_cert($fname) if($cert);
link_hash_crl($fname) if($crl);
-@@ -153,6 +156,9 @@
+@@ -153,6 +156,9 @@ sub link_hash_crl {
my $fname = $_[0];
$fname =~ s/'/'\\''/g;
my ($hash, $fprint) = `"$openssl" crl -hash -fingerprint -noout -in '$fname'`;
Modified: openssl/branches/jessie_stable/debian/patches/series
===================================================================
--- openssl/branches/jessie_stable/debian/patches/series 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/series 2016-05-01 20:00:01 UTC (rev 776)
@@ -19,28 +19,3 @@
defaults.patch
openssl_fix_for_x32.patch
ppc64el.patch
-0006-Fix-reachable-assert-in-SSLv2-servers.patch
-0005-PKCS-7-avoid-NULL-pointer-dereferences-with-missing-.patch
-0004-Fix-ASN1_TYPE_cmp.patch
-0002-Free-up-ADB-and-CHOICE-if-already-initialised.patch
-0001-fix-warning.patch
-0001-Remove-export-ciphers-from-the-DEFAULT-cipher-list.patch
-0001-Make-DTLS-always-act-as-if-read_ahead-is-set.-The-ac.patch
-0001-Fix-a-failure-to-NULL-a-pointer-freed-on-error.patch
-0001-Check-public-key-is-not-NULL.patch
-0008-Fix-a-failure-to-NULL-a-pointer-freed-on-error.patch
-CVE-2015-1791.patch
-CVE-2015-1792.patch
-CVE-2015-1789.patch
-CVE-2015-1790.patch
-CVE-2015-1788.patch
-CVE-2015-4000.patch
-CVE-2015-3194.patch
-CVE-2015-3195.patch
-CVE-2015-3196.patch
-Disable-EXPORT-and-LOW-ciphers.patch
-CVE-2016-0797.patch
-CVE-2016-0798.patch
-CVE-2016-0799.patch
-CVE-2016-0702.patch
-CVE-2016-0705.patch
Modified: openssl/branches/jessie_stable/debian/patches/shared-lib-ext.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/shared-lib-ext.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/shared-lib-ext.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -1,8 +1,10 @@
-Index: openssl-1.0.0c/Configure
-===================================================================
---- openssl-1.0.0c.orig/Configure 2010-12-12 16:10:12.000000000 +0100
-+++ openssl-1.0.0c/Configure 2010-12-12 17:12:38.000000000 +0100
-@@ -1605,7 +1605,8 @@
+---
+ Configure | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/Configure
++++ b/Configure
+@@ -1733,7 +1733,8 @@ while (<IN>)
elsif ($shared_extension ne "" && $shared_extension =~ /^\.s([ol])\.[^\.]*\.[^\.]*$/)
{
my $sotmp = $1;
Modified: openssl/branches/jessie_stable/debian/patches/stddef.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/stddef.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/stddef.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -1,12 +1,16 @@
-Index: openssl-0.9.8k/crypto/sha/sha.h
-===================================================================
---- openssl-0.9.8k.orig/crypto/sha/sha.h 2008-09-16 12:47:28.000000000 +0200
-+++ openssl-0.9.8k/crypto/sha/sha.h 2009-07-19 11:36:28.000000000 +0200
-@@ -59,6 +59,7 @@
+---
+ crypto/sha/sha.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/crypto/sha/sha.h
++++ b/crypto/sha/sha.h
+@@ -59,8 +59,8 @@
#ifndef HEADER_SHA_H
- #define HEADER_SHA_H
+ # define HEADER_SHA_H
-+#include <stddef.h>
- #include <openssl/e_os2.h>
- #include <stddef.h>
+-# include <openssl/e_os2.h>
+ # include <stddef.h>
++# include <openssl/e_os2.h>
+ #ifdef __cplusplus
+ extern "C" {
Modified: openssl/branches/jessie_stable/debian/patches/valgrind.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/valgrind.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/valgrind.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -1,20 +1,22 @@
-Index: openssl-1.0.0c/crypto/rand/md_rand.c
-===================================================================
---- openssl-1.0.0c.orig/crypto/rand/md_rand.c 2010-06-16 15:17:22.000000000 +0200
-+++ openssl-1.0.0c/crypto/rand/md_rand.c 2010-12-12 17:02:50.000000000 +0100
-@@ -476,6 +476,7 @@
- MD_Update(&m,(unsigned char *)&(md_c[0]),sizeof(md_c));
+---
+ crypto/rand/md_rand.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/crypto/rand/md_rand.c
++++ b/crypto/rand/md_rand.c
+@@ -480,6 +480,7 @@ int ssleay_rand_bytes(unsigned char *buf
+ MD_Update(&m, (unsigned char *)&(md_c[0]), sizeof(md_c));
- #ifndef PURIFY /* purify complains */
+ #ifndef PURIFY /* purify complains */
+#if 0
- /* The following line uses the supplied buffer as a small
- * source of entropy: since this buffer is often uninitialised
- * it may cause programs such as purify or valgrind to
-@@ -485,6 +486,7 @@
- */
- MD_Update(&m,buf,j);
+ /*
+ * The following line uses the supplied buffer as a small source of
+ * entropy: since this buffer is often uninitialised it may cause
+@@ -489,6 +490,7 @@ int ssleay_rand_bytes(unsigned char *buf
+ */
+ MD_Update(&m, buf, j);
#endif
+#endif
- k=(st_idx+MD_DIGEST_LENGTH/2)-st_num;
- if (k > 0)
+ k = (st_idx + MD_DIGEST_LENGTH / 2) - st_num;
+ if (k > 0) {
Modified: openssl/branches/jessie_stable/debian/patches/version-script.patch
===================================================================
--- openssl/branches/jessie_stable/debian/patches/version-script.patch 2016-05-01 19:56:52 UTC (rev 775)
+++ openssl/branches/jessie_stable/debian/patches/version-script.patch 2016-05-01 20:00:01 UTC (rev 776)
@@ -1,8 +1,13 @@
-Index: openssl-1.0.1d/Configure
-===================================================================
---- openssl-1.0.1d.orig/Configure 2013-02-06 19:41:43.000000000 +0100
-+++ openssl-1.0.1d/Configure 2013-02-06 19:41:43.000000000 +0100
-@@ -1621,6 +1621,8 @@
+---
+ Configure | 2
+ engines/ccgost/openssl.ld | 10
+ engines/openssl.ld | 10
+ openssl.ld | 4626 ++++++++++++++++++++++++++++++++++++++++++++++
+ 4 files changed, 4648 insertions(+)
+
+--- a/Configure
++++ b/Configure
+@@ -1635,6 +1635,8 @@ if ($strict_warnings)
}
}
@@ -11,10 +16,34 @@
open(IN,'<Makefile.org') || die "unable to read Makefile.org:$!\n";
unlink("$Makefile.new") || die "unable to remove old $Makefile.new:$!\n" if -e "$Makefile.new";
open(OUT,">$Makefile.new") || die "unable to create $Makefile.new:$!\n";
-Index: openssl-1.0.1d/openssl.ld
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ openssl-1.0.1d/openssl.ld 2013-02-06 19:44:25.000000000 +0100
+--- /dev/null
++++ b/engines/ccgost/openssl.ld
+@@ -0,0 +1,10 @@
++OPENSSL_1.0.0 {
++ global:
++ bind_engine;
++ v_check;
++ OPENSSL_init;
++ OPENSSL_finish;
++ local:
++ *;
++};
++
+--- /dev/null
++++ b/engines/openssl.ld
+@@ -0,0 +1,10 @@
++OPENSSL_1.0.0 {
++ global:
++ bind_engine;
++ v_check;
++ OPENSSL_init;
++ OPENSSL_finish;
++ local:
++ *;
++};
++
+--- /dev/null
++++ b/openssl.ld
@@ -0,0 +1,4626 @@
+OPENSSL_1.0.0 {
+ global:
@@ -4642,33 +4671,3 @@
+ SRP_user_pwd_free;
+} OPENSSL_1.0.1d;
+
-Index: openssl-1.0.1d/engines/openssl.ld
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ openssl-1.0.1d/engines/openssl.ld 2013-02-06 19:41:43.000000000 +0100
-@@ -0,0 +1,10 @@
-+OPENSSL_1.0.0 {
-+ global:
-+ bind_engine;
-+ v_check;
-+ OPENSSL_init;
-+ OPENSSL_finish;
-+ local:
-+ *;
-+};
-+
-Index: openssl-1.0.1d/engines/ccgost/openssl.ld
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ openssl-1.0.1d/engines/ccgost/openssl.ld 2013-02-06 19:41:43.000000000 +0100
-@@ -0,0 +1,10 @@
-+OPENSSL_1.0.0 {
-+ global:
-+ bind_engine;
-+ v_check;
-+ OPENSSL_init;
-+ OPENSSL_finish;
-+ local:
-+ *;
-+};
-+
More information about the Pkg-openssl-changes
mailing list