diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-03-07 16:24:01 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-03-07 16:24:01 +0700 |
commit | e78d715bfd0c981d5f11dfae4442491289ad5690 (patch) | |
tree | 58550dec8481292a828d50b41d558602f0ff22ec /crypto/src/asn1/Asn1UtcTime.cs | |
parent | Remove lazy ASN.1 behaviour (diff) | |
download | BouncyCastle.NET-ed25519-e78d715bfd0c981d5f11dfae4442491289ad5690.tar.xz |
Sort DER sets without encoding elements
Diffstat (limited to 'crypto/src/asn1/Asn1UtcTime.cs')
-rw-r--r-- | crypto/src/asn1/Asn1UtcTime.cs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/crypto/src/asn1/Asn1UtcTime.cs b/crypto/src/asn1/Asn1UtcTime.cs index bd06a3258..bb9b6de8b 100644 --- a/crypto/src/asn1/Asn1UtcTime.cs +++ b/crypto/src/asn1/Asn1UtcTime.cs @@ -174,6 +174,17 @@ namespace Org.BouncyCastle.Asn1 return new PrimitiveEncoding(tagClass, tagNo, GetContents(encoding)); } + internal sealed override DerEncoding GetEncodingDer() + { + return new PrimitiveDerEncoding(Asn1Tags.Universal, Asn1Tags.UtcTime, + GetContents(Asn1OutputStream.EncodingDer)); + } + + internal sealed override DerEncoding GetEncodingDerImplicit(int tagClass, int tagNo) + { + return new PrimitiveDerEncoding(tagClass, tagNo, GetContents(Asn1OutputStream.EncodingDer)); + } + protected override bool Asn1Equals(Asn1Object asn1Object) { if (!(asn1Object is Asn1UtcTime that)) |