I've read the following thread in your mailing list
    archive.
    From: Paulo Soares <[EMAIL PROTECTED]> 
    RE: strange signature creation in itext  
    2005-09-28 01:54    
    There's nothing strange with that. All te pdfs
have
    an internal creation
    date and that alone would be enough to get a
    different hash. 
    
     -----Original Message-----
      From: Tamas Nemeth
    [mailto:[EMAIL PROTECTED] 
      Sent: Tuesday, September 27, 2005 11:16 PM
      To: [EMAIL PROTECTED]; Paulo Soares
      Subject: strange signature creation in itext
      
      Hi!
      
      I'm trying to create command line pdf signer,
    which creates a signed
      pdf in 2 part. First an external program calls
me
    to get a hash (my

      program creates the hash and gives back to the
    external program), then
      the external program creates a pkcs7 file onto
    that hash and gives
     back to my command line program. After that my
    command line program
      inserts the hash into the pdf file.
      This works good, but sometimes (10:1) I get
    different hash when I
      create hash, and when I try to insert the pkcs7
    file into the pdf.
      As I see iText sometimes creates different pdf
    structure and that is
      why I get different hash values. I can't see the
    logic behind that.
      Can somebody tell meg, why creates iText
different
    structure
      sometimes. Is there any way to always create the
    same structure (hash)
      onto the same pdf? 
    
    I have the same problem. So I don't think the
problem
    of calculating different hashes is the internal
    creation date because:
    1. I've tried to put this creation date
    programmatically through the following code:
        Calendar cal = Calendar.getInstance();
        long l = 1156153389444L;
        cal.setTimeInMillis(l);
        sap.setSignDate(cal); 
    , so the creation date is the same all the time.
    2. The problem appears only on Linux(Trustix
Secure
    Linux 3.0) OS. In Windows it works just fine - the
    hash of given document is equal all times. On
Linux
    the hash is same all the times only if the java
    interpreter mode is chosen(java -Xint). But then
it
    works 10 times slower. Java version on both OS : 
jdk 1.5.0_02. IText version: itext-paulo-155.jar.
    
    I hope you can help me fix this problem. Thanks in
    advance!
    Best regards,
    Dimitar 



 
____________________________________________________________________________________
Bored stiff? Loosen up... 
Download and play hundreds of games for free on Yahoo! Games.
http://games.yahoo.com/games/front

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to