---
title: "Validar um arquivo assinado"
product: "PKI Suite"
slug: "validate-a-signed-file"
language: "pt"
canonical_url: "https://try.lacunasoftware.com/pt/pki-suite/validate-a-signed-file"
docs_url: "https://docs.lacunasoftware.com/pt-br/articles/pki-sdk"
samples:
  - title: "Validate a signed PDF using PKI SDK"
    language: "dotnet"
    framework: "aspnet-mvc"
    url: "https://github.com/LacunaSoftware/PkiSuiteSamples/blob/master/dotnet/mvc/PkiSuiteAspNetMvcSample/Controllers/OpenPadesSignatureSdkController.cs"
  - title: "Validate a signed PDF using PKI SDK"
    language: "dotnet"
    framework: "aspnet-core-angular"
    url: "https://github.com/LacunaSoftware/PkiSuiteSamples/blob/master/dotnet/spa/PkiSuiteAspNetSpaSample/Controllers/OpenPadesSdkController.cs"
  - title: "Validate a CMS/CAdES signature using PKI SDK"
    language: "dotnet"
    framework: "aspnet-mvc"
    url: "https://github.com/LacunaSoftware/PkiSuiteSamples/blob/master/dotnet/mvc/PkiSuiteAspNetMvcSample/Controllers/OpenCadesSignatureSdkController.cs"
  - title: "Validate a signed XML using PKI SDK"
    language: "dotnet"
    framework: "aspnet-mvc"
    url: "https://github.com/LacunaSoftware/PkiSuiteSamples/blob/master/dotnet/mvc/PkiSuiteAspNetMvcSample/Controllers/OpenXmlSignatureSdkController.cs"
samples_repo: "https://github.com/LacunaSoftware/PkiSuiteSamples"
trace_recorded: "2026-10-12"
last_generated: "2026-10-12T15:24:28Z"
---

# Validar um arquivo assinado

Solte um arquivo assinado, ou clique em um exemplo: o PKI SDK, no servidor do Demo Site, encontra todas as assinaturas dele e valida cada uma. Nada roda no seu navegador além desta página.

Live demo: [https://try.lacunasoftware.com/pt/pki-suite/validate-a-signed-file](https://try.lacunasoftware.com/pt/pki-suite/validate-a-signed-file). It runs against Lacuna's real products; this page describes it for AI coding agents.

## Call sequence

Recorded on 2026-10-12 against the real products with Lacuna's public test certificates and data. Keys, tokens, sessions, ids, file contents and personal data are masked.

### 1. PKI SDK finds the signatures in the file by its content and validates each one under the Signature policy it carries, ICP-Brasil AD-RT for this sample.

On the server, in process: `PadesSignature.Open(pdf), then PadesSignature.ValidateSignature(signer, policy)`

## Patterns to copy

- This Demo calls no API: PKI SDK validates the file inside the server's process.
- Validate each signature under the policy it carries: PKI SDK's ICP-Brasil policies for an ICP-Brasil policy OID, otherwise the format's basic policy, and XMLDSig's basic policy for an XML signature with no XAdES signed properties.
- A detached CMS signature needs the file it signs, given with `SetExternalData` before validating.
- Report a PDF's document timestamps (`IsTsp` signers) as timestamps, not signatures, and parse uploaded XML with DTDs prohibited and no resolver.

## Links

- Live demo: https://try.lacunasoftware.com/en/pki-suite/validate-a-signed-file (Portuguese: https://try.lacunasoftware.com/pt/pki-suite/validate-a-signed-file)
- Docs: https://docs.lacunasoftware.com/pt-br/articles/pki-sdk
- Sample, .NET (aspnet-mvc): [Validate a signed PDF using PKI SDK](https://github.com/LacunaSoftware/PkiSuiteSamples/blob/master/dotnet/mvc/PkiSuiteAspNetMvcSample/Controllers/OpenPadesSignatureSdkController.cs)
- Sample, .NET (aspnet-core-angular): [Validate a signed PDF using PKI SDK](https://github.com/LacunaSoftware/PkiSuiteSamples/blob/master/dotnet/spa/PkiSuiteAspNetSpaSample/Controllers/OpenPadesSdkController.cs)
- Sample, .NET (aspnet-mvc): [Validate a CMS/CAdES signature using PKI SDK](https://github.com/LacunaSoftware/PkiSuiteSamples/blob/master/dotnet/mvc/PkiSuiteAspNetMvcSample/Controllers/OpenCadesSignatureSdkController.cs)
- Sample, .NET (aspnet-mvc): [Validate a signed XML using PKI SDK](https://github.com/LacunaSoftware/PkiSuiteSamples/blob/master/dotnet/mvc/PkiSuiteAspNetMvcSample/Controllers/OpenXmlSignatureSdkController.cs)
- Every demo: https://try.lacunasoftware.com/llms.txt and https://try.lacunasoftware.com/demos.json
