Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show unverified digital signatures #1

Merged
merged 1 commit into from
Mar 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 9 additions & 5 deletions src/core/annotation.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ class AnnotationFactory {
return new ButtonWidgetAnnotation(parameters);
case "Ch":
return new ChoiceWidgetAnnotation(parameters);
case "Sig":
return new SquareAnnotation(parameters);
}
warn(
'Unimplemented widget field type "' +
Expand Down Expand Up @@ -1051,11 +1053,13 @@ class WidgetAnnotation extends Annotation {
// Hide signatures because we cannot validate them, and unset the fieldValue
// since it's (most likely) a `Dict` which is non-serializable and will thus
// cause errors when sending annotations to the main-thread (issue 10347).
if (data.fieldType === "Sig") {
data.fieldValue = null;
this.setFlags(AnnotationFlag.HIDDEN);
data.hidden = true;
}
// CUSTOMISATION: Until https://github.com/mozilla/pdf.js/issues/1076 is resolved,
// we will render the signature but not verify it.
// if (data.fieldType === "Sig") {
// data.fieldValue = null;
// this.setFlags(AnnotationFlag.HIDDEN);
// data.hidden = true;
// }
}

/**
Expand Down