summaryrefslogtreecommitdiffstats
path: root/Modules/_ssl.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_ssl.c')
-rw-r--r--Modules/_ssl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
index 8f4062b..ed4bbfd 100644
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -3417,12 +3417,12 @@ certEncodingType(DWORD encodingType)
static PyObject *pkcs_7_asn = NULL;
if (x509_asn == NULL) {
- x509_asn = PyUnicode_InternFromString("x509_asn");
+ x509_asn = PyString_InternFromString("x509_asn");
if (x509_asn == NULL)
return NULL;
}
if (pkcs_7_asn == NULL) {
- pkcs_7_asn = PyUnicode_InternFromString("pkcs_7_asn");
+ pkcs_7_asn = PyString_InternFromString("pkcs_7_asn");
if (pkcs_7_asn == NULL)
return NULL;
}
@@ -3434,7 +3434,7 @@ certEncodingType(DWORD encodingType)
Py_INCREF(pkcs_7_asn);
return pkcs_7_asn;
default:
- return PyLong_FromLong(encodingType);
+ return PyInt_FromLong(encodingType);
}
}
@@ -3475,7 +3475,7 @@ parseKeyUsage(PCCERT_CONTEXT pCertCtx, DWORD flags)
if (usage->rgpszUsageIdentifier[i]) {
PyObject *oid;
int err;
- oid = PyUnicode_FromString(usage->rgpszUsageIdentifier[i]);
+ oid = PyString_FromString(usage->rgpszUsageIdentifier[i]);
if (oid == NULL) {
Py_CLEAR(retval);
goto error;