Make WordPress Core

Ticket #25007: 25007.lets-see-the-cert.diff

File 25007.lets-see-the-cert.diff, 1.4 KB (added by dd32, 11 years ago)
  • src/wp-includes/class-http.php

     
    221221         * @return string|bool Class name for the first transport that claims to support the request. False if no transport claims to support the request.
    222222         */
    223223        public function _get_first_available_transport( $args, $url = null ) {
    224                 $request_order = apply_filters( 'http_api_transports', array( 'curl', 'streams' ), $args, $url );
     224                $request_order = apply_filters( 'http_api_transports', array( 'streams' ), $args, $url );
    225225
    226226                // Loop over each transport on each HTTP request looking for one which will serve this request's needs
    227227                foreach ( $request_order as $transport ) {
     
    751751
    752752                $context = stream_context_create( array(
    753753                        'ssl' => array(
    754                                 'verify_peer' => $ssl_verify,
     754                                'verify_peer' => false,
    755755                                //'CN_match' => $arrURL['host'], // This is handled by self::verify_ssl_certficate()
    756                                 'capture_peer_cert' => $ssl_verify,
     756                                'capture_peer_cert' => true,
    757757                                'SNI_enabled' => true,
    758758                                'cafile' => $r['sslcertificates'],
    759                                 'allow_self_signed' => ! $ssl_verify,
     759                                'allow_self_signed' => true,
    760760                        )
    761761                ) );
    762762
     
    966966                        return false;
    967967
    968968                $cert = openssl_x509_parse( $context_options['ssl']['peer_certificate'] );
     969var_dump( $cert );
    969970                if ( ! $cert )
    970971                        return false;
    971972