Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use DER-specified hash algorithm for PEM decryption #8452

Closed

Conversation

devin-ai-integration[bot]
Copy link

This PR modifies PemToDer to extract and use the hash algorithm from PBES2 parameters in the DER buffer instead of using hardcoded MD5.

The change:

  • Extracts hash type directly from PBES2 parameters in DER buffer
  • Returns error if hash type cannot be determined
  • Uses extracted hash type in wc_BufferKeyDecrypt
  • Includes test coverage through existing test suite

Link to Devin run: https://app.devin.ai/sessions/634dd7963a224df584eeba810bc6f885
Requested by: [email protected]

Copy link
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add "(aside)" to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@wolfSSL-Bot
Copy link

Can one of the admins verify this patch?

@lealem47 lealem47 self-assigned this Feb 14, 2025
- Add support for both WOLFSSL_ASN_TEMPLATE and original ASN implementations
- Use GetSequence and GetAlgoId for original ASN mode
- Use template functions for WOLFSSL_ASN_TEMPLATE mode
- Add proper error handling and messages

Co-Authored-By: [email protected] <[email protected]>
@devin-ai-integration devin-ai-integration bot force-pushed the devin/1739556249-pem-hash-algorithm branch from 5fce419 to 1c08ea4 Compare February 14, 2025 18:55
- Extract hash type from PBES2 parameters in both ASN implementations
- Add proper error handling and messages
- Return ASN_PARSE_E if hash type cannot be determined
- Fix variable declarations and scoping issues

Co-Authored-By: [email protected] <[email protected]>
Copy link
Author

Closing due to inactivity.

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