~ubuntu-branches/ubuntu/trusty/openssl/trusty

« back to all changes in this revision

Viewing changes to debian/patches/req_bits.patch

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2014-01-08 15:57:24 UTC
  • mfrom: (11.1.46 sid)
  • Revision ID: package-import@ubuntu.com-20140108155724-kl61on9fyqmod2z9
Tags: 1.0.1f-1ubuntu1
* Merge with Debian, remaining changes.
  - debian/libssl1.0.0.postinst:
    + Display a system restart required notification on libssl1.0.0
      upgrade on servers.
    + Use a different priority for libssl1.0.0/restart-services depending
      on whether a desktop, or server dist-upgrade is being performed.
  - debian/{libssl1.0.0-udeb.dirs, control, rules}: Create
    libssl1.0.0-udeb, for the benefit of wget-udeb (no wget-udeb package
    in Debian).
  - debian/{libcrypto1.0.0-udeb.dirs, libssl1.0.0.dirs, libssl1.0.0.files,
    rules}: Move runtime libraries to /lib, for the benefit of
    wpasupplicant.
  - debian/patches/perlpath-quilt.patch: Don't change perl #! paths under
    .pc.
  - debian/rules:
    + Don't run 'make test' when cross-building.
    + Use host compiler when cross-building.  Patch from Neil Williams.
    + Don't build for processors no longer supported: i586 (on i386)
    + Fix Makefile to properly clean up libs/ dirs in clean target.
    + Replace duplicate files in the doc directory with symlinks.
  - debian/control: Mark Debian Vcs-* as XS-Debian-Vcs-*
  - debian/patches/ubuntu_deb676533_arm_asm.patch: Enable arm assembly
    code.
  - debian/rules: Enable optimized 64bit elliptic curve code contributed
    by Google.
* Dropped changes:
  - debian/patches/arm64-support: included in debian-targets.patch
  - debian/patches/no_default_rdrand.patch: upstream
  - debian/patches/openssl-1.0.1e-env-zlib.patch: zlib is now completely
    disabled in debian/rules

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From: Kurt Roeckx <kurt@roeckx.be>
 
2
Date: Sun, 22 Dec 2013 19:10:21 +0100
 
3
Subject: Use defaults bits in req when not given
 
4
Bug: http://rt.openssl.org/Ticket/Display.html?id=2592&user=guest&pass=guest
 
5
 
 
6
Index: openssl-1.0.1e/apps/req.c
 
7
===================================================================
 
8
--- openssl-1.0.1e.orig/apps/req.c      2013-12-22 19:47:42.355657810 +0100
 
9
+++ openssl-1.0.1e/apps/req.c   2013-12-22 19:57:12.287547599 +0100
 
10
@@ -644,6 +644,11 @@
 
11
                if (inrand)
 
12
                        app_RAND_load_files(inrand);
 
13
 
 
14
+               if (!NCONF_get_number(req_conf,SECTION,BITS, &newkey))
 
15
+                       {
 
16
+                       newkey=DEFAULT_KEY_LENGTH;
 
17
+                       }
 
18
+
 
19
                if (keyalg)
 
20
                        {
 
21
                        genctx = set_keygen_ctx(bio_err, keyalg, &pkey_type, &newkey,
 
22
@@ -652,12 +657,6 @@
 
23
                                goto end;
 
24
                        }
 
25
        
 
26
-               if (newkey <= 0)
 
27
-                       {
 
28
-                       if (!NCONF_get_number(req_conf,SECTION,BITS, &newkey))
 
29
-                               newkey=DEFAULT_KEY_LENGTH;
 
30
-                       }
 
31
-
 
32
                if (newkey < MIN_KEY_LENGTH && (pkey_type == EVP_PKEY_RSA || pkey_type == EVP_PKEY_DSA))
 
33
                        {
 
34
                        BIO_printf(bio_err,"private key length is too short,\n");
 
35
@@ -1649,6 +1648,8 @@
 
36
                                keylen = atol(p + 1);
 
37
                                *pkeylen = keylen;
 
38
                                }
 
39
+                       else
 
40
+                               keylen = *pkeylen;
 
41
                        }
 
42
                else if (p)
 
43
                        paramfile = p + 1;