Skip to content

Instantly share code, notes, and snippets.

@charlesportwoodii
Last active September 22, 2016 16:15
Show Gist options
  • Save charlesportwoodii/9e95c6a4ecde31ea23c17f6823bdb320 to your computer and use it in GitHub Desktop.
Save charlesportwoodii/9e95c6a4ecde31ea23c17f6823bdb320 to your computer and use it in GitHub Desktop.
OpenSSL 1.0.2i, Cloudflare ChaChaPoly Configure Patch

OpenSSL 1.0.2i ChaCha Poly Configure Patch

Cloudflare's OpenSSL patch for ChaChaPoly doesn't apply cleanly on OpenSSL 1.0.2i. This minor patch fixes it:

cd openssl-1.0.2i
wget https://gist.githubusercontent.com/charlesportwoodii/9e95c6a4ecde31ea23c17f6823bdb320/raw/a02fac917fc30f4767fb60a9563bad69dc1c054d/chacha.patch
patch < chacha.patch
--- Configure.old 2016-09-22 10:44:13.323084391 -0500
+++ Configure 2016-09-22 10:44:47.900791682 -0500
@@ -1562,6 +1562,14 @@
$bf_obj=$bf_enc unless ($bf_obj =~ /\.o$/);
$cast_obj=$cast_enc unless ($cast_obj =~ /\.o$/);
$rc5_obj=$rc5_enc unless ($rc5_obj =~ /\.o$/);
+if ($chapoly_obj =~ /\.o$/)
+ {
+ $cflags.=" -DCHAPOLY_x86_64_ASM";
+ }
+else
+ {
+ $chapoly_obj=$chapoly_enc;
+ }
if ($rc4_obj =~ /\.o$/)
{
$cflags.=" -DRC4_ASM";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment