gnu: paredit: Rename to 'emacs-paredit'.
[jackhill/guix/guix.git] / gnu / packages / tls.scm
index 45c37f7..efc1190 100644 (file)
@@ -6,7 +6,7 @@
 ;;; Copyright © 2015 David Thompson <davet@gnu.org>
 ;;; Copyright © 2015 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2016 Nils Gillmann <niasterisk@grrlz.net>
+;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -36,6 +36,7 @@
   #:use-module (gnu packages guile)
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages libidn)
+  #:use-module (gnu packages linux)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages nettle)
   #:use-module (gnu packages perl)
@@ -108,7 +109,7 @@ living in the same process.")
 (define-public gnutls
   (package
     (name "gnutls")
-    (version "3.5.0")
+    (version "3.5.2")
     (source (origin
              (method url-fetch)
              (uri
@@ -119,7 +120,7 @@ living in the same process.")
                              "/gnutls-" version ".tar.xz"))
              (sha256
               (base32
-               "09dfb0fn4spmdja6hs2yl470fn85fx0pa5nn9njnq7j19ma3nszw"))))
+               "10l5pv7qc5c850aamih3pdkbqpc4v2a6g164dzd7c7fjpxffji9b"))))
     (build-system gnu-build-system)
     (arguments
      '(#:configure-flags
@@ -158,7 +159,8 @@ living in the same process.")
                "debug"
                "doc"))                            ;4.1 MiB of man pages
     (native-inputs
-     `(("pkg-config" ,pkg-config)
+     `(("net-tools" ,net-tools)
+       ("pkg-config" ,pkg-config)
        ("which" ,which)))
     (inputs
      `(("guile" ,guile-2.0)
@@ -195,7 +197,9 @@ required structures.")
               (base32
                "06996ds1rk8xhnyb5y273a7xkcxhggp4bq1g02rab55d7bjhfh0x"))
              (patches (search-patches "openssl-runpath.patch"
-                                      "openssl-c-rehash-in.patch"))))
+                                      "openssl-c-rehash-in.patch"
+                                      "openssl-CVE-2016-2177.patch"
+                                      "openssl-CVE-2016-2178.patch"))))
    (build-system gnu-build-system)
    (outputs '("out"
               "doc"                               ;1.5MiB of man3 pages
@@ -319,10 +323,45 @@ required structures.")
    (license license:openssl)
    (home-page "http://www.openssl.org/")))
 
+(define-public openssl-next
+  (package
+    (inherit openssl)
+    (name "openssl")
+    (version "1.1.0")
+    (source (origin
+             (method url-fetch)
+             (uri (list (string-append "ftp://ftp.openssl.org/source/"
+                                       name "-" version ".tar.gz")
+                        (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"))
+              (sha256
+               (base32
+                "10lcpmnxap9nw8ymdglys93cgkwd1lf1rz4fhq5whwhlmkwrzipm"))))
+    (outputs '("out"
+               "doc"        ;1.3MiB of man3 pages
+               "static"))   ; 5.5MiB 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.
+
+           (add-after 'configure 'patch-runpath
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
+                 (substitute* "Makefile.shared"
+                   (("\\$\\$\\{SHAREDCMD\\} \\$\\$\\{SHAREDFLAGS\\}")
+                    (string-append "$${SHAREDCMD} $${SHAREDFLAGS}"
+                                   " -Wl,-rpath," lib)))
+                 #t)))))))))
+
 (define-public libressl
   (package
     (name "libressl")
-    (version "2.3.4")
+    (version "2.4.2")
     (source
      (origin
       (method url-fetch)
@@ -331,7 +370,7 @@ required structures.")
              version ".tar.gz"))
       (sha256
        (base32
-        "1ag65pbvdikqj5y1w780jicl3ngi9ld2332ki6794y0gcar3a4bs"))))
+        "1qyrcyzrrn6r9cqvm66ib72qyr65q4hrdyiq1vb24a6nwmwdg1sz"))))
     (build-system gnu-build-system)
     (native-search-paths
       ;; FIXME: These two variables must designate a single file or directory
@@ -359,16 +398,16 @@ security, and applying best practice development processes.")
 (define-public python-acme
   (package
     (name "python-acme")
-    (version "0.8.0")
+    (version "0.8.1")
     (source (origin
               (method url-fetch)
               (uri (string-append
                      "https://pypi.python.org/packages/"
-                     "45/17/6fdcede92c7fe4d9c1ab9d7513ded5aa969a0b9c90f3d7b3b074cd37e898/"
+                     "f5/7a/11a99b5d1d1c692f6eed27cfab69e6ba4d2f0c2a461d2607e6a930ff2c68/"
                      "acme-" version ".tar.gz"))
       (sha256
         (base32
-         "1nk48p0pi6xmqpsqjvw6xkx5vv4vl33yzq67fpr33ci8fra6pa6z"))))
+         "17vx2miczpd8ww4xizmc0nca2c7jf04wnhfnswx2bxhb537lmsnk"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
@@ -421,16 +460,16 @@ security, and applying best practice development processes.")
 (define-public certbot
   (package
     (name "certbot")
-    (version "0.8.0")
+    (version "0.8.1")
     (source (origin
               (method url-fetch)
               (uri (string-append
                      "https://pypi.python.org/packages/"
-                     "da/b8/fa6d7f0f8c0d37944ca4a1940b1e933fc6673498995a45db03c034bb11dd/"
+                     "a2/3b/4756e6a0ceb14e084042a2a65c615d68d25621c6fd446d0fc10d14c4ce7d/"
                      name "-" version ".tar.gz"))
               (sha256
                (base32
-                "052338jdiy8dniskqxm2hzbca084ms0xqnjicshl6cpvhjs70g1w"))))
+                "0w972cf2mk74aji5d8dylg3jw6wczg01gb4asf3ndv8c64yxza3c"))))
     (build-system python-build-system)
     (arguments
      `(#:python ,python-2
@@ -526,3 +565,92 @@ finally access to the SSL api of the SSLeay/OpenSSL package so you can write
 servers or clients for more complicated applications.")
     (license (package-license perl))
     (home-page "http://search.cpan.org/~mikem/Net-SSLeay-1.66/")))
