Mercurial > hg
comparison mercurial/sslutil.py @ 29501:be68a4445041
merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 11 Jul 2016 08:54:13 -0500 |
parents | 4b16a5bd9948 a7d1532b26a1 |
children | 97dcdcf75f4f |
comparison
equal
deleted
inserted
replaced
29500:4b16a5bd9948 | 29501:be68a4445041 |
---|---|
382 if key == 'DNS': | 382 if key == 'DNS': |
383 try: | 383 try: |
384 if _dnsnamematch(value, hostname): | 384 if _dnsnamematch(value, hostname): |
385 return | 385 return |
386 except wildcarderror as e: | 386 except wildcarderror as e: |
387 return e.message | 387 return e.args[0] |
388 | 388 |
389 dnsnames.append(value) | 389 dnsnames.append(value) |
390 | 390 |
391 if not dnsnames: | 391 if not dnsnames: |
392 # The subject is only checked when there is no DNS in subjectAltName. | 392 # The subject is only checked when there is no DNS in subjectAltName. |
403 | 403 |
404 try: | 404 try: |
405 if _dnsnamematch(value, hostname): | 405 if _dnsnamematch(value, hostname): |
406 return | 406 return |
407 except wildcarderror as e: | 407 except wildcarderror as e: |
408 return e.message | 408 return e.args[0] |
409 | 409 |
410 dnsnames.append(value) | 410 dnsnames.append(value) |
411 | 411 |
412 if len(dnsnames) > 1: | 412 if len(dnsnames) > 1: |
413 return _('certificate is for %s') % ', '.join(dnsnames) | 413 return _('certificate is for %s') % ', '.join(dnsnames) |