Skip to content

Remove PeNet.Asn1 dependency#392

Merged
secana merged 1 commit into
secana:mainfrom
tibel:remove-penet-asn1-dependency
May 7, 2026
Merged

Remove PeNet.Asn1 dependency#392
secana merged 1 commit into
secana:mainfrom
tibel:remove-penet-asn1-dependency

Conversation

@tibel
Copy link
Copy Markdown
Contributor

@tibel tibel commented May 4, 2026

Summary

Replace the PeNet.Asn1 NuGet package with the built-in System.Formats.Asn1 APIs and SignedCms for PKCS#7 navigation.

Changes

  • Remove PeNet.Asn1 package reference from PeNet.csproj
  • Delete X509AuthentiCodeInfo.cs (ContentInfo/SignedData classes no longer needed)
  • Rewrite GetSignedHash() using AsnReader to parse the SPC IndirectData structure
  • Rewrite GetSigningSerialNumber() using SignedCms.SignerInfos directly
  • Update ASN.1 parsing tests to use AsnReader

Motivation

PeNet.Asn1 is an external dependency that duplicates functionality already available in .NET via System.Formats.Asn1. Removing it reduces the dependency footprint and simplifies maintenance.

Replace PeNet.Asn1 with System.Formats.Asn1 (built into .NET) and leverage SignedCms for PKCS#7 structure navigation.
@secana secana merged commit 46c897e into secana:main May 7, 2026
5 checks passed
@secana
Copy link
Copy Markdown
Owner

secana commented May 7, 2026

Very welcome change! New version is on its way

@tibel tibel deleted the remove-penet-asn1-dependency branch May 7, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants