Browse code

Merge "Don't use ipv6 for DNS SAN fields with python3"

Zuul authored on 2018/10/17 02:30:29
Showing 1 changed files
... ...
@@ -227,9 +227,13 @@ function init_CA {
227 227
 function init_cert {
228 228
     if [[ ! -r $DEVSTACK_CERT ]]; then
229 229
         if [[ -n "$TLS_IP" ]]; then
230
-            # Lie to let incomplete match routines work
231
-            # see https://bugs.python.org/issue23239
232
-            TLS_IP="DNS:$TLS_IP,IP:$TLS_IP"
230
+            if python3_enabled; then
231
+                TLS_IP="IP:$TLS_IP"
232
+            else
233
+                # Lie to let incomplete match routines work with python2
234
+                # see https://bugs.python.org/issue23239
235
+                TLS_IP="DNS:$TLS_IP,IP:$TLS_IP"
236
+            fi
233 237
         fi
234 238
         make_cert $INT_CA_DIR $DEVSTACK_CERT_NAME $DEVSTACK_HOSTNAME "$TLS_IP"
235 239