equal
deleted
inserted
replaced
234 if key == 'DNS': |
234 if key == 'DNS': |
235 try: |
235 try: |
236 if _dnsnamematch(value, hostname): |
236 if _dnsnamematch(value, hostname): |
237 return |
237 return |
238 except wildcarderror as e: |
238 except wildcarderror as e: |
239 return e.message |
239 return e.args[0] |
240 |
240 |
241 dnsnames.append(value) |
241 dnsnames.append(value) |
242 |
242 |
243 if not dnsnames: |
243 if not dnsnames: |
244 # The subject is only checked when there is no DNS in subjectAltName. |
244 # The subject is only checked when there is no DNS in subjectAltName. |
255 |
255 |
256 try: |
256 try: |
257 if _dnsnamematch(value, hostname): |
257 if _dnsnamematch(value, hostname): |
258 return |
258 return |
259 except wildcarderror as e: |
259 except wildcarderror as e: |
260 return e.message |
260 return e.args[0] |
261 |
261 |
262 dnsnames.append(value) |
262 dnsnames.append(value) |
263 |
263 |
264 if len(dnsnames) > 1: |
264 if len(dnsnames) > 1: |
265 return _('certificate is for %s') % ', '.join(dnsnames) |
265 return _('certificate is for %s') % ', '.join(dnsnames) |