Project

General

Profile

« Previous | Next » 

Revision 91313ab4

Added by Andreas Kohlbecker over 2 years ago

fix #9808 option to disable ssl cert validation

View differences:

modules/cdm_dataportal/cdm_api/cdm_api.module
2476 2476
    $header['Content-Type'] = 'application/x-www-form-urlencoded';
2477 2477
  }
2478 2478

  
2479

  
2479
  $context_resource = null;
2480
  if(!variable_get('cdm_webservice_url_ssl_verify', 1)){
2481
    $context_resource = stream_context_create(array('ssl' => array('verify_peer' => FALSE, 'verify_peer_name' => FALSE)));
2482
  }
2480 2483
  cdm_dd($uri);
2481 2484
  return drupal_http_request($uri, array(
2482 2485
      'headers' => $header,
2483 2486
      'method' => $method,
2484 2487
      'data' => $data,
2485
      'timeout' => CDM_HTTP_REQUEST_TIMEOUT
2488
      'timeout' => CDM_HTTP_REQUEST_TIMEOUT,
2489
      'context' => $context_resource
2486 2490
      )
2487 2491
   );
2488 2492
}

Also available in: Unified diff