Skip to content

Commit

Permalink
Show unverified digital signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
anirudhvarma12 committed Mar 16, 2021
1 parent dd3797a commit 55da4c3
Showing 1 changed file with 9 additions and 5 deletions.
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

0 comments on commit 55da4c3

Please sign in to comment.