trunk merge

This commit is contained in:
Barry Warsaw 2013-11-21 18:57:41 -05:00
commit 99fc416b23
3 changed files with 3 additions and 3 deletions

View File

@ -1801,7 +1801,6 @@ else:
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1) context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
context.verify_mode = ssl.CERT_REQUIRED context.verify_mode = ssl.CERT_REQUIRED
context.load_verify_locations(SIGNING_CA) context.load_verify_locations(SIGNING_CA)
context.verify_mode = ssl.CERT_REQUIRED
context.verify_flags = ssl.VERIFY_DEFAULT context.verify_flags = ssl.VERIFY_DEFAULT
# VERIFY_DEFAULT should pass # VERIFY_DEFAULT should pass

View File

@ -2520,7 +2520,7 @@ _add_ca_certs(PySSLContext *self, void *data, Py_ssize_t len,
return -1; return -1;
} }
biobuf = BIO_new_mem_buf(data, len); biobuf = BIO_new_mem_buf(data, (int)len);
if (biobuf == NULL) { if (biobuf == NULL) {
_setSSLError("Can't allocate buffer", 0, __FILE__, __LINE__); _setSSLError("Can't allocate buffer", 0, __FILE__, __LINE__);
return -1; return -1;

View File

@ -835,7 +835,8 @@ xmlparse_Parse(xmlparseobject *self, PyObject *args)
s += MAX_CHUNK_SIZE; s += MAX_CHUNK_SIZE;
slen -= MAX_CHUNK_SIZE; slen -= MAX_CHUNK_SIZE;
} }
rc = XML_Parse(self->itself, s, slen, isFinal); assert(MAX_CHUNK_SIZE < INT_MAX && slen < INT_MAX);
rc = XML_Parse(self->itself, s, (int)slen, isFinal);
done: done:
if (view.buf != NULL) if (view.buf != NULL)