Merge remote-tracking branch 'origin/master' into staging
[jackhill/guix/guix.git] / gnu / packages / tls.scm
index f638c60..8702d2b 100644 (file)
@@ -162,7 +162,7 @@ living in the same process.")
 (define-public gnutls
   (package
     (name "gnutls")
-    (version "3.5.18")
+    (version "3.6.5")
     (source (origin
              (method url-fetch)
              (uri
@@ -171,12 +171,19 @@ living in the same process.")
               (string-append "mirror://gnupg/gnutls/v"
                              (version-major+minor version)
                              "/gnutls-" version ".tar.xz"))
-             (patches
-              (search-patches "gnutls-skip-trust-store-test.patch"
-                              "gnutls-skip-pkgconfig-test.patch"))
+             (patches (search-patches "gnutls-skip-trust-store-test.patch"))
              (sha256
               (base32
-               "0d02x28fwkkx7xzn7807nww6idchizzq3plx8sfcyiw7wzclh8mf"))))
+               "0ddvg97dyrh8dkffv1mdc0knxx5my3qdbzv97s4a6jggmk9wwgh7"))
+             (modules '((guix build utils)))
+             (snippet
+              '(begin
+                 ;; XXX: The generated configure script in GnuTLS 3.6.5
+                 ;; apparently does not know about Guile 2.2.
+                 (substitute* "configure"
+                   (("guile_versions_to_search=\"2\\.0 1\\.8\"")
+                    "guile_versions_to_search=\"2.2 2.0 1.8\""))
+                 #t))))
     (build-system gnu-build-system)
     (arguments
      `(; Ensure we don't keep a reference to this buggy software.
@@ -262,7 +269,7 @@ required structures.")
 (define-public openssl
   (package
    (name "openssl")
-   (version "1.0.2o")
+   (version "1.0.2p")
    (source (origin
              (method url-fetch)
              (uri (list (string-append "https://www.openssl.org/source/openssl-"
@@ -274,10 +281,8 @@ required structures.")
                                        "/" name "-" version ".tar.gz")))
              (sha256
               (base32
-               "0kcy13l701054nhpbd901mz32v1kn4g311z0nifd83xs2jbmqgzc"))
+               "003xh9f898i56344vpvpxxxzmikivxig4xwlm7vbi7m8n43qxaah"))
              (patches (search-patches "openssl-runpath.patch"
-                                      "openssl-1.0.2-CVE-2018-0495.patch"
-                                      "openssl-1.0.2-CVE-2018-0732.patch"
                                       "openssl-c-rehash-in.patch"))))
    (build-system gnu-build-system)
    (outputs '("out"
@@ -319,15 +324,7 @@ required structures.")
                      (string-append "--openssldir=" out
                                     "/share/openssl-" ,version)
 
-                     (string-append "--prefix=" out)
-
-                     ;; XXX FIXME: Work around a code generation bug in GCC
-                     ;; 4.9.3 on ARM when compiled with -mfpu=neon.  See:
-                     ;; <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66917>
-                     ,@(if (and (not (%current-target-system))
-                                (string-prefix? "armhf" (%current-system)))
-                           '("-mfpu=vfpv3")
-                           '())))))
+                     (string-append "--prefix=" out)))))
         (add-after
          'install 'make-libraries-writable
          (lambda* (#:key outputs #:allow-other-keys)
@@ -404,7 +401,7 @@ required structures.")
   (package
     (inherit openssl)
     (name "openssl")
-    (version "1.1.0i")
+    (version "1.1.1a")
     (source (origin
              (method url-fetch)
              (uri (list (string-append "https://www.openssl.org/source/openssl-"
@@ -414,25 +411,30 @@ required structures.")
                         (string-append "ftp://ftp.openssl.org/source/old/"
                                        (string-trim-right version char-set:letter)
                                        "/" name "-" version ".tar.gz")))
-              (patches (search-patches "openssl-1.1.0-c-rehash-in.patch"))
+              (patches (search-patches "openssl-1.1-c-rehash-in.patch"))
               (sha256
                (base32
-                "16fgaf113p6s5ixw227sycvihh3zx6f6rf0hvjjhxk68m12cigzb"))))
+                "0hcz7znzznbibpy3iyyhvlqrq44y88plxwdj32wjzgbwic7i687w"))))
     (outputs '("out"
-               "doc"        ; 1.3MiB of man3 pages
-               "static"))   ; 5.5MiB of .a files
+               "doc"        ; 6.8 MiB of man3 pages and full HTML documentation
+               "static"))   ; 6.4 MiB of .a files
     (arguments
      (substitute-keyword-arguments (package-arguments openssl)
        ((#:phases phases)
         `(modify-phases ,phases
            (delete 'patch-tests)          ; These two phases are not needed by
-           (delete 'patch-Makefile.org)   ; OpenSSL 1.1.0.
+           (delete 'patch-Makefile.org)   ; OpenSSL 1.1.
 
            ;; Override configure phase since -rpath is now a configure option.
            (replace 'configure
              (lambda* (#:key outputs #:allow-other-keys)
                (let* ((out (assoc-ref outputs "out"))
                       (lib (string-append out "/lib")))
+                 ;; It's not a shebang so patch-source-shebangs misses it.
+                 (substitute* "config"
+                   (("/usr/bin/env")
+                    (string-append (assoc-ref %build-inputs "coreutils")
+                                   "/bin/env")))
                  (invoke "./config"
                          "shared"       ;build shared libraries
                          "--libdir=lib"
@@ -454,6 +456,21 @@ required structures.")
                                '("-mfpu=vfpv3")
                                '())))))
 
+           (delete 'move-man3-pages)
+           (add-after 'install 'move-extra-documentation
+             (lambda* (#:key outputs #:allow-other-keys)
+               ;; Move man3 pages and full HTML documentation to "doc".
+               (let* ((out    (assoc-ref outputs "out"))
+                      (man3   (string-append out "/share/man/man3"))
+                      (html (string-append out "/share/doc/openssl"))
+                      (doc    (assoc-ref outputs "doc"))
+                      (man-target (string-append doc "/share/man/man3"))
+                      (html-target (string-append doc "/share/doc/openssl")))
+                 (copy-recursively man3 man-target)
+                 (delete-file-recursively man3)
+                 (copy-recursively html html-target)
+                 (delete-file-recursively html)
+                 #t)))
            ;; XXX: Duplicate this phase to make sure 'version' evaluates
            ;; in the current scope and not the inherited one.
            (replace 'remove-miscellany
@@ -512,20 +529,20 @@ netcat implementation that supports TLS.")
   (package
     (name "python-acme")
     ;; Remember to update the hash of certbot when updating python-acme.
-    (version "0.26.1")
+    (version "0.29.1")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "acme" version))
               (sha256
                (base32
-                "1glhwqj6yyb11820lspgd0gl5dqdfljn43kcy4ar5caccpsbbrw6"))))
+                "0z5l966b1asbcdzl77bmywf22c1q0xill00jj7qyml9wx2nh7qm2"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
        (modify-phases %standard-phases
          (add-after 'build 'build-documentation
            (lambda _
-             (zero? (system* "make" "-C" "docs" "man" "info"))))
+             (invoke "make" "-C" "docs" "man" "info")))
          (add-after 'install 'install-documentation
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
@@ -569,7 +586,7 @@ netcat implementation that supports TLS.")
               (uri (pypi-uri name version))
               (sha256
                (base32
-                "0rnayqhdabm0rljxh76blqd11h51dqnwlwvql0j6xwzpccym30s9"))))
+                "14i6yrcb9s7ygy99gccfc8jscymi24xb72s5lgg9b2y40z909ikg"))))
     (build-system python-build-system)
     (arguments
      `(,@(substitute-keyword-arguments (package-arguments python-acme)
@@ -655,7 +672,7 @@ servers or clients for more complicated applications.")
 (define-public perl-crypt-openssl-rsa
  (package
   (name "perl-crypt-openssl-rsa")
-  (version "0.30")
+  (version "0.31")
   (source
     (origin
       (method url-fetch)
@@ -665,7 +682,7 @@ servers or clients for more complicated applications.")
              ".tar.gz"))
       (sha256
         (base32
-          "1b19kaaw4wda8dy6kjiwqa2prpbs2dqcyjyj9zdh5wbs74qkbq93"))))
+          "0djl5i6kibl7862b6ih29q8dhg5zpwzq77q9j8hp6xngshx40ws1"))))
   (build-system perl-build-system)
   (native-inputs
    `(("perl-crypt-openssl-guess" ,perl-crypt-openssl-guess)))
@@ -816,7 +833,7 @@ then ported to the GNU / Linux environment.")
 (define-public mbedtls-apache
   (package
     (name "mbedtls-apache")
-    (version "2.7.5")
+    (version "2.16.0")
     (source
      (origin
        (method url-fetch)
@@ -826,13 +843,14 @@ then ported to the GNU / Linux environment.")
                            version "-apache.tgz"))
        (sha256
         (base32
-         "0h4vks2z68bkwzg093mn0a7aqsva8rxr4m971n4bkasa17cjlc51"))))
+         "1qlscr0m97favkqmrlj90rlgw40h8lcypxz0snvr1iwkj1pbbnp3"))))
     (build-system cmake-build-system)
     (arguments
      `(#:configure-flags
        (list "-DUSE_SHARED_MBEDTLS_LIBRARY=ON")))
     (native-inputs
-     `(("perl" ,perl)))
+     `(("perl" ,perl)
+       ("python" ,python)))
     (synopsis "Small TLS library")
     (description
      "@code{mbed TLS}, formerly known as PolarSSL, makes it trivially easy
@@ -842,21 +860,38 @@ coding footprint.")
     (home-page "https://tls.mbed.org")
     (license license:asl2.0)))
 
+;; The Hiawatha Web server requires some specific features to be enabled.
+(define-public mbedtls-for-hiawatha
+  (hidden-package
+   (package
+     (inherit mbedtls-apache)
+     (arguments
+      (substitute-keyword-arguments
+          `(#:phases
+            (modify-phases %standard-phases
+              (add-after 'configure 'configure-extra-features
+                (lambda _
+                  (for-each (lambda (feature)
+                              (invoke "scripts/config.pl" "set" feature))
+                            (list "MBEDTLS_THREADING_C"
+                                  "MBEDTLS_THREADING_PTHREAD"))
+                  #t)))
+            ,@(package-arguments mbedtls-apache)))))))
+
 (define-public ghc-tls
   (package
     (name "ghc-tls")
-    (version "1.3.8")
+    (version "1.4.1")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://hackage.haskell.org/package/"
                                   "tls/tls-" version ".tar.gz"))
               (sha256
                (base32
-                "1rdidf18i781c0vdvy9yn79yh08hmcacf6fp3sgghyiy3h0wyh5l"))))
+                "1y083724mym28n6xfaz7pcc7zqxdhjpaxpbvzxfbs25qq2px3smv"))))
     (build-system haskell-build-system)
     (inputs
-     `(("ghc-mtl" ,ghc-mtl)
-       ("ghc-cereal" ,ghc-cereal)
+     `(("ghc-cereal" ,ghc-cereal)
        ("ghc-data-default-class" ,ghc-data-default-class)
        ("ghc-memory" ,ghc-memory)
        ("ghc-cryptonite" ,ghc-cryptonite)