Skip to content
This repository was archived by the owner on Jul 30, 2024. It is now read-only.

Commit e4b0397

Browse files
authored
Update NuGet ServerCommon dependencies to v2.5.0 (#268)
1 parent f50ef65 commit e4b0397

10 files changed

Lines changed: 135 additions & 135 deletions

File tree

src/NuGet.Services.Validation.Orchestrator/NuGet.Services.Validation.Orchestrator.csproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,22 +125,22 @@
125125
<Version>1.1.2</Version>
126126
</PackageReference>
127127
<PackageReference Include="NuGet.Services.Configuration">
128-
<Version>2.4.3</Version>
128+
<Version>2.5.0</Version>
129129
</PackageReference>
130130
<PackageReference Include="NuGet.Services.Contracts">
131-
<Version>2.4.3</Version>
131+
<Version>2.5.0</Version>
132132
</PackageReference>
133133
<PackageReference Include="NuGet.Services.KeyVault">
134-
<Version>2.4.3</Version>
134+
<Version>2.5.0</Version>
135135
</PackageReference>
136136
<PackageReference Include="NuGet.Services.Logging">
137-
<Version>2.4.3</Version>
137+
<Version>2.5.0</Version>
138138
</PackageReference>
139139
<PackageReference Include="NuGet.Services.ServiceBus">
140-
<Version>2.4.3</Version>
140+
<Version>2.5.0</Version>
141141
</PackageReference>
142142
<PackageReference Include="NuGet.Services.Validation">
143-
<Version>2.4.3</Version>
143+
<Version>2.5.0</Version>
144144
</PackageReference>
145145
<PackageReference Include="NuGet.Versioning">
146146
<Version>4.3.0</Version>

src/NuGet.Services.Validation.Orchestrator/PackageCertificates/CertificateVerificationEnqueuer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public CertificateVerificationEnqueuer(ITopicClient topicClient)
1818
_topicClient = topicClient ?? throw new ArgumentNullException(nameof(topicClient));
1919
}
2020

21-
public async Task EnqueueVerificationAsync(IValidationRequest request, Certificate certificate)
21+
public async Task EnqueueVerificationAsync(IValidationRequest request, EndCertificate certificate)
2222
{
2323
var message = new CertificateValidationMessage(certificate.Key, request.ValidationId);
2424
var brokeredMessage = _serializer.Serialize(message);

src/NuGet.Services.Validation.Orchestrator/PackageCertificates/ICertificateVerificationEnqueuer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ public interface ICertificateVerificationEnqueuer
1212
{
1313
/// <summary>
1414
/// Kicks off the certificate verification process for the given request. Verification will begin when the
15-
/// <see cref="ValidationEntitiesContext"/> has a <see cref="CertificateValidation"/> that matches the
15+
/// <see cref="ValidationEntitiesContext"/> has a <see cref="EndCertificateValidation"/> that matches the
1616
/// <see cref="IValidationRequest"/>'s validationId. Once verification completes, the <see cref="CertificateValidation"/>'s
1717
/// State will be updated to a non-NULL value.
1818
/// </summary>
1919
/// <param name="request">The request that details the package to be verified.</param>
2020
/// <param name="certificate">The certificate to verify.</param>
2121
/// <returns>A task that will complete when the verification process has been queued.</returns>
22-
Task EnqueueVerificationAsync(IValidationRequest request, Certificate certificate);
22+
Task EnqueueVerificationAsync(IValidationRequest request, EndCertificate certificate);
2323
}
2424
}

src/NuGet.Services.Validation.Orchestrator/PackageCertificates/PackageCertificatesValidator.cs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ private Task<List<PackageSignature>> FindSignaturesAsync(IValidationRequest requ
224224
.PackageSignatures
225225
.Where(s => s.PackageKey == request.PackageKey)
226226
.Include(s => s.TrustedTimestamps)
227-
.Include(s => s.Certificate)
227+
.Include(s => s.EndCertificate)
228228
.ToListAsync();
229229
}
230230

