le howto pour outrepasser les erreurs de certificat auto-signé lors de devs en https local

This commit is contained in:
clem 2020-12-01 23:11:14 +01:00
parent 22e0c42ef2
commit 8e8cfc379a
3 changed files with 15 additions and 0 deletions

View file

@ -192,3 +192,11 @@ $fonction(lire_config('souscriptions/slug_souscription_validation'), $Tdest, $op
* 'contexte' => ['parametre_url_1' => 'valeur_1', 'parametre_url_2' => 'valeur_2', ...] * 'contexte' => ['parametre_url_1' => 'valeur_1', 'parametre_url_2' => 'valeur_2', ...]
* 'nom' => 'nom_fichier_attache' ] * 'nom' => 'nom_fichier_attache' ]
``` ```
## Outrepasser l'erreur de certificat auto-signé lors de devs en https local
=> dans `inc/cherger_pdf.php` décommenter les 2 lignes suivante:
```
// pour une connexion https locale (certificat auto-signé) décommenter les 2 lignes suivantes
curl_setopt($CurlConnect, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($CurlConnect, CURLOPT_SSL_VERIFYPEER, false);
```

View file

@ -0,0 +1,2 @@
[(#AUTORISER{webmestre}|sinon_interdire_acces)]
<INCLURE{fond=inclure/gamumail_config}{env}>

View file

@ -18,6 +18,11 @@ function inc_charger_pdf_dist($fichier_pdf, $contexte = []){
} }
} }
$CurlConnect = curl_init(); $CurlConnect = curl_init();
// pour une connexion https locale (certificat auto-signé) décommenter les 2 lignes suivantes
//curl_setopt($CurlConnect, CURLOPT_SSL_VERIFYHOST, false);
//curl_setopt($CurlConnect, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($CurlConnect, CURLOPT_URL, $url); curl_setopt($CurlConnect, CURLOPT_URL, $url);
curl_setopt($CurlConnect, CURLOPT_RETURNTRANSFER, 1 ); curl_setopt($CurlConnect, CURLOPT_RETURNTRANSFER, 1 );
//curl_setopt($CurlConnect, CURLOPT_POSTFIELDS, $request); //curl_setopt($CurlConnect, CURLOPT_POSTFIELDS, $request);