go-pkcs12 icon indicating copy to clipboard operation
go-pkcs12 copied to clipboard

Address a bunch of Issue, and fix a missing `asn1:optional` flag, add a Config for setting options, and Marshal/Unmarshal

Open pschou opened this issue 3 years ago • 1 comments

Going through the pkcs12 implementation here made me consider that this was missing some things, such as getting the friendly name from a pkcs12 / trust store file. Created a set of Marshal/Unmarshal functions that provide/take algorithm configurations, they provide either a byte (for encoding) or a struct (for decoding) the pkcs12 structure.

The Algorithms are added to the Unmarshal output so the structure can be written back to a file via Marshalling into the same format.

pschou avatar Sep 14 '22 12:09 pschou

@AGWA Can you take a look at this and let me know what you think?

pschou avatar Oct 03 '22 18:10 pschou

Is this PR going to get in? I need support for pbeWithSHAAnd128BitRC2-CBC which this PR provides. I created an issue for that: https://github.com/SSLMate/go-pkcs12/issues/43

vineet-garg avatar Apr 03 '23 06:04 vineet-garg

Same. This has some good fixes, can we get this merged & in a release? 🥺

dmikusa avatar May 02 '23 19:05 dmikusa

Bump it up, looking forward any movement on this PR.

7ing avatar Jul 13 '23 17:07 7ing

Thanks @pschou for your PR. Unfortunately, this PR is extremely large and changes a lot of security-sensitive code and API surface and I just don't have the time to review it.

As I understand it, the most urgent features that people need are:

  • Encoding passwordless truststores (in the same format that Java 18 uses)
  • Encoding with modern algorithms (PBES2 with PBKDF2 and AES-256-CBC; the same algorithms that OpenSSL 3 uses by default)

I've begun working on a minimal, conservative change that adds the above features. I expect this to take much less time than reviewing this PR would.

CC @pivotal-david-osullivan @Tookmund

AGWA avatar Jul 13 '23 21:07 AGWA

Closing in favor of #48. In the future, please consider:

  • Filing an issue for feedback before embarking on major rewrites, feature additions, or API changes.
  • Keeping PRs as short as possible, and splitting unrelated changes into different PRs.

(This is good advice for all open source projects, not just this one.)

AGWA avatar Jul 15 '23 17:07 AGWA