<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <blockquote type="cite">
      <div class="msgHead" style="color: rgb(0, 0, 0); font-family:
        helvetica, arial, sans-serif; font-size: 14px; font-style:
        normal; font-variant-ligatures: normal; font-variant-caps:
        normal; font-weight: 400; letter-spacing: normal; orphans: 2;
        text-align: start; text-indent: 0px; text-transform: none;
        white-space: normal; widows: 2; word-spacing: 0px;
        -webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
        255); text-decoration-thickness: initial; text-decoration-style:
        initial; text-decoration-color: initial;">
        <p class="darkgray font13" style="font-size: 13px; color:
          rgb(102, 102, 102);"><span class="sender pipe"
            style="margin-right: 0.5em; border-right: 1px solid rgb(221,
            221, 221); padding-right: 0.8em;"><a
href="https://www.mail-archive.com/search?l=qgis-it-user@lists.osgeo.org&q=from:%22Roberta+Fagandini%22"
              rel="nofollow" style="color: rgb(102, 102, 102);
              text-decoration: none;"><span itemprop="author"
                itemscope="" itemtype="http://schema.org/Person"><span
                  itemprop="name">Roberta Fagandini</span></span></a></span><span> </span><span
            class="date"><a
href="https://www.mail-archive.com/search?l=qgis-it-user@lists.osgeo.org&q=date:20211227"
              rel="nofollow" style="color: rgb(102, 102, 102);
              text-decoration: none;">Mon, 27 Dec 2021 04:01:00 -0800</a></span></p>
      </div>
      <div itemprop="articleBody" class="msgBody" style="color: rgb(0,
        0, 0); font-family: helvetica, arial, sans-serif; font-size:
        14px; font-style: normal; font-variant-ligatures: normal;
        font-variant-caps: normal; font-weight: 400; letter-spacing:
        normal; orphans: 2; text-align: start; text-indent: 0px;
        text-transform: none; white-space: normal; widows: 2;
        word-spacing: 0px; -webkit-text-stroke-width: 0px;
        background-color: rgb(255, 255, 255); text-decoration-thickness:
        initial; text-decoration-style: initial; text-decoration-color:
        initial;">
        <pre style="font-family: courier, "courier new", monospace; font-size: 1em; white-space: pre-wrap; overflow-wrap: break-word; margin: 0px;">Utilizzando invece la stessa versione LTR di QGIS
(3.16.14) ma installata con la "vecchia" OSGeo4W (Python 3.7) l'errore
python alla connessione non si verifica.</pre>
      </div>
    </blockquote>
    <br>
    Strano... ho provato anche io con le stesse versioni di QGIS 3.16
    installate tramite OSGeo4W v1 e v2 e io ottengo un errore di
    connessione ssl anche con QGIS 3.16 in OSGeo4W v1:<br>
    <br>
    <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate
    verify failed: Hostname mismatch, certificate is not valid for
    '<a class="moz-txt-link-abbreviated" href="http://www.prgcloud.com">www.prgcloud.com</a>'. (_ssl.c:1045)><br>
    <br>
    <br>
    Infatti il certificato del server è valido per "prgcloud.com" e non
    per "<a class="moz-txt-link-abbreviated" href="http://www.prgcloud.com">www.prgcloud.com</a>" e correggendo la stringa dell'URL utilizzata
    da<br>
    <br>
    req = '<a class="moz-txt-link-freetext" href="https://www.prgcloud.com/auth/usercheck.php?username=">https://www.prgcloud.com/auth/usercheck.php?username=</a>' +
    self.ui.user.text() + '&password=' + self.ui.password.text()<br>
    <br>
    a<br>
    <br>
    req = '<a class="moz-txt-link-freetext" href="https://prgcloud.com/auth/usercheck.php?username=">https://prgcloud.com/auth/usercheck.php?username=</a>' +
    self.ui.user.text() + '&password=' + self.ui.password.text()<br>
    <br>
    la connessione avviene senza problemi.<br>
    <br>
    <br>
    Questa modifica però non da risultati positivi in QGIS 3.16 da
    OSGeo4W v2.<br>
    <br>
    L'unica modifica funzionante sia in QGIS 3.16 e 3.22 da OSGeo4W v2
    che in QGIS 3.16 da OSGeo4W v1 è quella di disabilitare la verifica
    dei certificati.<br>
    <br>
    Si implementa facilmente aggiungendo all'inizio del file
    catdialog.py, dove ci sono i vari "import" di librerie (per esempio
    dopo "import urllib"), la riga:<br>
    <br>
    import ssl<br>
    <br>
    e poi sostituendo ogni occorrenza (dovrebbero essere 4) di:<br>
    <br>
    contextlib.closing(urllib.request.urlopen(req))<br>
    <br>
    con:<br>
    <br>
    contextlib.closing(urllib.request.urlopen(req,
    context=ssl._create_unverified_context()))<br>
    <br>
    <br>
    La stessa cosa va fatta con il file trasfcoord.py.<br>
    <br>
    A presto.<br>
    <br>
    Andrea<br>
  </body>
</html>