forked from pipeline-foundation/itext7-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Process SignMetaInfo to ignore multiple document creation events per …
…one signing operation Make sure that it is possible to pass metainfo to the newly added sign classes Introduce isEventCountingMetaInfoSet check DEVSIX-8216 Autoported commit. Original commit hash: [daafb5686]
- Loading branch information
Showing
13 changed files
with
460 additions
and
11 deletions.
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
itext.tests/itext.kernel.tests/itext/kernel/pdf/DocumentPropertiesUnitTest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
This file is part of the iText (R) project. | ||
Copyright (c) 1998-2024 Apryse Group NV | ||
Authors: Apryse Software. | ||
This program is offered under a commercial and under the AGPL license. | ||
For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. | ||
AGPL licensing: | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU Affero General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU Affero General Public License for more details. | ||
You should have received a copy of the GNU Affero General Public License | ||
along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
using iText.Commons.Actions.Contexts; | ||
using iText.Test; | ||
|
||
namespace iText.Kernel.Pdf { | ||
[NUnit.Framework.Category("UnitTest")] | ||
public class DocumentPropertiesUnitTest : ExtendedITextTest { | ||
[NUnit.Framework.Test] | ||
public virtual void SetEventCountingMetaInfoTest() { | ||
DocumentProperties documentProperties = new DocumentProperties(); | ||
documentProperties.SetEventCountingMetaInfo(new DocumentPropertiesUnitTest.TestMetaInfo()); | ||
NUnit.Framework.Assert.IsTrue(documentProperties.IsEventCountingMetaInfoSet()); | ||
} | ||
|
||
[NUnit.Framework.Test] | ||
public virtual void MetaInfoIsNotSetTest() { | ||
DocumentProperties documentProperties = new DocumentProperties(); | ||
NUnit.Framework.Assert.IsFalse(documentProperties.IsEventCountingMetaInfoSet()); | ||
} | ||
|
||
private class TestMetaInfo : IMetaInfo { | ||
} | ||
} | ||
} |
306 changes: 306 additions & 0 deletions
306
itext.tests/itext.sign.tests/itext/signatures/SignMetaInfoHandlingTest.cs
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file added
BIN
+929 Bytes
...ts/itext.sign.tests/resources/itext/signatures/SignMetaInfoHandlingTest/helloWorldDoc.pdf
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
This file is part of the iText (R) project. | ||
Copyright (c) 1998-2024 Apryse Group NV | ||
Authors: Apryse Software. | ||
This program is offered under a commercial and under the AGPL license. | ||
For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. | ||
AGPL licensing: | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU Affero General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU Affero General Public License for more details. | ||
You should have received a copy of the GNU Affero General Public License | ||
along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
using iText.Commons.Actions.Contexts; | ||
|
||
namespace iText.Signatures { | ||
internal class SignMetaInfo : IMetaInfo { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
ee1e118580ab3623b1d1c3bc4adcb713e883b405 | ||
daafb56864e655e3de3fbf76865c017b57edb51d |