A PDF does not have to be generated by PL/SIGN — or even by a PL/ product — to be digitally signed inside Oracle Database.
This is an important use case for PL/SIGN.
Many Oracle applications already create PDFs using an APEX PDF solution, Oracle Reports, another PDF library, or an external reporting system. The result may be an invoice, certificate, contract, statement or other business document stored as a BLOB.
PL/SIGN can take that existing PDF and add a standards-based PAdES digital signature to it.
The PDF is processed incrementally: the original document remains intact and the signature is appended as a new PDF revision. PL/SIGN supports both approval and certification signatures, including DocMDP permissions.
From PDF BLOB to signed PDF BLOB
For a basic PAdES B-B signature, the workflow can remain completely inside PL/SQL:
l_signed_pdf := pl_sign.sign_pdf(
p_pdf => l_pdf,
p_private_key_pem => l_private_key,
p_certificate_der => l_certificate,
p_signature_type => 'APPROVAL'
);
SIGN_PDF accepts an existing PDF BLOB and returns an incrementally signed PDF BLOB.
So the architecture can simply be:
PDF generator → PDF BLOB → PL/SIGN → signed PDF BLOB
The PDF generator and the signing component are independent.
Adding trusted time: PAdES B-T
For documents where proof of signing time matters, PL/SIGN also supports PAdES B-T.
In this case an RFC 3161 Time Stamping Authority (TSA) adds a cryptographically protected timestamp to the signature. PL/SIGN can contact an HTTPS TSA directly using Oracle network access and an Oracle Wallet, or use a PL/SQL callback when timestamp transport is handled separately.
This is useful for invoices, certificates, contracts and other documents that may need to prove not only who signed them, but also when the signature existed.
The private key does not have to be in Oracle
PL/SIGN also supports two-phase external signing.
Oracle prepares the exact data or SHA-256 hash that must be signed, while the actual private-key operation can happen in an HSM, QTSP or remote signing service. The resulting raw signature is then returned to PL/SIGN to complete the PDF.
This makes it possible to keep private keys outside the database while the document workflow remains controlled from PL/SQL.
Beyond the initial signature
The same architecture can continue beyond B-B and B-T. PL/SIGN also provides validation, PAdES B-LT upgrade and B-LTA document timestamp workflows for longer-term validation and archival protection.
The key idea is simple:
You do not need to replace your existing PDF generator to add digital signatures.
Generate the document with the tool that already fits your application, then use PL/SIGN as the signing layer inside Oracle Database.
Generate anywhere. Sign in Oracle.
#Oracle #PLSQL #PDF #DigitalSignature #PAdES #OracleAPEX #PLSIGN #eIDAS
