Index: ./curl/docs/libcurl/symbols-in-versions
==================================================================
--- ./curl/docs/libcurl/symbols-in-versions~0	2015-03-09 17:07:13.000000000 -0700
+++ ./curl/docs/libcurl/symbols-in-versions	2015-03-08 23:14:26.000000000 -0700
@@ -227,6 +227,7 @@
 CURLINFO_LONG                   7.4.1
 CURLINFO_MASK                   7.4.1
 CURLINFO_NAMELOOKUP_TIME        7.4.1
+CURLINFO_SSL_NEGOTIATED_VERSION 7.42.0
 CURLINFO_NONE                   7.4.1
 CURLINFO_NUM_CONNECTS           7.12.3
 CURLINFO_OS_ERRNO               7.12.2
Index: ./curl/include/curl/curl.h
==================================================================
--- ./curl/include/curl/curl.h~0	2015-03-09 17:07:13.000000000 -0700
+++ ./curl/include/curl/curl.h	2015-03-08 23:21:08.000000000 -0700
@@ -2114,7 +2114,8 @@
   CURLINFO_TLS_SESSION      = CURLINFO_SLIST  + 43,
   /* Fill in new entries below here! */
 
-  CURLINFO_LASTONE          = 43
+  CURLINFO_SSL_NEGOTIATED_VERSION = CURLINFO_LONG + 44, 
+  CURLINFO_LASTONE          = 44
 } CURLINFO;
 
 /* CURLINFO_RESPONSE_CODE is the new name for the option previously known as
Index: ./curl/lib/getinfo.c
==================================================================
--- ./curl/lib/getinfo.c~0	2015-03-09 17:07:13.000000000 -0700
+++ ./curl/lib/getinfo.c	2015-03-08 23:38:58.000000000 -0700
@@ -70,6 +70,7 @@
   info->conn_local_ip[0] = '\0';
   info->conn_primary_port = 0;
   info->conn_local_port = 0;
+  info->ssl_negotiated_version = -1L;
 
   return CURLE_OK;
 }
@@ -137,6 +138,9 @@
   case CURLINFO_HTTP_CONNECTCODE:
     *param_longp = data->info.httpproxycode;
     break;
+  case CURLINFO_SSL_NEGOTIATED_VERSION:
+    *param_longp = data->info.ssl_negotiated_version;
+    break;
   case CURLINFO_FILETIME:
     *param_longp = data->info.filetime;
     break;
Index: ./curl/lib/urldata.h
==================================================================
--- ./curl/lib/urldata.h~0	2015-03-09 17:07:13.000000000 -0700
+++ ./curl/lib/urldata.h	2015-03-08 23:28:30.000000000 -0700
@@ -1139,6 +1139,7 @@
   struct curl_certinfo certs; /* info about the certs, only populated in
                                  OpenSSL builds. Asked for with
                                  CURLOPT_CERTINFO / CURLINFO_CERTINFO */
+  long ssl_negotiated_version; /* the version of ssl/tls that we negotiated */
 };
 
 
Index: ./curl/lib/vtls/darwinssl.c
==================================================================
--- ./curl/lib/vtls/darwinssl.c~0	2015-03-09 17:07:13.000000000 -0700
+++ ./curl/lib/vtls/darwinssl.c	2015-03-09 17:06:57.000000000 -0700
@@ -1810,6 +1810,36 @@
   }
 }
 
+static void set_ssl_version_long(SSLContextRef ssl_ctx, struct connectdata *conn)
+{
+  SSLProtocol protocol = 0;
+  long code = -1L;
+    (void)SSLGetNegotiatedProtocolVersion(connssl->ssl_ctx, &protocol);
+  if(ssl_ctx) {
+    (void)SSLGetNegotiatedProtocolVersion(connssl->ssl_ctx, &protocol);
+    switch(protocol) {
+      case kSSLProtocol2:
+	code = CURL_SSLVERSION_SSLv2;
+        break;
+      case kSSLProtocol3:
+	code = CURL_SSLVERSION_SSLv3;
+        break;
+      case kTLSProtocol1:
+	code = CURL_SSLVERSION_TLSv1;
+        break;
+#if CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS
+      case kTLSProtocol11:
+	code = CURL_SSLVERSION_TLSv1_1;
+        break;
+      case kTLSProtocol12:
+	code = CURL_SSLVERSION_TLSv1_2;
+        break;
+#endif
+    }
+  }
+  conn->data->info.ssl_negotiated_version = code; /* nb: the ssl instance of struct connectdata did not have ->data -- discuss */
+}
+
 static CURLcode
 darwinssl_connect_step2(struct connectdata *conn, int sockindex)
 {
@@ -1914,6 +1944,7 @@
     /* we have been connected fine, we're not waiting for anything else. */
     connssl->connecting_state = ssl_connect_3;
 
+    set_ssl_version_long(connssl->ssl_ctx, conn);
     /* Informational message */
     (void)SSLGetNegotiatedCipher(connssl->ssl_ctx, &cipher);
     (void)SSLGetNegotiatedProtocolVersion(connssl->ssl_ctx, &protocol);
Index: ./curl/lib/vtls/openssl.c
==================================================================
--- ./curl/lib/vtls/openssl.c~0	2015-03-09 17:07:13.000000000 -0700
+++ ./curl/lib/vtls/openssl.c	2015-03-09 17:07:08.000000000 -0700
@@ -1660,6 +1660,33 @@
 
 #endif /* USE_NGHTTP2 */
 
+static void set_ssl_version_long(SSL *ssl, struct connectdata *conn)
+{
+  long code = -1L;
+  if(ssl) {
+    switch(SSL_version(ssl)) {
+#if OPENSSL_VERSION_NUMBER >= 0x1000100FL
+      case TLS1_2_VERSION:
+	code = CURL_SSLVERSION_TLSv1_2;
+	break;
+      case TLS1_1_VERSION:
+	code = CURL_SSLVERSION_TLSv1_1;
+	break;
+#endif
+      case TLS1_VERSION:
+	code = CURL_SSLVERSION_TLSv1;
+	break;
+      case SSL3_VERSION:
+	code = CURL_SSLVERSION_SSLv3;
+	break;
+      case SSL2_VERSION:
+	code = CURL_SSLVERSION_SSLv2;
+	break;
+    }
+  }
+  conn->data->info.ssl_negotiated_version = code; /* nb: the ssl instance of struct connectdata did not have ->data -- discuss */
+}
+
 static const char *
 get_ssl_version_txt(SSL *ssl)
 {
@@ -2203,6 +2230,7 @@
     /* we have been connected fine, we're not waiting for anything else. */
     connssl->connecting_state = ssl_connect_3;
 
+    set_ssl_version_long(connssl->handle, conn);
     /* Informational message */
     infof(data, "SSL connection using %s / %s\n",
           get_ssl_version_txt(connssl->handle),
