diff --git a/harvest/oai.ini b/harvest/oai.ini index e71fcb56f9018691f6cb8de5bab40dc4ec1317f0..da519756eb823eb7a5d8f9bdc2c4a259307a5968 100644 --- a/harvest/oai.ini +++ b/harvest/oai.ini @@ -16,6 +16,7 @@ ; dateGranularity = auto ; harvestedIdLog = harvest.log ; verbose = false +; sslverifypeer = true ; ; The section_name may be passed to harvest_oai.php as a parameter to harvest only ; records from that source. This is also the directory name that records will be @@ -74,6 +75,9 @@ ; verbose may be set to true in order to display more detailed output while ; harvesting; this may be useful for troubleshooting purposes, but it defaults to ; false. +; +; sslverifypeer may be set to false to disable SSL certificate checking; it defaults +; to true, and changing the setting is not recommended. ; SAMPLE CONFIGURATION FOR OPEN JOURNAL SYSTEMS ;[OJS] diff --git a/module/VuFind/src/VuFind/Harvester/OAI.php b/module/VuFind/src/VuFind/Harvester/OAI.php index 2564a0c8d0143e381b0b0886a65a34a60922891d..0fa942941ea2746e54d2e9813913e4eef237bc88 100644 --- a/module/VuFind/src/VuFind/Harvester/OAI.php +++ b/module/VuFind/src/VuFind/Harvester/OAI.php @@ -194,6 +194,11 @@ class OAI // Store client: $this->client = $client; + // Disable SSL verification if requested: + if (isset($settings['sslverifypeer']) && !$settings['sslverifypeer']) { + $this->client->setOptions(array('sslverifypeer' => false)); + } + // Don't time out during harvest!! set_time_limit(0);