File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed
sign/src/main/java/com/itextpdf/signatures Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -482,18 +482,11 @@ private static byte[] buildOCSPResponse(byte[] basicOcspResponse) throws IOExcep
482482 return BOUNCY_CASTLE_FACTORY .createOCSPResp (ocspResponse ).getEncoded ();
483483 }
484484
485- private PdfName getSignatureHashKey (String signatureName ) throws NoSuchAlgorithmException , IOException {
485+ private PdfName getSignatureHashKey (String signatureName ) throws NoSuchAlgorithmException {
486486 PdfSignature sig = sgnUtil .getSignature (signatureName );
487487 PdfString contents = sig .getContents ();
488488 byte [] bc = PdfEncodings .convertToBytes (contents .getValue (), null );
489- byte [] bt = null ;
490- if (PdfName .ETSI_RFC3161 .equals (sig .getSubFilter ())) {
491- try (IASN1InputStream din = BOUNCY_CASTLE_FACTORY .createASN1InputStream (new ByteArrayInputStream (bc ))) {
492- IASN1Primitive pkcs = din .readObject ();
493- bc = pkcs .getEncoded ();
494- }
495- }
496- bt = hashBytesSha1 (bc );
489+ byte [] bt = hashBytesSha1 (bc );
497490 return new PdfName (convertToHex (bt ));
498491 }
499492
You can’t perform that action at this time.
0 commit comments