summaryrefslogtreecommitdiffstats
path: root/Modules/_ssl.c
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2013-11-22 16:08:25 (GMT)
committerBarry Warsaw <barry@python.org>2013-11-22 16:08:25 (GMT)
commit9e6097ebe7bb99a4a22b949ef4b1563b21ad7166 (patch)
treee51d885f796058f800d6b1a5179e782a9f2617e7 /Modules/_ssl.c
parent87b9637a86876f86302a659da3b2e52a5cae5314 (diff)
parent5398e1a56e4483a16e4620758aad0d91e986653f (diff)
downloadcpython-9e6097ebe7bb99a4a22b949ef4b1563b21ad7166.zip
cpython-9e6097ebe7bb99a4a22b949ef4b1563b21ad7166.tar.gz
cpython-9e6097ebe7bb99a4a22b949ef4b1563b21ad7166.tar.bz2
Trunk merge.
Diffstat (limited to 'Modules/_ssl.c')
-rw-r--r--Modules/_ssl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
index f32d180..180355b 100644
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -3387,7 +3387,7 @@ PySSL_txt2obj(PyObject *self, PyObject *args, PyObject *kwds)
}
obj = OBJ_txt2obj(txt, name ? 0 : 1);
if (obj == NULL) {
- PyErr_Format(PyExc_ValueError, "Unknown object");
+ PyErr_Format(PyExc_ValueError, "unknown object '%.100s'", txt);
return NULL;
}
result = asn1obj2py(obj);
@@ -3411,12 +3411,12 @@ PySSL_nid2obj(PyObject *self, PyObject *args)
return NULL;
}
if (nid < NID_undef) {
- PyErr_Format(PyExc_ValueError, "NID must be positive.");
+ PyErr_SetString(PyExc_ValueError, "NID must be positive.");
return NULL;
}
obj = OBJ_nid2obj(nid);
if (obj == NULL) {
- PyErr_Format(PyExc_ValueError, "Unknown NID");
+ PyErr_Format(PyExc_ValueError, "unknown NID %i", nid);
return NULL;
}
result = asn1obj2py(obj);