PSPDFSignatureValidator


@interface PSPDFSignatureValidator : NSObject

This class validates digital signatures in a PDF document. Validation consists of two steps: Checking that the signature integrity is correct (that is, the document was not modified after it was signed), and ensuring that the chain of certificates contained in the signature is trusted.

  • Undocumented

    Declaration

    Objective-C

    
    @interface PSPDFSignatureValidator : NSObject
  • Undocumented

    Declaration

    Objective-C

    
    @interface PSPDFSignatureValidator : NSObject
  • Initializes a PSPDFSignatureValidator with a signature form element. If formElement is nil, nil will be returned.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithSignatureFormElement:
        (nonnull PSPDFSignatureFormElement *)formElement;
  • The signature form element.

    Declaration

    Objective-C

    @property (readonly, nonatomic)
        PSPDFSignatureFormElement *_Nonnull signatureFormElement;

    Swift

    var signatureFormElement: PSPDFSignatureFormElement { get }
  • Starts the digital signature verification process. If trustedCertificates is nil, the default from the shared signature manager is used.

    For convenience, the Adobe CA is implicitely included as part of the trustedCertificates list, so you don’t have to add it yourself.

    Declaration

    Objective-C

    - (nullable PSPDFSignatureStatus *)
    verifySignatureWithTrustedCertificates:
        (nullable NSArray<PSPDFX509 *> *)trustedCertificates
                                     error:(NSError *_Nullable *_Nullable)error;

    Swift

    func verifySignature(withTrustedCertificates trustedCertificates: [PSPDFX509]?) throws -> PSPDFSignatureStatus

    Return Value

    nil if signature not found.