You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.map_err(|_| pyo3::exceptions::PyValueError::new_err("Invalid password or PKCS12 data"))?;
639
642
643
+
if asn1::parse_single::<cryptography_x509::pkcs12::Pfx<'_>>(data.as_bytes()).is_err(){
644
+
let warning_cls = pyo3::exceptions::PyUserWarning::type_object(py);
645
+
let message = cstr_from_literal!("PKCS#12 bundle could not be parsed as DER, falling back to parsing as BER. Please file an issue at https://github.com/pyca/cryptography/issues explaining how your PKCS#12 bundle was created. In the future, this may become an exception.");
let result = load_pkcs7_certificates(py, pkcs7_decoded)?;
787
+
if asn1::parse_single::<pkcs7::ContentInfo<'_>>(data).is_err(){
788
+
let warning_cls = pyo3::exceptions::PyUserWarning::type_object(py);
789
+
let message = cstr_from_literal!("PKCS#7 certificates could not be parsed as DER, falling back to parsing as BER. Please file an issue at https://github.com/pyca/cryptography/issues explaining how your PKCS#7 certificates were created. In the future, this may become an exception.");
0 commit comments