Skip to content

Commit

Permalink
Nuget update (#314)
Browse files Browse the repository at this point in the history
* Update to latest NuGet packages
  • Loading branch information
Oren Novotny committed Jan 13, 2018
1 parent ebbd1f2 commit a15609e
Show file tree
Hide file tree
Showing 15 changed files with 50 additions and 1,083 deletions.
6 changes: 3 additions & 3 deletions Core/Packages/DataServicePackage.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using NuGet.Packaging;
using NuGet.Packaging;
using System;
using System.Collections.Generic;
using System.Data.Services.Common;
Expand Down Expand Up @@ -162,7 +162,7 @@ public IEnumerable<FrameworkAssemblyReference> FrameworkReferences

public SignatureInfo PublisherSignature => CorePackage?.PublisherSignature;

public IReadOnlyList<SignatureInfo> RepositorySignatures => CorePackage?.RepositorySignatures ?? new List<SignatureInfo>();
public SignatureInfo RepositorySignature => CorePackage?.RepositorySignature;

public VerifySignaturesResult VerificationResult => CorePackage?.VerificationResult;

Expand Down Expand Up @@ -199,4 +199,4 @@ public Task VerifySignatureAsync()
return CorePackage?.VerifySignatureAsync();
}
}
}
}
4 changes: 2 additions & 2 deletions Core/Packages/ISignaturePackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ public interface ISignaturePackage : IPackage
bool IsSigned { get; }
bool IsVerified { get; }
SignatureInfo PublisherSignature { get; }
IReadOnlyList<SignatureInfo> RepositorySignatures { get; }
SignatureInfo RepositorySignature { get; }
VerifySignaturesResult VerificationResult { get; }
string Source { get; }
Task LoadSignatureDataAsync();
Task VerifySignatureAsync();
}
}
}
28 changes: 10 additions & 18 deletions Core/Packages/ZipPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public class ZipPackage : IDisposable, ISignaturePackage
private const string AssemblyReferencesDir = "lib";
private const string ResourceAssemblyExtension = ".resources.dll";
private static readonly string[] AssemblyReferencesExtensions = new[] {".dll", ".exe", ".winmd"};
private static readonly List<SignatureInfo> emptyList = new List<SignatureInfo>();

// paths to exclude
private static readonly string[] ExcludePaths = new[] {"_rels", "package","[Content_Types]", ".signature"};
Expand Down Expand Up @@ -55,8 +54,6 @@ public ZipPackage(string filePath)
};
EnsureManifest();

RepositorySignatures = emptyList;
}

public string Source { get; }
Expand Down Expand Up @@ -284,7 +281,7 @@ public bool IsPrerelease

public SignatureInfo PublisherSignature { get; private set; }

public IReadOnlyList<SignatureInfo> RepositorySignatures { get; private set; }
public SignatureInfo RepositorySignature { get; private set; }

public VerifySignaturesResult VerificationResult { get; private set; }

Expand Down Expand Up @@ -323,21 +320,16 @@ public async Task LoadSignatureDataAsync()
try
{
// Load signature data
var sigs = await reader.GetSignaturesAsync(CancellationToken.None);
var reposigs = new List<SignatureInfo>();
RepositorySignatures = reposigs;

foreach (var sig in sigs)
// TODO: Repo + Author sig?
var sig = await reader.GetSignatureAsync(CancellationToken.None);

// There will only be one
if (sig.Type == SignatureType.Author)
{
PublisherSignature = new SignatureInfo(sig);
} else if (sig.Type == SignatureType.Repository)
{
// There will only be one
if (sig.Type == SignatureType.Author)
{
PublisherSignature = new SignatureInfo(sig);
}
if (sig.Type == SignatureType.Repository)
{
reposigs.Add(new SignatureInfo(sig));
}
RepositorySignature = new SignatureInfo(sig);
}
}
catch (SignatureException)
Expand Down
158 changes: 0 additions & 158 deletions Core/Timestamp/Rfc3161TimestampToken.cs

This file was deleted.

Loading

0 comments on commit a15609e

Please sign in to comment.