enable MD2 algorithm only for a particular place & not for the whole JVM
Is it possible to enable & disable "jdk.certpath.disabledAlgorithms" property programmatically. I want to remove all disabled Algorithms for some time and later I will enable it.
Or is it possible to enable only for a particular place & not in a JVM level. I want that Algorithm need to be enabled for a piece of code, but I don't want it to the remaining part of the application.
Re: enable MD2 algorithm only for a particular place & not for the whole JVM
That property disables it JVM-wide, so no.
If you want a particular part of your application to work under different JVM configuration rules, then you should isolate that part of your application away from the main application and run it in its own private JVM thus creating two separate components to your application stack. The application becomes slightly more complicated that way, but at least you have the amount of control you need to have.