Fix ctap2 fuzz targets to use prod cbor parsing

This fixes a left-over from #329.
This commit is contained in:
Julien Cretin
2021-08-11 15:24:41 +02:00
committed by Julien Cretin
parent 659f8a16a2
commit b5b9d3f6e0
2 changed files with 3 additions and 4 deletions

View File

@@ -122,7 +122,7 @@ pub const ES256_CRED_PARAM: PublicKeyCredentialParameter = PublicKeyCredentialPa
};
// Helpers to perform CBOR read/write while respecting CTAP2 nesting limits.
fn cbor_read(encoded_cbor: &[u8]) -> Result<cbor::Value, Ctap2StatusCode> {
pub fn cbor_read(encoded_cbor: &[u8]) -> Result<cbor::Value, Ctap2StatusCode> {
cbor::reader::read_nested(encoded_cbor, Some(MAX_CBOR_NESTING_DEPTH))
.map_err(|_e| Ctap2StatusCode::CTAP2_ERR_INVALID_CBOR)
}