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, 2017 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 <ng0@infotropique.org>
10 ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
11 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
12 ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
14 ;;; This file is part of GNU Guix.
16 ;;; GNU Guix is free software; you can redistribute it and/or modify it
17 ;;; under the terms of the GNU General Public License as published by
18 ;;; the Free Software Foundation; either version 3 of the License, or (at
19 ;;; your option) any later version.
21 ;;; GNU Guix is distributed in the hope that it will be useful, but
22 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
23 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 ;;; GNU General Public License for more details.
26 ;;; You should have received a copy of the GNU General Public License
27 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
29 (define-module (gnu packages tls)
30 #:use-module ((guix licenses) #:prefix license:)
31 #:use-module (guix packages)
32 #:use-module (guix download)
33 #:use-module (guix utils)
34 #:use-module (guix build-system gnu)
35 #:use-module (guix build-system perl)
36 #:use-module (guix build-system python)
37 #:use-module (guix build-system cmake)
38 #:use-module (gnu packages compression)
39 #:use-module (gnu packages)
40 #:use-module (gnu packages dns)
41 #:use-module (gnu packages guile)
42 #:use-module (gnu packages libbsd)
43 #:use-module (gnu packages libffi)
44 #:use-module (gnu packages libidn)
45 #:use-module (gnu packages linux)
46 #:use-module (gnu packages ncurses)
47 #:use-module (gnu packages nettle)
48 #:use-module (gnu packages perl)
49 #:use-module (gnu packages pkg-config)
50 #:use-module (gnu packages python)
51 #:use-module (gnu packages texinfo)
52 #:use-module (gnu packages base)
53 #:use-module (srfi srfi-1))
55 (define-public libtasn1
62 (uri (string-append "mirror://gnu/libtasn1/libtasn1-"
66 "0ls7jdq3y5fnrwg0pzhq11m21r8pshac2705bczz6mqjc8pdllv7"))
67 (patches (search-patches "libtasn1-CVE-2017-10790.patch"))))
68 (build-system gnu-build-system)
69 (native-inputs `(("perl" ,perl)))
70 (home-page "https://www.gnu.org/software/libtasn1/")
71 (synopsis "ASN.1 library")
73 "GNU libtasn1 is a library implementing the ASN.1 notation. It is used
74 for transmitting machine-neutral encodings of data objects in computer
75 networking, allowing for formal validation of data according to some
77 (license license:lgpl2.0+)))
85 (uri (string-append "https://lionet.info/soft/asn1c-"
89 "1fc64g45ykmv73kdndr4zdm4wxhimhrir4rxnygxvwkych5l81w0"))))
90 (build-system gnu-build-system)
93 (home-page "https://lionet.info/asn1c")
94 (synopsis "ASN.1 to C compiler")
95 (description "The ASN.1 to C compiler takes ASN.1 module
96 files and generates C++ compatible C source code. That code can be
97 used to serialize the native C structures into compact and unambiguous
98 BER/XER/PER-based data files, and deserialize the files back.
100 Various ASN.1 based formats are widely used in the industry, such as to encode
101 the X.509 certificates employed in the HTTPS handshake, to exchange control
102 data between mobile phones and cellular networks, to car-to-car communication
103 in intelligent transportation networks.")
104 (license license:bsd-2)))
106 (define-public p11-kit
113 (uri (string-append "https://github.com/p11-glue/p11-kit/releases/"
114 "download/" version "/p11-kit-" version ".tar.gz"))
117 "0qyvnkb5hfi94wv3bn67y20hcbbvynvjwxpk7k9sh1si6ff69hg1"))))
118 (build-system gnu-build-system)
120 `(("pkg-config" ,pkg-config)))
123 ("libtasn1" ,libtasn1)))
125 `(#:configure-flags '("--without-trust-paths")))
126 (home-page "http://p11-glue.freedesktop.org/p11-kit.html")
127 (synopsis "PKCS#11 library")
129 "p11-kit provides a way to load and enumerate PKCS#11 modules. It
130 provides a standard configuration setup for installing PKCS#11 modules
131 in such a way that they are discoverable. It also solves problems with
132 coordinating the use of PKCS#11 by different components or libraries
133 living in the same process.")
134 (license license:bsd-3)))
137 ;; TODO Add net-tools-for-tests to #:disallowed-references when we can afford
138 ;; rebuild GnuTLS (i.e. core-updates).
139 (define-public gnutls
146 ;; Note: Releases are no longer on ftp.gnu.org since the
147 ;; schism (after version 3.1.5).
148 (string-append "mirror://gnupg/gnutls/v"
149 (version-major+minor version)
150 "/gnutls-" version ".tar.xz"))
152 (search-patches "gnutls-skip-trust-store-test.patch"
153 "gnutls-skip-pkgconfig-test.patch"))
156 "15ihq6p0hnnhs8cnjrkj40dmlcaa1jjg8xg0g2ydbnlqs454ixbr"))))
157 (build-system gnu-build-system)
161 ;; GnuTLS doesn't consult any environment variables to specify
162 ;; the location of the system-wide trust store. Instead it has a
163 ;; configure-time option. Unless specified, its configure script
164 ;; attempts to auto-detect the location by looking for common
165 ;; places in the file system, none of which are present in our
166 ;; chroot build environment. If not found, then no default trust
167 ;; store is used, so each program has to provide its own
168 ;; fallback, and users have to configure each program
169 ;; independently. This seems suboptimal.
170 "--with-default-trust-store-dir=/etc/ssl/certs"
172 ;; FIXME: Temporarily disable p11-kit support since it is not
173 ;; working on mips64el.
176 #:phases (modify-phases %standard-phases
179 (lambda* (#:key outputs #:allow-other-keys)
180 ;; Copy the 4.1 MiB of section 3 man pages to "doc".
181 (let* ((out (assoc-ref outputs "out"))
182 (doc (assoc-ref outputs "doc"))
183 (mandir (string-append doc "/share/man/man3"))
184 (oldman (string-append out "/share/man/man3")))
186 (copy-recursively oldman mandir)
187 (delete-file-recursively oldman)
189 (outputs '("out" ;4.4 MiB
191 "doc")) ;4.1 MiB of man pages
193 `(("net-tools" ,net-tools-for-tests)
194 ("pkg-config" ,pkg-config)
197 `(("guile" ,guile-2.2)))
199 ;; These are all in the 'Requires.private' field of gnutls.pc.
200 `(("libtasn1" ,libtasn1)
204 (home-page "https://www.gnu.org/software/gnutls/")
205 (synopsis "Transport layer security library")
207 "GnuTLS is a secure communications library implementing the SSL, TLS
208 and DTLS protocols. It is provided in the form of a C library to support the
209 protocols, as well as to parse and write X.5009, PKCS 12, OpenPGP and other
210 required structures.")
211 (license license:lgpl2.1+)
212 (properties '((ftp-server . "ftp.gnutls.org")
213 (ftp-directory . "/gcrypt/gnutls")))))
215 (define-public gnutls/guile-2.2
216 (deprecated-package "guile2.2-gnutls" gnutls))
218 (define-public gnutls/guile-2.0
219 ;; GnuTLS for Guile 2.0.
222 (name "guile2.0-gnutls")
223 (inputs `(("guile" ,guile-2.0)
224 ,@(alist-delete "guile" (package-inputs gnutls))))))
226 (define-public gnutls/dane
227 ;; GnuTLS with build libgnutls-dane, implementing DNS-based
228 ;; Authentication of Named Entities. This is required for GNS functionality
229 ;; by GNUnet and gnURL. This is done in an extra package definition
230 ;; to have the choice between GnuTLS with Dane and without Dane.
234 (inputs `(("unbound" ,unbound)
235 ,@(package-inputs gnutls)))))
237 (define-public openssl
243 (uri (list (string-append "ftp://ftp.openssl.org/source/"
244 name "-" version ".tar.gz")
245 (string-append "ftp://ftp.openssl.org/source/old/"
246 (string-trim-right version char-set:letter)
247 "/" name "-" version ".tar.gz")))
250 "037kvpisc6qh5dkppcwbm5bg2q800xh2hma3vghz8xcycmdij1yf"))
253 ;; Remove ELF files. 'substitute*' can't read them.
254 (delete-file "test/ssltest_old")
255 (delete-file "test/v3ext")
256 (delete-file "test/x509aux")
258 (patches (search-patches "openssl-runpath.patch"
259 "openssl-c-rehash-in.patch"))))
260 (build-system gnu-build-system)
262 "doc" ;1.5MiB of man3 pages
263 "static")) ;6MiB of .a files
264 (native-inputs `(("perl" ,perl)))
266 `(#:disallowed-references (,perl)
271 ;; Changes to OpenSSL sometimes cause Perl to "sneak in" to the closure,
272 ;; so we explicitly disallow it here.
273 #:disallowed-references ,(list (canonical-package perl))
275 (modify-phases %standard-phases
277 'configure 'patch-Makefile.org
278 (lambda* (#:key outputs #:allow-other-keys)
279 ;; The default MANDIR is some unusual place. Fix that.
280 (let ((out (assoc-ref outputs "out")))
281 (patch-makefile-SHELL "Makefile.org")
282 (substitute* "Makefile.org"
283 (("^MANDIR[[:blank:]]*=.*$")
284 (string-append "MANDIR = " out "/share/man\n")))
288 (lambda* (#:key outputs #:allow-other-keys)
289 (let ((out (assoc-ref outputs "out")))
292 "shared" ;build shared libraries
295 ;; The default for this catch-all directory is
296 ;; PREFIX/ssl. Change that to something more
298 (string-append "--openssldir=" out
299 "/share/openssl-" ,version)
301 (string-append "--prefix=" out)
303 ;; XXX FIXME: Work around a code generation bug in GCC
304 ;; 4.9.3 on ARM when compiled with -mfpu=neon. See:
305 ;; <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66917>
306 ,@(if (and (not (%current-target-system))
307 (string-prefix? "armhf" (%current-system)))
311 'install 'make-libraries-writable
312 (lambda* (#:key outputs #:allow-other-keys)
313 ;; Make libraries writable so that 'strip' does its job.
314 (let ((out (assoc-ref outputs "out")))
315 (for-each (lambda (file)
317 (find-files (string-append out "/lib")
320 (add-after 'install 'move-static-libraries
321 (lambda* (#:key outputs #:allow-other-keys)
322 ;; Move static libraries to the "static" output.
323 (let* ((out (assoc-ref outputs "out"))
324 (lib (string-append out "/lib"))
325 (static (assoc-ref outputs "static"))
326 (slib (string-append static "/lib")))
327 (for-each (lambda (file)
328 (install-file file slib)
330 (find-files lib "\\.a$"))
332 (add-after 'install 'move-man3-pages
333 (lambda* (#:key outputs #:allow-other-keys)
334 ;; Move section 3 man pages to "doc".
335 (let* ((out (assoc-ref outputs "out"))
336 (man3 (string-append out "/share/man/man3"))
337 (doc (assoc-ref outputs "doc"))
338 (target (string-append doc "/share/man/man3")))
340 (for-each (lambda (file)
342 (string-append target "/"
345 (delete-file-recursively man3)
348 'patch-source-shebangs 'patch-tests
349 (lambda* (#:key inputs native-inputs #:allow-other-keys)
350 (let ((bash (assoc-ref (or native-inputs inputs) "bash")))
351 (substitute* (find-files "test" ".*")
353 (string-append bash "/bin/sh"))
358 'install 'remove-miscellany
359 (lambda* (#:key outputs #:allow-other-keys)
360 ;; The 'misc' directory contains random undocumented shell and Perl
361 ;; scripts. Remove them to avoid retaining a reference on Perl.
362 (let ((out (assoc-ref outputs "out")))
363 (delete-file-recursively (string-append out "/share/openssl-"
367 ;; FIXME: These two variables must designate a single file or directory
368 ;; and are not actually "search paths." In practice it works OK in user
369 ;; profiles because there's always just one item that matches the
371 (list (search-path-specification
372 (variable "SSL_CERT_DIR")
373 (files '("etc/ssl/certs")))
374 (search-path-specification
375 (variable "SSL_CERT_FILE")
376 (files '("etc/ssl/certs/ca-certificates.crt")))))
377 (synopsis "SSL/TLS implementation")
379 "OpenSSL is an implementation of SSL/TLS.")
380 (license license:openssl)
381 (home-page "http://www.openssl.org/")))
383 (define-public openssl-next
390 (uri (list (string-append "ftp://ftp.openssl.org/source/"
391 name "-" version ".tar.gz")
392 (string-append "ftp://ftp.openssl.org/source/old/"
393 (string-trim-right version char-set:letter)
394 "/" name "-" version ".tar.gz")))
395 (patches (search-patches "openssl-1.1.0-c-rehash-in.patch"))
398 "0r97n4n552ns571diz54qsgarihrxvbn7kvyv8wjyfs9ybrldxqj"))))
400 "doc" ;1.3MiB of man3 pages
401 "static")) ; 5.5MiB of .a files
403 (substitute-keyword-arguments (package-arguments openssl)
405 `(modify-phases ,phases
406 (delete 'patch-tests) ; These two phases are not needed by
407 (delete 'patch-Makefile.org) ; OpenSSL 1.1.0.
409 ;; Override configure phase since -rpath is now a configure option.
411 (lambda* (#:key outputs #:allow-other-keys)
412 (let* ((out (assoc-ref outputs "out"))
413 (lib (string-append out "/lib")))
416 "shared" ;build shared libraries
419 ;; The default for this catch-all directory is
420 ;; PREFIX/ssl. Change that to something more
422 (string-append "--openssldir=" out
423 "/share/openssl-" ,version)
425 (string-append "--prefix=" out)
426 (string-append "-Wl,-rpath," lib)
428 ;; XXX FIXME: Work around a code generation bug in GCC
429 ;; 4.9.3 on ARM when compiled with -mfpu=neon. See:
430 ;; <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66917>
431 ,@(if (and (not (%current-target-system))
432 (string-prefix? "armhf" (%current-system)))
436 ;; XXX: Duplicate this phase to make sure 'version' evaluates
437 ;; in the current scope and not the inherited one.
438 (replace 'remove-miscellany
439 (lambda* (#:key outputs #:allow-other-keys)
440 ;; The 'misc' directory contains random undocumented shell and Perl
441 ;; scripts. Remove them to avoid retaining a reference on Perl.
442 (let ((out (assoc-ref outputs "out")))
443 (delete-file-recursively (string-append out "/share/openssl-"
447 (define-public libressl
453 (uri (string-append "mirror://openbsd/LibreSSL/"
454 name "-" version ".tar.gz"))
457 "1i77viqy1afvbr392npk9v54k9zhr9zq2vhv6pliza22b0ymwzz5"))))
458 (build-system gnu-build-system)
460 ;; Do as if 'getentropy' was missing since older Linux kernels lack it
461 ;; and libc would return ENOSYS, which is not properly handled.
462 ;; See <https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00235.html>.
463 '(#:configure-flags '("ac_cv_func_getentropy=no"
464 ;; Provide a TLS-enabled netcat.
467 ;; FIXME: These two variables must designate a single file or directory
468 ;; and are not actually "search paths." In practice it works OK in
469 ;; user profiles because there's always just one item that matches the
471 (list (search-path-specification
472 (variable "SSL_CERT_DIR")
473 (files '("etc/ssl/certs")))
474 (search-path-specification
475 (variable "SSL_CERT_FILE")
476 (files '("etc/ssl/certs/ca-certificates.crt")))))
477 (home-page "https://www.libressl.org/")
478 (synopsis "SSL/TLS implementation")
479 (description "LibreSSL is a version of the TLS/crypto stack, forked from
480 OpenSSL in 2014 with the goals of modernizing the codebase, improving security,
481 and applying best practice development processes. This package also includes a
482 netcat implementation that supports TLS.")
483 ;; Files taken from OpenSSL keep their license, others are under various
484 ;; non-copyleft licenses.
485 (license (list license:openssl
486 (license:non-copyleft
488 "See COPYING in the distribution.")))))
490 (define-public python-acme
493 ;; Remember to update the hash of certbot when updating python-acme.
497 (uri (pypi-uri "acme" version))
500 "08p8w50zciqlhgn3ab0wbbvi1zyg3x37r1gywq0z1allsij3v8hz"))))
501 (build-system python-build-system)
504 (modify-phases %standard-phases
505 (add-after 'build 'build-documentation
507 (zero? (system* "make" "-C" "docs" "man" "info"))))
508 (add-after 'install 'install-documentation
509 (lambda* (#:key outputs #:allow-other-keys)
510 (let* ((out (assoc-ref outputs "out"))
511 (man (string-append out "/share/man/man1"))
512 (info (string-append out "/info")))
513 (install-file "docs/_build/texinfo/acme-python.info" info)
514 (install-file "docs/_build/man/acme-python.1" man)
516 ;; TODO: Add optional inputs for testing.
518 `(("python-mock" ,python-mock-2)
520 ("python-sphinx" ,python-sphinx)
521 ("python-sphinxcontrib-programoutput" ,python-sphinxcontrib-programoutput)
522 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
523 ("texinfo" ,texinfo)))
525 `(("python-six" ,python-six)
526 ("python-requests" ,python-requests)
527 ("python-pytz" ,python-pytz)
528 ("python-pyrfc3339" ,python-pyrfc3339)
529 ("python-pyasn1" ,python-pyasn1)
530 ("python-cryptography" ,python-cryptography)
531 ("python-pyopenssl" ,python-pyopenssl)))
532 (home-page "https://github.com/letsencrypt/letsencrypt")
533 (synopsis "ACME protocol implementation in Python")
534 (description "ACME protocol implementation in Python")
535 (license license:asl2.0)))
537 (define-public certbot
540 ;; Certbot and python-acme are developed in the same repository, and their
541 ;; versions should remain synchronized.
542 (version (package-version python-acme))
545 (uri (pypi-uri name version))
548 "0lwxqz3r0fg3dy06fgba1dfs7n6ribc25z0rh5rqbl7mvy8hf8x7"))))
549 (build-system python-build-system)
551 `(,@(substitute-keyword-arguments (package-arguments python-acme)
553 `(modify-phases ,phases
554 (replace 'install-documentation
555 (lambda* (#:key outputs #:allow-other-keys)
556 (let* ((out (assoc-ref outputs "out"))
557 (man1 (string-append out "/share/man/man1"))
558 (man7 (string-append out "/share/man/man7"))
559 (info (string-append out "/info")))
560 (install-file "docs/_build/texinfo/Certbot.info" info)
561 (install-file "docs/_build/man/certbot.1" man1)
562 (install-file "docs/_build/man/certbot.7" man7)
564 ;; TODO: Add optional inputs for testing.
566 `(("python-nose" ,python-nose)
567 ("python-mock" ,python-mock-2)
569 ("python-sphinx" ,python-sphinx)
570 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
571 ("python-sphinx-repoze-autointerface" ,python-sphinx-repoze-autointerface)
572 ("python-sphinxcontrib-programoutput" ,python-sphinxcontrib-programoutput)
573 ("texinfo" ,texinfo)))
575 `(("python-acme" ,python-acme)
576 ("python-zope-interface" ,python-zope-interface)
577 ("python-pyrfc3339" ,python-pyrfc3339)
578 ("python-pyopenssl" ,python-pyopenssl)
579 ("python-configobj" ,python-configobj)
580 ("python-configargparse" ,python-configargparse)
581 ("python-zope-component" ,python-zope-component)
582 ("python-parsedatetime" ,python-parsedatetime)
583 ("python-six" ,python-six)
584 ("python-psutil" ,python-psutil)
585 ("python-requests" ,python-requests)
586 ("python-pytz" ,python-pytz)))
587 (synopsis "Let's Encrypt client by the Electronic Frontier Foundation")
588 (description "Certbot automatically receives and installs X.509 certificates
589 to enable Transport Layer Security (TLS) on servers. It interoperates with the
590 Let’s Encrypt certificate authority (CA), which issues browser-trusted
591 certificates for free.")
592 (home-page "https://certbot.eff.org/")
593 (license license:asl2.0)))
595 (define-public letsencrypt
596 (package (inherit certbot)
598 (properties `((superseded . ,certbot)))))
600 (define-public perl-net-ssleay
602 (name "perl-net-ssleay")
606 (uri (string-append "mirror://cpan/authors/id/M/MI/MIKEM/"
607 "Net-SSLeay-" version ".tar.gz"))
610 "0z8vya34g88bc41kx955sv7y4niwbbywji8liqbl52v29qbvdjq0"))))
611 (build-system perl-build-system)
612 (inputs `(("openssl" ,openssl)))
615 (modify-phases %standard-phases
617 'configure 'set-ssl-prefix
618 (lambda* (#:key inputs #:allow-other-keys)
619 (setenv "OPENSSL_PREFIX" (assoc-ref inputs "openssl"))
621 (synopsis "Perl extension for using OpenSSL")
623 "This module offers some high level convenience functions for accessing
624 web pages on SSL servers (for symmetry, the same API is offered for accessing
625 http servers, too), an sslcat() function for writing your own clients, and
626 finally access to the SSL api of the SSLeay/OpenSSL package so you can write
627 servers or clients for more complicated applications.")
628 (license license:perl-license)
629 (home-page "http://search.cpan.org/~mikem/Net-SSLeay-1.66/")))
631 (define-public perl-crypt-openssl-rsa
633 (name "perl-crypt-openssl-rsa")
639 "mirror://cpan/authors/id/P/PE/PERLER/Crypt-OpenSSL-RSA-"
644 "1gnpvv09b2gpifwdzc5jnhama3d1a4c39lzj9hcaicsb8rvzjmsk"))))
645 (build-system perl-build-system)
647 `(("perl-crypt-openssl-bignum" ,perl-crypt-openssl-bignum)
648 ("perl-crypt-openssl-random" ,perl-crypt-openssl-random)
649 ("openssl" ,openssl)))
650 (arguments perl-crypt-arguments)
652 "http://search.cpan.org/dist/Crypt-OpenSSL-RSA")
654 "RSA encoding and decoding, using the openSSL libraries")
655 (description "Crypt::OpenSSL::RSA does RSA encoding and decoding (using the
656 OpenSSL libraries).")
657 (license license:perl-license)))
659 (define perl-crypt-arguments
660 `(#:phases (modify-phases %standard-phases
661 (add-before 'configure 'patch-Makefile.PL
662 (lambda* (#:key inputs #:allow-other-keys)
663 (substitute* "Makefile.PL"
664 (("'LIBS'.*=>.*") (string-append "'LIBS' => ['-L"
665 (assoc-ref inputs "openssl")
666 "/lib -lcrypto'],")))
669 (define-public perl-crypt-openssl-bignum
671 (name "perl-crypt-openssl-bignum")
677 "mirror://cpan/authors/id/K/KM/KMX/Crypt-OpenSSL-Bignum-"
682 "0gamn4dff1bz77nswacy1dlpn9fkwahzw7yvvik4nbwwy2s63hc8"))))
683 (build-system perl-build-system)
684 (inputs `(("openssl" ,openssl)))
685 (arguments perl-crypt-arguments)
687 "http://search.cpan.org/dist/Crypt-OpenSSL-Bignum")
689 "OpenSSL's multiprecision integer arithmetic in Perl")
690 (description "Crypt::OpenSSL::Bignum provides multiprecision integer
691 arithmetic in Perl.")
692 ;; At your option either gpl1+ or the Artistic License
693 (license license:perl-license)))
695 (define-public perl-crypt-openssl-random
697 (name "perl-crypt-openssl-random")
703 "mirror://cpan/authors/id/R/RU/RURBAN/Crypt-OpenSSL-Random-"
708 "0yjcabkibrkafywvdkmd1xpi6br48skyk3l15ni176wvlg38335v"))))
709 (build-system perl-build-system)
710 (inputs `(("openssl" ,openssl)))
711 (arguments perl-crypt-arguments)
713 "http://search.cpan.org/dist/Crypt-OpenSSL-Random")
715 "OpenSSL/LibreSSL pseudo-random number generator access")
716 (description "Crypt::OpenSSL::Random is a OpenSSL/LibreSSL pseudo-random
718 (license license:perl-license)))
720 (define-public acme-client
726 (uri (string-append "https://kristaps.bsd.lv/" name "/"
727 "snapshots/" name "-portable-"
731 "00q05b3b1dfnfp7sr1nbd212n0mqrycl3cr9lbs51m7ncaihbrz9"))))
732 (build-system gnu-build-system)
734 '(#:tests? #f ; no test suite
737 (string-append "PREFIX=" (assoc-ref %outputs "out")))
739 (modify-phases %standard-phases
740 (add-after 'unpack 'patch-paths
741 (lambda* (#:key inputs #:allow-other-keys)
742 (let ((pem (string-append (assoc-ref inputs "libressl")
743 "/etc/ssl/cert.pem")))
744 (substitute* "http.c"
745 (("/etc/ssl/cert.pem") pem))
747 (delete 'configure)))) ; no './configure' script
749 `(("pkg-config" ,pkg-config)))
752 ("libressl" ,libressl)))
753 (synopsis "Let's Encrypt client by the OpenBSD project")
754 (description "acme-client is a Let's Encrypt client implemented in C. It
755 uses a modular design, and attempts to secure itself by dropping privileges and
756 operating in a chroot where possible. acme-client is developed on OpenBSD and
757 then ported to the GNU / Linux environment.")
758 (home-page "https://kristaps.bsd.lv/acme-client/")
759 ;; acme-client is distributed under the ISC license, but the files 'jsmn.h'
760 ;; and 'jsmn.c' are distributed under the Expat license.
761 (license (list license:isc license:expat))))
763 ;; The "-apache" variant is the upstreamed prefered variant. A "-gpl"
764 ;; variant exists in addition to the "-apache" one.
765 (define-public mbedtls-apache
767 (name "mbedtls-apache")
772 ;; XXX: The download links on the website are script redirection links
773 ;; which effectively lead to the format listed in the uri here.
774 (uri (string-append "https://tls.mbed.org/download/mbedtls-"
775 version "-apache.tgz"))
778 "11wnj34rfqxjggmdgf042i49lr6civgbqwv2p7p8bn6k2919vg4r"))))
779 (build-system cmake-build-system)
782 (synopsis "Small TLS library")
784 "@code{mbed TLS}, formerly known as PolarSSL, makes it trivially easy
785 for developers to include cryptographic and SSL/TLS capabilities in their
786 (embedded) products, facilitating this functionality with a minimal
788 (home-page "https://tls.mbed.org")
789 (license license:asl2.0)))