Revision ec495134
Added by Andreas Kohlbecker over 2 years ago
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 |
} |
modules/cdm_dataportal/settings.php | ||
---|---|---|
990 | 990 |
'#default_value' => variable_get('cdm_webservice_url', NULL), |
991 | 991 |
); |
992 | 992 |
|
993 |
$form['cdm_webservice']['cdm_webservice_url_ssl_verify'] = array( |
|
994 |
'#type' => 'checkbox', |
|
995 |
'#title' => t('Verify SSL/TLS certificate') . ':', |
|
996 |
'#description' => 'The ssl/tsl certificate of the CDM web service will not be verified if this options is disabled, . |
|
997 |
This can be helpful if you are running your server with self-signed certificates. Since this is |
|
998 |
discouraged, disabling this options should only be done, if you are fully aware of the security consequences.', |
|
999 |
'#default_value' => variable_get('cdm_webservice_url_ssl_verify', 1), |
|
1000 |
); |
|
1001 |
|
|
993 | 1002 |
$form['cdm_webservice']['cdm_webservice_debug'] = array( |
994 | 1003 |
'#type' => 'markup', |
995 | 1004 |
'#markup' => '<b>Debug CDM Web Service:</b> Debugging web services is possible via the ' . l('CDM web service debug block', 'admin/structure/block/manage/cdm_api/cdm_ws_debug/configure') |
Also available in: Unified diff
fix #9808 option to disable ssl cert validation