1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
5 ;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
6 ;;; Copyright © 2015 David Thompson <davet@gnu.org>
7 ;;; Copyright © 2015, 2016, 2017 Leo Famulari <leo@famulari.name>
8 ;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
9 ;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net>
10 ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
11 ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
13 ;;; This file is part of GNU Guix.
15 ;;; GNU Guix is free software; you can redistribute it and/or modify it
16 ;;; under the terms of the GNU General Public License as published by
17 ;;; the Free Software Foundation; either version 3 of the License, or (at
18 ;;; your option) any later version.
20 ;;; GNU Guix is distributed in the hope that it will be useful, but
21 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;;; GNU General Public License for more details.
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28 (define-module (gnu packages tls)
29 #:use-module ((guix licenses) #:prefix license:)
30 #:use-module (guix packages)
31 #:use-module (guix download)
32 #:use-module (guix utils)
33 #:use-module (guix build-system gnu)
34 #:use-module (guix build-system perl)
35 #:use-module (guix build-system python)
36 #:use-module (guix build-system cmake)
37 #:use-module (gnu packages compression)
38 #:use-module (gnu packages)
39 #:use-module (gnu packages guile)
40 #:use-module (gnu packages libbsd)
41 #:use-module (gnu packages libffi)
42 #:use-module (gnu packages libidn)
43 #:use-module (gnu packages linux)
44 #:use-module (gnu packages ncurses)
45 #:use-module (gnu packages nettle)
46 #:use-module (gnu packages perl)
47 #:use-module (gnu packages pkg-config)
48 #:use-module (gnu packages python)
49 #:use-module (gnu packages texinfo)
50 #:use-module (gnu packages base)
51 #:use-module (srfi srfi-1))
53 (define-public libtasn1
56 (replacement libtasn1/fixed)
61 (uri (string-append "mirror://gnu/libtasn1/libtasn1-"
65 "00jsix5hny0g768zv4hk78dib7w0qmk5fbizf4jj37r51nd4s6k8"))))
66 (build-system gnu-build-system)
67 (native-inputs `(("perl" ,perl)))
68 (home-page "https://www.gnu.org/software/libtasn1/")
69 (synopsis "ASN.1 library")
71 "GNU libtasn1 is a library implementing the ASN.1 notation. It is used
72 for transmitting machine-neutral encodings of data objects in computer
73 networking, allowing for formal validation of data according to some
75 (license license:lgpl2.0+)))
77 (define libtasn1/fixed
82 (inherit (package-source libtasn1))
84 (search-patches "libtasn1-CVE-2017-6891.patch"
85 "libtasn1-CVE-2017-10790.patch"))))))
93 (uri (string-append "https://lionet.info/soft/asn1c-"
97 "1fc64g45ykmv73kdndr4zdm4wxhimhrir4rxnygxvwkych5l81w0"))))
98 (build-system gnu-build-system)
101 (home-page "https://lionet.info/asn1c")
102 (synopsis "ASN.1 to C compiler")
103 (description "The ASN.1 to C compiler takes ASN.1 module
104 files and generates C++ compatible C source code. That code can be
105 used to serialize the native C structures into compact and unambiguous
106 BER/XER/PER-based data files, and deserialize the files back.
108 Various ASN.1 based formats are widely used in the industry, such as to encode
109 the X.509 certificates employed in the HTTPS handshake, to exchange control
110 data between mobile phones and cellular networks, to car-to-car communication
111 in intelligent transportation networks.")
112 (license license:bsd-2)))
114 (define-public p11-kit
121 (uri (string-append "https://github.com/p11-glue/p11-kit/releases/"
122 "download/" version "/p11-kit-" version ".tar.gz"))
125 "0hdy4h8byvcvd4av504xqfqyd1h6xy914j034mq3c6v4ya37r3lq"))))
126 (build-system gnu-build-system)
128 `(("pkg-config" ,pkg-config)))
131 ("libtasn1" ,libtasn1)))
133 `(#:configure-flags '("--without-trust-paths")))
134 (home-page "http://p11-glue.freedesktop.org/p11-kit.html")
135 (synopsis "PKCS#11 library")
137 "p11-kit provides a way to load and enumerate PKCS#11 modules. It
138 provides a standard configuration setup for installing PKCS#11 modules
139 in such a way that they are discoverable. It also solves problems with
140 coordinating the use of PKCS#11 by different components or libraries
141 living in the same process.")
142 (license license:bsd-3)))
145 ;; TODO Add net-tools-for-tests to #:disallowed-references when we can afford
146 ;; rebuild GnuTLS (i.e. core-updates).
147 (define-public gnutls
150 (replacement gnutls-3.5.13)
155 ;; Note: Releases are no longer on ftp.gnu.org since the
156 ;; schism (after version 3.1.5).
157 (string-append "mirror://gnupg/gnutls/v"
158 (version-major+minor version)
159 "/gnutls-" version ".tar.xz"))
162 "0l9971841jsfdcvcyhas17sk5rsby6x5vvwcmmj4x3zi9q60zcc2"))))
163 (build-system gnu-build-system)
166 (list (string-append "--with-guile-site-dir="
167 (assoc-ref %outputs "out")
168 "/share/guile/site/2.0")
169 ;; GnuTLS doesn't consult any environment variables to specify
170 ;; the location of the system-wide trust store. Instead it has a
171 ;; configure-time option. Unless specified, its configure script
172 ;; attempts to auto-detect the location by looking for common
173 ;; places in the file system, none of which are present in our
174 ;; chroot build environment. If not found, then no default trust
175 ;; store is used, so each program has to provide its own
176 ;; fallback, and users have to configure each program
177 ;; independently. This seems suboptimal.
178 "--with-default-trust-store-dir=/etc/ssl/certs"
180 ;; FIXME: Temporarily disable p11-kit support since it is not
181 ;; working on mips64el.
184 #:phases (modify-phases %standard-phases
187 (lambda* (#:key outputs #:allow-other-keys)
188 ;; Copy the 4.1 MiB of section 3 man pages to "doc".
189 (let* ((out (assoc-ref outputs "out"))
190 (doc (assoc-ref outputs "doc"))
191 (mandir (string-append doc "/share/man/man3"))
192 (oldman (string-append out "/share/man/man3")))
194 (copy-recursively oldman mandir)
195 (delete-file-recursively oldman)
197 (outputs '("out" ;4.4 MiB
199 "doc")) ;4.1 MiB of man pages
201 `(("net-tools" ,net-tools-for-tests)
202 ("pkg-config" ,pkg-config)
205 `(("guile" ,guile-2.0)))
207 ;; These are all in the 'Requires.private' field of gnutls.pc.
208 `(("libtasn1" ,libtasn1)
212 (home-page "https://www.gnu.org/software/gnutls/")
213 (synopsis "Transport layer security library")
215 "GnuTLS is a secure communications library implementing the SSL, TLS
216 and DTLS protocols. It is provided in the form of a C library to support the
217 protocols, as well as to parse and write X.5009, PKCS 12, OpenPGP and other
218 required structures.")
219 (license license:lgpl2.1+)
220 (properties '((ftp-server . "ftp.gnutls.org")
221 (ftp-directory . "/gcrypt/gnutls")))))
223 (define gnutls-3.5.13 ;GNUTLS-SA-2017-{3,4}
226 ;; We use 'D' instead of '13' here to keep the store file name at
227 ;; the same length. See <https://bugs.gnu.org/27308>.
232 (string-append "mirror://gnupg/gnutls/v"
233 (version-major+minor version)
234 "/gnutls-3.5.13.tar.xz"))
236 (search-patches "gnutls-skip-trust-store-test.patch"
237 "gnutls-skip-pkgconfig-test.patch"))
240 "15ihq6p0hnnhs8cnjrkj40dmlcaa1jjg8xg0g2ydbnlqs454ixbr"))))))
242 (define-public gnutls/guile-2.2
243 ;; GnuTLS for Guile 2.2. This is supported by GnuTLS >= 3.5.5.
246 (source (package-source gnutls-3.5.13))
247 (name "guile2.2-gnutls")
249 ;; Remove '--with-guile-site-dir=…/2.0'.
250 (substitute-keyword-arguments (package-arguments gnutls)
251 ((#:configure-flags flags)
253 (inputs `(("guile" ,guile-2.2)
254 ,@(alist-delete "guile" (package-inputs gnutls))))))
256 (define-public openssl
262 (uri (list (string-append "ftp://ftp.openssl.org/source/"
263 name "-" version ".tar.gz")
264 (string-append "ftp://ftp.openssl.org/source/old/"
265 (string-trim-right version char-set:letter)
266 "/" name "-" version ".tar.gz")))
269 "1h6qi35w6hv6rd73p4cdgdzg732pdrfgpp37cgwz1v9a3z37ffbb"))
270 (patches (search-patches "openssl-runpath.patch"
271 "openssl-c-rehash-in.patch"))))
272 (build-system gnu-build-system)
274 "doc" ;1.5MiB of man3 pages
275 "static")) ;6MiB of .a files
276 (native-inputs `(("perl" ,perl)))
278 `(#:disallowed-references (,perl)
283 ;; Changes to OpenSSL sometimes cause Perl to "sneak in" to the closure,
284 ;; so we explicitly disallow it here.
285 #:disallowed-references ,(list (canonical-package perl))
287 (modify-phases %standard-phases
289 'configure 'patch-Makefile.org
290 (lambda* (#:key outputs #:allow-other-keys)
291 ;; The default MANDIR is some unusual place. Fix that.
292 (let ((out (assoc-ref outputs "out")))
293 (patch-makefile-SHELL "Makefile.org")
294 (substitute* "Makefile.org"
295 (("^MANDIR[[:blank:]]*=.*$")
296 (string-append "MANDIR = " out "/share/man\n")))
300 (lambda* (#:key outputs #:allow-other-keys)
301 (let ((out (assoc-ref outputs "out")))
304 "shared" ;build shared libraries
307 ;; The default for this catch-all directory is
308 ;; PREFIX/ssl. Change that to something more
310 (string-append "--openssldir=" out
311 "/share/openssl-" ,version)
313 (string-append "--prefix=" out)
315 ;; XXX FIXME: Work around a code generation bug in GCC
316 ;; 4.9.3 on ARM when compiled with -mfpu=neon. See:
317 ;; <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66917>
318 ,@(if (and (not (%current-target-system))
319 (string-prefix? "armhf" (%current-system)))
323 'install 'make-libraries-writable
324 (lambda* (#:key outputs #:allow-other-keys)
325 ;; Make libraries writable so that 'strip' does its job.
326 (let ((out (assoc-ref outputs "out")))
327 (for-each (lambda (file)
329 (find-files (string-append out "/lib")
332 (add-after 'install 'move-static-libraries
333 (lambda* (#:key outputs #:allow-other-keys)
334 ;; Move static libraries to the "static" output.
335 (let* ((out (assoc-ref outputs "out"))
336 (lib (string-append out "/lib"))
337 (static (assoc-ref outputs "static"))
338 (slib (string-append static "/lib")))
339 (for-each (lambda (file)
340 (install-file file slib)
342 (find-files lib "\\.a$"))
344 (add-after 'install 'move-man3-pages
345 (lambda* (#:key outputs #:allow-other-keys)
346 ;; Move section 3 man pages to "doc".
347 (let* ((out (assoc-ref outputs "out"))
348 (man3 (string-append out "/share/man/man3"))
349 (doc (assoc-ref outputs "doc"))
350 (target (string-append doc "/share/man/man3")))
352 (for-each (lambda (file)
354 (string-append target "/"
357 (delete-file-recursively man3)
360 'patch-source-shebangs 'patch-tests
361 (lambda* (#:key inputs native-inputs #:allow-other-keys)
362 (let ((bash (assoc-ref (or native-inputs inputs) "bash")))
363 (substitute* (find-files "test" ".*")
365 (string-append bash "/bin/sh"))
370 'install 'remove-miscellany
371 (lambda* (#:key outputs #:allow-other-keys)
372 ;; The 'misc' directory contains random undocumented shell and Perl
373 ;; scripts. Remove them to avoid retaining a reference on Perl.
374 (let ((out (assoc-ref outputs "out")))
375 (delete-file-recursively (string-append out "/share/openssl-"
379 ;; FIXME: These two variables must designate a single file or directory
380 ;; and are not actually "search paths." In practice it works OK in user
381 ;; profiles because there's always just one item that matches the
383 (list (search-path-specification
384 (variable "SSL_CERT_DIR")
385 (files '("etc/ssl/certs")))
386 (search-path-specification
387 (variable "SSL_CERT_FILE")
388 (files '("etc/ssl/certs/ca-certificates.crt")))))
389 (synopsis "SSL/TLS implementation")
391 "OpenSSL is an implementation of SSL/TLS.")
392 (license license:openssl)
393 (home-page "http://www.openssl.org/")))
395 (define-public openssl-next
402 (uri (list (string-append "ftp://ftp.openssl.org/source/"
403 name "-" version ".tar.gz")
404 (string-append "ftp://ftp.openssl.org/source/old/"
405 (string-trim-right version char-set:letter)
406 "/" name "-" version ".tar.gz")))
407 (patches (search-patches "openssl-1.1.0-c-rehash-in.patch"))
410 "0r97n4n552ns571diz54qsgarihrxvbn7kvyv8wjyfs9ybrldxqj"))))
412 "doc" ;1.3MiB of man3 pages
413 "static")) ; 5.5MiB of .a files
415 (substitute-keyword-arguments (package-arguments openssl)
417 `(modify-phases ,phases
418 (delete 'patch-tests) ; These two phases are not needed by
419 (delete 'patch-Makefile.org) ; OpenSSL 1.1.0.
421 ;; Override configure phase since -rpath is now a configure option.
423 (lambda* (#:key outputs #:allow-other-keys)
424 (let* ((out (assoc-ref outputs "out"))
425 (lib (string-append out "/lib")))
428 "shared" ;build shared libraries
431 ;; The default for this catch-all directory is
432 ;; PREFIX/ssl. Change that to something more
434 (string-append "--openssldir=" out
435 "/share/openssl-" ,version)
437 (string-append "--prefix=" out)
438 (string-append "-Wl,-rpath," lib)
440 ;; XXX FIXME: Work around a code generation bug in GCC
441 ;; 4.9.3 on ARM when compiled with -mfpu=neon. See:
442 ;; <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66917>
443 ,@(if (and (not (%current-target-system))
444 (string-prefix? "armhf" (%current-system)))
448 ;; XXX: Duplicate this phase to make sure 'version' evaluates
449 ;; in the current scope and not the inherited one.
450 (replace 'remove-miscellany
451 (lambda* (#:key outputs #:allow-other-keys)
452 ;; The 'misc' directory contains random undocumented shell and Perl
453 ;; scripts. Remove them to avoid retaining a reference on Perl.
454 (let ((out (assoc-ref outputs "out")))
455 (delete-file-recursively (string-append out "/share/openssl-"
459 (define-public libressl
465 (uri (string-append "mirror://openbsd/LibreSSL/"
466 name "-" version ".tar.gz"))
469 "1i77viqy1afvbr392npk9v54k9zhr9zq2vhv6pliza22b0ymwzz5"))))
470 (build-system gnu-build-system)
472 ;; Do as if 'getentropy' was missing since older Linux kernels lack it
473 ;; and libc would return ENOSYS, which is not properly handled.
474 ;; See <https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00235.html>.
475 '(#:configure-flags '("ac_cv_func_getentropy=no"
476 ;; Provide a TLS-enabled netcat.
479 ;; FIXME: These two variables must designate a single file or directory
480 ;; and are not actually "search paths." In practice it works OK in
481 ;; user profiles because there's always just one item that matches the
483 (list (search-path-specification
484 (variable "SSL_CERT_DIR")
485 (files '("etc/ssl/certs")))
486 (search-path-specification
487 (variable "SSL_CERT_FILE")
488 (files '("etc/ssl/certs/ca-certificates.crt")))))
489 (home-page "https://www.libressl.org/")
490 (synopsis "SSL/TLS implementation")
491 (description "LibreSSL is a version of the TLS/crypto stack, forked from
492 OpenSSL in 2014 with the goals of modernizing the codebase, improving security,
493 and applying best practice development processes. This package also includes a
494 netcat implementation that supports TLS.")
495 ;; Files taken from OpenSSL keep their license, others are under various
496 ;; non-copyleft licenses.
497 (license (list license:openssl
498 (license:non-copyleft
500 "See COPYING in the distribution.")))))
502 (define-public python-acme
505 ;; Remember to update the hash of certbot when updating python-acme.
509 (uri (pypi-uri "acme" version))
512 "0vmnv7qhdhl9qhq03v6zrcj1lsmpmpjb94s0xsc7piwqxfmf9jrw"))))
513 (build-system python-build-system)
516 (modify-phases %standard-phases
517 (add-after 'build 'build-documentation
519 (zero? (system* "make" "-C" "docs" "man" "info"))))
520 (add-after 'install 'install-documentation
521 (lambda* (#:key outputs #:allow-other-keys)
522 (let* ((out (assoc-ref outputs "out"))
523 (man (string-append out "/share/man/man1"))
524 (info (string-append out "/info")))
525 (install-file "docs/_build/texinfo/acme-python.info" info)
526 (install-file "docs/_build/man/acme-python.1" man)
528 ;; TODO: Add optional inputs for testing.
530 `(("python-mock" ,python-mock-2)
532 ("python-sphinx" ,python-sphinx)
533 ("python-sphinxcontrib-programoutput" ,python-sphinxcontrib-programoutput)
534 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
535 ("texinfo" ,texinfo)))
537 `(("python-six" ,python-six)
538 ("python-requests" ,python-requests)
539 ("python-pytz" ,python-pytz)
540 ("python-pyrfc3339" ,python-pyrfc3339)
541 ("python-pyasn1" ,python-pyasn1)
542 ("python-cryptography" ,python-cryptography)
543 ("python-pyopenssl" ,python-pyopenssl)))
544 (home-page "https://github.com/letsencrypt/letsencrypt")
545 (synopsis "ACME protocol implementation in Python")
546 (description "ACME protocol implementation in Python")
547 (license license:asl2.0)))
549 (define-public python2-acme
550 (package-with-python2 python-acme))
552 (define-public certbot
555 ;; Certbot and python-acme are developed in the same repository, and their
556 ;; versions should remain synchronized.
557 (version (package-version python-acme))
560 (uri (pypi-uri name version))
563 "173619jkq4bg88f6i837z3pcjkrfabrvv8vrpyx18k9i7xnb5xa3"))))
564 (build-system python-build-system)
566 `(,@(substitute-keyword-arguments (package-arguments python-acme)
568 `(modify-phases ,phases
569 (replace 'install-documentation
570 (lambda* (#:key outputs #:allow-other-keys)
571 (let* ((out (assoc-ref outputs "out"))
572 (man1 (string-append out "/share/man/man1"))
573 (man7 (string-append out "/share/man/man7"))
574 (info (string-append out "/info")))
575 (install-file "docs/_build/texinfo/Certbot.info" info)
576 (install-file "docs/_build/man/certbot.1" man1)
577 (install-file "docs/_build/man/certbot.7" man7)
579 ;; TODO: Add optional inputs for testing.
581 `(("python-nose" ,python-nose)
582 ("python-mock" ,python-mock-2)
584 ("python-sphinx" ,python-sphinx)
585 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
586 ("python-sphinx-repoze-autointerface" ,python-sphinx-repoze-autointerface)
587 ("python-sphinxcontrib-programoutput" ,python-sphinxcontrib-programoutput)
588 ("texinfo" ,texinfo)))
590 `(("python-acme" ,python-acme)
591 ("python-zope-interface" ,python-zope-interface)
592 ("python-pyrfc3339" ,python-pyrfc3339)
593 ("python-pyopenssl" ,python-pyopenssl)
594 ("python-configobj" ,python-configobj)
595 ("python-configargparse" ,python-configargparse)
596 ("python-zope-component" ,python-zope-component)
597 ("python-parsedatetime" ,python-parsedatetime)
598 ("python-six" ,python-six)
599 ("python-psutil" ,python-psutil)
600 ("python-requests" ,python-requests)
601 ("python-pytz" ,python-pytz)))
602 (synopsis "Let's Encrypt client by the Electronic Frontier Foundation")
603 (description "Certbot automatically receives and installs X.509 certificates
604 to enable Transport Layer Security (TLS) on servers. It interoperates with the
605 Let’s Encrypt certificate authority (CA), which issues browser-trusted
606 certificates for free.")
607 (home-page "https://certbot.eff.org/")
608 (license license:asl2.0)))
610 (define-public letsencrypt
611 (package (inherit certbot)
613 (properties `((superseded . ,certbot)))))
615 (define-public perl-net-ssleay
617 (name "perl-net-ssleay")
621 (uri (string-append "mirror://cpan/authors/id/M/MI/MIKEM/"
622 "Net-SSLeay-" version ".tar.gz"))
625 "1m2wwzhjwsg0drlhp9w12fl6bsgj69v8gdz72jqrqll3qr7f408p"))))
626 (build-system perl-build-system)
629 ("patch/disable-ede-test"
630 ,(search-patch "perl-net-ssleay-disable-ede-test.patch"))))
631 (inputs `(("openssl" ,openssl)))
634 (modify-phases %standard-phases
637 (lambda* (#:key inputs #:allow-other-keys)
638 ;; XXX We apply this patch here instead of in the 'origin' because
639 ;; this package's build system fails badly when the source file
641 ;; XXX Try removing this patch for perl-net-ssleay > 1.68
642 (zero? (system* "patch" "--force" "-p1" "-i"
643 (assoc-ref inputs "patch/disable-ede-test")))))
645 'configure 'set-ssl-prefix
646 (lambda* (#:key inputs #:allow-other-keys)
647 (setenv "OPENSSL_PREFIX" (assoc-ref inputs "openssl"))
649 (synopsis "Perl extension for using OpenSSL")
651 "This module offers some high level convenience functions for accessing
652 web pages on SSL servers (for symmetry, the same API is offered for accessing
653 http servers, too), an sslcat() function for writing your own clients, and
654 finally access to the SSL api of the SSLeay/OpenSSL package so you can write
655 servers or clients for more complicated applications.")
656 (license license:perl-license)
657 (home-page "http://search.cpan.org/~mikem/Net-SSLeay-1.66/")))
659 (define-public perl-crypt-openssl-rsa
661 (name "perl-crypt-openssl-rsa")
667 "mirror://cpan/authors/id/P/PE/PERLER/Crypt-OpenSSL-RSA-"
672 "1gnpvv09b2gpifwdzc5jnhama3d1a4c39lzj9hcaicsb8rvzjmsk"))))
673 (build-system perl-build-system)
675 `(("perl-crypt-openssl-bignum" ,perl-crypt-openssl-bignum)
676 ("perl-crypt-openssl-random" ,perl-crypt-openssl-random)
677 ("openssl" ,openssl)))
678 (arguments perl-crypt-arguments)
680 "http://search.cpan.org/dist/Crypt-OpenSSL-RSA")
682 "RSA encoding and decoding, using the openSSL libraries")
683 (description "Crypt::OpenSSL::RSA does RSA encoding and decoding (using the
684 OpenSSL libraries).")
685 (license license:perl-license)))
687 (define perl-crypt-arguments
688 `(#:phases (modify-phases %standard-phases
689 (add-before 'configure 'patch-Makefile.PL
690 (lambda* (#:key inputs #:allow-other-keys)
691 (substitute* "Makefile.PL"
692 (("'LIBS'.*=>.*") (string-append "'LIBS' => ['-L"
693 (assoc-ref inputs "openssl")
694 "/lib -lcrypto'],")))
697 (define-public perl-crypt-openssl-bignum
699 (name "perl-crypt-openssl-bignum")
705 "mirror://cpan/authors/id/K/KM/KMX/Crypt-OpenSSL-Bignum-"
710 "05yzrdglrrzp191krf77zrwfkmzrfwrsrx1vyskbj94522lszk67"))))
711 (build-system perl-build-system)
712 (inputs `(("openssl" ,openssl)))
713 (arguments perl-crypt-arguments)
715 "http://search.cpan.org/dist/Crypt-OpenSSL-Bignum")
717 "OpenSSL's multiprecision integer arithmetic in Perl")
718 (description "Crypt::OpenSSL::Bignum provides multiprecision integer
719 arithmetic in Perl.")
720 ;; At your option either gpl1+ or the Artistic License
721 (license license:perl-license)))
723 (define-public perl-crypt-openssl-random
725 (name "perl-crypt-openssl-random")
731 "mirror://cpan/authors/id/R/RU/RURBAN/Crypt-OpenSSL-Random-"
736 "0yjcabkibrkafywvdkmd1xpi6br48skyk3l15ni176wvlg38335v"))))
737 (build-system perl-build-system)
738 (inputs `(("openssl" ,openssl)))
739 (arguments perl-crypt-arguments)
741 "http://search.cpan.org/dist/Crypt-OpenSSL-Random")
743 "OpenSSL/LibreSSL pseudo-random number generator access")
744 (description "Crypt::OpenSSL::Random is a OpenSSL/LibreSSL pseudo-random
746 (license license:perl-license)))
748 (define-public acme-client
754 (uri (string-append "https://kristaps.bsd.lv/" name "/"
755 "snapshots/" name "-portable-"
759 "00q05b3b1dfnfp7sr1nbd212n0mqrycl3cr9lbs51m7ncaihbrz9"))))
760 (build-system gnu-build-system)
762 '(#:tests? #f ; no test suite
765 (string-append "PREFIX=" (assoc-ref %outputs "out")))
767 (modify-phases %standard-phases
768 (add-after 'unpack 'patch-paths
769 (lambda* (#:key inputs #:allow-other-keys)
770 (let ((pem (string-append (assoc-ref inputs "libressl")
771 "/etc/ssl/cert.pem")))
772 (substitute* "http.c"
773 (("/etc/ssl/cert.pem") pem))
775 (delete 'configure)))) ; no './configure' script
777 `(("pkg-config" ,pkg-config)))
780 ("libressl" ,libressl)))
781 (synopsis "Let's Encrypt client by the OpenBSD project")
782 (description "acme-client is a Let's Encrypt client implemented in C. It
783 uses a modular design, and attempts to secure itself by dropping privileges and
784 operating in a chroot where possible. acme-client is developed on OpenBSD and
785 then ported to the GNU / Linux environment.")
786 (home-page "https://kristaps.bsd.lv/acme-client/")
787 ;; acme-client is distributed under the ISC license, but the files 'jsmn.h'
788 ;; and 'jsmn.c' are distributed under the Expat license.
789 (license (list license:isc license:expat))))
791 ;; The "-apache" variant is the upstreamed prefered variant. A "-gpl"
792 ;; variant exists in addition to the "-apache" one.
793 (define-public mbedtls-apache
795 (name "mbedtls-apache")
800 ;; XXX: The download links on the website are script redirection links
801 ;; which effectively lead to the format listed in the uri here.
802 (uri (string-append "https://tls.mbed.org/download/mbedtls-"
803 version "-apache.tgz"))
806 "1yc1rj0izjihj9hbzvskpa4gjzqf4dm2i84nmmm2s9j1i66fp6jm"))))
807 (build-system cmake-build-system)
810 (synopsis "Small TLS library")
812 "@code{mbed TLS}, formerly known as PolarSSL, makes it trivially easy
813 for developers to include cryptographic and SSL/TLS capabilities in their
814 (embedded) products, facilitating this functionality with a minimal
816 (home-page "https://tls.mbed.org")
817 (license license:asl2.0)))