I'm using the "Legion of the Bouncy Castle" jars and cryptography inside James mailets works fine for me. I had to put them in "C:\james\lib".
 
Here comes a possible hint for you: the java.security file governing the security providers for James in my Windows install is the "C:\Program Files\Java\j2re1.4.2\lib\security\java.security" file. Is it set correctly in your system?
 
Hope it is useful....
 
Vincenzo
-----Original Message-----
From: Intelekia [mailto:[EMAIL PROTECTED]
Sent: sabato 3 luglio 2004 9.00
To: [EMAIL PROTECTED]
Subject: Using Cryptography in a Mailet within James?

Has anybody used cryptography inside James? I am trying to do so (the JCE bundled with J2SE 1.4.2) from a mailet. If I invoke THE SAME class (please see attached sample) from the command line it works fine, but if I run inside James I always get the exception: �Algorithm PBEWithMD5AndDES not available�.

I think this must do with the java permissions and policies, but if have tried the following without any success:

 

-          run phoenix without security manager

-          edit the java.policy file contained in phoenix-loader.jar in order to add specific permissions

-          edit James� environment.xml file to add the following permissions:

 

<server>

    <policy>

      <grant code-base="file:${java.home}${/}jre${/}lib${/}ext${/}-">

         <permission class="java.security.AllPermission" />

      </grant>

      <grant code-base="file:${java.home}${/}..${/}lib${/}-">

         <permission class="java.security.AllPermission" />

      </grant>

      <grant code-base="file:${java.home}${/}lib${/}ext${/}-">

         <permission class="java.security.AllPermission" />

      </grant>

      <grant code-base="file:${app.home}${/}-">

         <permission class="java.security.AllPermission" />

      </grant>

    </policy>

[�]

 

Any help & ideas are welcome, thank you in advance!

 

Isaac.

 

Reply via email to