mirror of
https://github.com/saymrwulf/cryptography.git
synced 2026-05-14 20:37:55 +00:00
Fixed lifetime errors in certificate.rs with gil-refs disabled (#10760)
This commit is contained in:
parent
2ab8b23dd6
commit
a63af2fcf3
1 changed files with 3 additions and 3 deletions
|
|
@ -58,7 +58,7 @@ impl Certificate {
|
|||
|
||||
fn __repr__(&self, py: pyo3::Python<'_>) -> pyo3::PyResult<String> {
|
||||
let subject = self.subject(py)?;
|
||||
let subject_repr = subject.repr()?.extract::<&str>()?;
|
||||
let subject_repr = subject.repr()?.extract::<pyo3::pybacked::PyBackedStr>()?;
|
||||
Ok(format!("<Certificate(subject={subject_repr}, ...)>"))
|
||||
}
|
||||
|
||||
|
|
@ -927,7 +927,7 @@ fn create_x509_certificate(
|
|||
let spki_bytes = builder
|
||||
.getattr(pyo3::intern!(py, "_public_key"))?
|
||||
.call_method1(pyo3::intern!(py, "public_bytes"), (der, spki))?
|
||||
.extract::<&[u8]>()?;
|
||||
.extract::<pyo3::pybacked::PyBackedBytes>()?;
|
||||
|
||||
let py_serial = builder
|
||||
.getattr(pyo3::intern!(py, "_serial_number"))?
|
||||
|
|
@ -951,7 +951,7 @@ fn create_x509_certificate(
|
|||
not_after: time_from_py(py, &py_not_after)?,
|
||||
},
|
||||
subject: x509::common::encode_name(py, &py_subject_name)?,
|
||||
spki: asn1::parse_single(spki_bytes)?,
|
||||
spki: asn1::parse_single(&spki_bytes)?,
|
||||
issuer_unique_id: None,
|
||||
subject_unique_id: None,
|
||||
raw_extensions: x509::common::encode_extensions(
|
||||
|
|
|
|||
Loading…
Reference in a new issue