diff --git a/README.md b/README.md index c35db343b..59f613e85 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -### **PLEASE NOTE: iTextSharp is EOL, and has been replaced by [iText 7][itext7]. Only security fixes will be added** +### **PLEASE NOTE: iTextSharp is EOL, and has been replaced by [iText 7][itext]. Only security fixes will be added** We HIGHLY recommend customers use iText 7 for new projects, and to consider moving existing projects from iTextSharp to iText 7 to benefit from the many improvements such as: @@ -51,4 +51,4 @@ Contact sales for more info: http://itextpdf.com/sales [building]: BUILDING.md [gratis]: https://en.wikipedia.org/wiki/Gratis_versus_libre [itext]: http://itextpdf.com/ -[itext7]: https://github.com/itext/itext7-dotnet \ No newline at end of file +[itext]: https://github.com/itext/itext-dotnet \ No newline at end of file diff --git a/iTextAsian.nuspec b/iTextAsian.nuspec index d21d1524f..5d7cb0a13 100644 --- a/iTextAsian.nuspec +++ b/iTextAsian.nuspec @@ -1,9 +1,9 @@  - iTextAsian + iTextAsian.portable 2.1 - iTextSharp.xtra + iTextSharp.xtra Portable iText Software Bruno Lowagie,Paulo Soares,et al. https://www.gnu.org/licenses/agpl.html diff --git a/itext-hyph-xml.nuspec b/itext-hyph-xml.nuspec index 5c94bf4a9..8a33cf0e6 100644 --- a/itext-hyph-xml.nuspec +++ b/itext-hyph-xml.nuspec @@ -1,9 +1,9 @@  - itext-hyph-xml + itext-hyph-xml.portable 2.0.0 - iTextSharp.xtra + iTextSharp.xtra Portable iText Software Bruno Lowagie,Paulo Soares,et al. https://www.gnu.org/licenses/agpl.html diff --git a/itextsharp.nuspec b/itextsharp.nuspec index d719337c8..2c6493b7a 100644 --- a/itextsharp.nuspec +++ b/itextsharp.nuspec @@ -1,9 +1,9 @@  - iTextSharp + iTextSharp.portable 5.5.13.4 - iTextSharp + iTextSharp Portable iText Software Bruno Lowagie,Paulo Soares https://www.gnu.org/licenses/agpl.html diff --git a/itextsharp.pdfa.nuspec b/itextsharp.pdfa.nuspec index 0926a604c..aa6723ad6 100644 --- a/itextsharp.pdfa.nuspec +++ b/itextsharp.pdfa.nuspec @@ -1,9 +1,9 @@  - itextsharp.pdfa + itextsharp.pdfa.portable 5.5.13.4 - iTextSharp.pdfa + iTextSharp.pdfa Portable iText Software Bruno Lowagie,Paulo Soares,et al. https://www.gnu.org/licenses/agpl.html @@ -35,7 +35,7 @@ iText Community: https://www.nuget.org/packages/itext/ - + diff --git a/itextsharp.xmlworker.nuspec b/itextsharp.xmlworker.nuspec index 8f2203c5f..8d0f0882c 100644 --- a/itextsharp.xmlworker.nuspec +++ b/itextsharp.xmlworker.nuspec @@ -1,9 +1,9 @@  - itextsharp.xmlworker + itextsharp.xmlworker.portable 5.5.13.4 - iTextSharp XML Worker + iTextSharp XML Worker Portable iText Software Bruno Lowagie,Paulo Soares,et al. https://www.gnu.org/licenses/agpl.html diff --git a/itextsharp.xtra.nuspec b/itextsharp.xtra.nuspec index 850fe20c9..1731bda19 100644 --- a/itextsharp.xtra.nuspec +++ b/itextsharp.xtra.nuspec @@ -1,9 +1,9 @@  - itextsharp.xtra + itextsharp.xtra.portable 5.5.13.4 - iTextSharp.xtra + iTextSharp.xtra Portable iText Software Bruno Lowagie,Paulo Soares,et al. https://www.gnu.org/licenses/agpl.html diff --git a/src/BuildAll(VS2010).sln b/src/BuildAll(VS2010).sln index 4845f1815..5a81f7d05 100644 --- a/src/BuildAll(VS2010).sln +++ b/src/BuildAll(VS2010).sln @@ -1,7 +1,7 @@  -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.21005.1 +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.11.35312.102 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "itextsharp(VS2010)", "core\itextsharp(VS2010).csproj", "{84C4FDD9-3ED7-453B-B9DA-B3ED52CB071C}" EndProject @@ -35,24 +35,24 @@ Global {84C4FDD9-3ED7-453B-B9DA-B3ED52CB071C}.Debug_woDrawing|Any CPU.Build.0 = Debug_woDrawing|Any CPU {84C4FDD9-3ED7-453B-B9DA-B3ED52CB071C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {84C4FDD9-3ED7-453B-B9DA-B3ED52CB071C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {84C4FDD9-3ED7-453B-B9DA-B3ED52CB071C}.Release_woDrawing|Any CPU.ActiveCfg = Release_woDrawing|Any CPU - {84C4FDD9-3ED7-453B-B9DA-B3ED52CB071C}.Release_woDrawing|Any CPU.Build.0 = Release_woDrawing|Any CPU + {84C4FDD9-3ED7-453B-B9DA-B3ED52CB071C}.Release_woDrawing|Any CPU.ActiveCfg = Release|Any CPU + {84C4FDD9-3ED7-453B-B9DA-B3ED52CB071C}.Release_woDrawing|Any CPU.Build.0 = Release|Any CPU {84C4FDD9-3ED7-453B-B9DA-B3ED52CB071C}.Release|Any CPU.ActiveCfg = Release|Any CPU {84C4FDD9-3ED7-453B-B9DA-B3ED52CB071C}.Release|Any CPU.Build.0 = Release|Any CPU {63217779-2BD4-45B5-993C-2696F6EF5BBC}.Debug_woDrawing|Any CPU.ActiveCfg = Debug_woDrawing|Any CPU {63217779-2BD4-45B5-993C-2696F6EF5BBC}.Debug_woDrawing|Any CPU.Build.0 = Debug_woDrawing|Any CPU {63217779-2BD4-45B5-993C-2696F6EF5BBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {63217779-2BD4-45B5-993C-2696F6EF5BBC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {63217779-2BD4-45B5-993C-2696F6EF5BBC}.Release_woDrawing|Any CPU.ActiveCfg = Release_woDrawing|Any CPU - {63217779-2BD4-45B5-993C-2696F6EF5BBC}.Release_woDrawing|Any CPU.Build.0 = Release_woDrawing|Any CPU + {63217779-2BD4-45B5-993C-2696F6EF5BBC}.Release_woDrawing|Any CPU.ActiveCfg = Release|Any CPU + {63217779-2BD4-45B5-993C-2696F6EF5BBC}.Release_woDrawing|Any CPU.Build.0 = Release|Any CPU {63217779-2BD4-45B5-993C-2696F6EF5BBC}.Release|Any CPU.ActiveCfg = Release|Any CPU {63217779-2BD4-45B5-993C-2696F6EF5BBC}.Release|Any CPU.Build.0 = Release|Any CPU {96647204-4A3E-41D7-BC74-B1608D6D1857}.Debug_woDrawing|Any CPU.ActiveCfg = Debug_woDrawing|Any CPU {96647204-4A3E-41D7-BC74-B1608D6D1857}.Debug_woDrawing|Any CPU.Build.0 = Debug_woDrawing|Any CPU {96647204-4A3E-41D7-BC74-B1608D6D1857}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {96647204-4A3E-41D7-BC74-B1608D6D1857}.Debug|Any CPU.Build.0 = Debug|Any CPU - {96647204-4A3E-41D7-BC74-B1608D6D1857}.Release_woDrawing|Any CPU.ActiveCfg = Release_woDrawing|Any CPU - {96647204-4A3E-41D7-BC74-B1608D6D1857}.Release_woDrawing|Any CPU.Build.0 = Release_woDrawing|Any CPU + {96647204-4A3E-41D7-BC74-B1608D6D1857}.Release_woDrawing|Any CPU.ActiveCfg = Release|Any CPU + {96647204-4A3E-41D7-BC74-B1608D6D1857}.Release_woDrawing|Any CPU.Build.0 = Release|Any CPU {96647204-4A3E-41D7-BC74-B1608D6D1857}.Release|Any CPU.ActiveCfg = Release|Any CPU {96647204-4A3E-41D7-BC74-B1608D6D1857}.Release|Any CPU.Build.0 = Release|Any CPU {BE1934CF-90A9-43D3-A794-7E540874EDBB}.Debug_woDrawing|Any CPU.ActiveCfg = Debug|Any CPU @@ -67,32 +67,30 @@ Global {2F467830-A94B-4C44-B17B-0A81CBDB8CB2}.Debug_woDrawing|Any CPU.Build.0 = Debug_woDrawing|Any CPU {2F467830-A94B-4C44-B17B-0A81CBDB8CB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2F467830-A94B-4C44-B17B-0A81CBDB8CB2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2F467830-A94B-4C44-B17B-0A81CBDB8CB2}.Release_woDrawing|Any CPU.ActiveCfg = Release_woDrawing|Any CPU - {2F467830-A94B-4C44-B17B-0A81CBDB8CB2}.Release_woDrawing|Any CPU.Build.0 = Release_woDrawing|Any CPU + {2F467830-A94B-4C44-B17B-0A81CBDB8CB2}.Release_woDrawing|Any CPU.ActiveCfg = Release|Any CPU + {2F467830-A94B-4C44-B17B-0A81CBDB8CB2}.Release_woDrawing|Any CPU.Build.0 = Release|Any CPU {2F467830-A94B-4C44-B17B-0A81CBDB8CB2}.Release|Any CPU.ActiveCfg = Release|Any CPU {2F467830-A94B-4C44-B17B-0A81CBDB8CB2}.Release|Any CPU.Build.0 = Release|Any CPU {C892FA61-C495-4F30-8799-A198F89F23F4}.Debug_woDrawing|Any CPU.ActiveCfg = Debug_woDrawing|Any CPU {C892FA61-C495-4F30-8799-A198F89F23F4}.Debug_woDrawing|Any CPU.Build.0 = Debug_woDrawing|Any CPU {C892FA61-C495-4F30-8799-A198F89F23F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C892FA61-C495-4F30-8799-A198F89F23F4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C892FA61-C495-4F30-8799-A198F89F23F4}.Release_woDrawing|Any CPU.ActiveCfg = Release_woDrawing|Any CPU - {C892FA61-C495-4F30-8799-A198F89F23F4}.Release_woDrawing|Any CPU.Build.0 = Release_woDrawing|Any CPU + {C892FA61-C495-4F30-8799-A198F89F23F4}.Release_woDrawing|Any CPU.ActiveCfg = Release|Any CPU + {C892FA61-C495-4F30-8799-A198F89F23F4}.Release_woDrawing|Any CPU.Build.0 = Release|Any CPU {C892FA61-C495-4F30-8799-A198F89F23F4}.Release|Any CPU.ActiveCfg = Release|Any CPU {C892FA61-C495-4F30-8799-A198F89F23F4}.Release|Any CPU.Build.0 = Release|Any CPU {D533E5BC-52BF-43DE-8C8E-1FB41C0CB78E}.Debug_woDrawing|Any CPU.ActiveCfg = Debug_woDrawing|Any CPU {D533E5BC-52BF-43DE-8C8E-1FB41C0CB78E}.Debug_woDrawing|Any CPU.Build.0 = Debug_woDrawing|Any CPU {D533E5BC-52BF-43DE-8C8E-1FB41C0CB78E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D533E5BC-52BF-43DE-8C8E-1FB41C0CB78E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D533E5BC-52BF-43DE-8C8E-1FB41C0CB78E}.Release_woDrawing|Any CPU.ActiveCfg = Release_woDrawing|Any CPU - {D533E5BC-52BF-43DE-8C8E-1FB41C0CB78E}.Release_woDrawing|Any CPU.Build.0 = Release_woDrawing|Any CPU + {D533E5BC-52BF-43DE-8C8E-1FB41C0CB78E}.Release_woDrawing|Any CPU.ActiveCfg = Release|Any CPU {D533E5BC-52BF-43DE-8C8E-1FB41C0CB78E}.Release|Any CPU.ActiveCfg = Release|Any CPU {D533E5BC-52BF-43DE-8C8E-1FB41C0CB78E}.Release|Any CPU.Build.0 = Release|Any CPU {67AA00E9-15AF-4592-8119-110C8CBD1E31}.Debug_woDrawing|Any CPU.ActiveCfg = Debug_woDrawing|Any CPU {67AA00E9-15AF-4592-8119-110C8CBD1E31}.Debug_woDrawing|Any CPU.Build.0 = Debug_woDrawing|Any CPU {67AA00E9-15AF-4592-8119-110C8CBD1E31}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {67AA00E9-15AF-4592-8119-110C8CBD1E31}.Debug|Any CPU.Build.0 = Debug|Any CPU - {67AA00E9-15AF-4592-8119-110C8CBD1E31}.Release_woDrawing|Any CPU.ActiveCfg = Release_woDrawing|Any CPU - {67AA00E9-15AF-4592-8119-110C8CBD1E31}.Release_woDrawing|Any CPU.Build.0 = Release_woDrawing|Any CPU + {67AA00E9-15AF-4592-8119-110C8CBD1E31}.Release_woDrawing|Any CPU.ActiveCfg = Debug|Any CPU {67AA00E9-15AF-4592-8119-110C8CBD1E31}.Release|Any CPU.ActiveCfg = Release|Any CPU {67AA00E9-15AF-4592-8119-110C8CBD1E31}.Release|Any CPU.Build.0 = Release|Any CPU {4CC217F8-36B2-4753-ACD7-733AB1C60FB0}.Debug_woDrawing|Any CPU.ActiveCfg = Debug_woDrawing|Any CPU @@ -100,7 +98,6 @@ Global {4CC217F8-36B2-4753-ACD7-733AB1C60FB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4CC217F8-36B2-4753-ACD7-733AB1C60FB0}.Debug|Any CPU.Build.0 = Debug|Any CPU {4CC217F8-36B2-4753-ACD7-733AB1C60FB0}.Release_woDrawing|Any CPU.ActiveCfg = Release_woDrawing|Any CPU - {4CC217F8-36B2-4753-ACD7-733AB1C60FB0}.Release_woDrawing|Any CPU.Build.0 = Release_woDrawing|Any CPU {4CC217F8-36B2-4753-ACD7-733AB1C60FB0}.Release|Any CPU.ActiveCfg = Release|Any CPU {4CC217F8-36B2-4753-ACD7-733AB1C60FB0}.Release|Any CPU.Build.0 = Release|Any CPU {B8A96D47-4027-491B-8E78-ADE658E5BA9F}.Debug_woDrawing|Any CPU.ActiveCfg = Debug|Any CPU @@ -115,4 +112,7 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {B725F951-8689-4DB7-B5FE-7037C38AD8D8} + EndGlobalSection EndGlobal diff --git a/src/core/AssemblyInfo.cs b/src/core/AssemblyInfo.cs deleted file mode 100644 index dab22fe0f..000000000 --- a/src/core/AssemblyInfo.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using Versions.Attributes; - -[assembly: AssemblyTitle("iTextSharp")] -[assembly: AssemblyDescription("A free PDF library ported from Java iText.")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("iText Group NV")] -[assembly: AssemblyProduct("iTextSharp")] -[assembly: AssemblyCopyright ("Copyright (c) 1998-2022 iText Group NV")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] -[assembly: InternalsVisibleTo("itextsharp.pdfa, PublicKey=00240000048000009400000006020000002400005253413100040000010001008b21ed5b3fc1c11996390981fe22bbe71a39a9e11d3c2cefddd6ee92920fa871f9666ae0fa941af0280d0653df048ae2d93f8c5e2d820dba3c8df9ed468c8be40a6fffeb32aa481a254f0fb9f37aa7c3ec1c0acd2c009746bbdafcb75bcdbcecb7caf1f0f4b6e7d013906ba60b66eb1c8298e4efb052caf6cece4bf1816902cc"),] -[assembly: InternalsVisibleTo("itextsharp.pdfa.tests, PublicKey=00240000048000009400000006020000002400005253413100040000010001008b21ed5b3fc1c11996390981fe22bbe71a39a9e11d3c2cefddd6ee92920fa871f9666ae0fa941af0280d0653df048ae2d93f8c5e2d820dba3c8df9ed468c8be40a6fffeb32aa481a254f0fb9f37aa7c3ec1c0acd2c009746bbdafcb75bcdbcecb7caf1f0f4b6e7d013906ba60b66eb1c8298e4efb052caf6cece4bf1816902cc"),] -[assembly: InternalsVisibleTo("itextsharp.tests, PublicKey=00240000048000009400000006020000002400005253413100040000010001008b21ed5b3fc1c11996390981fe22bbe71a39a9e11d3c2cefddd6ee92920fa871f9666ae0fa941af0280d0653df048ae2d93f8c5e2d820dba3c8df9ed468c8be40a6fffeb32aa481a254f0fb9f37aa7c3ec1c0acd2c009746bbdafcb75bcdbcecb7caf1f0f4b6e7d013906ba60b66eb1c8298e4efb052caf6cece4bf1816902cc"),] - -[assembly: ComVisibleAttribute(false)] - -[assembly: KeyVersion("3.1.1.0")] - -[assembly: AssemblyVersion("5.5.13.4")] -[assembly: AssemblyInformationalVersion("5.5.13.4")] diff --git a/src/core/iTextSharp/text/FontFactoryImp.cs b/src/core/iTextSharp/text/FontFactoryImp.cs index cea3ed016..a57352bce 100644 --- a/src/core/iTextSharp/text/FontFactoryImp.cs +++ b/src/core/iTextSharp/text/FontFactoryImp.cs @@ -527,7 +527,8 @@ virtual public int RegisterDirectory(String dir, bool scanSubdirectories) { try { if (!Directory.Exists(dir)) return 0; - string[] files = Directory.GetFiles(dir); + + string[] files = Directory.GetFileSystemEntries(dir); if (files == null) return 0; for (int k = 0; k < files.Length; ++k) { diff --git a/src/core/iTextSharp/text/Version.cs b/src/core/iTextSharp/text/Version.cs index a84a9c3e2..668556367 100644 --- a/src/core/iTextSharp/text/Version.cs +++ b/src/core/iTextSharp/text/Version.cs @@ -77,7 +77,7 @@ public sealed class Version { * This String contains the version number of this iText release. * For debugging purposes, we request you NOT to change this constant. */ - private const String release = "5.5.13.4"; + private const String release = "5.5.13.5"; /** * This String contains the iText version as shown in the producer line. diff --git a/src/core/iTextSharp/text/pdf/PdfPublicKeySecurityHandler.cs b/src/core/iTextSharp/text/pdf/PdfPublicKeySecurityHandler.cs index 8a651740f..0afc6de9c 100644 --- a/src/core/iTextSharp/text/pdf/PdfPublicKeySecurityHandler.cs +++ b/src/core/iTextSharp/text/pdf/PdfPublicKeySecurityHandler.cs @@ -10,7 +10,7 @@ following permission added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY ITEXT GROUP. ITEXT GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS - + 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. @@ -20,15 +20,15 @@ You should have received a copy of the GNU Affero General Public License the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, 02110-1301 USA, or download the license from the following URL: http://itextpdf.com/terms-of-use/ - + The interactive user interfaces in modified source and object code versions of this program must display Appropriate Legal Notices, as required under Section 5 of the GNU Affero General Public License. - + In accordance with Section 7(b) of the GNU Affero General Public License, a covered work must retain the producer line in every PDF that is created or manipulated using iText. - + You can be released from the requirements of the license by purchasing a commercial license. Buying such a license is mandatory as soon as you develop commercial activities involving the iText software without @@ -36,7 +36,7 @@ disclosing the source code of your own applications. These activities include: offering paid services to customers as an ASP, serving PDFs on the fly in a web application, shipping iText with a closed source product. - + For more information, please contact iText Software Corp. at this address: sales@itextpdf.com */ @@ -56,10 +56,10 @@ source product. /** * The below 2 methods are from pdfbox. - * + * * private DERObject CreateDERForRecipient(byte[] in, X509Certificate cert) ; * private KeyTransRecipientInfo ComputeRecipientInfo(X509Certificate x509certificate, byte[] abyte0); - * + * * 2006-11-22 Aiken Sam. */ @@ -100,11 +100,11 @@ namespace iTextSharp.text.pdf { * @author Aiken Sam (aikensam@ieee.org) */ public class PdfPublicKeySecurityHandler { - + private const int SEED_LENGTH = 20; - + private List recipients = null; - + private byte[] seed; public PdfPublicKeySecurityHandler() { @@ -116,59 +116,59 @@ public PdfPublicKeySecurityHandler() { virtual public void AddRecipient(PdfPublicKeyRecipient recipient) { recipients.Add(recipient); } - + virtual protected internal byte[] GetSeed() { return (byte[])seed.Clone(); } - + virtual public int GetRecipientsSize() { return recipients.Count; } - + virtual public byte[] GetEncodedRecipient(int index) { //Certificate certificate = recipient.GetX509(); PdfPublicKeyRecipient recipient = recipients[index]; byte[] cms = recipient.Cms; - + if (cms != null) return cms; - + X509Certificate certificate = recipient.Certificate; - int permission = recipient.Permission;//PdfWriter.AllowCopy | PdfWriter.AllowPrinting | PdfWriter.AllowScreenReaders | PdfWriter.AllowAssembly; + int permission = recipient.Permission;//PdfWriter.AllowCopy | PdfWriter.AllowPrinting | PdfWriter.AllowScreenReaders | PdfWriter.AllowAssembly; int revision = 3; - + permission |= (int)(revision==3 ? (uint)0xfffff0c0 : (uint)0xffffffc0); permission &= unchecked((int)0xfffffffc); permission += 1; - + byte[] pkcs7input = new byte[24]; - + byte one = (byte)(permission); byte two = (byte)(permission >> 8); byte three = (byte)(permission >> 16); byte four = (byte)(permission >> 24); System.Array.Copy(seed, 0, pkcs7input, 0, 20); // put this seed in the pkcs7 input - + pkcs7input[20] = four; - pkcs7input[21] = three; + pkcs7input[21] = three; pkcs7input[22] = two; pkcs7input[23] = one; Asn1Object obj = CreateDERForRecipient(pkcs7input, certificate); - + MemoryStream baos = new MemoryStream(); - + Asn1OutputStream k = Asn1OutputStream.Create(baos); - - k.WriteObject(obj); - + + k.WriteObject(obj); + cms = baos.ToArray(); recipient.Cms = cms; - - return cms; + + return cms; } - + virtual public PdfArray GetEncodedRecipients() { PdfArray EncodedRecipients = new PdfArray(); byte[] cms = null; @@ -179,14 +179,14 @@ virtual public PdfArray GetEncodedRecipients() { } catch { EncodedRecipients = null; } - } + } return EncodedRecipients; } - + private Asn1Object CreateDERForRecipient(byte[] inp, X509Certificate cert) { - + String s = "1.2.840.113549.3.2"; - + byte[] outp = new byte[100]; DerObjectIdentifier derob = new DerObjectIdentifier(s); byte[] keyp = IVGenerator.GetIV(16); @@ -207,24 +207,24 @@ private Asn1Object CreateDERForRecipient(byte[] inp, X509Certificate cert) { ev.Add(new DerOctetString(iv)); DerSequence seq = new DerSequence(ev); AlgorithmIdentifier algorithmidentifier = new AlgorithmIdentifier(derob, seq); - EncryptedContentInfo encryptedcontentinfo = + EncryptedContentInfo encryptedcontentinfo = new EncryptedContentInfo(PkcsObjectIdentifiers.Data, algorithmidentifier, deroctetstring); Asn1Set set = null; EnvelopedData env = new EnvelopedData(null, derset, encryptedcontentinfo, set); - Org.BouncyCastle.Asn1.Cms.ContentInfo contentinfo = + Org.BouncyCastle.Asn1.Cms.ContentInfo contentinfo = new Org.BouncyCastle.Asn1.Cms.ContentInfo(PkcsObjectIdentifiers.EnvelopedData, env); - return contentinfo.ToAsn1Object(); + return contentinfo.ToAsn1Object(); } - + private KeyTransRecipientInfo ComputeRecipientInfo(X509Certificate x509certificate, byte[] abyte0) { - Asn1InputStream asn1inputstream = + Asn1InputStream asn1inputstream = new Asn1InputStream(new MemoryStream(x509certificate.GetTbsCertificate())); - TbsCertificateStructure tbscertificatestructure = + TbsCertificateStructure tbscertificatestructure = TbsCertificateStructure.GetInstance(asn1inputstream.ReadObject()); AlgorithmIdentifier algorithmidentifier = tbscertificatestructure.SubjectPublicKeyInfo.AlgorithmID; - Org.BouncyCastle.Asn1.Cms.IssuerAndSerialNumber issuerandserialnumber = + Org.BouncyCastle.Asn1.Cms.IssuerAndSerialNumber issuerandserialnumber = new Org.BouncyCastle.Asn1.Cms.IssuerAndSerialNumber( - tbscertificatestructure.Issuer, + tbscertificatestructure.Issuer, tbscertificatestructure.SerialNumber.Value); IBufferedCipher cipher = CipherUtilities.GetCipher(algorithmidentifier.Algorithm); cipher.Init(true, x509certificate.GetPublicKey()); @@ -235,6 +235,6 @@ private KeyTransRecipientInfo ComputeRecipientInfo(X509Certificate x509certifica DerOctetString deroctetstring = new DerOctetString(abyte1); RecipientIdentifier recipId = new RecipientIdentifier(issuerandserialnumber); return new KeyTransRecipientInfo( recipId, algorithmidentifier, deroctetstring); - } + } } } diff --git a/src/core/iTextSharp/text/pdf/crypto/AESCipher.cs b/src/core/iTextSharp/text/pdf/crypto/AESCipher.cs index c032a3ba3..be38bf8d7 100644 --- a/src/core/iTextSharp/text/pdf/crypto/AESCipher.cs +++ b/src/core/iTextSharp/text/pdf/crypto/AESCipher.cs @@ -10,7 +10,7 @@ following permission added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY ITEXT GROUP. ITEXT GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS - + 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. @@ -20,15 +20,15 @@ You should have received a copy of the GNU Affero General Public License the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, 02110-1301 USA, or download the license from the following URL: http://itextpdf.com/terms-of-use/ - + The interactive user interfaces in modified source and object code versions of this program must display Appropriate Legal Notices, as required under Section 5 of the GNU Affero General Public License. - + In accordance with Section 7(b) of the GNU Affero General Public License, a covered work must retain the producer line in every PDF that is created or manipulated using iText. - + You can be released from the requirements of the license by purchasing a commercial license. Buying such a license is mandatory as soon as you develop commercial activities involving the iText software without @@ -36,7 +36,7 @@ disclosing the source code of your own applications. These activities include: offering paid services to customers as an ASP, serving PDFs on the fly in a web application, shipping iText with a closed source product. - + For more information, please contact iText Software Corp. at this address: sales@itextpdf.com */ @@ -53,7 +53,7 @@ namespace iTextSharp.text.pdf.crypto { */ public class AESCipherCBCnoPad { private IBlockCipher cbc; - + /** Creates a new instance of AESCipher */ public AESCipherCBCnoPad(bool forEncryption, byte[] key) { IBlockCipher aes = new AesEngine(); @@ -61,7 +61,7 @@ public AESCipherCBCnoPad(bool forEncryption, byte[] key) { KeyParameter kp = new KeyParameter(key); cbc.Init(forEncryption, kp); } - + virtual public byte[] ProcessBlock(byte[] inp, int inpOff, int inpLen) { if ((inpLen % cbc.GetBlockSize()) != 0) throw new ArgumentException("Not multiple of block: " + inpLen); @@ -74,6 +74,6 @@ virtual public byte[] ProcessBlock(byte[] inp, int inpOff, int inpLen) { inpOff += cbc.GetBlockSize(); } return outp; - } + } } } diff --git a/src/core/iTextSharp/text/pdf/crypto/AESCipherCBCnoPad.cs b/src/core/iTextSharp/text/pdf/crypto/AESCipherCBCnoPad.cs index e8f9d7c06..f26bf36fa 100644 --- a/src/core/iTextSharp/text/pdf/crypto/AESCipherCBCnoPad.cs +++ b/src/core/iTextSharp/text/pdf/crypto/AESCipherCBCnoPad.cs @@ -10,7 +10,7 @@ following permission added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY ITEXT GROUP. ITEXT GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS - + 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. @@ -20,15 +20,15 @@ You should have received a copy of the GNU Affero General Public License the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, 02110-1301 USA, or download the license from the following URL: http://itextpdf.com/terms-of-use/ - + The interactive user interfaces in modified source and object code versions of this program must display Appropriate Legal Notices, as required under Section 5 of the GNU Affero General Public License. - + In accordance with Section 7(b) of the GNU Affero General Public License, a covered work must retain the producer line in every PDF that is created or manipulated using iText. - + You can be released from the requirements of the license by purchasing a commercial license. Buying such a license is mandatory as soon as you develop commercial activities involving the iText software without @@ -36,7 +36,7 @@ disclosing the source code of your own applications. These activities include: offering paid services to customers as an ASP, serving PDFs on the fly in a web application, shipping iText with a closed source product. - + For more information, please contact iText Software Corp. at this address: sales@itextpdf.com */ @@ -54,17 +54,17 @@ namespace iTextSharp.text.pdf.crypto { */ public class AESCipher { private PaddedBufferedBlockCipher bp; - + /** Creates a new instance of AESCipher */ public AESCipher(bool forEncryption, byte[] key, byte[] iv) { IBlockCipher aes = new AesEngine(); IBlockCipherMode cbc = new CbcBlockCipher(aes); - bp = new PaddedBufferedBlockCipher(cbc); + bp = new PaddedBufferedBlockCipher(cbc, new Pkcs7Padding()); KeyParameter kp = new KeyParameter(key); ParametersWithIV piv = new ParametersWithIV(kp, iv); bp.Init(forEncryption, piv); } - + virtual public byte[] Update(byte[] inp, int inpOff, int inpLen) { int neededLen = bp.GetUpdateOutputSize(inpLen); byte[] outp = null; @@ -75,7 +75,7 @@ virtual public byte[] Update(byte[] inp, int inpOff, int inpLen) { bp.ProcessBytes(inp, inpOff, inpLen, outp, 0); return outp; } - + virtual public byte[] DoFinal() { int neededLen = bp.GetOutputSize(0); byte[] outp = new byte[neededLen]; @@ -94,6 +94,6 @@ virtual public byte[] DoFinal() { else return outp; } - + } } diff --git a/src/core/iTextSharp/text/pdf/security/CertificateVerification.cs b/src/core/iTextSharp/text/pdf/security/CertificateVerification.cs index 711258e76..b842c9964 100644 --- a/src/core/iTextSharp/text/pdf/security/CertificateVerification.cs +++ b/src/core/iTextSharp/text/pdf/security/CertificateVerification.cs @@ -10,7 +10,7 @@ following permission added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY ITEXT GROUP. ITEXT GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS - + 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. @@ -20,15 +20,15 @@ You should have received a copy of the GNU Affero General Public License the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, 02110-1301 USA, or download the license from the following URL: http://itextpdf.com/terms-of-use/ - + The interactive user interfaces in modified source and object code versions of this program must display Appropriate Legal Notices, as required under Section 5 of the GNU Affero General Public License. - + In accordance with Section 7(b) of the GNU Affero General Public License, a covered work must retain the producer line in every PDF that is created or manipulated using iText. - + You can be released from the requirements of the license by purchasing a commercial license. Buying such a license is mandatory as soon as you develop commercial activities involving the iText software without @@ -36,7 +36,7 @@ disclosing the source code of your own applications. These activities include: offering paid services to customers as an ASP, serving PDFs on the fly in a web application, shipping iText with a closed source product. - + For more information, please contact iText Software Corp. at this address: sales@itextpdf.com */ @@ -48,6 +48,7 @@ source product. using Org.BouncyCastle.Tsp; using Org.BouncyCastle.Asn1.X509; using Org.BouncyCastle.Security.Certificates; +using Org.BouncyCastle.Asn1; namespace iTextSharp.text.pdf.security { /** @@ -80,7 +81,8 @@ public static String VerifyCertificate(X509Certificate cert, ICollection VerifyCertificates(ICollection extensions = + IDictionary extensions = new Dictionary(); DerOctetString extValue = new DerOctetString(new DerOctetString( PdfEncryption.CreateDocumentId()).GetEncoded()); @@ -165,7 +166,7 @@ private static OcspReq GenerateOCSPRequest(X509Certificate issuerCert, BigIntege gen.SetRequestExtensions(new X509Extensions(extensions)); return gen.Generate(); } - + private OcspResp GetOcspResponse(X509Certificate checkCert, X509Certificate rootCert, String url) { if (checkCert == null || rootCert == null) return null; @@ -177,7 +178,7 @@ private OcspResp GetOcspResponse(X509Certificate checkCert, X509Certificate root LOGGER.Info("Getting OCSP from " + url); OcspReq request = GenerateOCSPRequest(rootCert, checkCert.SerialNumber); byte[] array = request.GetEncoded(); - + HttpWebRequest con = (HttpWebRequest)WebRequest.Create(url); con.ContentLength = array.Length; con.ContentType = "application/ocsp-request"; diff --git a/src/core/iTextSharp/text/pdf/security/OcspVerifier.cs b/src/core/iTextSharp/text/pdf/security/OcspVerifier.cs index bd421bcc8..21c30e560 100644 --- a/src/core/iTextSharp/text/pdf/security/OcspVerifier.cs +++ b/src/core/iTextSharp/text/pdf/security/OcspVerifier.cs @@ -10,7 +10,7 @@ following permission added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY ITEXT GROUP. ITEXT GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS - + 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. @@ -20,15 +20,15 @@ You should have received a copy of the GNU Affero General Public License the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, 02110-1301 USA, or download the license from the following URL: http://itextpdf.com/terms-of-use/ - + The interactive user interfaces in modified source and object code versions of this program must display Appropriate Legal Notices, as required under Section 5 of the GNU Affero General Public License. - + In accordance with Section 7(b) of the GNU Affero General Public License, a covered work must retain the producer line in every PDF that is created or manipulated using iText. - + You can be released from the requirements of the license by purchasing a commercial license. Buying such a license is mandatory as soon as you develop commercial activities involving the iText software without @@ -36,7 +36,7 @@ disclosing the source code of your own applications. These activities include: offering paid services to customers as an ASP, serving PDFs on the fly in a web application, shipping iText with a closed source product. - + For more information, please contact iText Software Corp. at this address: sales@itextpdf.com */ @@ -52,7 +52,6 @@ source product. using Org.BouncyCastle.Asn1; using Org.BouncyCastle.Asn1.Ocsp; using Org.BouncyCastle.Security.Certificates; -using Org.BouncyCastle.Utilities.Date; /** * Class that allows you to verify a certificate against @@ -62,12 +61,13 @@ namespace iTextSharp.text.pdf.security { public class OcspVerifier : RootStoreVerifier { /** The Logger instance */ private static ILogger LOGGER = LoggerFactory.GetLogger(typeof(OcspVerifier)); - - protected readonly static String id_kp_OCSPSigning = "1.3.6.1.5.5.7.3.9"; + + protected readonly static String id_kp_OCSPSigning_Raw = "1.3.6.1.5.5.7.3.9"; + protected static DerObjectIdentifier id_kp_OCSPSigning; /** The list of OCSP responses. */ protected List ocsps; - + /** * Creates an OCSPVerifier instance. * @param verifier the next verifier in the chain @@ -207,7 +207,13 @@ virtual public void IsValidResponse(BasicOcspResp ocspResp, X509Certificate issu IList keyPurposes = null; try { keyPurposes = tempCert.GetExtendedKeyUsage(); - if ((keyPurposes != null) && keyPurposes.Contains(new DerObjectIdentifier(id_kp_OCSPSigning)) && IsSignatureValid(ocspResp, tempCert)) { + if (id_kp_OCSPSigning == null) + { + if (DerObjectIdentifier.TryFromID(id_kp_OCSPSigning_Raw, out var id)) + id_kp_OCSPSigning = id; + } + + if ((keyPurposes != null) && keyPurposes.Contains(id_kp_OCSPSigning) && IsSignatureValid(ocspResp, tempCert)) { responderCert = tempCert; break; } @@ -248,7 +254,7 @@ virtual public void IsValidResponse(BasicOcspResp ocspResp, X509Certificate issu // validating ocsp signers certificate // Check if responders certificate has id-pkix-ocsp-nocheck extension, // in which case we do not validate (perform revocation check on) ocsp certs for lifetime of certificate - if (responderCert.GetExtensionValue(new DerObjectIdentifier(OcspObjectIdentifiers.PkixOcspNocheck.Id)) == null) { + if (responderCert.GetExtensionValue(OcspObjectIdentifiers.PkixOcspNocheck) == null) { X509Crl crl; try { X509CrlParser crlParser = new X509CrlParser(); @@ -289,7 +295,7 @@ virtual public bool VerifyResponse(BasicOcspResp ocspResp, X509Certificate issue return false; } } - + /** * Checks if an OCSP response is genuine * @param ocspResp the OCSP response @@ -303,7 +309,7 @@ virtual public bool IsSignatureValid(BasicOcspResp ocspResp, X509Certificate res return false; } } - + /** * Gets an OCSP response online and returns it if the status is GOOD * (without further checking). diff --git a/src/core/iTextSharp/text/pdf/security/PdfPKCS7.cs b/src/core/iTextSharp/text/pdf/security/PdfPKCS7.cs index 4d1597873..ff45d585f 100644 --- a/src/core/iTextSharp/text/pdf/security/PdfPKCS7.cs +++ b/src/core/iTextSharp/text/pdf/security/PdfPKCS7.cs @@ -10,7 +10,7 @@ following permission added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY ITEXT GROUP. ITEXT GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS - + 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. @@ -20,15 +20,15 @@ You should have received a copy of the GNU Affero General Public License the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, 02110-1301 USA, or download the license from the following URL: http://itextpdf.com/terms-of-use/ - + The interactive user interfaces in modified source and object code versions of this program must display Appropriate Legal Notices, as required under Section 5 of the GNU Affero General Public License. - + In accordance with Section 7(b) of the GNU Affero General Public License, a covered work must retain the producer line in every PDF that is created or manipulated using iText. - + You can be released from the requirements of the license by purchasing a commercial license. Buying such a license is mandatory as soon as you develop commercial activities involving the iText software without @@ -36,7 +36,7 @@ disclosing the source code of your own applications. These activities include: offering paid services to customers as an ASP, serving PDFs on the fly in a web application, shipping iText with a closed source product. - + For more information, please contact iText Software Corp. at this address: sales@itextpdf.com */ @@ -82,24 +82,24 @@ public class PdfPKCS7 { * @throws NoSuchProviderException on error * @throws NoSuchAlgorithmException on error */ - public PdfPKCS7(ICipherParameters privKey, ICollection certChain, + public PdfPKCS7(ICipherParameters privKey, ICollection certChain, String hashAlgorithm, bool hasRSAdata) { - + digestAlgorithmOid = DigestAlgorithms.GetAllowedDigests(hashAlgorithm); if (digestAlgorithmOid == null) throw new ArgumentException(MessageLocalization.GetComposedMessage("unknown.hash.algorithm.1", hashAlgorithm)); - + version = signerversion = 1; certs = new List(certChain); crls = new List(); digestalgos = new Dictionary(); digestalgos[digestAlgorithmOid] = null; - + // // Copy in the certificates and crls used to sign the private key. // signCert = certs[0]; - + if (privKey != null) { // // Now we have private key, find out what the digestEncryptionAlgorithm is. @@ -168,12 +168,12 @@ public PdfPKCS7(byte[] contentsKey, PdfName filterSubtype) { isTsp = PdfName.ETSI_RFC3161.Equals(filterSubtype); isCades = PdfName.ETSI_CADES_DETACHED.Equals(filterSubtype); Asn1InputStream din = new Asn1InputStream(new MemoryStream(contentsKey)); - + // // Basic checks to make sure it's a PKCS#7 SignedData Object // Asn1Object pkcs; - + try { pkcs = din.ReadObject(); } @@ -194,10 +194,10 @@ public PdfPKCS7(byte[] contentsKey, PdfName filterSubtype) { // 2 - possible ID_PKCS7_DATA // (the certificates and crls are taken out by other means) // last - signerInfos - + // the version version = ((DerInteger)content[0]).Value.IntValue; - + // the digestAlgorithms digestalgos = new Dictionary(); IEnumerator e = ((Asn1Set)content[1]).GetEnumerator(); @@ -207,7 +207,7 @@ public PdfPKCS7(byte[] contentsKey, PdfName filterSubtype) { DerObjectIdentifier o = (DerObjectIdentifier)s[0]; digestalgos[o.Id] = null; } - + // the certificates and crls X509CertificateParser cf = new X509CertificateParser(); certs = new List(); @@ -215,14 +215,14 @@ public PdfPKCS7(byte[] contentsKey, PdfName filterSubtype) { certs.Add(cc); } crls = new List(); - + // the possible ID_PKCS7_DATA Asn1Sequence rsaData = (Asn1Sequence)content[2]; if (rsaData.Count > 1) { Asn1OctetString rsaDataContent = (Asn1OctetString)((Asn1TaggedObject)rsaData[1]).GetObject(); RSAdata = rsaDataContent.GetOctets(); } - + // the signerInfos int next = 3; while (content[next] is Asn1TaggedObject) @@ -242,14 +242,14 @@ public PdfPKCS7(byte[] contentsKey, PdfName filterSubtype) { Asn1Sequence issuerAndSerialNumber = (Asn1Sequence)signerInfo[1]; Org.BouncyCastle.Asn1.X509.X509Name issuer = Org.BouncyCastle.Asn1.X509.X509Name.GetInstance(issuerAndSerialNumber[0]); BigInteger serialNumber = ((DerInteger)issuerAndSerialNumber[1]).Value; - foreach (X509Certificate cert in certs) { + foreach (X509Certificate cert in certs) { if (issuer.Equivalent(cert.IssuerDN) && serialNumber.Equals(cert.SerialNumber)) { - signCert = cert; - break; - } + signCert = cert; + break; + } } if (signCert == null) { - throw new ArgumentException(MessageLocalization.GetComposedMessage("can.t.find.signing.certificate.with.serial.1", + throw new ArgumentException(MessageLocalization.GetComposedMessage("can.t.find.signing.certificate.with.serial.1", issuer.ToString() + " / " + serialNumber.ToString(16))); } CalcSignCertificateChain(); @@ -261,7 +261,7 @@ public PdfPKCS7(byte[] contentsKey, PdfName filterSubtype) { sigAttr = sseq.GetEncoded(); // maybe not necessary, but we use the following line as fallback: sigAttrDer = sseq.GetEncoded(Asn1Encodable.Der); - + for (int k = 0; k < sseq.Count; ++k) { Asn1Sequence seq2 = (Asn1Sequence)sseq[k]; String idSeq2 = ((DerObjectIdentifier)seq2[0]).Id; @@ -429,13 +429,13 @@ virtual public DateTime SignDate { } // version info - + /** Version of the PKCS#7 object */ private int version = 1; - + /** Version of the PKCS#7 "SignerInfo" object. */ private int signerversion = 1; - + /** * Get the version of the PKCS#7 object. * @return the version of the PKCS#7 object. @@ -455,15 +455,15 @@ virtual public int SigningInfoVersion { return signerversion; } } - + // Message digest algorithm /** The ID of the digest algorithm, e.g. "2.16.840.1.101.3.4.2.1". */ private String digestAlgorithmOid; - + /** The object that will create the digest */ private IDigest messageDigest; - + /** The digest algorithms */ private Dictionary digestalgos; @@ -488,9 +488,9 @@ virtual public String DigestAlgorithmOid { virtual public String GetHashAlgorithm() { return DigestAlgorithms.GetDigest(digestAlgorithmOid); } - + // Encryption algorithm - + /** The encryption algorithm. */ private String digestEncryptionAlgorithmOid; @@ -502,7 +502,7 @@ virtual public String DigestEncryptionAlgorithmOid { return digestEncryptionAlgorithmOid; } } - + /** * Get the algorithm used to calculate the message digest, e.g. "SHA1withRSA". * @return the algorithm used to calculate the message digest @@ -516,13 +516,13 @@ virtual public String GetDigestAlgorithm() { */ // The signature is created externally - - /** The signed digest if created outside this class */ + + /** The signed digest if created outside this class */ private byte[] externalDigest; - + /** External RSA data */ private byte[] externalRSAdata; - + /** * Sets the digest/signature to an external calculated value. * @param digest the digest. This is the actual signature @@ -549,26 +549,26 @@ virtual public void SetExternalDigest(byte[] digest, byte[] RSAdata, String dige throw new ArgumentException(MessageLocalization.GetComposedMessage("unknown.key.algorithm.1", digestEncryptionAlgorithm)); } } - + // The signature is created internally - + /** Class from the Java SDK that provides the functionality of a digital signature algorithm. */ private ISigner sig; - + /** The signed digest as calculated by this class (or extracted from an existing PDF) */ private byte[] digest; - + /** The RSA data */ private byte[] RSAdata; // Signing functionality. - + private ISigner InitSignature(ICipherParameters key) { ISigner signature = SignerUtilities.GetSigner(GetDigestAlgorithm()); signature.Init(true, key); return signature; } - + private ISigner InitSignature(AsymmetricKeyParameter key) { String digestAlgorithm = GetDigestAlgorithm(); if (PdfName.ADBE_X509_RSA_SHA1.Equals(GetFilterSubtype())) @@ -577,7 +577,7 @@ private ISigner InitSignature(AsymmetricKeyParameter key) { signature.Init(false, signCert.GetPublicKey()); return signature; } - + /** * Update the digest with the specified bytes. * This method is used both for signing and verifying @@ -594,7 +594,7 @@ virtual public void Update(byte[] buf, int off, int len) { } // adbe.x509.rsa_sha1 (PKCS#1) - + /** * Gets the bytes for the PKCS#1 object. * @return a byte array @@ -605,16 +605,18 @@ virtual public byte[] GetEncodedPKCS1() { else digest = sig.GenerateSignature(); MemoryStream bOut = new MemoryStream(); - - Asn1OutputStream dout = Asn1OutputStream.Create(bOut); - dout.WriteObject(new DerOctetString(digest)); - dout.Close(); - + + using (Asn1OutputStream dout = Asn1OutputStream.Create(bOut)) + { + dout.WriteObject(new DerOctetString(digest)); + dout.Close(); + } + return bOut.ToArray(); } // other subfilters (PKCS#7) - + /** * Gets the bytes for the PKCS7SignedData object. * @return the bytes for the PKCS7SignedData object @@ -661,7 +663,7 @@ virtual public byte[] GetEncodedPKCS7(byte[] secondDigest, ITSAClient tsaClient, } digest = sig.GenerateSignature(); } - + // Create the set of Hash algorithms Asn1EncodableVector digestAlgorithms = new Asn1EncodableVector(); foreach (string dal in digestalgos.Keys) { @@ -670,14 +672,14 @@ virtual public byte[] GetEncodedPKCS7(byte[] secondDigest, ITSAClient tsaClient, algos.Add(DerNull.Instance); digestAlgorithms.Add(new DerSequence(algos)); } - + // Create the contentInfo. Asn1EncodableVector v = new Asn1EncodableVector(); v.Add(new DerObjectIdentifier(SecurityIDs.ID_PKCS7_DATA)); if (RSAdata != null) v.Add(new DerTaggedObject(0, new DerOctetString(RSAdata))); DerSequence contentinfo = new DerSequence(v); - + // Get all the certificates // v = new Asn1EncodableVector(); @@ -685,28 +687,28 @@ virtual public byte[] GetEncodedPKCS7(byte[] secondDigest, ITSAClient tsaClient, Asn1InputStream tempstream = new Asn1InputStream(new MemoryStream(xcert.GetEncoded())); v.Add(tempstream.ReadObject()); } - + DerSet dercertificates = new DerSet(v); - + // Create signerinfo structure. // Asn1EncodableVector signerinfo = new Asn1EncodableVector(); - + // Add the signerInfo version // signerinfo.Add(new DerInteger(signerversion)); - + v = new Asn1EncodableVector(); v.Add(CertificateInfo.GetIssuer(signCert.GetTbsCertificate())); v.Add(new DerInteger(signCert.SerialNumber)); signerinfo.Add(new DerSequence(v)); - + // Add the digestAlgorithm v = new Asn1EncodableVector(); v.Add(new DerObjectIdentifier(digestAlgorithmOid)); v.Add(DerNull.Instance); signerinfo.Add(new DerSequence(v)); - + // add the authenticated attribute if present if (secondDigest != null) { signerinfo.Add(new DerTaggedObject(false, 0, GetAuthenticatedAttributeSet(secondDigest, ocsp, crlBytes, sigtype))); @@ -716,10 +718,10 @@ virtual public byte[] GetEncodedPKCS7(byte[] secondDigest, ITSAClient tsaClient, v.Add(new DerObjectIdentifier(digestEncryptionAlgorithmOid)); v.Add(DerNull.Instance); signerinfo.Add(new DerSequence(v)); - + // Add the digest signerinfo.Add(new DerOctetString(digest)); - + // When requested, go get and add the timestamp. May throw an exception. // Added by Martin Brunecky, 07/12/2007 folowing Aiken Sam, 2006-11-15 // Sam found Adobe expects time-stamped SHA1-1 of the encrypted digest @@ -733,30 +735,32 @@ virtual public byte[] GetEncodedPKCS7(byte[] secondDigest, ITSAClient tsaClient, } } } - + // Finally build the body out of all the components above Asn1EncodableVector body = new Asn1EncodableVector(); body.Add(new DerInteger(version)); body.Add(new DerSet(digestAlgorithms)); body.Add(contentinfo); body.Add(new DerTaggedObject(false, 0, dercertificates)); - + // Only allow one signerInfo body.Add(new DerSet(new DerSequence(signerinfo))); - + // Now we have the body, wrap it in it's PKCS7Signed shell // and return it // Asn1EncodableVector whole = new Asn1EncodableVector(); whole.Add(new DerObjectIdentifier(SecurityIDs.ID_PKCS7_SIGNED_DATA)); whole.Add(new DerTaggedObject(0, new DerSequence(body))); - + MemoryStream bOut = new MemoryStream(); - - Asn1OutputStream dout = Asn1OutputStream.Create(bOut); - dout.WriteObject(new DerSequence(whole)); - dout.Close(); - + + using (Asn1OutputStream dout = Asn1OutputStream.Create(bOut)) + { + dout.WriteObject(new DerSequence(whole)); + dout.Close(); + } + return bOut.ToArray(); } @@ -789,7 +793,7 @@ private Asn1EncodableVector BuildUnauthenticatedAttributes(byte[] timeStampToken } // Authenticated attributes - + /** * When using authenticatedAttributes the authentication process is different. * The document digest is generated and put inside the attribute. The signing is done over the DER encoded @@ -823,7 +827,7 @@ virtual public byte[] getAuthenticatedAttributeBytes(byte[] secondDigest, byte[] /** * This method provides that encoding and the parameters must be * exactly the same as in {@link #getEncodedPKCS7(byte[],Calendar)}. - * + * * @param secondDigest the content digest * @return the byte array representation of the authenticatedAttributes ready to be signed */ @@ -896,9 +900,9 @@ private DerSet GetAuthenticatedAttributeSet(byte[] secondDigest, byte[] ocsp, IC aaV2.Add(algoId); } - byte[] dig = DigestAlgorithms.Digest(GetHashAlgorithm(), signCert.GetEncoded()); + byte[] dig = DigestAlgorithms.Digest(GetHashAlgorithm(), signCert.GetEncoded()); aaV2.Add(new DerOctetString(dig)); - + v.Add(new DerSet(new DerSequence(new DerSequence(new DerSequence(aaV2))))); attribute.Add(new DerSequence(v)); } @@ -909,28 +913,28 @@ private DerSet GetAuthenticatedAttributeSet(byte[] secondDigest, byte[] ocsp, IC return new DerSet(attribute); } - + /* * DIGITAL SIGNATURE VERIFICATION */ - + /** Signature attributes */ private byte[] sigAttr; /** Signature attributes (maybe not necessary, but we use it as fallback) */ private byte[] sigAttrDer; - + /** encrypted digest */ private IDigest encContDigest; // Stefan Santesson - + /** Indicates if a signature has already been verified */ private bool verified; - + /** The result of the verification */ private bool verifyResult; - + // verification - + /** * Verify the digest. * @throws SignatureException on error @@ -1005,16 +1009,16 @@ virtual public bool VerifyTimestampImprint() { } // Certificates - + /** All the X.509 certificates in no particular order. */ private List certs; - + /** All the X.509 certificates used for the main signature. */ private ICollection signCerts; /** The X.509 certificate that is used to sign the digest. */ private X509Certificate signCert; - + /** * Get all the X.509 certificates associated with this PKCS#7 object in no particular order. * Other certificates, from OCSP for example, will also be included. @@ -1042,7 +1046,7 @@ virtual public X509Certificate[] SignCertificateChain { return ret; } } - + /** * Get the X.509 certificate actually used to sign the digest. * @return the X.509 certificate actually used to sign the digest @@ -1087,7 +1091,7 @@ private void CalcSignCertificateChain() { } signCerts = cc; } - + // Certificate Revocation Lists private ICollection crls; @@ -1113,7 +1117,7 @@ private void FindCRL(Asn1Sequence seq) { crls.Add(crl); } } - + // Online Certificate Status Protocol /** BouncyCastle BasicOCSPResp */ @@ -1163,7 +1167,7 @@ private void FindOcsp(Asn1Sequence seq) { basicResp = null; bool ret = false; while (true) { - if ((seq[0] is DerObjectIdentifier) + if ((seq[0] is DerObjectIdentifier) && ((DerObjectIdentifier)seq[0]).Id.Equals(OcspObjectIdentifiers.PkixOcspBasic.Id)) { break; } @@ -1193,12 +1197,12 @@ private void FindOcsp(Asn1Sequence seq) { BasicOcspResponse resp = BasicOcspResponse.GetInstance(inp.ReadObject()); basicResp = new BasicOcspResp(resp); } - + // Time Stamps /** True if there's a PAdES LTV time stamp. */ private bool isTsp; - + private bool isCades; /** BouncyCastle TimeStampToken. */ diff --git a/src/core/iTextSharp/text/pdf/security/SignaturePolicyInfo.cs b/src/core/iTextSharp/text/pdf/security/SignaturePolicyInfo.cs index b53856a71..db1e57910 100644 --- a/src/core/iTextSharp/text/pdf/security/SignaturePolicyInfo.cs +++ b/src/core/iTextSharp/text/pdf/security/SignaturePolicyInfo.cs @@ -10,7 +10,7 @@ following permission added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY ITEXT GROUP. ITEXT GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS - + 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. @@ -20,15 +20,15 @@ You should have received a copy of the GNU Affero General Public License the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, 02110-1301 USA, or download the license from the following URL: http://itextpdf.com/terms-of-use/ - + The interactive user interfaces in modified source and object code versions of this program must display Appropriate Legal Notices, as required under Section 5 of the GNU Affero General Public License. - + In accordance with Section 7(b) of the GNU Affero General Public License, a covered work must retain the producer line in every PDF that is created or manipulated using iText. - + You can be released from the requirements of the license by purchasing a commercial license. Buying such a license is mandatory as soon as you develop commercial activities involving the iText software without @@ -36,7 +36,7 @@ disclosing the source code of your own applications. These activities include: offering paid services to customers as an ASP, serving PDFs on the fly in a web application, shipping iText with a closed source product. - + For more information, please contact iText Software Corp. at this address: sales@itextpdf.com */ @@ -50,10 +50,10 @@ namespace iTextSharp.text.pdf.security { /** * Class that encapsulates the signature policy information * @author J. Arturo - * + * * Sample: - * - * SignaturePolicyInfo spi = new SignaturePolicyInfo("2.16.724.1.3.1.1.2.1.9", + * + * SignaturePolicyInfo spi = new SignaturePolicyInfo("2.16.724.1.3.1.1.2.1.9", * "G7roucf600+f03r/o0bAOQ6WAs0=", "SHA-1", "https://sede.060.gob.es/politica_de_firma_anexo_1.pdf"); */ @@ -118,7 +118,7 @@ protected internal SignaturePolicyIdentifier ToSignaturePolicyIdentifier() { signaturePolicyIdentifier = new SignaturePolicyIdentifier(new SignaturePolicyId( DerObjectIdentifier.GetInstance(new DerObjectIdentifier(this.PolicyIdentifier.Replace("urn:oid:", ""))), - new OtherHashAlgAndValue(new AlgorithmIdentifier(new DerObjectIdentifier(algId)), + new OtherHashAlgAndValue(new AlgorithmIdentifier(new DerObjectIdentifier(algId)), new DerOctetString(this.PolicyHash)), spqi)); return signaturePolicyIdentifier; diff --git a/src/core/iTextSharp/xmp/impl/XmpSerializerRdf.cs b/src/core/iTextSharp/xmp/impl/XmpSerializerRdf.cs index 1989ecef4..5606099d9 100644 --- a/src/core/iTextSharp/xmp/impl/XmpSerializerRdf.cs +++ b/src/core/iTextSharp/xmp/impl/XmpSerializerRdf.cs @@ -37,10 +37,10 @@ namespace iTextSharp.xmp.impl { /// - /// Serializes the XMPMeta-object using the standard RDF serialization format. - /// The output is written to an OutputStream - /// according to the SerializeOptions. - /// + /// Serializes the XMPMeta-object using the standard RDF serialization format. + /// The output is written to an OutputStream + /// according to the SerializeOptions. + /// /// @since 11.07.2006 /// public class XmpSerializerRdf { @@ -84,14 +84,14 @@ public class XmpSerializerRdf { /// /// the padding in the XMP Packet, or the length of the complete packet in - /// case of option exactPacketLength. + /// case of option exactPacketLength. /// private int _padding; /// - /// the size of one unicode char, for UTF-8 set to 1 + /// the size of one unicode char, for UTF-8 set to 1 /// (Note: only valid for ASCII chars lower than 0x80), - /// set to 2 in case of UTF-16 + /// set to 2 in case of UTF-16 /// private int _unicodeSize = 1; // UTF-8 @@ -123,7 +123,7 @@ public virtual void Serialize(IXmpMeta xmp, Stream @out, SerializeOptions option CheckOptionsConsistence(); - // serializes the whole packet, but don't write the tail yet + // serializes the whole packet, but don't write the tail yet // and flush to make sure that the written bytes are calculated correctly string tailStr = SerializeAsRdf(); _writer.Flush(); @@ -414,18 +414,18 @@ private bool SerializeCompactRdfAttrProps(XmpNode parentNode, int indent) { /// field of a struct, or an item of an array. The indent is that for the /// property element. The patterns bwlow ignore attribute qualifiers such as /// xml:lang, they don't affect the output form. - /// + /// ///
- /// + /// ///
         ///  	<ns:UnqualifiedStructProperty-1
         ///  		... The fields as attributes, if all are simple and unqualified
         ///  	/>
