Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #32601

Re: Anyone know how to set up a bouncycastle?

From Arne Vajhøj <arne@vajhoej.dk>
Newsgroups comp.lang.java.programmer
Subject Re: Anyone know how to set up a bouncycastle?
Date 2015-09-17 22:36 -0400
Organization Aioe.org NNTP Server
Message-ID <mtftbo$l9h$2@speranza.aioe.org> (permalink)
References <5e5ff34b-8293-469c-abd6-10bc2a9f850b@googlegroups.com>

Show all headers | View raw


On 9/17/2015 1:51 PM, e.d.programmer@gmail.com wrote:
> I'm trying to read a PDF using pdfbox, and on one system I get this
> error:
>
> cannot create instance of
> org.bouncycastle.jcajce.provider.digest.GOST3411$Mappings :
> java.security.AccessControlException: access denied
> ("java.security.SecurityPermission" "putProviderProperty.BC")
> java.lang.InternalError: cannot create instance of
> org.bouncycastle.jcajce.provider.digest.GOST3411$Mappings :
> java.security.AccessControlException: access denied
> ("java.security.SecurityPermission" "putProviderProperty.BC")
> org.bouncycastle.jce.provider.BouncyCastleProvider.loadAlgorithms(Unknown
> Source)
> org.bouncycastle.jce.provider.BouncyCastleProvider.setup(Unknown
> Source)
> org.bouncycastle.jce.provider.BouncyCastleProvider.access$000(Unknown
> Source)
> org.bouncycastle.jce.provider.BouncyCastleProvider$1.run(Unknown
> Source) java.security.AccessController.doPrivileged(Native Method)
> org.bouncycastle.jce.provider.BouncyCastleProvider.<init>(Unknown
> Source)
> org.apache.pdfbox.pdmodel.encryption.SecurityHandlerFactory.<clinit>(SecurityHandlerFactory.java:44)

Wild guess - in your java.security.policy add this permission:

grant {
    permission java.security.SecurityPermission "putProviderProperty.BC";
    ...
};

Arne

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Anyone know how to set up a bouncycastle? e.d.programmer@gmail.com - 2015-09-17 10:51 -0700
  Re: Anyone know how to set up a bouncycastle? Arne Vajhøj <arne@vajhoej.dk> - 2015-09-17 22:36 -0400
    Re: Anyone know how to set up a bouncycastle? e.d.programmer@gmail.com - 2015-09-18 05:45 -0700
      Re: Anyone know how to set up a bouncycastle? Arne Vajhøj <arne@vajhoej.dk> - 2015-09-18 20:04 -0400
  Re: Anyone know how to set up a bouncycastle? Jeff Higgins <jeff@invalid.invalid> - 2015-09-18 10:26 -0400

csiph-web