equal
deleted
inserted
replaced
544 if has_https: |
544 if has_https: |
545 class BetterHTTPS(httplib.HTTPSConnection): |
545 class BetterHTTPS(httplib.HTTPSConnection): |
546 send = keepalive.safesend |
546 send = keepalive.safesend |
547 |
547 |
548 def connect(self): |
548 def connect(self): |
549 if hasattr(self, 'ui'): |
549 cacerts = self.ui.config('web', 'cacerts') |
550 cacerts = self.ui.config('web', 'cacerts') |
550 if cacerts: |
551 if cacerts: |
551 cacerts = util.expandpath(cacerts) |
552 cacerts = util.expandpath(cacerts) |
|
553 else: |
|
554 cacerts = None |
|
555 |
552 |
556 hostfingerprint = self.ui.config('hostfingerprints', self.host) |
553 hostfingerprint = self.ui.config('hostfingerprints', self.host) |
557 if cacerts and not hostfingerprint: |
554 if cacerts and not hostfingerprint: |
558 sock = _create_connection((self.host, self.port)) |
555 sock = _create_connection((self.host, self.port)) |
559 self.sock = _ssl_wrap_socket(sock, self.key_file, |
556 self.sock = _ssl_wrap_socket(sock, self.key_file, |