original_string: protected function _buildSslContext(Request $request, $options)
      {
          $sslOptions = [
              'ssl_verify_peer',
              'ssl_verify_peer_name',
              'ssl_verify_depth',
              'ssl_allow_self_signed',
              'ssl_cafile',
              'ssl_local_cert',
              'ssl_passphrase',
          ];
          if (empty($options['ssl_cafile'])) {
              $options['ssl_cafile'] = CORE_PATH . 'config' . DIRECTORY_SEPARATOR . 'cacert.pem';
          }
          if (!empty($options['ssl_verify_host'])) {
              $url = $request->getUri();
              $host = parse_url($url, PHP_URL_HOST);
              $this->_sslContextOptions['peer_name'] = $host;
          }
          foreach ($sslOptions as $key) {
              if (isset($options[$key])) {
                  $name = substr($key, 4);
                  $this->_sslContextOptions[$name] = $options[$key];
              }
          }
      }
code: protected function _buildSslContext(Request $request, $options)
      {
          $sslOptions = [
              'ssl_verify_peer',
              'ssl_verify_peer_name',
              'ssl_verify_depth',
              'ssl_allow_self_signed',
              'ssl_cafile',
              'ssl_local_cert',
              'ssl_passphrase',
          ];
          if (empty($options['ssl_cafile'])) {
              $options['ssl_cafile'] = CORE_PATH . 'config' . DIRECTORY_SEPARATOR . 'cacert.pem';
          }
          if (!empty($options['ssl_verify_host'])) {
              $url = $request->getUri();
              $host = parse_url($url, PHP_URL_HOST);
              $this->_sslContextOptions['peer_name'] = $host;
          }
          foreach ($sslOptions as $key) {
              if (isset($options[$key])) {
                  $name = substr($key, 4);
                  $this->_sslContextOptions[$name] = $options[$key];
              }
          }
      }
code_tokens: protected function _buildSslContext ( Request $ request , $ options ) { $ sslOptions = [ 'ssl_verify_peer' , 'ssl_verify_peer_name' , 'ssl_verify_depth' , 'ssl_allow_self_signed' , 'ssl_cafile' , 'ssl_local_cert' , 'ssl_passphrase' , ] ; if ( empty ( $ options [ 'ssl_cafile' ] ) ) { $ options [ 'ssl_cafile' ] = CORE_PATH . 'config' . DIRECTORY_SEPARATOR . 'cacert.pem' ; } if ( ! empty ( $ options [ 'ssl_verify_host' ] ) ) { $ url = $ request -> getUri ( ) ; $ host = parse_url ( $ url , PHP_URL_HOST ) ; $ this -> _sslContextOptions [ 'peer_name' ] = $ host ; } foreach ( $ sslOptions as $ key ) { if ( isset ( $ options [ $ key ] ) ) { $ name = substr ( $ key , 4 ) ; $ this -> _sslContextOptions [ $ name ] = $ options [ $ key ] ; } } }
docstring: Build SSL options for the request.
  
  @param \Cake\Http\Client\Request $request The request being sent.
  @param array $options Array of options to use.
  @return void
docstring_tokens: Build SSL options for the request .