+
+(define-public perl-crypt-openssl-rsa
+ (package
+  (name "perl-crypt-openssl-rsa")
+  (version "0.28")
+  (source
+    (origin
+      (method url-fetch)
+      (uri (string-append
+             "mirror://cpan/authors/id/P/PE/PERLER/Crypt-OpenSSL-RSA-"
+             version
+             ".tar.gz"))
+      (sha256
+        (base32
+          "1gnpvv09b2gpifwdzc5jnhama3d1a4c39lzj9hcaicsb8rvzjmsk"))))
+  (build-system perl-build-system)
+  (inputs
+    `(("perl-crypt-openssl-bignum" ,perl-crypt-openssl-bignum)
+      ("perl-crypt-openssl-random" ,perl-crypt-openssl-random)
+      ("openssl" ,openssl)))
+  (arguments perl-crypt-arguments)
+  (home-page
+    "http://search.cpan.org/dist/Crypt-OpenSSL-RSA")
+  (synopsis
+    "RSA encoding and decoding, using the openSSL libraries")
+  (description "Crypt::OpenSSL::RSA does RSA encoding and decoding (using the
+OpenSSL libraries).")
+  (license (package-license perl))))
+
+(define perl-crypt-arguments
+   `(#:phases (modify-phases %standard-phases
+      (add-before 'configure 'patch-Makefile.PL
+        (lambda* (#:key inputs #:allow-other-keys)
+          (substitute* "Makefile.PL"
+            (("'LIBS'.*=>.*") (string-append "'LIBS' => ['-L"
+                                             (assoc-ref inputs "openssl")
+                                             "/lib -lcrypto'],")))
+          #t)))))
+
+(define-public perl-crypt-openssl-bignum
+ (package
+  (name "perl-crypt-openssl-bignum")
+  (version "0.06")
+  (source
+    (origin
+      (method url-fetch)
+      (uri (string-append
+             "mirror://cpan/authors/id/K/KM/KMX/Crypt-OpenSSL-Bignum-"
+             version
+             ".tar.gz"))
+      (sha256
+        (base32
+          "05yzrdglrrzp191krf77zrwfkmzrfwrsrx1vyskbj94522lszk67"))))
+  (build-system perl-build-system)
+  (inputs `(("openssl" ,openssl)))
+  (arguments perl-crypt-arguments)
+  (home-page
+    "http://search.cpan.org/dist/Crypt-OpenSSL-Bignum")
+  (synopsis
+    "OpenSSL's multiprecision integer arithmetic in Perl")
+  (description "Crypt::OpenSSL::Bignum provides multiprecision integer
+arithmetic in Perl.")
+  ;; At your option either gpl1+ or the Artistic License
+  (license (package-license perl))))
+
+(define-public perl-crypt-openssl-random
+ (package
+  (name "perl-crypt-openssl-random")
+  (version "0.11")
+  (source
+    (origin
+      (method url-fetch)
+      (uri (string-append
+             "mirror://cpan/authors/id/R/RU/RURBAN/Crypt-OpenSSL-Random-"
+             version
+             ".tar.gz"))
+      (sha256
+        (base32
+          "0yjcabkibrkafywvdkmd1xpi6br48skyk3l15ni176wvlg38335v"))))
+  (build-system perl-build-system)
+  (inputs `(("openssl" ,openssl)))
+  (arguments perl-crypt-arguments)
+  (home-page
+    "http://search.cpan.org/dist/Crypt-OpenSSL-Random")
+  (synopsis
+    "OpenSSL/LibreSSL pseudo-random number generator access")
+  (description "Crypt::OpenSSL::Random is a OpenSSL/LibreSSL pseudo-random
+number generator")
+  (license (package-license perl))))