Skip to content

Instantly share code, notes, and snippets.

@jcayzac
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcayzac/9542144 to your computer and use it in GitHub Desktop.
Save jcayzac/9542144 to your computer and use it in GitHub Desktop.

#Fix the annoying OpenSSL 1.0.1 "Unknown Protocol" error with (lib)curl

  • Add a ciphers AES128-SHA,3DES line to ~/.curlrc.
  • Unfortunately, libcurl doesn't use .curlrc. So to get around the problem in git:
# some if the stuff here is macports-specific
$ port install autoconf automake
$ git clone https://github.com/git/git.git
$ cd git
$ git checkout v1.9.0 #or whatever new version
$ git apply - < <(curl https://gist.githubusercontent.com/jcayzac/9542144/raw/git.patch)
$ autoreconf
$ mkdir -p "${HOME}/.prefix/bin" # prepend your PATH with that location!
$ ./configure --prefix="${HOME}/.prefix" --with-libpcre LD_LIBRARY_PATH=/opt/local/lib
$ LD_LIBRARY_PATH=/opt/local/lib make -j4 all install
From 015fa110dd000b2f8c5cb760f31f4bfaa4fb7e2e Mon Sep 17 00:00:00 2001
From: Julien Cayzac <jcayzac@spam.com>
Date: Fri, 14 Mar 2014 12:59:09 +0900
Subject: [PATCH] Fix for Rakuten Stash
---
http.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/http.c b/http.c
index 70eaa26..bcd9c65 100644
--- a/http.c
+++ b/http.c
@@ -342,6 +342,8 @@ static CURL *get_curl_handle(void)
curl_low_speed_time);
}
+ curl_easy_setopt(result, CURLOPT_SSL_CIPHER_LIST, "AES128-SHA,3DES");
+
curl_easy_setopt(result, CURLOPT_FOLLOWLOCATION, 1);
#if LIBCURL_VERSION_NUM >= 0x071301
curl_easy_setopt(result, CURLOPT_POSTREDIR, CURL_REDIR_POST_ALL);
--
1.9.0.1.g015fa11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment