This commit is contained in:
Kovid Goyal
2022-08-05 08:14:29 +05:30
parent 2a5922ce92
commit b1e0adcfdc

View File

@@ -170,7 +170,6 @@ elliptic_curve_key_get_public(EllipticCurveKey *self, void UNUSED *closure) {
if (!ans) return NULL;
if (1 != EVP_PKEY_get_raw_public_key(self->key, (unsigned char*)PyBytes_AS_STRING(ans), &len)) { Py_CLEAR(ans); return set_error_from_openssl("Could not get public key from EVP_PKEY"); }
return ans;
}
@@ -183,7 +182,6 @@ elliptic_curve_key_get_private(EllipticCurveKey *self, void UNUSED *closure) {
if (mlock(PyBytes_AS_STRING(ans), len) != 0) { Py_CLEAR(ans); return PyErr_SetFromErrno(PyExc_OSError); }
if (1 != EVP_PKEY_get_raw_private_key(self->key, (unsigned char*)ans->secret, &len)) { Py_CLEAR(ans); return set_error_from_openssl("Could not get public key from EVP_PKEY"); }
return (PyObject*)ans;
}