-        ///  
+        ///
         ///  	<ns:UnqualifiedStructProperty-2 rdf:parseType="Resource">
         ///  		... The fields as elements, if none are simple and unqualified
         ///  	</ns:UnqualifiedStructProperty-2>
-        ///  
+        ///
         ///  	<ns:UnqualifiedStructProperty-3>
         ///  		<rdf:Description
         ///  			... The simple and unqualified fields as attributes
@@ -433,22 +433,22 @@ private bool SerializeCompactRdfAttrProps(XmpNode parentNode, int indent) {
         ///  			... The compound or qualified fields as elements
         ///  		</rdf:Description>
         ///  	</ns:UnqualifiedStructProperty-3>
-        ///  
+        ///
         ///  	<ns:UnqualifiedArrayProperty>
         ///  		<rdf:Bag> or Seq or Alt
         ///  			... Array items as rdf:li elements, same forms as top level properties
         ///  		</rdf:Bag>
         ///  	</ns:UnqualifiedArrayProperty>
-        ///  
+        ///
         ///  	<ns:QualifiedProperty rdf:parseType="Resource">
-        ///  		<rdf:value> ... Property "value" 
+        ///  		<rdf:value> ... Property "value"
         ///  			following the unqualified forms ... </rdf:value>
         ///  		... Qualifiers looking like named struct fields
         ///  	</ns:QualifiedProperty>
         /// 
- /// + /// ///
- /// + /// /// *** Consider numbered array items, but has compatibility problems. *** /// Consider qualified form with rdf:Description and attributes. /// @@ -695,26 +695,26 @@ private void SerializeCompactRdfGeneralQualifier(int indent, XmpNode node) { /// /// Serializes one schema with all contained properties in pretty-printed - /// manner.
+ /// manner.
/// Each schema's properties are written to a single /// rdf:Description element. All of the necessary namespaces are declared in /// the rdf:Description element. The baseIndent is the base level for the /// entire serialization, that of the x:xmpmeta element. An xml:lang /// qualifier is written as an attribute of the property start tag, not by /// itself forcing the qualified property form. - /// + /// ///
- /// + /// ///
         ///  	 <rdf:Description rdf:about="TreeName" xmlns:ns="URI" ... >
-        ///  
+        ///
         ///  	 	... The actual properties of the schema, see SerializePrettyRDFProperty
-        ///  
+        ///
         ///  	 	<!-- ns1:Alias is aliased to ns2:Actual -->  ... If alias comments are wanted
-        ///  
+        ///
         ///  	 </rdf:Description>
         /// 
- /// + /// ///
///
/// a schema node @@ -733,7 +733,7 @@ private void SerializeCanonicalRdfSchema(XmpNode schemaNode, int level) { /// - /// Writes all used namespaces of the subtree in node to the output. + /// Writes all used namespaces of the subtree in node to the output. /// The subtree is recursivly traversed. /// the root node of the subtree /// a set containing currently used prefixes @@ -846,42 +846,42 @@ private void EndOuterRdfDescription(int level) { /// qualified property form. The patterns below mostly ignore attribute /// qualifiers like xml:lang. Except for the one struct case, attribute /// qualifiers don't affect the output form. - /// + /// ///
- /// + /// ///
         /// 	<ns:UnqualifiedSimpleProperty>value</ns:UnqualifiedSimpleProperty>
-        /// 
+        ///
         /// 	<ns:UnqualifiedStructProperty> (If no rdf:resource qualifier)
         /// 		<rdf:Description>
         /// 			... Fields, same forms as top level properties
         /// 		</rdf:Description>
         /// 	</ns:UnqualifiedStructProperty>
-        /// 
+        ///
         /// 	<ns:ResourceStructProperty rdf:resource="URI"
         /// 		... Fields as attributes
         /// 	>
-        /// 
+        ///
         /// 	<ns:UnqualifiedArrayProperty>
         /// 		<rdf:Bag> or Seq or Alt
         /// 			... Array items as rdf:li elements, same forms as top level properties
         /// 		</rdf:Bag>
         /// 	</ns:UnqualifiedArrayProperty>
-        /// 
+        ///
         /// 	<ns:QualifiedProperty>
         /// 		<rdf:Description>
-        /// 			<rdf:value> ... Property "value" following the unqualified 
+        /// 			<rdf:value> ... Property "value" following the unqualified
         /// 				forms ... </rdf:value>
         /// 			... Qualifiers looking like named struct fields
         /// 		</rdf:Description>
         /// 	</ns:QualifiedProperty>
         /// 
- /// + /// ///
/// /// the property node /// property shall be rendered as attribute rather than tag - /// use canonical form with inner description tag or + /// use canonical form with inner description tag or /// the compact form with rdf:ParseType="resource" attribute. /// the current indent level /// Forwards all writer exceptions. @@ -1152,7 +1152,7 @@ private void AppendNodeValue(string value, bool forAttribute) { ///
  • don't has qualifier ///
  • is no URI ///
  • is no composite property - /// + /// /// /// an XMPNode /// Returns true if the node serialized as RDF-Attribute diff --git a/src/core/itextsharp(VS2010).csproj b/src/core/itextsharp(VS2010).csproj index 048a50616..602926f64 100644 --- a/src/core/itextsharp(VS2010).csproj +++ b/src/core/itextsharp(VS2010).csproj @@ -1,5 +1,4 @@ - - + Local 8.0.50727 @@ -28,7 +27,7 @@ true - v4.6.1 + netstandard2.0 2.0 publish\ true @@ -45,9 +44,44 @@ false false true + true + Portable.$(AssemblyName) + PLEASE NOTE: iTextSharp is EOL, and has been replaced by iText 7. Only security fixes will be added + +We HIGHLY recommend customers use iText 7 for new projects, and to consider moving existing projects from iTextSharp to iText 7 to benefit from the many improvements such as: +- HTML to PDF (PDF/A) conversion +- PDF Redaction +- SVG support +- Better language support (Indic, Thai, Khmer, Arabic, Hebrew) +- PDF Debugging for your IDE +- Data Extraction +- Better continued support and bugfixes +- More modular, extensible handling of your document workflow +- Extra practical add-ons +- Encryption, hashing and digital signatures + +iText is a PDF library that allows you to CREATE, ADAPT, INSPECT and MAINTAIN documents in the Portable Document Format (PDF), allowing you to add PDF functionality to your software projects with ease. We even have documentation to help you get coding. + +iText 7 is available under AGPL and Commercial license. iText 7 Community: https://www.nuget.org/packages/itext7/ + +iText 7 is a complete re-write of iText 5, allowing you to choose your adventure with add-ons, all based on a simple, modular code structure that is easy to use and well documented. + +iText 7 includes pdfDebug, the first debugging tool that gives you a clear overview of your content streams and document structure as well as pdfCalligraph, allowing you to leverage advanced typography. + +Several iText engineers are actively supporting the project on StackOverflow: https://stackoverflow.com/questions/tagged/itext + iText Group NV + iTextSharp + Copyright (c) 1998-2020 iText Group NV + 5.5.13.5 + iText Software + itext itextsharp c# .net csharp pdf + https://itextpdf.com/ + https://itextpdf.com/sites/default/files/ITSC-avatar.png + https://www.gnu.org/licenses/agpl.html + true - bin\Debug\net461\ + bin\Debug\ false 285212672 false @@ -58,7 +92,7 @@ true 4096 false - 1572;1587;1570;1591;1573;1596 + 1572;1587;1570;1591;1573;1596;1584;1658 false false false @@ -69,7 +103,7 @@ AllRules.ruleset - bin\Debug_woDrawing\net461\ + bin\Debug_woDrawing\ false 285212672 false @@ -91,7 +125,7 @@ AllRules.ruleset - bin\Release\net461\ + bin\Release\ false 285212672 false @@ -102,7 +136,7 @@ false 4096 false - 1572;1587;1570;1591;1573;1596 + 1572;1587;1570;1591;1573;1596;1584;1658 true false false @@ -113,7 +147,7 @@ AllRules.ruleset - bin\Release_woDrawing\net461\ + bin\Release_woDrawing\ false 285212672 false @@ -135,1475 +169,11 @@ AllRules.ruleset - - $(SolutionDir)\packages\BouncyCastle.Cryptography.2.4.0\lib\net461\BouncyCastle.Cryptography.dll - True - - - - - - - + + + - - Code - - - - - - - - Code - - - - - - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - - - Code - - - - Code - - - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - - - Code - - - - Code - - - Code - - - - - Code - - - Code - - - Code - - - Code - - - Code - - - - - Code - - - Code - - - Code - - - Code - - - Code - - - - - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - - Code - - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - - - Code - - - Code - - - Code - - - Code - - - Code - - - - - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - @@ -1626,127 +196,16 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - - - - - - - - - - - - \ No newline at end of file + + + <_Parameter1>itextsharp.pdfa, PublicKey=00240000048000009400000006020000002400005253413100040000010001008b21ed5b3fc1c11996390981fe22bbe71a39a9e11d3c2cefddd6ee92920fa871f9666ae0fa941af0280d0653df048ae2d93f8c5e2d820dba3c8df9ed468c8be40a6fffeb32aa481a254f0fb9f37aa7c3ec1c0acd2c009746bbdafcb75bcdbcecb7caf1f0f4b6e7d013906ba60b66eb1c8298e4efb052caf6cece4bf1816902cc + + + <_Parameter1>itextsharp.pdfa.tests, PublicKey=00240000048000009400000006020000002400005253413100040000010001008b21ed5b3fc1c11996390981fe22bbe71a39a9e11d3c2cefddd6ee92920fa871f9666ae0fa941af0280d0653df048ae2d93f8c5e2d820dba3c8df9ed468c8be40a6fffeb32aa481a254f0fb9f37aa7c3ec1c0acd2c009746bbdafcb75bcdbcecb7caf1f0f4b6e7d013906ba60b66eb1c8298e4efb052caf6cece4bf1816902cc + + + <_Parameter1>itextsharp.tests, PublicKey=00240000048000009400000006020000002400005253413100040000010001008b21ed5b3fc1c11996390981fe22bbe71a39a9e11d3c2cefddd6ee92920fa871f9666ae0fa941af0280d0653df048ae2d93f8c5e2d820dba3c8df9ed468c8be40a6fffeb32aa481a254f0fb9f37aa7c3ec1c0acd2c009746bbdafcb75bcdbcecb7caf1f0f4b6e7d013906ba60b66eb1c8298e4efb052caf6cece4bf1816902cc + + + diff --git a/src/extras/iTextAsian/AssemblyInfo.cs b/src/extras/iTextAsian/AssemblyInfo.cs deleted file mode 100644 index c6473e7aa..000000000 --- a/src/extras/iTextAsian/AssemblyInfo.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; - -[assembly: AssemblyTitle("iTextAsian")] -[assembly: AssemblyDescription("CJK CMAPS for iTextSharp.")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("iText Group NV")] -[assembly: AssemblyProduct("iTextAsian")] -[assembly: AssemblyCopyright ("Copyright (c) 1998-2022 iText Group NV")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -[assembly: AssemblyVersion("2.1")] diff --git a/src/extras/iTextAsian/iTextAsian(VS2010).csproj b/src/extras/iTextAsian/iTextAsian(VS2010).csproj index add0699e7..fd3c09f3c 100644 --- a/src/extras/iTextAsian/iTextAsian(VS2010).csproj +++ b/src/extras/iTextAsian/iTextAsian(VS2010).csproj @@ -1,5 +1,4 @@ - - + Local 8.0.50727 @@ -27,7 +26,7 @@ true - v4.6.1 + netstandard2.0 2.0 publish\ true @@ -44,9 +43,36 @@ false false true + true + Portable.$(AssemblyName) + + PLEASE NOTE: iTextSharp is EOL, and has been replaced by iText 7. Only security fixes will be added + + We HIGHLY recommend customers use iText 7 for new projects, and to consider moving existing projects from iTextSharp to iText 7 to benefit from the many improvements such as: + - HTML to PDF (PDF/A) conversion + - PDF Redaction + - SVG support + - Better language support (Indic, Thai, Khmer, Arabic, Hebrew) + - PDF Debugging for your IDE + - Data Extraction + - Better continued support and bugfixes + - More modular, extensible handling of your document workflow + - Extra practical add-ons + - Encryption, hashing and digital signatures + + This DEPRECATED library adds extra functionality for iTextSharp. Please use iText 7 instead. iText 7 Community: https://www.nuget.org/packages/itext7/ and iText 7 pdfSweep addon: https://www.nuget.org/packages/itext7.pdfsweep/ + iText Group NV + Copyright (c) 1998-2020 iText Group NV + 2.1 + iText Software + itext itextsharp c# csharp .net pdf + https://itextpdf.com/ + https://itextpdf.com/sites/default/files/ITSC-avatar.png + https://www.gnu.org/licenses/agpl.html + true - bin\Debug\net461\ + bin\Debug\ false 285212672 false @@ -70,7 +96,7 @@ AllRules.ruleset - bin\Release\net461\ + bin\Release\ false 285212672 false @@ -94,7 +120,7 @@ AllRules.ruleset - bin\Debug_woDrawing\net461\ + bin\Debug_woDrawing\ false 285212672 false @@ -119,7 +145,7 @@ true - bin\Release_woDrawing\net461\ + bin\Release_woDrawing\ DEBUG;TRACE 285212672 4096 @@ -128,15 +154,6 @@ prompt AllRules.ruleset - - - - - - - Code - - @@ -316,28 +333,4 @@ - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - - - - - - \ No newline at end of file + diff --git a/src/extras/iTextSharp.xtra/Properties/AssemblyInfo.cs b/src/extras/iTextSharp.xtra/Properties/AssemblyInfo.cs deleted file mode 100644 index e18038359..000000000 --- a/src/extras/iTextSharp.xtra/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -[assembly: AssemblyTitle("iTextSharp.xtra")] -[assembly: AssemblyDescription("Extra functionality for iTextSharp, a free PDF library ported from Java iText.")] - -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("iText Group NV")] -[assembly: AssemblyProduct("iTextSharp.xtra")] -[assembly: AssemblyCopyright ("Copyright (c) 1998-2022 iText Group NV")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -[assembly: AssemblyVersion("5.5.13.4")] -[assembly: AssemblyInformationalVersion("5.5.13.4")] diff --git a/src/extras/iTextSharp.xtra/iTextSharp.xtra(VS2010).csproj b/src/extras/iTextSharp.xtra/iTextSharp.xtra(VS2010).csproj index ad1e9ac13..84d3df4bc 100644 --- a/src/extras/iTextSharp.xtra/iTextSharp.xtra(VS2010).csproj +++ b/src/extras/iTextSharp.xtra/iTextSharp.xtra(VS2010).csproj @@ -1,5 +1,4 @@ - - + Debug AnyCPU @@ -12,18 +11,46 @@ itextsharp.xtra true itextsharp.snk - v4.6.1 + netstandard2.0 2.0 + true + Portable.$(AssemblyName) + + PLEASE NOTE: iTextSharp is EOL, and has been replaced by iText 7. Only security fixes will be added + + We HIGHLY recommend customers use iText 7 for new projects, and to consider moving existing projects from iTextSharp to iText 7 to benefit from the many improvements such as: + - HTML to PDF (PDF/A) conversion + - PDF Redaction + - SVG support + - Better language support (Indic, Thai, Khmer, Arabic, Hebrew) + - PDF Debugging for your IDE + - Data Extraction + - Better continued support and bugfixes + - More modular, extensible handling of your document workflow + - Extra practical add-ons + - Encryption, hashing and digital signatures + + This DEPRECATED library adds extra functionality for iTextSharp. Please use iText 7 instead. iText 7 Community: https://www.nuget.org/packages/itext7/ and iText 7 pdfSweep addon: https://www.nuget.org/packages/itext7.pdfsweep/ + iText Group NV + iTextSharp.xtra + Copyright (c) 1998-2020 iText Group NV + 5.5.13.5 + iText Software + itext itextsharp c# csharp .net pdf + https://itextpdf.com/ + https://itextpdf.com/sites/default/files/ITSC-avatar.png + https://www.gnu.org/licenses/agpl.html + true true full false - bin\Debug\net461\ + bin\Debug\ DEBUG;TRACE prompt 4 @@ -32,81 +59,19 @@ pdbonly true - bin\Release\net461\ + bin\Release\ TRACE prompt 4 AllRules.ruleset - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - {84C4FDD9-3ED7-453B-B9DA-B3ED52CB071C} - itextsharp%28VS2010%29 - + - - - \ No newline at end of file + diff --git a/src/extras/itext-hyph-xml/AssemblyInfo.cs b/src/extras/itext-hyph-xml/AssemblyInfo.cs deleted file mode 100644 index 085843af2..000000000 --- a/src/extras/itext-hyph-xml/AssemblyInfo.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; - -[assembly: AssemblyTitle("itext-hyph-xml")] -[assembly: AssemblyDescription("Hyphenation patterns for iTextSharp.")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("iText Group NV")] -[assembly: AssemblyProduct("itext-hyph-xml")] -[assembly: AssemblyCopyright ("Copyright (c) 1998-2022 iText Group NV")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -[assembly: AssemblyVersion("2.0.0")] - -[assembly: AssemblyDelaySign(false)] diff --git a/src/extras/itext-hyph-xml/itext-hyph-xml(VS2010).csproj b/src/extras/itext-hyph-xml/itext-hyph-xml(VS2010).csproj index 79ffb5576..fa353760f 100644 --- a/src/extras/itext-hyph-xml/itext-hyph-xml(VS2010).csproj +++ b/src/extras/itext-hyph-xml/itext-hyph-xml(VS2010).csproj @@ -1,5 +1,4 @@ - - + Local 8.0.50727 @@ -27,11 +26,38 @@ true - v4.6.1 + netstandard2.0 2.0 + true + Portable.$(AssemblyName) + + PLEASE NOTE: iTextSharp is EOL, and has been replaced by iText 7. Only security fixes will be added + + We HIGHLY recommend customers use iText 7 for new projects, and to consider moving existing projects from iTextSharp to iText 7 to benefit from the many improvements such as: + - HTML to PDF (PDF/A) conversion + - PDF Redaction + - SVG support + - Better language support (Indic, Thai, Khmer, Arabic, Hebrew) + - PDF Debugging for your IDE + - Data Extraction + - Better continued support and bugfixes + - More modular, extensible handling of your document workflow + - Extra practical add-ons + - Encryption, hashing and digital signatures + + This DEPRECATED library adds extra functionality for iTextSharp. Please use iText 7 instead. iText 7 Community: https://www.nuget.org/packages/itext7/ and iText 7 pdfSweep addon: https://www.nuget.org/packages/itext7.pdfsweep/ + iText Group NV + Copyright (c) 1998-2020 iText Group NV + 2.0.0 + iText Software + itext itextsharp c# csharp .net pdf + https://itextpdf.com/ + https://itextpdf.com/sites/default/files/ITSC-avatar.png + https://www.gnu.org/licenses/agpl.html + true - bin\Debug\net461\ + bin\Debug\ false 285212672 false @@ -55,7 +81,7 @@ AllRules.ruleset - bin\Release\net461\ + bin\Release\ false 285212672 false @@ -80,7 +106,7 @@ true - bin\Debug_woDrawing\net461\ + bin\Debug_woDrawing\ DEBUG;TRACE 285212672 4096 @@ -97,7 +123,7 @@ true - bin\Release_woDrawing\net461\ + bin\Release_woDrawing\ TRACE 285212672 true @@ -114,15 +140,6 @@ true false - - - - - - - Code - - @@ -196,11 +213,4 @@ - - - - - - - - \ No newline at end of file + diff --git a/src/extras/itextsharp.pdfa.tests/Properties/AssemblyInfo.cs b/src/extras/itextsharp.pdfa.tests/Properties/AssemblyInfo.cs deleted file mode 100644 index ff30681f6..000000000 --- a/src/extras/itextsharp.pdfa.tests/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -[assembly: AssemblyTitle("itextsharp.pdfa.tests")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("iText Group NV")] -[assembly: AssemblyProduct("itextsharp.pdfa.tests")] -[assembly: AssemblyCopyright ("Copyright (c) 1998-2022 iText Group NV")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -[assembly: ComVisible(false)] - -[assembly: Guid("ad182706-8617-4e07-ac63-2f1b88ebb671")] - -[assembly: AssemblyVersion("5.5.13.4")] -[assembly: AssemblyInformationalVersion("5.5.13.4")] diff --git a/src/extras/itextsharp.pdfa.tests/itextsharp.pdfa.tests(VS2010).csproj b/src/extras/itextsharp.pdfa.tests/itextsharp.pdfa.tests(VS2010).csproj index 07fa53011..21ed3b069 100644 --- a/src/extras/itextsharp.pdfa.tests/itextsharp.pdfa.tests(VS2010).csproj +++ b/src/extras/itextsharp.pdfa.tests/itextsharp.pdfa.tests(VS2010).csproj @@ -1,5 +1,4 @@ - - + Debug AnyCPU @@ -12,7 +11,7 @@ itextsharp.pdfa.tests true itextsharp.snk - v4.6.1 + netstandard2.0 4.0 @@ -32,12 +31,16 @@ false false true + $(AssemblyName).portable + iText Group NV + Copyright (c) 1998-2020 iText Group NV + 5.5.13.5 true full false - bin\Debug\net461\ + bin\Debug\ DEBUG;TRACE;DRAWING prompt 4 @@ -46,7 +49,7 @@ pdbonly true - bin\Release\net461\ + bin\Release\ TRACE;DRAWING prompt 4 @@ -56,14 +59,14 @@ true full false - bin\Debug_woDrawing\net461\ + bin\Debug_woDrawing\ DEBUG;TRACE prompt 4 AllRules.ruleset - bin\Release_woDrawing\net461\ + bin\Release_woDrawing\ TRACE true pdbonly @@ -72,29 +75,8 @@ AllRules.ruleset - - $(SolutionDir)\packages\NUnit.2.6.2\lib\nunit.framework.dll - - - lib\XmlDiffPatch.dll - - - - - - - - - - - - - - - - - - + + @@ -131,33 +113,7 @@ - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - diff --git a/src/extras/itextsharp.pdfa.tests/lib/XmlDiffPatch.dll b/src/extras/itextsharp.pdfa.tests/lib/XmlDiffPatch.dll deleted file mode 100644 index 916dd2b65..000000000 Binary files a/src/extras/itextsharp.pdfa.tests/lib/XmlDiffPatch.dll and /dev/null differ diff --git a/src/extras/itextsharp.pdfa.tests/packages.config b/src/extras/itextsharp.pdfa.tests/packages.config deleted file mode 100644 index 6bbafef6f..000000000 --- a/src/extras/itextsharp.pdfa.tests/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/extras/itextsharp.pdfa/Properties/AssemblyInfo.cs b/src/extras/itextsharp.pdfa/Properties/AssemblyInfo.cs deleted file mode 100644 index 1b0da32fc..000000000 --- a/src/extras/itextsharp.pdfa/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -[assembly: AssemblyTitle("iTextSharp.pda")] -[assembly: AssemblyDescription("PDFA functionality for iTextSharp, a free PDF library ported from Java iText.")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("iText Group NV")] -[assembly: AssemblyProduct("iTextSharp.pdfa")] -[assembly: AssemblyCopyright ("Copyright (c) 1998-2022 iText Group NV")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -[assembly: ComVisible(false)] - -[assembly: Guid("e1d9164b-61e9-4efa-9758-14406d5034cd")] - -[assembly: AssemblyVersion("5.5.13.4")] -[assembly: AssemblyInformationalVersion("5.5.13.4")] diff --git a/src/extras/itextsharp.pdfa/itextsharp.pdfa(VS2010).csproj b/src/extras/itextsharp.pdfa/itextsharp.pdfa(VS2010).csproj index 54ca628f0..1bbc06508 100644 --- a/src/extras/itextsharp.pdfa/itextsharp.pdfa(VS2010).csproj +++ b/src/extras/itextsharp.pdfa/itextsharp.pdfa(VS2010).csproj @@ -1,5 +1,4 @@ - - + Debug AnyCPU @@ -12,7 +11,7 @@ itextsharp.pdfa true itextsharp.snk - v4.6.1 + netstandard2.0 @@ -33,12 +32,41 @@ false false true + true + Portable.$(AssemblyName) + + PLEASE NOTE: iTextSharp is EOL, and has been replaced by iText 7. Only security fixes will be added + + We HIGHLY recommend customers use iText 7 for new projects, and to consider moving existing projects from iTextSharp to iText 7 to benefit from the many improvements such as: + - HTML to PDF (PDF/A) conversion + - PDF Redaction + - SVG support + - Better language support (Indic, Thai, Khmer, Arabic, Hebrew) + - PDF Debugging for your IDE + - Data Extraction + - Better continued support and bugfixes + - More modular, extensible handling of your document workflow + - Extra practical add-ons + - Encryption, hashing and digital signatures + + The iTextSharp.pdfa adds PDF/A-related functionality for iTextSharp. The same funcionality is present in pdfa module of iText 7 Community: https://www.nuget.org/packages/itext7/ + + iText Group NV + iTextSharp.pdfa + Copyright (c) 1998-2020 iText Group NV + 5.5.13.5 + iText Software + itext itextsharp c# csharp .net pdf pdfa + https://itextpdf.com/ + https://itextpdf.com/sites/default/files/ITSC-avatar.png + https://www.gnu.org/licenses/agpl.html + true true full false - bin\Debug\net461\ + bin\Debug\ DEBUG;TRACE prompt 4 @@ -47,7 +75,7 @@ pdbonly true - bin\Release\net461\ + bin\Release\ TRACE prompt 4 @@ -57,14 +85,14 @@ true full false - bin\Debug_woDrawing\net461\ + bin\Debug_woDrawing\ DEBUG;TRACE prompt 4 AllRules.ruleset - bin\Release_woDrawing\net461\ + bin\Release_woDrawing\ TRACE true pdbonly @@ -73,64 +101,12 @@ AllRules.ruleset - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {84C4FDD9-3ED7-453B-B9DA-B3ED52CB071C} - itextsharp%28VS2010%29 - + - + - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - + - - - \ No newline at end of file + diff --git a/src/extras/itextsharp.sandbox/itextsharp.sandbox(VS2010).csproj b/src/extras/itextsharp.sandbox/itextsharp.sandbox(VS2010).csproj index 181e96f00..6c1cacf80 100644 --- a/src/extras/itextsharp.sandbox/itextsharp.sandbox(VS2010).csproj +++ b/src/extras/itextsharp.sandbox/itextsharp.sandbox(VS2010).csproj @@ -2,6 +2,7 @@ true + itextsharp.snk @@ -15,7 +16,7 @@ Properties itextsharp.sandbox itextsharp.sandbox - v4.6.1 + v4.8 512 true @@ -24,7 +25,7 @@ true full false - bin\Debug\net461\ + bin\Debug\ DEBUG;TRACE prompt 4 @@ -33,7 +34,7 @@ AnyCPU pdbonly true - bin\Release\net461\ + bin\Release\ TRACE prompt 4 diff --git a/src/extras/itextsharp.tests/Properties/AssemblyInfo.cs b/src/extras/itextsharp.tests/Properties/AssemblyInfo.cs deleted file mode 100644 index 1f3db1fa9..000000000 --- a/src/extras/itextsharp.tests/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -[assembly: AssemblyTitle("itextsharp.tests")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("iText Group NV")] -[assembly: AssemblyProduct("itextsharp.tests")] -[assembly: AssemblyCopyright ("Copyright (c) 1998-2022 iText Group NV")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -[assembly: ComVisible(false)] - -[assembly: Guid("6d44f434-c50b-4232-87eb-853990beef3b")] - -[assembly: AssemblyVersion("5.5.13.4")] -[assembly: AssemblyInformationalVersion("5.5.13.4")] diff --git a/src/extras/itextsharp.tests/itextsharp.tests(VS2010).csproj b/src/extras/itextsharp.tests/itextsharp.tests(VS2010).csproj index 2435d3f6d..32d8f7ba3 100644 --- a/src/extras/itextsharp.tests/itextsharp.tests(VS2010).csproj +++ b/src/extras/itextsharp.tests/itextsharp.tests(VS2010).csproj @@ -1,5 +1,4 @@ - - + Debug AnyCPU @@ -10,18 +9,22 @@ Properties itextsharp.tests itextsharp.tests - v4.6.1 + netstandard2.0 2.0 + $(AssemblyName).portable + iText Group NV + Copyright (c) 1998-2020 iText Group NV + 5.5.13.5 true full false - bin\Debug\net461\ + bin\Debug\ DEBUG;TRACE;DRAWING prompt 4 @@ -30,7 +33,7 @@ pdbonly true - bin\Release\net461\ + bin\Release\ TRACE;DRAWING prompt 4 @@ -46,14 +49,14 @@ true full false - bin\Debug_woDrawing\net461\ + bin\Debug_woDrawing\ DEBUG;TRACE prompt 4 AllRules.ruleset - bin\Release_woDrawing\net461\ + bin\Release_woDrawing\ TRACE true pdbonly @@ -62,137 +65,17 @@ AllRules.ruleset - - $(SolutionDir)\packages\NUnit.2.6.2\lib\nunit.framework.dll - - - $(SolutionDir)\packages\BouncyCastle.Cryptography.2.4.0\lib\net461\BouncyCastle.Cryptography.dll - True - - - - - - lib\XmlDiffPatch.dll - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - @@ -243,7 +126,10 @@ - + + + + @@ -467,12 +353,4 @@ itextsharp.xtra%28VS2010%29 - - diff --git a/src/extras/itextsharp.tests/lib/XmlDiffPatch.dll b/src/extras/itextsharp.tests/lib/XmlDiffPatch.dll deleted file mode 100644 index 916dd2b65..000000000 Binary files a/src/extras/itextsharp.tests/lib/XmlDiffPatch.dll and /dev/null differ diff --git a/src/extras/itextsharp.tests/packages.config b/src/extras/itextsharp.tests/packages.config deleted file mode 100644 index 18038d6fb..000000000 --- a/src/extras/itextsharp.tests/packages.config +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/extras/itextsharp.xmlworker.tests/Properties/AssemblyInfo.cs b/src/extras/itextsharp.xmlworker.tests/Properties/AssemblyInfo.cs deleted file mode 100644 index 9dd4cfabd..000000000 --- a/src/extras/itextsharp.xmlworker.tests/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -[assembly: AssemblyTitle("itextsharp.xmlworker.tests")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("iText Group NV")] -[assembly: AssemblyProduct("itextsharp.xmlworker.tests")] -[assembly: AssemblyCopyright ("Copyright (c) 1998-2022 iText Group NV")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -[assembly: ComVisible(false)] - -[assembly: Guid("f9ca61f8-a39e-4bcf-bf38-f58ea5f0b42a")] - -[assembly: AssemblyVersion("5.5.13.4")] -[assembly: AssemblyInformationalVersion("5.5.13.4")] - diff --git a/src/extras/itextsharp.xmlworker.tests/itextsharp.xmlworker.tests(VS2010).csproj b/src/extras/itextsharp.xmlworker.tests/itextsharp.xmlworker.tests(VS2010).csproj index f1c0bc852..03e63fabc 100644 --- a/src/extras/itextsharp.xmlworker.tests/itextsharp.xmlworker.tests(VS2010).csproj +++ b/src/extras/itextsharp.xmlworker.tests/itextsharp.xmlworker.tests(VS2010).csproj @@ -1,5 +1,4 @@ - - + Debug AnyCPU @@ -12,18 +11,22 @@ itextsharp.xmlworker.tests true itextsharp.snk - v4.6.1 + netstandard2.0 2.0 + $(AssemblyName).portable + iText Group NV + Copyright (c) 1998-2020 iText Group NV + 5.5.13.5 true full false - bin\Debug\net461\ + bin\Debug\ DEBUG;TRACE;DRAWING prompt 4 @@ -32,14 +35,14 @@ pdbonly true - bin\Release\net461\ + bin\Release\ TRACE;DRAWING prompt 4 AllRules.ruleset - bin\Release_woDrawing\net461\ + bin\Release_woDrawing\ TRACE true pdbonly @@ -49,7 +52,7 @@ true - bin\Debug_woDrawing\net461\ + bin\Debug_woDrawing\ DEBUG;TRACE full AnyCPU @@ -57,518 +60,7 @@ AllRules.ruleset - - $(SolutionDir)\packages\NUnit.2.6.2\lib\nunit.framework.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Code - - + @@ -1535,12 +1027,4 @@ - - - \ No newline at end of file + diff --git a/src/extras/itextsharp.xmlworker/Properties/AssemblyInfo.cs b/src/extras/itextsharp.xmlworker/Properties/AssemblyInfo.cs deleted file mode 100644 index 348658e7a..000000000 --- a/src/extras/itextsharp.xmlworker/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -[assembly: AssemblyTitle("iTextSharp XML Worker")] -[assembly: AssemblyDescription("Parses XML to PDF, with CSS support, using iTextSharp")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("iText Group NV")] -[assembly: AssemblyProduct("itextsharp.xmlworker")] -[assembly: AssemblyCopyright ("Copyright (c) 1998-2022 iText Group NV")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] -[assembly: InternalsVisibleTo("itextsharp.xmlworker.tests, PublicKey=00240000048000009400000006020000002400005253413100040000010001008b21ed5b3fc1c11996390981fe22bbe71a39a9e11d3c2cefddd6ee92920fa871f9666ae0fa941af0280d0653df048ae2d93f8c5e2d820dba3c8df9ed468c8be40a6fffeb32aa481a254f0fb9f37aa7c3ec1c0acd2c009746bbdafcb75bcdbcecb7caf1f0f4b6e7d013906ba60b66eb1c8298e4efb052caf6cece4bf1816902cc"),] - -[assembly: ComVisible(false)] - -[assembly: Guid("12ef9c6c-372c-4ba1-9104-89a92a97ff9a")] - -[assembly: AssemblyVersion("5.5.13.4")] -[assembly: AssemblyInformationalVersion("5.5.13.4")] diff --git a/src/extras/itextsharp.xmlworker/iTextSharp/tool/xml/html/DefaultTagProcessorFactory.cs b/src/extras/itextsharp.xmlworker/iTextSharp/tool/xml/html/DefaultTagProcessorFactory.cs index 6b2305a28..0f1cd4f6b 100644 --- a/src/extras/itextsharp.xmlworker/iTextSharp/tool/xml/html/DefaultTagProcessorFactory.cs +++ b/src/extras/itextsharp.xmlworker/iTextSharp/tool/xml/html/DefaultTagProcessorFactory.cs @@ -126,7 +126,7 @@ public DefaultTagProcessorFactory() { */ protected virtual ITagProcessor Load(String className) { try { - return (ITagProcessor) Activator.CreateInstance(null, className).Unwrap(); + return (ITagProcessor) Activator.CreateInstance(Type.GetType(className)); } catch (Exception e) { throw new NoTagProcessorException(String.Format(LocaleMessages.GetInstance().GetMessage(LocaleMessages.NO_TAGPROCESSOR), className), e); } diff --git a/src/extras/itextsharp.xmlworker/iTextSharp/tool/xml/parser/StateController.cs b/src/extras/itextsharp.xmlworker/iTextSharp/tool/xml/parser/StateController.cs index cb354462d..d54312a72 100644 --- a/src/extras/itextsharp.xmlworker/iTextSharp/tool/xml/parser/StateController.cs +++ b/src/extras/itextsharp.xmlworker/iTextSharp/tool/xml/parser/StateController.cs @@ -40,8 +40,6 @@ source product. For more information, please contact iText Software Corp. at this address: sales@itextpdf.com */ -using System; -using System.Runtime.Remoting.Messaging; using iTextSharp.tool.xml.parser.state; namespace iTextSharp.tool.xml.parser { diff --git a/src/extras/itextsharp.xmlworker/itextsharp.xmlworker(VS2010).csproj b/src/extras/itextsharp.xmlworker/itextsharp.xmlworker(VS2010).csproj index 7c119a9cd..2ec3bf373 100644 --- a/src/extras/itextsharp.xmlworker/itextsharp.xmlworker(VS2010).csproj +++ b/src/extras/itextsharp.xmlworker/itextsharp.xmlworker(VS2010).csproj @@ -1,5 +1,4 @@ - - + Debug AnyCPU @@ -13,7 +12,7 @@ itextsharp.xmlworker true itextsharp.snk - v4.6.1 + netstandard2.0 2.0 @@ -33,12 +32,42 @@ false false true + true + Portable.$(AssemblyName) + + PLEASE NOTE: iTextSharp is EOL, and has been replaced by iText 7. Only security fixes will be added + + We HIGHLY recommend customers use iText 7 for new projects, and to consider moving existing projects from iTextSharp to iText 7 to benefit from the many improvements such as: + - HTML to PDF (PDF/A) conversion + - PDF Redaction + - SVG support + - Better language support (Indic, Thai, Khmer, Arabic, Hebrew) + - PDF Debugging for your IDE + - Data Extraction + - Better continued support and bugfixes + - More modular, extensible handling of your document workflow + - Extra practical add-ons + - Encryption, hashing and digital signatures + + This DEPRECATED tool parses (X)HTML snippets and the associated CSS and converts them to PDF. It is replaced by iText7 pdfHTML addon https://www.nuget.org/packages/itext7.pdfhtml/ and iText 7 Community: https://www.nuget.org/packages/itext7/ + + XMLWorker is an extra component for iTextSharp. The first XML to PDF implementation, is a new version of the old HTMLWorker that used to be shipped with iTextSharp. + + iText Group NV + Copyright (c) 1998-2020 iText Group NV + 5.5.13.5 + iText Software + itext itextsharp c# csharp xml worker pdf html xhtml css + https://itextpdf.com/ + https://itextpdf.com/sites/default/files/ITSC-avatar.png + https://www.gnu.org/licenses/agpl.html + true true full false - bin\Debug\net461\ + bin\Debug\ DEBUG;TRACE prompt 4 @@ -47,7 +76,7 @@ pdbonly true - bin\Release\net461\ + bin\Release\ TRACE prompt 4 @@ -57,14 +86,14 @@ true full false - bin\Debug_woDrawing\net461\ + bin\Debug_woDrawing\ DEBUG;TRACE prompt 4 AllRules.ruleset - bin\Release_woDrawing\net461\ + bin\Release_woDrawing\ TRACE true pdbonly @@ -72,171 +101,6 @@ prompt AllRules.ruleset - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Code - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -247,34 +111,11 @@ - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - {84C4FDD9-3ED7-453B-B9DA-B3ED52CB071C} - itextsharp%28VS2010%29 - + - - - \ No newline at end of file + + + <_Parameter1>itextsharp.xmlworker.tests, PublicKey=00240000048000009400000006020000002400005253413100040000010001008b21ed5b3fc1c11996390981fe22bbe71a39a9e11d3c2cefddd6ee92920fa871f9666ae0fa941af0280d0653df048ae2d93f8c5e2d820dba3c8df9ed468c8be40a6fffeb32aa481a254f0fb9f37aa7c3ec1c0acd2c009746bbdafcb75bcdbcecb7caf1f0f4b6e7d013906ba60b66eb1c8298e4efb052caf6cece4bf1816902cc + + +