Index: Collection.php
===================================================================
--- Collection.php	(revision 42096)
+++ Collection.php	(working copy)
@@ -40,6 +40,9 @@
 /** URL of mw-serve render server */
 $wgCollectionMWServeURL = 'http://tools.pediapress.com/mw-serve/';
 
+/** PEM-encoded SSL certificate for the mw-serve render server to pass to CURL*/
+$wgCollectionPDFserverCert = null;
+
 /** Login credentials to this MediaWiki as 'USERNAME:PASSWORD' string */
 $wgCollectionMWServeCredentials = null;
 
Index: Collection.body.php
===================================================================
--- Collection.body.php	(revision 42096)
+++ Collection.body.php	(working copy)
@@ -1312,6 +1312,7 @@
 	static function post( $url, $postFields, &$errorMessage, &$headers,
 		$timeout=true, $toFile=null ) {
 		global $wgHTTPTimeout, $wgHTTPProxy, $wgVersion, $wgTitle;
+		global $wgCollectionPDFserverCert;
 	
 		$c = curl_init( $url );
 		curl_setopt($c, CURLOPT_PROXY, $wgHTTPProxy);
@@ -1325,6 +1326,14 @@
 		if ( $timeout ) {
 			curl_setopt( $c, CURLOPT_TIMEOUT, $wgHTTPTimeout );
 		}
+		/* Allow the use of self-signed certificates by referencing
+		 * a local (to the mediawiki install) copy of the signing
+		 * certificate */
+		if ( !($wgCollectionPDFserverCert === null) ) {
+			curl_setopt ($c, CURLOPT_SSL_VERIFYPEER, TRUE); 
+			curl_setopt ($c, CURLOPT_CAINFO, $wgCollectionPDFserverCert);
+		}
+		/* end local certificate code */
 		$headerStream = tmpfile();
 		curl_setopt( $c, CURLOPT_WRITEHEADER, $headerStream );
 		if ( $toFile ) {
