Loading...
Searching...
No Matches
pdftron::PDF::VerificationResult Class Reference

`#include <VerificationResult.h>`

## Public Types
enum | DocumentStatus { e_no_error = 0 , e_corrupt_file = 1 , e_unsigned = 2 , e_bad_byteranges = 3 , e_corrupt_cryptographic_contents = 4 }
enum | DigestStatus { e_digest_invalid = 0 , e_digest_verified = 1 , e_digest_verification_disabled = 2 , e_weak_digest_algorithm_but_digest_verifiable = 3 , e_no_digest_status = 4 , e_unsupported_encoding = 5 , e_unsupported_digest_algorithm = 6 }
enum | TrustStatus { e_trust_verified = 0 , e_untrusted = 1 , e_trust_verification_disabled = 2 , e_no_trust_status = 3 , e_unsupported_trust_features = 4 }
enum | ModificationPermissionsStatus { e_invalidated_by_disallowed_changes = 0 , e_has_allowed_changes = 1 , e_unmodified = 2 , e_permissions_verification_disabled = 3 , e_no_permissions_status = 4 , e_unsupported_permissions_features = 5 }
typedef pdftron::PDF::DisallowedChange | DisallowedChange

## Public Member Functions
| VerificationResult (const VerificationResult &other)
VerificationResult & | operator= (const VerificationResult &other)
| ~VerificationResult ()
void | Destroy ()
bool | GetVerificationStatus () const
DocumentStatus | GetDocumentStatus () const
DigestStatus | GetDigestStatus () const
TrustStatus | GetTrustStatus () const
ModificationPermissionsStatus | GetPermissionsStatus () const
bool | HasTrustVerificationResult () const
TrustVerificationResult | GetTrustVerificationResult () const
std::vector< DisallowedChange > | GetDisallowedChanges () const
Crypto::DigestAlgorithm::Type | GetDigestAlgorithm () const
UString | GetDocumentStatusAsString () const
UString | GetDigestStatusAsString () const
UString | GetTrustStatusAsString () const
UString | GetPermissionsStatusAsString () const
std::vector< UString > | GetUnsupportedFeatures () const
| VerificationResult (TRN_VerificationResult impl)

## Public Attributes
TRN_VerificationResult | m_impl

## Detailed Description

The result of a verification operation performed on a digital signature.

Definition at line 25 of file VerificationResult.h.

## Member Typedef Documentation

## ◆ DisallowedChange

typedef pdftron::PDF::DisallowedChange pdftron::PDF::VerificationResult::DisallowedChange

Definition at line 28 of file VerificationResult.h.

## Member Enumeration Documentation

## ◆ DigestStatus

enum pdftron::PDF::VerificationResult::DigestStatus

Enumerator
e_digest_invalid |
e_digest_verified |
e_digest_verification_disabled |
e_weak_digest_algorithm_but_digest_verifiable |
e_no_digest_status |
e_unsupported_encoding |
e_unsupported_digest_algorithm |

Definition at line 37 of file VerificationResult.h.

## ◆ DocumentStatus

enum pdftron::PDF::VerificationResult::DocumentStatus

Enumerator
e_no_error |
e_corrupt_file |
e_unsigned |
e_bad_byteranges |
e_corrupt_cryptographic_contents |

Definition at line 30 of file VerificationResult.h.

## ◆ ModificationPermissionsStatus

enum pdftron::PDF::VerificationResult::ModificationPermissionsStatus

Enumerator
e_invalidated_by_disallowed_changes |
e_has_allowed_changes |
e_unmodified |
e_permissions_verification_disabled |
e_no_permissions_status |
e_unsupported_permissions_features |

Definition at line 53 of file VerificationResult.h.

## ◆ TrustStatus

enum pdftron::PDF::VerificationResult::TrustStatus

Enumerator
e_trust_verified |
e_untrusted |
e_trust_verification_disabled |
e_no_trust_status |
e_unsupported_trust_features |

Definition at line 46 of file VerificationResult.h.

## Constructor & Destructor Documentation

## ◆ VerificationResult() [1/2]

pdftron::PDF::VerificationResult::VerificationResult | ( | const VerificationResult & | other | ) |

## ◆ ~VerificationResult()

pdftron::PDF::VerificationResult::~VerificationResult | ( |  | ) |

## ◆ VerificationResult() [2/2]

pdftron::PDF::VerificationResult::VerificationResult | ( | TRN_VerificationResult | impl | ) |

## Member Function Documentation

## ◆ Destroy()

void pdftron::PDF::VerificationResult::Destroy | ( |  | ) |

## ◆ GetDigestAlgorithm()

Crypto::DigestAlgorithm::Type pdftron::PDF::VerificationResult::GetDigestAlgorithm | ( |  | ) | const

