Giter Club home page Giter Club logo

Comments (3)

zimmi avatar zimmi commented on May 22, 2024

Just as an FYI, the upcoming JDK 8u152 will bring a programmatic way to enable unlimited key strength, without the user having to copy policy files around.

The API is backward compatible, so it might make sense to do this right away. The incantation is:

java.security.Security.setProperty("crypto.policy", "unlimited");

P.S.: I haven't used your library yet, but it looks really good! :)

from bt.

atomashpolskiy avatar atomashpolskiy commented on May 22, 2024

This is very timely and useful info, thank you for sharing! However, I'm struggling to understand from the text, whether this new property will be undefined or set to 'limited' by default in 8u125 (and later)? Common sense tells me that it should be the latter, otherwise this property would be useless in earlier versions. Is my assumption correct?

from bt.

zimmi avatar zimmi commented on May 22, 2024

First off, I'm not an OpenJDK developer.
However, the text says:

By default, the property will be undefined. If the property is undefined and the legacy JCE jurisdiction files don't exist in the legacy lib/security directory, then the default cryptographic level will remain at 'limited'.

Reading that, my understanding is the following:

  • JDK 8u152 and later: With an unmodified JDK, the property will be undefined by default, therefore the cryptographic level will be 'limited' (as it is today)
  • before JDK 8u152: Property will be ignored, still need to copy policy files

So to find out what the current cryptographic level is, it seems like you would still need to do a check for the supported key length like in your first post.
Setting the property might be a useful convenience though, but I'm not sure if that's something a library should do implicitly, because it's a global setting. Maybe just some documentation / demo code?

Edit: For the CLI it does seem like a good default though. Much less hassle! :)

from bt.

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.