Ephenodrom / Dart-Basic-Utils

A dart package for many helper methods fitting common situations
MIT License
364 stars 77 forks source link

X509 Basic Constraints and PolicyInformation #103

Open alexrocks59 opened 1 year ago

alexrocks59 commented 1 year ago

We currently are using this library to generate self-signed certificate for TLS communication with a 2030.5 meter agent. The library is great and we were able to at least pass the TLS handshake passing the generated self-signed certificate.

The 2030.5 server is now passing us a bad certificate alert and not quite sure what is causing it. We have a sample cert/key generated via openssl which passes this communication. When comparing the cert generated by the library, we found this lacked the extensions basicContraints and PolicyInformation. I started looking at the library code and was wondering if you can give us some guidelines and info we can use to possibly implement these? Thanks so much

Nikoo00o commented 1 year ago

Hi, you can implement support for those extensions and then create a pull request similar to the one i did for the key usage here https://github.com/Ephenodrom/Dart-Basic-Utils/pull/81/files

You just have to read the certificate protocol/documentation on how your extensions have to be encoded.