<PackageReference Include="BouncyCastle.Cryptography" Version="2.5.0" />

Rfc4211Asn1Utilities

using System; namespace Org.BouncyCastle.Asn1.Crmf { internal class Rfc4211Asn1Utilities { internal static OptionalValidity CheckValidityFieldPresent(OptionalValidity validity) { if (validity != null && validity.NotBefore == null && validity.NotAfter == null) throw new ArgumentException("At least one of the sub-fields MUST be specified", "validity"); return validity; } } }