7 stdenv.mkDerivation rec {
12 url = "https://www.bearssl.org/bearssl-${version}.tar.gz";
13 sha256 = "057zhgy9w4y8z2996r0pq5k2k39lpvmmvz4df8db8qa9f6hvn1b7";
23 enableParallelBuilding = true;
26 "AR=${stdenv.cc.targetPrefix}ar"
27 "CC=${stdenv.cc.targetPrefix}cc"
28 "LD=${stdenv.cc.targetPrefix}cc"
29 "LDDLL=${stdenv.cc.targetPrefix}cc"
30 ] ++ lib.optional stdenv.hostPlatform.isStatic "DLL=no";
34 install -D build/brssl $bin/brssl
35 install -D build/testcrypto $bin/testcrypto
36 install -Dm644 -t $lib/lib build/libbearssl.*
37 install -Dm644 -t $dev/include inc/*.h
43 homepage = "https://www.bearssl.org/";
44 description = "Implementation of the SSL/TLS protocol written in C";
46 BearSSL is an implementation of the SSL/TLS protocol (RFC 5246)
47 written in C. It aims at offering the following features:
49 * Be correct and secure. In particular, insecure protocol versions and
50 choices of algorithms are not supported, by design; cryptographic
51 algorithm implementations are constant-time by default.
53 * Be small, both in RAM and code footprint. For instance, a minimal
54 server implementation may fit in about 20 kilobytes of compiled code
55 and 25 kilobytes of RAM.
57 * Be highly portable. BearSSL targets not only “big” operating systems
58 like Linux and Windows, but also small embedded systems and even
59 special contexts like bootstrap code.
61 * Be feature-rich and extensible. SSL/TLS has many defined cipher
62 suites and extensions; BearSSL should implement most of them, and
63 allow extra algorithm implementations to be added afterwards,
64 possibly from third parties.
66 license = lib.licenses.mit;
67 platforms = lib.platforms.all;