Skip to content

Conversation

@tarcieri
Copy link
Member

Renames and replaces the previous ErrorKind::Truncated which carried no additional information with an ErrorKind::Incomplete which carries the expected and actual lengths.

This is useful for incremental processing where a reader might attempt to perform an I/O operation to further fill a buffer in the event that the document is incomplete.

This commit includes a number of incidental changes to handle cases where ErrorKind::Truncated was inappropriately used before. One of the biggest is adding an error type to the spki crate in order to better signal the error conditions (e.g. AlgorithmParametersMissing) which were previously unhelpfully propagated as der::ErrorKind::Truncated.

Renames and replaces the previous `ErrorKind::Truncated` which carried
no additional information with an `ErrorKInd::Incomplete` which carries
the expected and actual lengths.

This is useful for incremental processing where a reader might attempt
to perform an I/O operation to further fill a buffer in the event that
the document is incomplete.

This commit includes a number of incidental changes to handle cases
where `ErrorKind::Truncated` was inappropriately used before. One of the
biggest is adding an error type to the `spki` crate in order to better
signal the error conditions (e.g. `AlgorithmParametersMissing`) which
were previously unhelpfully propagated as `der::ErrorKind::Truncated`.
@tarcieri tarcieri force-pushed the der/incomplete-errorkind branch from 9c20a81 to 5600c6d Compare October 23, 2021 22:14
@tarcieri tarcieri merged commit 2bffb00 into master Oct 23, 2021
@tarcieri tarcieri deleted the der/incomplete-errorkind branch October 23, 2021 22:25
This was referenced Nov 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants