Skip to content

Commit

Permalink
Started using the offcial System.Drawing.Common assembly instead of…
Browse files Browse the repository at this point in the history
… `CoreCompat.System.Drawing.v2`. Updated dependencies and fixed `obsolete` warnings.
  • Loading branch information
VahidN committed Nov 28, 2017
1 parent 7e68fb5 commit a43f937
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/iTextSharp.LGPLv2.Core/iTextSharp.LGPLv2.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description> iTextSharp.LGPLv2.Core is an unofficial port of the last LGPL version of the iTextSharp (V4.1.6) to .NET Core.</Description>
<VersionPrefix>1.3.3</VersionPrefix>
<VersionPrefix>1.3.4</VersionPrefix>
<LangVersion>latest</LangVersion>
<Authors>Vahid Nasiri</Authors>
<TargetFrameworks>netstandard1.3;netstandard2.0</TargetFrameworks>
Expand All @@ -28,7 +28,7 @@
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' ">
<PackageReference Include="CoreCompat.System.Drawing" Version="1.0.0-beta006" />
<PackageReference Include="Portable.BouncyCastle" Version="1.8.1.2" />
<PackageReference Include="Portable.BouncyCastle" Version="1.8.1.3" />
<PackageReference Include="System.Collections.NonGeneric" Version="4.3.0" />
<PackageReference Include="System.Net.Requests" Version="4.3.0" />
<PackageReference Include="System.Reflection.TypeExtensions" Version="4.3.0" />
Expand All @@ -42,8 +42,8 @@
<DefineConstants>NETSTANDARD1_3</DefineConstants>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="CoreCompat.System.Drawing.v2" Version="5.2.0-preview1-r131" />
<PackageReference Include="Portable.BouncyCastle" Version="1.8.1.2" />
<PackageReference Include="System.Drawing.Common" Version="4.5.0-preview1-25914-04" />
<PackageReference Include="Portable.BouncyCastle" Version="1.8.1.3" />
<PackageReference Include="System.Collections.NonGeneric" Version="4.3.0" />
<PackageReference Include="System.Net.Requests" Version="4.3.0" />
<PackageReference Include="System.Reflection.TypeExtensions" Version="4.4.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Org.BouncyCastle.Asn1;
using Org.BouncyCastle.Asn1.X509;
using Org.BouncyCastle.Asn1.Ocsp;
using System.Collections.Generic;

namespace iTextSharp.text.pdf
{
Expand Down Expand Up @@ -62,7 +63,7 @@ public byte[] GetEncoded()
outp.Dispose();
HttpWebResponse response = (HttpWebResponse)con.GetResponseAsync().Result;
if (response.StatusCode != HttpStatusCode.OK)
throw new IOException($"Invalid HTTP response: {(int) response.StatusCode}");
throw new IOException($"Invalid HTTP response: {(int)response.StatusCode}");
Stream inp = response.GetResponseStream();
OcspResp ocspResponse = new OcspResp(inp);
inp.Dispose();
Expand Down Expand Up @@ -114,8 +115,8 @@ private static OcspReq generateOcspRequest(X509Certificate issuerCert, BigIntege
gen.AddRequest(id);

// create details for nonce extension
ArrayList oids = new ArrayList();
ArrayList values = new ArrayList();
var oids = new List<object>();
var values = new List<object>();

oids.Add(OcspObjectIdentifiers.PkixOcspNonce);
values.Add(new X509Extension(false, new DerOctetString(new DerOctetString(PdfEncryption.CreateDocumentId()).GetEncoded())));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace iTextSharp.text.pdf.crypto
{
/// <summary>
/// <summary>
/// Creates an AES Cipher with CBC and padding PKCS5/7.
/// @author Paulo Soares (psoares@consiste.pt)
/// </summary>
Expand All @@ -19,7 +19,7 @@ public class AesCipher
/// </summary>
public AesCipher(bool forEncryption, byte[] key, byte[] iv)
{
IBlockCipher aes = new AesFastEngine();
IBlockCipher aes = new AesEngine();
IBlockCipher cbc = new CbcBlockCipher(aes);
_bp = new PaddedBufferedBlockCipher(cbc);
KeyParameter kp = new KeyParameter(key);
Expand Down

0 comments on commit a43f937

Please sign in to comment.