@@ -249,13 +249,13 @@ private void PromoteSignatures(IEnumerable<PackageSignature> signatures)
249249
/// <returns>True if the signature should be "Valid", false if it should be "InGracePeriod".</returns>
250250
private bool IsValidSignatureOutOfGracePeriod(PackageSignature signature)
251251
{
252-
var certificate = signature.Certificate;
252+
var certificate = signature.EndCertificate;
253253

254254
// A signature can be valid even if its certificate is revoked as long as the certificate
255255
// revocation date begins after the signature was created. The validation pipeline does
256256
// not revalidate revoked certificates, thus, a valid package signature with a revoked
257257
// certificate should be "Valid" regardless of the certificate's status update time.
258-
if (certificate.Status == CertificateStatus.Revoked)
258+
if (certificate.Status == EndCertificateStatus.Revoked)
259259
{
260260
return true;
261261
}
@@ -284,14 +284,14 @@ private IEnumerable<PackageSignature> FindSignaturesToInvalidate(IEnumerable<Pac
284284
{
285285
// Revalidation requests do NOT revalidate certificates that are known to be revoked. Thus,
286286
// certificates that were revoked before the package was signed ALWAYS invalidate the signature.
287-
if (s.Certificate.Status == CertificateStatus.Revoked)
287+
if (s.EndCertificate.Status == EndCertificateStatus.Revoked)
288288
{
289-
return s.TrustedTimestamps.Any(t => s.Certificate.RevocationTime.Value <= t.Value);
289+
return s.TrustedTimestamps.Any(t => s.EndCertificate.RevocationTime.Value <= t.Value);
290290
}
291291

292292
// Revalidation requests will revalidate invalid certificates. Therefore, invalid certificates
293293
// should invalidate the signature only if this is not a revalidation request.
294-
if (s.Certificate.Status == CertificateStatus.Invalid)
294+
if (s.EndCertificate.Status == EndCertificateStatus.Invalid)
295295
{
296296
return !isRevalidationRequest;
297297
}
@@ -330,14 +330,14 @@ private void InvalidatePackageSignatures(IValidationRequest request, PackageSign
330330
/// <param name="signatures">The signatures used to sign the package requested by the validation request.</param>
331331
/// <param name="isRevalidationRequest">Whether this package has already been validated.</param>
332332
/// <returns>The certificates used to sign the package that should be validated.</returns>
333-
private IEnumerable<Certificate> FindCertificatesToValidateAsync(IEnumerable<PackageSignature> signatures, bool isRevalidationRequest)
333+
private IEnumerable<EndCertificate> FindCertificatesToValidateAsync(IEnumerable<PackageSignature> signatures, bool isRevalidationRequest)
334334
{
335335
// Get all the certificates used to sign the signatures. Note that revoked certificates
336336
// should NEVER be revalidated as Certificate Authorities may, under certain conditions,
337337
// drop a revoked certificate's revocation information. Revalidating such a revoked
338338
// certificate would cause the certificate to be marked as "Good" when in reality it
339339
// should remain revoked.
340-
var certificates = signatures.Select(s => s.Certificate).Where(c => c.Status != CertificateStatus.Revoked);
340+
var certificates = signatures.Select(s => s.EndCertificate).Where(c => c.Status != EndCertificateStatus.Revoked);
341341

342342
// Skip certificates that have been validated recently unless this is a revalidation request.
343343
if (!isRevalidationRequest)
@@ -353,7 +353,7 @@ private IEnumerable<Certificate> FindCertificatesToValidateAsync(IEnumerable<Pac
353353
/// </summary>
354354
/// <param name="certificate">The certificate that may be revalidated.</param>
355355
/// <returns>Whether the certificate should be revalidated.</returns>
356-
private bool ShouldValidateCertificate(Certificate certificate)
356+
private bool ShouldValidateCertificate(EndCertificate certificate)
357357
{
358358
// Validate the certificate only if it has never been validated before, or, if
359359
// its last validation time is past the maximum revalidation threshold.
@@ -368,24 +368,24 @@ private bool ShouldValidateCertificate(Certificate certificate)
368368
}
369369

370370
/// <summary>
371-
/// Enqueue certificate verifications and add <see cref="CertificateValidation"/> entities
371+
/// Enqueue certificate verifications and add <see cref="EndCertificateValidation"/> entities
372372
/// for each validation. Note that this does NOT save the entity context!
373373
/// </summary>
374374
/// <param name="request">The package validation request.</param>
375375
/// <param name="certificates">The certificates that should be verified.</param>
376376
/// <returns>A task that completes when all certificate verifications have been enqueued.</returns>
377-
private Task StartCertificateValidationsAsync(IValidationRequest request, IEnumerable<Certificate> certificates)
377+
private Task StartCertificateValidationsAsync(IValidationRequest request, IEnumerable<EndCertificate> certificates)
378378
{
379379
var startCertificateVerificationTasks = new List<Task>();
380380

381381
foreach (var certificate in certificates)
382382
{
383383
startCertificateVerificationTasks.Add(_certificateVerificationEnqueuer.EnqueueVerificationAsync(request, certificate));
384384

385-
_validationContext.CertificateValidations.Add(new CertificateValidation
385+
_validationContext.CertificateValidations.Add(new EndCertificateValidation
386386
{
387387
ValidationId = request.ValidationId,
388-
Certificate = certificate,
388+
EndCertificate = certificate,
389389
Status = null,
390390
});
391391
}

src/Validation.Common/Validation.Common.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,11 @@
105105
<Reference Include="NuGet.ApplicationInsights.Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
106106
<HintPath>..\..\packages\NuGet.ApplicationInsights.Owin.4.1.0\lib\net452\NuGet.ApplicationInsights.Owin.dll</HintPath>
107107
</Reference>
108-
<Reference Include="NuGet.Services.KeyVault, Version=2.4.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
109-
<HintPath>..\..\packages\NuGet.Services.KeyVault.2.4.3\lib\net45\NuGet.Services.KeyVault.dll</HintPath>
108+
<Reference Include="NuGet.Services.KeyVault, Version=2.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
109+
<HintPath>..\..\packages\NuGet.Services.KeyVault.2.5.0\lib\net45\NuGet.Services.KeyVault.dll</HintPath>
110110
</Reference>
111-
<Reference Include="NuGet.Services.Logging, Version=2.4.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
112-
<HintPath>..\..\packages\NuGet.Services.Logging.2.4.3\lib\net452\NuGet.Services.Logging.dll</HintPath>
111+
<Reference Include="NuGet.Services.Logging, Version=2.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
112+
<HintPath>..\..\packages\NuGet.Services.Logging.2.5.0\lib\net452\NuGet.Services.Logging.dll</HintPath>
113113
</Reference>
114114
<Reference Include="NuGet.Services.VirusScanning.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
115115
<HintPath>..\..\packages\NuGet.Services.VirusScanning.Vcs.3.2.0\lib\net452\NuGet.Services.VirusScanning.Core.dll</HintPath>

src/Validation.Common/packages.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="3.2.1" targetFramework="net452" />
2323
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net452" />
2424
<package id="NuGet.ApplicationInsights.Owin" version="4.1.0" targetFramework="net452" />
25-
<package id="NuGet.Services.KeyVault" version="2.4.3" targetFramework="net452" />
26-
<package id="NuGet.Services.Logging" version="2.4.3" targetFramework="net452" />
25+
<package id="NuGet.Services.KeyVault" version="2.5.0" targetFramework="net452" />
26+
<package id="NuGet.Services.Logging" version="2.5.0" targetFramework="net452" />
2727
<package id="NuGet.Services.VirusScanning.Vcs" version="3.2.0" targetFramework="net452" />
2828
<package id="Owin" version="1.0" targetFramework="net452" />
2929
<package id="Serilog" version="2.0.0" targetFramework="net452" />

src/Validation.PackageSigning.Core/Validation.PackageSigning.Core.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@
3838
</ItemGroup>
3939
<ItemGroup>
4040
<PackageReference Include="NuGet.Services.ServiceBus">
41-
<Version>2.4.3</Version>
41+
<Version>2.5.0</Version>
4242
</PackageReference>
4343
<PackageReference Include="NuGet.Services.Validation">
44-
<Version>2.4.3</Version>
44+
<Version>2.5.0</Version>
4545
</PackageReference>
4646
</ItemGroup>
4747
<ItemGroup>

src/Validation.PackageSigning.ExtractAndValidateSignature/Validation.PackageSigning.ExtractAndValidateSignature.csproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,22 +99,22 @@
9999
<Version>4.6.0-preview1-4690</Version>
100100
</PackageReference>
101101
<PackageReference Include="NuGet.Services.Configuration">
102-
<Version>2.4.3</Version>
102+
<Version>2.5.0</Version>
103103
</PackageReference>
104104
<PackageReference Include="NuGet.Services.Contracts">
105-
<Version>2.4.3</Version>
105+
<Version>2.5.0</Version>
106106
</PackageReference>
107107
<PackageReference Include="NuGet.Services.KeyVault">
108-
<Version>2.4.3</Version>
108+
<Version>2.5.0</Version>
109109
</PackageReference>
110110
<PackageReference Include="NuGet.Services.Logging">
111-
<Version>2.4.3</Version>
111+
<Version>2.5.0</Version>
112112
</PackageReference>
113113
<PackageReference Include="NuGet.Services.ServiceBus">
114-
<Version>2.4.3</Version>
114+
<Version>2.5.0</Version>
115115
</PackageReference>
116116
<PackageReference Include="NuGet.Services.Validation">
117-
<Version>2.4.3</Version>
117+
<Version>2.5.0</Version>
118118
</PackageReference>
119119
<PackageReference Include="System.Net.Http">
120120
<Version>4.3.3</Version>

0 commit comments

Comments
 (0)