tools/upip: Upgrade to 1.2.2.
TLS SNI support, fixes after making str.rstrip() behavior compliant.
This commit is contained in:
parent
bdc6e86e07
commit
2f7827ba8f
@ -122,7 +122,7 @@ def url_open(url):
|
|||||||
s.connect(addr)
|
s.connect(addr)
|
||||||
|
|
||||||
if proto == "https:":
|
if proto == "https:":
|
||||||
s = ussl.wrap_socket(s)
|
s = ussl.wrap_socket(s, server_hostname=host)
|
||||||
if warn_ussl:
|
if warn_ussl:
|
||||||
print("Warning: %s SSL certificate is not validated" % host)
|
print("Warning: %s SSL certificate is not validated" % host)
|
||||||
warn_ussl = False
|
warn_ussl = False
|
||||||
|
@ -3,7 +3,7 @@ import uctypes
|
|||||||
# http://www.gnu.org/software/tar/manual/html_node/Standard.html
|
# http://www.gnu.org/software/tar/manual/html_node/Standard.html
|
||||||
TAR_HEADER = {
|
TAR_HEADER = {
|
||||||
"name": (uctypes.ARRAY | 0, uctypes.UINT8 | 100),
|
"name": (uctypes.ARRAY | 0, uctypes.UINT8 | 100),
|
||||||
"size": (uctypes.ARRAY | 124, uctypes.UINT8 | 12),
|
"size": (uctypes.ARRAY | 124, uctypes.UINT8 | 11),
|
||||||
}
|
}
|
||||||
|
|
||||||
DIRTYPE = "dir"
|
DIRTYPE = "dir"
|
||||||
@ -75,8 +75,8 @@ class TarFile:
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
d = TarInfo()
|
d = TarInfo()
|
||||||
d.name = str(h.name, "utf-8").rstrip()
|
d.name = str(h.name, "utf-8").rstrip("\0")
|
||||||
d.size = int(bytes(h.size).rstrip(), 8)
|
d.size = int(bytes(h.size), 8)
|
||||||
d.type = [REGTYPE, DIRTYPE][d.name[-1] == "/"]
|
d.type = [REGTYPE, DIRTYPE][d.name[-1] == "/"]
|
||||||
self.subf = d.subf = FileSection(self.f, d.size, roundup(d.size, 512))
|
self.subf = d.subf = FileSection(self.f, d.size, roundup(d.size, 512))
|
||||||
return d
|
return d
|
||||||
|
Loading…
x
Reference in New Issue
Block a user