Giter VIP home page Giter VIP logo

Comments (3)

dlongley avatar dlongley commented on July 20, 2024

There was an error with the "algorithm" option name for creating a PKCS#12 via forge. The option wasn't being properly passed through to the private key encryption API.

This has been fixed now -- the correct option name is "algorithm" not "encAlgorithm", however, "encAlgorithm" will still be accepted for backwards compatibility and should actually do the right now. Before, using "encAlgorithm" would have no effect; the default algorithm for encryption (AES-128 CBC) would be chosen. This is why the algorithm information is not displayed by OpenSSL, as it similarly does not display this information for AES-CBC if you use the: -keypbe AES-128-CBC option when exporting a PKCS#12 via OpenSSL's CLI. If you use "3des" now in forge, OpenSSL will display that information via its CLI.

I'm not sure if this actually fixes the problem you have with loading in iOS. The documentation for SecPKCS12Import does seem to indicate it should accept keys encrypted with AES-128-CBC.

from forge.

mvdbos avatar mvdbos commented on July 20, 2024

It does fix the problem! Thanks!

Looking at the openssl default for encrypting a private key when creating a PKCS#12, 3DES is the default algo, unless specified otherwise. It seems SecPKCS12Import assumes this is the case...

Shouldn't 3DES be the default in forge too? Seems the most compatible option.

from forge.

dlongley avatar dlongley commented on July 20, 2024

@matthijsvandenbos, great! As for the default... AES was originally chosen as the default because it was implemented in forge before 3DES. So now that there is 3DES support in forge, AES has precedence. It is also faster and is the effective replacement for 3DES -- which really should only be used for compatibility purposes (with legacy applications) at this point.

from forge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.