<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to tickets</title><link href="https://sourceforge.net/p/emark/tickets/" rel="alternate"/><link href="https://sourceforge.net/p/emark/tickets/feed.atom" rel="self"/><id>https://sourceforge.net/p/emark/tickets/</id><updated>2026-03-06T02:36:58.286000Z</updated><subtitle>Recent changes to tickets</subtitle><entry><title>#3 LTV/OSCP fail</title><link href="https://sourceforge.net/p/emark/tickets/3/?limit=25#6254" rel="alternate"/><published>2026-03-06T02:36:58.286000Z</published><updated>2026-03-06T02:36:58.286000Z</updated><author><name>eli</name><uri>https://sourceforge.net/u/eli-f/</uri></author><id>https://sourceforge.net1260ed5240b61e5ff86785f543795a911032de98</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thanks for this great tool!&lt;br/&gt;
BTW, I am unable to download the source code (no Files tab in sourceforge at this moment) &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>LTV/OSCP fail</title><link href="https://sourceforge.net/p/emark/tickets/3/" rel="alternate"/><published>2026-03-06T02:15:35.780000Z</published><updated>2026-03-06T02:15:35.780000Z</updated><author><name>eli</name><uri>https://sourceforge.net/u/eli-f/</uri></author><id>https://sourceforge.net1a582c20f316159d3a3e32b65085cc70d41f9744</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi! I have been trying to sign with PAdES-LTV But I was unable, Here I provide the most info I have  gathered:&lt;/p&gt;
&lt;h1 id="h-bug-report-pades-ltv-failure-unspecified-and-excessive-padding-51mb-file-size"&gt;Bug Report: PAdES-LTV failure (UNSPECIFIED) and excessive padding (5.1MB file size)&lt;/h1&gt;
&lt;h3 id="h-description"&gt;Description&lt;/h3&gt;
&lt;p&gt;When signing a PDF using a Spanish DNIe (Smartcard) or an FNMT certificate with LTV (Long Term Validation) enabled, the signature process fails to embed the OCSP response correctly. This results in:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;An "UNSPECIFIED" certificate chain validation error in the UI.&lt;/li&gt;
&lt;li&gt;A massive output file (approx. 5.1MB) filled with &lt;code&gt;0x30&lt;/code&gt; (ASCII '0') padding.&lt;/li&gt;
&lt;li&gt;A signature that validates only as &lt;strong&gt;PAdES-T&lt;/strong&gt; (Timestamp) instead of &lt;strong&gt;PAdES-LTV&lt;/strong&gt; in official validators (e.g., RedSARA Valide).&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="h-environment"&gt;Environment&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;OS:&lt;/strong&gt; Debian GNU/Linux&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Software:&lt;/strong&gt; eMark PDF Signer v1.1.3 (Java 8)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Middleware:&lt;/strong&gt; OpenSC (/usr/lib/x86_64-linux-gnu/opensc-pkcs11.so)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Certificate Authority:&lt;/strong&gt; FNMT-RCM / Dirección General de la Policía (DNIe)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="h-technical-analysis"&gt;Technical Analysis&lt;/h3&gt;
&lt;p&gt;Following a deep trace of the application using &lt;code&gt;tcpdump&lt;/code&gt; and &lt;code&gt;java -Djavax.net.debug=all&lt;/code&gt;, the root cause was identified:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Network Layer:&lt;/strong&gt; The OCSP request to &lt;code&gt;http://ocsp.dnie.es&lt;/code&gt; is successful. The server returns &lt;code&gt;HTTP 200 OK&lt;/code&gt; with &lt;code&gt;Content-Type: application/ocsp-response&lt;/code&gt; and a payload of ~3978 bytes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Application Layer:&lt;/strong&gt; The software fails to ingest the response. The log shows:&lt;br/&gt;
&lt;code&gt;WARNING: Embedded OCSP response is not byte array, cannot parse&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The Bug:&lt;/strong&gt; It appears the code in &lt;code&gt;com.codemuni.service.SignatureVerificationService&lt;/code&gt; (method &lt;code&gt;checkRevocationStatus&lt;/code&gt;) expects the HTTP connection content to be a native &lt;code&gt;byte[]&lt;/code&gt;. However, the Java 8 &lt;code&gt;URLConnection&lt;/code&gt; returns an &lt;code&gt;InputStream&lt;/code&gt;. &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Padding Issue:&lt;/strong&gt; Because the OCSP parsing fails, the software aborts the embedding process but fails to shrink the pre-allocated 5MB signature placeholder, leaving it filled with null/zero padding.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="h-evidence"&gt;Evidence&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Application Log excerpt:&lt;/strong&gt;&lt;br/&gt;
```text&lt;br/&gt;
INFO: Checking certificate revocation status for &lt;span&gt;[...]&lt;/span&gt;&lt;br/&gt;
INFO: OCSP: Found embedded OCSP response - parsing for revocation time&lt;br/&gt;
WARNING: Embedded OCSP response is not byte array, cannot parse&lt;br/&gt;
INFO: Timestamp found - performing RFC 3161 verification&lt;/p&gt;
&lt;h3 id="h-more-data-from-log"&gt;More data from log&lt;/h3&gt;
&lt;p&gt;~/emark$ grep -i -B3 -A10 "WARNING: Embedded OCSP response|Asn1Exception|MalformedURLException" log04.txt&lt;br/&gt;
Mar 06, 2026 2:27:15 AM com.codemuni.service.SignatureVerificationService checkRevocationStatus&lt;br/&gt;
INFO: OCSP: Found embedded OCSP response - parsing for revocation time&lt;br/&gt;
Mar 06, 2026 2:27:15 AM com.codemuni.service.SignatureVerificationService checkRevocationStatus&lt;br/&gt;
WARNING: Embedded OCSP response is not byte array, cannot parse&lt;br/&gt;
Mar 06, 2026 2:27:15 AM com.codemuni.service.SignatureVerificationService verifySignature&lt;br/&gt;
INFO: Signature Algorithm: Hash=SHA256, Encryption=RSA&lt;br/&gt;
Mar 06, 2026 2:27:15 AM com.codemuni.service.SignatureVerificationService verifySignature&lt;br/&gt;
INFO: Hash algorithm strength: ACCEPTABLE&lt;br/&gt;
Mar 06, 2026 2:27:15 AM com.codemuni.service.SignatureVerificationService verifySignature&lt;br/&gt;
INFO: Timestamp found - performing RFC 3161 verification&lt;br/&gt;
Mar 06, 2026 2:27:15 AM com.codemuni.service.SignatureVerificationService verifyTimestamp&lt;br/&gt;
INFO: === Timestamp Verification (CCA Requirement) ===&lt;br/&gt;
Mar 06, 2026 2:27:15 AM com.codemuni.service.SignatureVerificationService verifyTimestamp&lt;br/&gt;
INFO: Step 1: Timestamp found - Date: Mar 06, 2026 02:26:57&lt;/p&gt;
&lt;h3 id="h-packet-capture-tcpdump-excerpt"&gt;Packet Capture (tcpdump) excerpt:&lt;/h3&gt;
&lt;p&gt;in attached file.&lt;/p&gt;
&lt;p&gt;Suggested Fix&lt;br/&gt;
Update the OCSP response handler to properly consume the InputStream from the HttpURLConnection and convert it to a byte[] before passing it to the Bouncy Castle / OpenPDF parser.&lt;br/&gt;
java&lt;/p&gt;
&lt;p&gt;// Ensure the stream is fully read into a byte array&lt;br/&gt;
InputStream is = connection.getInputStream();&lt;br/&gt;
ByteArrayOutputStream buffer = new ByteArrayOutputStream();&lt;br/&gt;
int nRead;&lt;br/&gt;
byte[] data = new byte&lt;span&gt;[16384]&lt;/span&gt;;&lt;br/&gt;
while ((nRead = is.read(data, 0, data.length)) != -1) {&lt;br/&gt;
    buffer.write(data, 0, nRead);&lt;br/&gt;
}&lt;br/&gt;
byte[] ocspBytes = buffer.toByteArray();&lt;br/&gt;
// Process ocspBytes...&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Ticket #2: watermark removal discussion</title><link href="https://sourceforge.net/p/emark/tickets/2/?limit=25#7774" rel="alternate"/><published>2025-10-14T14:18:25.828000Z</published><updated>2025-10-14T14:18:25.828000Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.net54a2281d40974762e3cbffa46cb4791c47b30f36</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Ticket changed by:&lt;/em&gt; &lt;a class="" href="https://github.com/devcodemuni" rel="nofollow"&gt;devcodemuni&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;: open --&amp;gt; closed&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</summary></entry><entry><title>Ticket #2: watermark removal discussion</title><link href="https://sourceforge.net/p/emark/tickets/2/?limit=25#9610" rel="alternate"/><published>2025-10-14T14:18:25.705000Z</published><updated>2025-10-14T14:18:25.705000Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.netfef10057a243c9ea347d3e4ef4e3ff8c97d032a8</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;assigned_to&lt;/strong&gt;: &lt;a class="" href="https://github.com/devcodemuni" rel="nofollow"&gt;devcodemuni&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</summary></entry><entry><title>Ticket #2: watermark removal discussion</title><link href="https://sourceforge.net/p/emark/tickets/2/?limit=25#2512" rel="alternate"/><published>2025-10-14T14:18:25.204000Z</published><updated>2025-10-14T14:18:25.204000Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.netc1f47e12bb29633852b7702ebe31f3a6e883a7ac</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally posted by:&lt;/em&gt; &lt;a class="" href="https://github.com/devcodemuni" rel="nofollow"&gt;devcodemuni&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hi @Aniketc068,&lt;/p&gt;
&lt;p&gt;We have removed the &lt;strong&gt;watermark overlay&lt;/strong&gt; from the signature appearance when a &lt;strong&gt;custom image&lt;/strong&gt; is selected.&lt;br/&gt;
Your selected signature image will now appear clean and without any background watermark.&lt;/p&gt;
&lt;p&gt;Please update to the latest release and confirm. ✅&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Ticket #1: text over lapping issue discussion</title><link href="https://sourceforge.net/p/emark/tickets/1/?limit=25#b125" rel="alternate"/><published>2025-10-14T14:18:24.697000Z</published><updated>2025-10-14T14:18:24.697000Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.net5cc567a3c35fe2247e2dde91c730c723fcc7495e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Ticket changed by:&lt;/em&gt; &lt;a class="" href="https://github.com/devcodemuni" rel="nofollow"&gt;devcodemuni&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;: open --&amp;gt; closed&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</summary></entry><entry><title>Ticket #1: text over lapping issue discussion</title><link href="https://sourceforge.net/p/emark/tickets/1/?limit=25#d622" rel="alternate"/><published>2025-10-14T14:18:24.550000Z</published><updated>2025-10-14T14:18:24.550000Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.netee77e54857118f9ddcf5398bc01150c6ae112725</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;assigned_to&lt;/strong&gt;: &lt;a class="" href="https://github.com/devcodemuni" rel="nofollow"&gt;devcodemuni&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</summary></entry><entry><title>Ticket #1: text over lapping issue discussion</title><link href="https://sourceforge.net/p/emark/tickets/1/?limit=25#ca63" rel="alternate"/><published>2025-10-14T14:18:24.018000Z</published><updated>2025-10-14T14:18:24.018000Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.neta22e3d611119bed068a28521657e15d0515a77ba</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally posted by:&lt;/em&gt; &lt;a class="" href="https://github.com/devcodemuni" rel="nofollow"&gt;devcodemuni&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hi @Aniketc068,&lt;/p&gt;
&lt;p&gt;We have fixed the &lt;strong&gt;signature appearance text overlapping&lt;/strong&gt; issue.&lt;br/&gt;
Now the signature block renders properly without overlapping text.&lt;/p&gt;
&lt;p&gt;Please update to the latest release and check. 🚀&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>