• dmiyares

    (@dmiyares)


    Hi:

    I’ve got a client to has a server where curl isn’t using RC4-SHA by default. They’ve been wanting a connection to a site which only uses https. Each time we try to connect via wp_remote_post() it fails. Checking curl on the command line I see

    curl -v -S -k -3 https://sitewewanttoconnect.to

    curl: (35) Cannot communicate securely with peer: no common encryption algorithm(s).

    However… adding

    curl -v -S -k -3 –cipher rsa_rc4_128_sha

    works fine.

    Digging around I found
    wp-includes/class-http.php

    search for $timeout = (int) ceil( $r[‘timeout’] );

    and add after

    curl_setopt( $handle, CURLOPT_SSL_CIPHER_LIST, ‘rsa_rc4_128_sha’ );

    Once thats in there everything works great.

    I would recompile curl IF I had root rights to…

    So question… is there a way to do this via wp-config.php so future wordpress updates don’t step on this?

    Thanks

  • The topic ‘adding curl_setopt to class-http.php.. is it possible in wp-config?’ is closed to new replies.