Validate Certificate
Validate a .p12 certificate without persisting it.
Validates the certificate structure, extracts metadata, determines status, and optionally cross-validates the certificate CN against the SRI legal name for the given RUC.
This endpoint is designed for wizard flows where validation is needed before final submission.
Args: file: .p12 certificate file password: Certificate password ruc: Optional RUC to cross-validate against certificate CN db: Async database session for SRI cache lookups
Returns: ValidateCertificateResponse: Validation result with metadata or error
Raises: HTTPException 422: If file cannot be read
Cookies
Body
Response
Successful Response
Response for certificate validation without persistence.
Whether the certificate is valid
Certificate subject common name
Certificate serial number
Certificate validity start date
Certificate validity end date
Certificate status: active, expiring, expired
Error message if validation failed