java.security.AccessControlException: access denied (“java.security.SecurityPermission” “authProvider.SunMSCAPI”)

前端 未结 3 726
粉色の甜心
粉色の甜心 2020-12-09 22:53

Till morning everything working fine in my applet. I took Java update and everything stopped. I\'m dealing with digital certificate using applet. Here is my stack trace. I f

3条回答
  •  北荒
    北荒 (楼主)
    2020-12-09 23:33

    I know it's pretty late to answer here, but adding my solution as I had a tough time with this:

    My Issue: While deploying an application (a WAR file) that has dependencies on Bouncy Castle libraries, I faced this issue: `

    cannot create instance of
    org.bouncycastle.jcajce.provider.digest.GOST3411$Mappings
     java.security.AccessControlException: access denied
    ("java.security.SecurityPermission"
    "putProviderProperty.BC")
    

    `

    Here is what I did and it worked for me: Go to: {Installed JDK path}\jre\lib\security\ Open the file java.policy

    Add permission: permission java.security.SecurityPermission "putProviderProperty.BC";

    Restart the programs to load the changes.

    I am yet to understand how exactly this works or if it is safe to just change java.policy file like this (still looking for other ways to achieve such a configuration).

    Do take precautions with such a change. More at Oracle's doc

提交回复
热议问题