bcgit / pc-dart

Pointy Castle - Dart Derived Bouncy Castle APIs
MIT License
233 stars 122 forks source link

PKCS12 Support #180

Closed Jakub91 closed 1 year ago

Jakub91 commented 1 year ago

Hello, is it possible that you will add support for PKCS12 in the near future? Thank you.

Ephenodrom commented 1 year ago

@Jakub91 What are your requirements ?

Ephenodrom commented 1 year ago

@Jakub91 PKCS12 creation is now available via https://github.com/Ephenodrom/Dart-Basic-Utils.

Here is an example with the corresponding openssl call :


var privateKey = ''; // PEM
var chain = ['','','']; // LIST OF PEM
// openssl pkcs12 -export -passout pass:Beavis -out bundle.pfx -inkey priv.key -in chain.pem
var bytes = Pkcs12Utils.generatePkcs12(
    privateKey,
    chain,
    password: 'Beavis'
);
Ephenodrom commented 1 year ago

187