Skip to content

Commit

Permalink
Fixed lifetime error in csr.rs with gil-refs disabled (#10756)
Browse files Browse the repository at this point in the history
  • Loading branch information
alex authored Apr 6, 2024
1 parent 5f19fad commit 070ebf2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rust/src/x509/csr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ fn create_x509_csr(
let spki_bytes = private_key
.call_method0(pyo3::intern!(py, "public_key"))?
.call_method1(pyo3::intern!(py, "public_bytes"), (der, spki))?
.extract::<&[u8]>()?;
.extract::<pyo3::pybacked::PyBackedBytes>()?;

let mut attrs = vec![];
let ext_bytes;
Expand Down Expand Up @@ -362,7 +362,7 @@ fn create_x509_csr(
let csr_info = CertificationRequestInfo {
version: 0,
subject: x509::common::encode_name(py, &py_subject_name.as_borrowed())?,
spki: asn1::parse_single(spki_bytes)?,
spki: asn1::parse_single(&spki_bytes)?,
attributes: common::Asn1ReadableOrWritable::new_write(asn1::SetOfWriter::new(attrs)),
};

Expand Down

0 comments on commit 070ebf2

Please sign in to comment.