Skip to content

Commit

Permalink
Use correct version when creating CSR
Browse files Browse the repository at this point in the history
  • Loading branch information
kovidgoyal committed Oct 26, 2024
1 parent 89865d8 commit 358a202
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/calibre/utils/certgen.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ static PyObject* create_rsa_cert_req(PyObject *self, PyObject *args) {
if (!KeyPair) return PyErr_Format(PyExc_TypeError, "The key capsule is NULL");
Cert = X509_REQ_new();
if (!Cert) return set_error("X509_REQ_new");
if (!X509_REQ_set_version(Cert, 1)) { set_error("X509_REQ_set_version"); goto error; }
if (!X509_REQ_set_version(Cert, X509_REQ_VERSION_1)) { set_error("X509_REQ_set_version"); goto error; }
Name = X509_REQ_get_subject_name(Cert);
if (!Name) { set_error("X509_REQ_get_subject_name"); goto error; }
if (!add_entry(Name, "C", country)) goto error;
Expand Down

0 comments on commit 358a202

Please sign in to comment.