mirror of
https://github.com/saymrwulf/cryptography.git
synced 2026-05-14 20:37:55 +00:00
This commit is contained in:
parent
6d2d8c2e37
commit
95e57bf5c5
1 changed files with 3 additions and 1 deletions
|
|
@ -176,7 +176,9 @@ fn load_pem_public_key(
|
|||
}
|
||||
}
|
||||
"PUBLIC KEY" => cryptography_key_parsing::spki::parse_public_key(p.contents())?,
|
||||
_ => return Err(CryptographyError::from(pem::PemError::MalformedFraming)),
|
||||
_ => return Err(CryptographyError::from(pyo3::exceptions::PyValueError::new_err(
|
||||
"Valid PEM but no BEGIN PUBLIC KEY/END PUBLIC KEY delimiters. Are you sure this is a public key?"
|
||||
))),
|
||||
};
|
||||
public_key_from_pkey(py, &pkey, pkey.id())
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue