Project

General

Profile

« Previous | Next » 

Revision 2415b2e3

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
2447 2447
    $header['Content-Type'] = 'application/x-www-form-urlencoded';
2448 2448
  }
2449 2449

  
2450

  
2450
  $context_resource = null;
2451
  if(!variable_get('cdm_webservice_url_ssl_verify', 1)){
2452
    $context_resource = stream_context_create(array('ssl' => array('verify_peer' => FALSE, 'verify_peer_name' => FALSE)));
2453
  }
2451 2454
  cdm_dd($uri);
2452 2455
  return drupal_http_request($uri, array(
2453 2456
      'headers' => $header,
2454 2457
      'method' => $method,
2455 2458
      'data' => $data,
2456
      'timeout' => CDM_HTTP_REQUEST_TIMEOUT
2459
      'timeout' => CDM_HTTP_REQUEST_TIMEOUT,
2460
      'context' => $context_resource
2457 2461
      )
2458 2462
   );
2459 2463
}

Also available in: Unified diff