Skip to content

pkcs8: eagerly decode PEM labels#1163

Merged
tarcieri merged 1 commit intomasterfrom
pkcs8/eagerly-decode-pem-label
Jul 23, 2023
Merged

pkcs8: eagerly decode PEM labels#1163
tarcieri merged 1 commit intomasterfrom
pkcs8/eagerly-decode-pem-label

Conversation

@tarcieri
Copy link
Copy Markdown
Member

This should give better errors for invalid PEM type labels even if there are subsequent Base64 processing errors, which might occur if e.g. Base64 is wrapped at a nonstandard width.

Notably such errors will include the expected PEM type label.

This should give better errors for invalid PEM type labels even if there
are subsequent Base64 processing errors, which might occur if e.g.
Base64 is wrapped at a nonstandard width.

Notably such errors will include the expected PEM type label.
@tarcieri tarcieri force-pushed the pkcs8/eagerly-decode-pem-label branch from d8cae03 to a96eb35 Compare July 23, 2023 22:46
@tarcieri tarcieri merged commit 47a73cc into master Jul 23, 2023
@tarcieri tarcieri deleted the pkcs8/eagerly-decode-pem-label branch July 23, 2023 23:01
@tarcieri
Copy link
Copy Markdown
Member Author

Perhaps SecretDocument could have a better API here that passes in the expected type label when decoding.

@tarcieri tarcieri mentioned this pull request Apr 27, 2026
tarcieri added a commit that referenced this pull request Apr 27, 2026
## Added
- Custom error types support to the Decode and DecodeValue traits (#1055)
- PrivateKeyInfoRef / PrivateKeyInfoOwned type aliases (#1483)
- Implement core::error::Error trait for Error (#2302)
- Implement DecodePrivateKey/EncodePrivateKey traits for PrivateKeyInfoOwned (#2306)
- KeyError enum (#2305)
- ctutils feature (#2308)
- getrandom feature (#2311)

## Changed
- Eagerly decode PEM labels for better error messages (#1163)
- Use pbes2::Parameters::generate_recommended (#1430, #2296)
- Make PrivateKeyInfo generic around its backing storage (#1483)
- Bump rand_core to 0.9 (#1658)
- Use 2024 edition; bump MSRV to 1.85 (#1670)
- Bump rand_core to v0.10 (#2198)
- Error::KeyMalformed now wraps an inner KeyError for providing more detail (#2305)
- Use TryCryptoRng instead of CryptoRng (#2309)

## Removed
- subtle feature (#2308)
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.

1 participant