Skip to content

Conversation

Bishop19
Copy link

@Bishop19 Bishop19 commented May 22, 2025

This PR is inspired by ISO 18013-5, in which I need to define some attributes and set them on the extensions of a certificate. Therefore, this PR:

  • adds support for custom extensions
    • a new param on generateEccCsrPem to represent the custom extensions that a user wants to add to the CSR
      • the value of an extension can be String, int, List<String> or bool
      • I tried to maintain compatibility with the existing SAN extension
  • adds parsing for new extensions on X509CertificateDataExtensions (subjectKeyIdentifier, authorityKeyIdentifier and authorityInfoAccess)
    • if it is a known extension and there is no parsing for it, it just prints that (change this? Maybe add List<String> unsupportedExtensions field, because throwing an Exception would block all parsing)

TODO:

  • add support for custom extensions on generateRsaCsrPem (if generateEccCsrPem looks good)

Note:

  • I couldn't get build_runner to run and change the *.g.dart files. Only if I set the minimum sdk version to 3.0.0. Since I don't know if you want that change, I modified these files by hand (despite the warning). If you want that, I can just commit that change
  • Would help with How to request extensions in generateRsaCsrPem #74 ?

@Bishop19
Copy link
Author

Bishop19 commented Jun 5, 2025

@Ephenodrom bump 🙏🏼

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