Skip to content

Commit

Permalink
Merge pull request #622 from 64characters/libressl
Browse files Browse the repository at this point in the history
Patch LibreSSL to use its own instead of system timingsafe_bcmp()
  • Loading branch information
eofster authored Sep 3, 2020
2 parents 4ee7c62 + 5de580a commit 35005d7
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ build/
.idea/

ThirdParty/Opus
ThirdParty/LibreSSL
ThirdParty/LibreSSL/*
!ThirdParty/LibreSSL/patches
ThirdParty/PJSIP/*
!ThirdParty/PJSIP/patches
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,20 @@ Build and install:

### LibreSSL

Download:

$ curl -O https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.1.3.tar.gz
$ curl -O https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.1.3.tar.gz.asc
$ gpg --verify libressl-3.1.3.tar.gz.asc
$ tar xzvf libressl-3.1.3.tar.gz
$ cd libressl-3.1.3

Patch:

$ patch -p0 -i /path/to/Telephone/ThirdParty/LibreSSL/patches/check-libc.patch

Build and install:

$ ./configure --prefix=/path/to/Telephone/ThirdParty/LibreSSL --disable-shared CFLAGS='-Os -mmacosx-version-min=10.10'
$ make
$ make install
Expand Down
13 changes: 13 additions & 0 deletions ThirdParty/LibreSSL/patches/check-libc.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git m4/check-libc.m4 m4/check-libc.m4
index e511f6d..d11493f 100644
--- m4/check-libc.m4
+++ m4/check-libc.m4
@@ -115,7 +115,7 @@ AC_CACHE_CHECK([for getentropy], ac_cv_func_getentropy, [
])
])

-AC_CHECK_FUNCS([timingsafe_bcmp timingsafe_memcmp])
+AC_CHECK_FUNCS([timingsafe_memcmp])
AM_CONDITIONAL([HAVE_ARC4RANDOM], [test "x$ac_cv_func_arc4random" = xyes])
AM_CONDITIONAL([HAVE_ARC4RANDOM_BUF], [test "x$ac_cv_func_arc4random_buf" = xyes])
AM_CONDITIONAL([HAVE_ARC4RANDOM_UNIFORM], [test "x$ac_cv_func_arc4random_uniform" = xyes])

0 comments on commit 35005d7

Please sign in to comment.