Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-5820

Investigate why we get "response contains wrong nonce value" during build tests

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.31, 3.0.2 PDFBox
    • 2.0.32, 3.0.3 PDFBox, 4.0.0
    • Crypto
    • None

    Description

      This happens sometimes. I'll add more debugging output, because I suspect the cause is something else.

      [ERROR] org.apache.pdfbox.examples.pdmodel.TestCreateSignature.testDetachedSHA256(boolean)[2] -- Time elapsed: 0.495 s <<< ERROR!
      java.io.IOException: java.io.IOException: org.bouncycastle.tsp.TSPValidationException: response contains wrong nonce value.
      	at org.apache.pdfbox.examples.signature.CreateEmbeddedTimeStamp.processTimeStamping(CreateEmbeddedTimeStamp.java:128)
      	at org.apache.pdfbox.examples.signature.CreateEmbeddedTimeStamp.embedTimeStamp(CreateEmbeddedTimeStamp.java:98)
      	at org.apache.pdfbox.examples.pdmodel.TestCreateSignature.testDetachedSHA256(TestCreateSignature.java:268)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
      	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
      	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
      	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
      	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
      	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
      	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
      	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
      	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
      	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
      	at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
      	at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658)
      	at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:274)
      	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
      	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
      	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
      	at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
      	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
      	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
      	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
      	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
      	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      	at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
      	at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:274)
      	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
      	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
      	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
      	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
      	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
      	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
      	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
      	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
      	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      	at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
      	at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:274)
      	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
      	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
      	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
      	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
      	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
      	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      	at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
      	at java.base/java.util.concurrent.RecursiveAction.exec(RecursiveAction.java:189)
      	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
      	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
      	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
      	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
      	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
      Caused by: java.io.IOException: org.bouncycastle.tsp.TSPValidationException: response contains wrong nonce value.
      	at org.apache.pdfbox.examples.signature.TSAClient.getTimeStampToken(TSAClient.java:116)
      	at org.apache.pdfbox.examples.signature.ValidationTimeStamp.signTimeStamp(ValidationTimeStamp.java:127)
      	at org.apache.pdfbox.examples.signature.ValidationTimeStamp.addSignedTimeStamp(ValidationTimeStamp.java:101)
      	at org.apache.pdfbox.examples.signature.CreateEmbeddedTimeStamp.processRelevantSignatures(CreateEmbeddedTimeStamp.java:158)
      	at org.apache.pdfbox.examples.signature.CreateEmbeddedTimeStamp.processTimeStamping(CreateEmbeddedTimeStamp.java:115)
      	... 51 more
      Caused by: org.bouncycastle.tsp.TSPValidationException: response contains wrong nonce value.
      	at org.bouncycastle.tsp.TimeStampResponse.validate(Unknown Source)
      	at org.apache.pdfbox.examples.signature.TSAClient.getTimeStampToken(TSAClient.java:112)
      	... 55 more
      

      Attachments

        1. pdfbox.log
          219 kB
          Tilman Hausherr

        Activity

          People

            tilman Tilman Hausherr
            tilman Tilman Hausherr
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: