Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Thanks to Richard, Simon, Mark Myers, and giulio for looking at the question.</p> <p>I finally got round to understanding Mikkel's article (by reading it <strong>really</strong> slowly) on:</p> <p><a href="http://lekkimworld.com/2013/06/20/java_in_notes_domino_explained_on_java_security_and_how_it_relates_to_notes_domino.html" rel="nofollow">http://lekkimworld.com/2013/06/20/java_in_notes_domino_explained_on_java_security_and_how_it_relates_to_notes_domino.html</a></p> <p>The solution was easier than I thought, I was confused by the reflection example.</p> <p>It's a more elegant way than modifying the java.policy file (which I didn't manage, btw).</p> <p>I modified the class that was creating troubles when I was calling its decrypt() method by adding a new method dopriviledgeddecrypt() which is a cunning wrapper around the method that was causing troubles. I then modified all the callers to PDFDecryptor.decrypt() so that they were calling PDFDecryptor.dopriviledgeddecrypt(). The last step involves exporting the whole class to a jar file, which is then placed in the \jvm\lib\ext folder on both the machine where you are developing (in the client) and on all the servers where this code will run.</p> <p>I was also unable to find out whether there is a syntax for modifying the java.policy file so that it affects only a single Notes Database. (Update: I now know that this is not possible)</p> <pre><code>package com.magerman.hremail.prep1docc; public class PDFDecryptor { /** * Instantiates a new pDF decryptor. * * @param inputFile * the input file * @param inputPassword * the input password */ public PDFDecryptor(final File inputFile, final String inputPassword) { originalFile = inputFile; password = inputPassword; } /** * Decrypt. Given an inputted PDF File, will try to remove the security of * the PDF and save in-place. Done after the attachments have been extracted */ public final void decrypt() { // naughty code here } public final void doproviledgeddecrypt() throws Exception { AccessController.doPrivileged(new PrivilegedExceptionAction() { public Object run() throws Exception { PDFDecryptor.this.decrypt(); return null; } }); } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload