Show More
@@ -324,7 +324,7 b' def _defaultcacerts():' | |||
|
324 | 324 | |
|
325 | 325 | return None |
|
326 | 326 | |
|
327 |
def validatesocket(sock |
|
|
327 | def validatesocket(sock): | |
|
328 | 328 | """Validate a socket meets security requiremnets. |
|
329 | 329 | |
|
330 | 330 | The passed socket must have been created with ``wrapsocket()``. |
@@ -386,17 +386,10 b' def validatesocket(sock, strict=False):' | |||
|
386 | 386 | return |
|
387 | 387 | |
|
388 | 388 | if not sock._hgstate['caloaded']: |
|
389 | if strict: | |
|
390 | raise error.Abort(_('%s certificate with fingerprint %s not ' | |
|
391 | 'verified') % (host, nicefingerprint), | |
|
392 | hint=_('check %s or web.cacerts config ' | |
|
393 | 'setting') % section) | |
|
394 | else: | |
|
395 | ui.warn(_('warning: %s certificate with fingerprint %s ' | |
|
396 | 'not verified (check %s or web.cacerts config ' | |
|
397 | 'setting)\n') % | |
|
398 | (host, nicefingerprint, section)) | |
|
399 | ||
|
389 | ui.warn(_('warning: %s certificate with fingerprint %s ' | |
|
390 | 'not verified (check %s or web.cacerts config ' | |
|
391 | 'setting)\n') % | |
|
392 | (host, nicefingerprint, section)) | |
|
400 | 393 | return |
|
401 | 394 | |
|
402 | 395 | msg = _verifycert(peercert2, host) |
General Comments 0
You need to be logged in to leave comments.
Login now