It seems an excessive setting but, for example, if Computer1 is a mobile device, Computer2 is a server and Computer3 is a smartcard we are in a real scenario.
On 13 September 2012 01:10, Leonard Rosenthol <[email protected]> wrote: > Why would you ever want a scenario with three computers to do something as > simple as signing a file? This just seems like extreme overkill for no > practical reason. > > As discussed, you will either need to cache the "prepared for signing" > file or modify the iText sources. > > Leonard > > On 9/13/12 5:42 AM, "Alvaro Cuno" <[email protected]> wrote: > >>Sorry, I was too brief ... let me explain more in detail my use case: >> >>Computer1 Computer2 Computer3 >> o----getMetahash(pdf, params)--->o >> o<---------------metahash---------------o >> o-------------------------------cipher(metahash)------------->o >> o<----------------------------------signature----------------------o >> o-------signDoc(pdf, signature)---->o >> o<-----signedPdf-------------------------o >> >>Notice that the only one needs to know about pdf processing is >>Computer2, and because it can't store any intermediate results >>Computer2 need to generate the same pdf structure twice. I think the >>setting before is a deferred signing because the multiple steps. >> >>However, if the placement of objects is random then I will have to >>redesign the previous scenario. >> >>Thanks for the advice >> >>- >>Alvaro >> >>On 12 September 2012 00:37, Leonard Rosenthol <[email protected]> wrote: >>> Deferred signing doesn't care about the order of the objects…. >>> >>> People have been implementing such for over a decade w/o any problems…. >>> >>> Leonard >>> >>> On 9/12/12 6:00 AM, "Alvaro Cuno" <[email protected]> wrote: >>> >>>>Hello, a useful example is on deferred signing ... >>>> >>>>Alvaro >>>> >>>>On 11 September 2012 02:00, Leonard Rosenthol <[email protected]> >>>>wrote: >>>>> Neither iText nor any other PDF producer has such an option, because >>>>>it >>>>> serves no useful purpose. >>>>> >>>>> I still don't understand why it matters since the PDF is valid and >>>>> processes correctly. >>>>> >>>>> Leonard >>>>> >>>>> On 9/11/12 5:30 AM, "Alvaro Cuno" <[email protected]> wrote: >>>>> >>>>>>Ok, if not is a pdf standard requirement, how can I set the fixed form >>>>>>instead of the free form? that is it possible? ... I noticed the fact >>>>>>because I was experimenting implement digital signatures using >>>>>>multiple machines so I can use only local variables. >>>>>> >>>>>>Greats >>>>>>- >>>>>>Alvaro >>>>>> >>>>>> >>>>>>On 10 September 2012 01:58, Leonard Rosenthol <[email protected]> >>>>>>wrote: >>>>>>> Because object numbering and their location in a PDF are completely >>>>>>>free >>>>>>> form there are no requirements. >>>>>>> >>>>>>> Why does it matter? >>>>>>> >>>>>>> From: Alvaro Cuno <[email protected]> >>>>>>> Reply-To: Post here <[email protected]> >>>>>>> To: Post here <[email protected]> >>>>>>> Subject: [iText-questions] are the dictionary elements randomly >>>>>>>placed? >>>>>>> >>>>>>> >>>>>>> Hello all, >>>>>>> >>>>>>> I signed a same file (hello.pdf) three times using the next code: >>>>>>> >>>>>>> public static void sign(String src, String dest) >>>>>>> throws IOException, DocumentException, >>>>>>>KeyStoreException, >>>>>>> NoSuchAlgorithmException, CertificateException, >>>>>>> UnrecoverableKeyException { >>>>>>> >>>>>>> Security.addProvider(new BouncyCastleProvider()); >>>>>>> KeyStore ks = KeyStore.getInstance("pkcs12"); >>>>>>> ks.load(new FileInputStream("citizen1.p12"), >>>>>>> "password".toCharArray()); >>>>>>> String alias = (String) ks.aliases().nextElement(); >>>>>>> PrivateKey key = (PrivateKey) ks.getKey(alias, >>>>>>> "password".toCharArray()); >>>>>>> Certificate[] chain = ks.getCertificateChain(alias); >>>>>>> >>>>>>> PdfReader reader = new PdfReader(src); >>>>>>> FileOutputStream os = new FileOutputStream(dest); >>>>>>> PdfStamper stamper = PdfStamper.createSignature(reader, os, >>>>>>>'\0', >>>>>>> null, true); >>>>>>> PdfSignatureAppearance appearance = >>>>>>> stamper.getSignatureAppearance(); >>>>>>> appearance.setAcro6Layers(true); >>>>>>> appearance.setCrypto(key, chain, null, >>>>>>> PdfSignatureAppearance.WINCER_SIGNED); >>>>>>> appearance.setVisibleSignature(new Rectangle(160, 732, 232, >>>>>>>780), 1, >>>>>>> null); >>>>>>> Calendar cal = Calendar.getInstance(); >>>>>>> cal.setTime(new Date(0)); >>>>>>> appearance.setSignDate(cal); >>>>>>> stamper.close(); >>>>>>> } >>>>>>> >>>>>>> Everything is ok and all digital signatures are valid, however I >>>>>>>don't >>>>>>> understand why the internal structures of the signed documents (see >>>>>>>attached >>>>>>> files) are different? >>>>>>> >>>>>>> >>>>>>> hello-signed-1.pdf hello-signed-2.pdf hello-signed-3.pdf >>>>>>> ... ... >>>>>>>... >>>>>>> %%EOF %%EOF %%EOF >>>>>>> ... ... >>>>>>>... >>>>>>> 10 0 obj 10 0 obj 10 0 >>>>>>>obj >>>>>>> 11 0 obj 8 0 obj 11 0 >>>>>>>obj >>>>>>> 12 0 obj 11 0 obj 12 0 >>>>>>>obj >>>>>>> 8 0 obj 9 0 obj 9 0 >>>>>>>obj >>>>>>> 9 0 obj 12 0 obj 8 0 >>>>>>>obj >>>>>>> 5 0 obj 5 0 obj 5 0 >>>>>>>obj >>>>>>> ... ... >>>>>>>... >>>>>>> >>>>>>> >>>>>>> The objects 8, 9 and 11 are related to /n0, /n2, /FRM fields, ... >>>>>>>these >>>>>>> were inserted randomly? if yes, why? >>>>>>> >>>>>>> - >>>>>>> Alvaro >>>>>>> >>>>>>> >>>>>>> >>>>>>>--------------------------------------------------------------------- >>>>>>>-- >>>>>>>-- >>>>>>>----- >>>>>>> Live Security Virtual Conference >>>>>>> Exclusive live event will cover all the ways today's security and >>>>>>> threat landscape has changed and how IT managers can respond. >>>>>>>Discussions >>>>>>> will include endpoint security, mobile security and the latest in >>>>>>>malware >>>>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>>>> _______________________________________________ >>>>>>> iText-questions mailing list >>>>>>> [email protected] >>>>>>> https://lists.sourceforge.net/lists/listinfo/itext-questions >>>>>>> >>>>>>> iText(R) is a registered trademark of 1T3XT BVBA. >>>>>>> Many questions posted to this list can (and will) be answered with a >>>>>>> reference to the iText book: http://www.itextpdf.com/book/ >>>>>>> Please check the keywords list before you ask for examples: >>>>>>> http://itextpdf.com/themes/keywords.php >>>>>> >>>>>>---------------------------------------------------------------------- >>>>>>-- >>>>>>-- >>>>>>---- >>>>>>Live Security Virtual Conference >>>>>>Exclusive live event will cover all the ways today's security and >>>>>>threat landscape has changed and how IT managers can respond. >>>>>>Discussions >>>>>>will include endpoint security, mobile security and the latest in >>>>>>malware >>>>>>threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>>>_______________________________________________ >>>>>>iText-questions mailing list >>>>>>[email protected] >>>>>>https://lists.sourceforge.net/lists/listinfo/itext-questions >>>>>> >>>>>>iText(R) is a registered trademark of 1T3XT BVBA. >>>>>>Many questions posted to this list can (and will) be answered with a >>>>>>reference to the iText book: http://www.itextpdf.com/book/ >>>>>>Please check the keywords list before you ask for examples: >>>>>>http://itextpdf.com/themes/keywords.php >>>>> >>>>> >>>>> >>>>>----------------------------------------------------------------------- >>>>>-- >>>>>----- >>>>> Live Security Virtual Conference >>>>> Exclusive live event will cover all the ways today's security and >>>>> threat landscape has changed and how IT managers can respond. >>>>>Discussions >>>>> will include endpoint security, mobile security and the latest in >>>>>malware >>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>> _______________________________________________ >>>>> iText-questions mailing list >>>>> [email protected] >>>>> https://lists.sourceforge.net/lists/listinfo/itext-questions >>>>> >>>>> iText(R) is a registered trademark of 1T3XT BVBA. >>>>> Many questions posted to this list can (and will) be answered with a >>>>>reference to the iText book: http://www.itextpdf.com/book/ >>>>> Please check the keywords list before you ask for examples: >>>>>http://itextpdf.com/themes/keywords.php >>>> >>>>------------------------------------------------------------------------ >>>>-- >>>>---- >>>>Live Security Virtual Conference >>>>Exclusive live event will cover all the ways today's security and >>>>threat landscape has changed and how IT managers can respond. >>>>Discussions >>>>will include endpoint security, mobile security and the latest in >>>>malware >>>>threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>_______________________________________________ >>>>iText-questions mailing list >>>>[email protected] >>>>https://lists.sourceforge.net/lists/listinfo/itext-questions >>>> >>>>iText(R) is a registered trademark of 1T3XT BVBA. >>>>Many questions posted to this list can (and will) be answered with a >>>>reference to the iText book: http://www.itextpdf.com/book/ >>>>Please check the keywords list before you ask for examples: >>>>http://itextpdf.com/themes/keywords.php >>> >>> >>>------------------------------------------------------------------------- >>>----- >>> Live Security Virtual Conference >>> Exclusive live event will cover all the ways today's security and >>> threat landscape has changed and how IT managers can respond. >>>Discussions >>> will include endpoint security, mobile security and the latest in >>>malware >>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>> _______________________________________________ >>> iText-questions mailing list >>> [email protected] >>> https://lists.sourceforge.net/lists/listinfo/itext-questions >>> >>> iText(R) is a registered trademark of 1T3XT BVBA. >>> Many questions posted to this list can (and will) be answered with a >>>reference to the iText book: http://www.itextpdf.com/book/ >>> Please check the keywords list before you ask for examples: >>>http://itextpdf.com/themes/keywords.php >> >>-------------------------------------------------------------------------- >>---- >>Live Security Virtual Conference >>Exclusive live event will cover all the ways today's security and >>threat landscape has changed and how IT managers can respond. Discussions >>will include endpoint security, mobile security and the latest in malware >>threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>_______________________________________________ >>iText-questions mailing list >>[email protected] >>https://lists.sourceforge.net/lists/listinfo/itext-questions >> >>iText(R) is a registered trademark of 1T3XT BVBA. >>Many questions posted to this list can (and will) be answered with a >>reference to the iText book: http://www.itextpdf.com/book/ >>Please check the keywords list before you ask for examples: >>http://itextpdf.com/themes/keywords.php > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > iText-questions mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/itext-questions > > iText(R) is a registered trademark of 1T3XT BVBA. > Many questions posted to this list can (and will) be answered with a > reference to the iText book: http://www.itextpdf.com/book/ > Please check the keywords list before you ask for examples: > http://itextpdf.com/themes/keywords.php ------------------------------------------------------------------------------ Got visibility? Most devs has no idea what their production app looks like. Find out how fast your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219671;13503038;y? http://info.appdynamics.com/FreeJavaPerformanceDownload.html _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