Retrieves an enumeration value representing the digest algorithm used to sign the signature that is associated with this verification result. For DocTimeStamp signatures, returns the weakest algorithm found (between the CMS and message imprint digests).

Returns
  A DigestAlgorithm enumeration value.

## ◆ GetDigestStatus()

DigestStatus pdftron::PDF::VerificationResult::GetDigestStatus | ( |  | ) | const

Retrieves the digest-related result condition associated with a digital signature verification operation.

Returns
  A DigestStatus-type enumeration value.

## ◆ GetDigestStatusAsString()

UString pdftron::PDF::VerificationResult::GetDigestStatusAsString | ( |  | ) | const

Retrieves the digest-related result condition associated with a digital signature verification operation, as a descriptive string.

Returns
  a string.

## ◆ GetDisallowedChanges()

std::vector< DisallowedChange > pdftron::PDF::VerificationResult::GetDisallowedChanges | ( |  | ) | const

Retrieves a list of informational structures regarding any disallowed changes that have been made to the document since the signature associated with this verification result was signed.

Returns
  a collection of DisallowedChange objects.

## ◆ GetDocumentStatus()

DocumentStatus pdftron::PDF::VerificationResult::GetDocumentStatus | ( |  | ) | const

Retrieves the document-related result condition associated with a digital signature verification operation.

Returns
  A DocumentStatus-type enumeration value.

## ◆ GetDocumentStatusAsString()

UString pdftron::PDF::VerificationResult::GetDocumentStatusAsString | ( |  | ) | const

Retrieves the document-related result condition associated with a digital signature verification operation, as a descriptive string.

Returns
  a string.

## ◆ GetPermissionsStatus()

ModificationPermissionsStatus pdftron::PDF::VerificationResult::GetPermissionsStatus | ( |  | ) | const

Retrieves the result condition about permissions checks performed on any unsigned modifications associated with a digital signature verification operation.

Returns
  A ModificationPermissionsStatus-type enumeration value.

## ◆ GetPermissionsStatusAsString()

UString pdftron::PDF::VerificationResult::GetPermissionsStatusAsString | ( |  | ) | const

Retrieves the result condition about permissions checks performed on any unsigned modifications associated with a digital signature verification operation, as a descriptive string.

Returns
  a string.

## ◆ GetTrustStatus()

TrustStatus pdftron::PDF::VerificationResult::GetTrustStatus | ( |  | ) | const

Retrieves the trust-related result condition associated with a digital signature verification operation.

Returns
  A TrustStatus-type enumeration value.

## ◆ GetTrustStatusAsString()

UString pdftron::PDF::VerificationResult::GetTrustStatusAsString | ( |  | ) | const

Retrieves the trust-related result condition associated with a digital signature verification operation, as a descriptive string.

Returns
  a string.

## ◆ GetTrustVerificationResult()

TrustVerificationResult pdftron::PDF::VerificationResult::GetTrustVerificationResult | ( |  | ) | const

Retrieves the detailed result associated with the trust step of the verification operation that returned this VerificationResult, if such a detailed trust result is available. Must call HasTrustVerificationResult first and check for a true result.

Returns
  a TrustVerificationResult object

Note
  This function will throw if no TrustVerificationResult is available.

## ◆ GetUnsupportedFeatures()

std::vector< UString > pdftron::PDF::VerificationResult::GetUnsupportedFeatures | ( |  | ) | const

Retrieves reports about unsupported features encountered during verification. This function is the canonical source of information about all unsupported features encountered. Current possible values: "unsupported signature encoding", "usage rights signature", "legal content attestations", "unsupported digest algorithm"

Returns
  a container of strings representing unsupported features encountered during verification

Note
  Output may change in future versions.

## ◆ GetVerificationStatus()

bool pdftron::PDF::VerificationResult::GetVerificationStatus | ( |  | ) | const

Retrieves the main verification status. The main status is determined based on the other statuses. Verification may fail for many reasons; some of these reasons are the presence of features that are not supported yet. It may be desirable for you to report unsupported signatures differently (for example, using a question mark rather than an X mark). Any unsupported features encountered can be retrieved by the use of the function GetUnsupportedFeatures on this class.

Returns
  A boolean representing whether or not the verification operation was completely successful.

## ◆ HasTrustVerificationResult()

bool pdftron::PDF::VerificationResult::HasTrustVerificationResult | ( |  | ) | const

Returns whether there is a detailed TrustVerificationResult in this VerificationResult or not.

Returns
  A boolean.

## ◆ operator=()

VerificationResult & pdftron::PDF::VerificationResult::operator= | ( | const VerificationResult & | other | ) |

## Member Data Documentation

## ◆ m_impl

TRN_VerificationResult pdftron::PDF::VerificationResult::m_impl

Definition at line 192 of file VerificationResult.h.

The documentation for this class was generated from the following file:

- PDF/VerificationResult.h