On Thu, 2014-03-06 at 09:11 +0100, Dominik Seichter wrote:

> Andreas, thanks for your fixes and updates. @zyx: Could you please
> review them and maybe commit them to the repository? I don't have any
> time right now to follow patches.

        Hi,
sure thing, I'll be glad to help.

I applied the patch to current trunk (r1582), which worked like a charm.
Unfortunately, invoking the build fails with below errors. Please see
also warnings from gcc.

Andreas, is it possible any chunks are missing in the patch? I also
tried "make clean" after applying your patch and before building, but it
did not help.

By the way, I have some encrypted PDF documents with forms, where PoDoFo
doesn't seem to decrypt form field values properly, using both RC and
AES encryption (two documents). I'm eager to see whether your patch will
address this as well.
        Thanks and bye,
        zyx

---------------------------------------------------------------------------------

[  7%] Building CXX object 
src/CMakeFiles/podofo_static.dir/base/PdfEncrypt.cpp.o
podofo-trunk/src/base/PdfEncrypt.cpp: In constructor 
‘PoDoFo::PdfAESStream::PdfAESStream(unsigned char*, size_t)’:
podofo-trunk/src/base/PdfEncrypt.cpp:405:7: warning: 
‘PoDoFo::PdfAESStream::bOnlyFinalLeft’ will be initialized after [-Wreorder]
  bool bOnlyFinalLeft;
       ^
podofo-trunk/src/base/PdfEncrypt.cpp:403:15: warning:   ‘const size_t 
PoDoFo::PdfAESStream::keyLen’ [-Wreorder]
  const size_t keyLen;
               ^
podofo-trunk/src/base/PdfEncrypt.cpp:336:5: warning:   when initialized here 
[-Wreorder]
     PdfAESStream( unsigned char* key, const size_t keylen )
     ^
podofo-trunk/src/base/PdfEncrypt.cpp: In member function ‘PoDoFo::pdf_long 
PoDoFo::PdfAESStream::Decrypt(unsigned char*, PoDoFo::pdf_long, 
PoDoFo::pdf_long*)’:
podofo-trunk/src/base/PdfEncrypt.cpp:372:88: error: cannot convert 
‘PoDoFo::pdf_long* {aka long int*}’ to ‘int*’ for argument ‘3’ to ‘int 
EVP_DecryptUpdate(EVP_CIPHER_CTX*, unsigned char*, int*, const unsigned char*, 
int)’
    status = EVP_DecryptUpdate( aes, pBuffer, &lOutLen, pBuffer + keyLen, lLen 
- keyLen );
                                                                                
        ^
podofo-trunk/src/base/PdfEncrypt.cpp:378:73: error: cannot convert 
‘PoDoFo::pdf_long* {aka long int*}’ to ‘int*’ for argument ‘3’ to ‘int 
EVP_DecryptUpdate(EVP_CIPHER_CTX*, unsigned char*, int*, const unsigned char*, 
int)’
    status = EVP_DecryptUpdate( aes, tempBuffer, &lOutLen, pBuffer, lLen );
                                                                         ^
podofo-trunk/src/base/PdfEncrypt.cpp:391:72: error: cannot convert 
‘PoDoFo::pdf_long* {aka long int*}’ to ‘int*’ for argument ‘3’ to ‘int 
EVP_DecryptFinal_ex(EVP_CIPHER_CTX*, unsigned char*, int*)’
     status = EVP_DecryptFinal_ex( aes, pBuffer + lOutLen, &lStepOutLen );
                                                                        ^
podofo-trunk/src/base/PdfEncrypt.cpp: In member function ‘virtual void 
PoDoFo::PdfEncryptMD5Base::CreateObjKey(unsigned char*, int*) const’:
podofo-trunk/src/base/PdfEncrypt.cpp:911:68: error: 
‘ePdfEncryptAlgorithm_AESV3’ was not declared in this scope
  if (m_eAlgorithm == ePdfEncryptAlgorithm_AESV2 || m_eAlgorithm == 
ePdfEncryptAlgorithm_AESV3)
                                                                    ^
podofo-trunk/src/base/PdfEncrypt.cpp: In member function ‘void 
PoDoFo::PdfEncryptAESBase::BaseDecrypt(const unsigned char*, int, const 
unsigned char*, const unsigned char*, PoDoFo::pdf_long, unsigned char*, 
PoDoFo::pdf_long&)’:
podofo-trunk/src/base/PdfEncrypt.cpp:1301:70: error: cannot convert 
‘PoDoFo::pdf_long* {aka long int*}’ to ‘int*’ for argument ‘3’ to ‘int 
EVP_DecryptUpdate(EVP_CIPHER_CTX*, unsigned char*, int*, const unsigned char*, 
int)’
     status = EVP_DecryptUpdate(aes, textout, &outLen, textin, textlen);
                                                                      ^
make[2]: *** [src/CMakeFiles/podofo_static.dir/base/PdfEncrypt.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/podofo_static.dir/all] Error 2


> 
-- 
http://www.litePDF.cz                                 i...@litepdf.cz


------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to