Index: wp-includes/class-http.php
===================================================================
--- wp-includes/class-http.php	(revision 17587)
+++ wp-includes/class-http.php	(working copy)
@@ -746,19 +746,23 @@
 	 * @return boolean False means this class can not be used, true means it can.
 	 */
 	function test( $args = array() ) {
-		if ( false !== ($option = get_option( 'disable_fsockopen' )) && time()-$option < 43200 ) // 12 hours
+		// Doesn't exist
+		if ( !function_exists( 'fsockopen' ) )
 			return false;
 
-		$is_ssl = isset($args['ssl']) && $args['ssl'];
+		// We disabled fsockopen because it's too slow
+		if ( false !== ( $option = get_option( 'disable_fsockopen' ) ) && time() - $option < 43200 ) // 12 hours
+			return false;
 
-		if ( ! $is_ssl && function_exists( 'fsockopen' ) )
+		if ( isset( $args['ssl'] ) && $args['ssl'] ) {
+			// We need SSL.  Check if it's available.
+			$use = extension_loaded( 'openssl' );
+		} else {
+			// No SSL needed
 			$use = true;
-		elseif ( $is_ssl && extension_loaded('openssl') && function_exists( 'fsockopen' ) )
-			$use = true;
-		else
-			$use = false;
+		}
 
-		return apply_filters('use_fsockopen_transport', $use, $args);
+		return apply_filters( 'use_fsockopen_transport', $use, $args );
 	}
 }
 
@@ -929,11 +933,20 @@
 	 *
 	 * @return boolean False means this class can not be used, true means it can.
 	 */
-	function test($args = array()) {
-		if ( ! function_exists('fopen') || (function_exists('ini_get') && true != ini_get('allow_url_fopen')) )
+	function test( $args = array() ) {
+		// Doesn't exist
+		if ( !function_exists( 'fopen' ) || ( function_exists( 'ini_get' ) && !ini_get( 'allow_url_fopen' ) ) )
 			return false;
 
-		return apply_filters('use_streams_transport', true, $args);
+		if ( isset( $args['ssl'] ) && $args['ssl'] ) {
+			// We need SSL.  Check if it's available.
+			$use = extension_loaded( 'openssl' );
+		} else {
+			// No SSL needed
+			$use = true;
+		}
+
+		return apply_filters( 'use_streams_transport', $use, $args );
 	}
 }
 
@@ -1096,8 +1109,25 @@
 	 *
 	 * @return boolean False means this class can not be used, true means it can.
 	 */
-	function test($args = array()) {
-		return apply_filters('use_http_extension_transport', function_exists('http_request'), $args );
+	function test( $args = array() ) {
+		// Doesn't exist
+		if ( !function_exists( 'http_request' ) )
+			return false;
+
+		if ( isset( $args['ssl'] ) && $args['ssl'] ) {
+			// We need SSL.  Check if it's available.
+			if ( is_callable( 'curl_version' ) && $curl_version = curl_version() ) {
+				// The HTTP Extensions is ultimately cURL based.  See if we can detect the cURL SSL capability.
+				$use = CURL_VERSION_SSL & $curl_version['features']; // bitwise
+			} else {
+				$use = extension_loaded( 'openssl' );
+			}
+		} else {
+			// No SSL needed
+			$use = true;
+		}
+
+		return apply_filters( 'use_http_extension_transport', (bool) $use, $args );
 	}
 }
 
@@ -1312,11 +1342,24 @@
 	 *
 	 * @return boolean False means this class can not be used, true means it can.
 	 */
-	function test($args = array()) {
-		if ( function_exists('curl_init') && function_exists('curl_exec') )
-			return apply_filters('use_curl_transport', true, $args);
+	function test( $args = array() ) {
+		// Doesn't exist
+		if ( !function_exists( 'curl_init' ) || !function_exists( 'curl_exec' ) )
+			return false;
 
-		return false;
+		if ( isset( $args['ssl'] ) && $args['ssl'] ) {
+			// We need SSL.  Check if it's available.
+			if ( is_callable( 'curl_version' ) && $curl_version = curl_version() ) {
+				$use = CURL_VERSION_SSL & $curl_version['features']; // bitwise
+			} else {
+				$use = extension_loaded( 'openssl' );
+			}
+		} else {
+			// No SSL needed
+			$use = true;
+		}
+
+		return apply_filters( 'use_curl_transport', (bool) $use, $args );
 	}
 }
 
