You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//
// This file was generated by the BinaryNotes compiler (created by Abdulla Abdurakhmanov, modified by Sylvain Prevost).
// See http://bnotes.sourceforge.net
// Any modifications to this file will be lost upon recompilation of the source ASN.1.
//
using System;
using System.Numerics;
using org.bn.attributes;
using org.bn.attributes.constraints;
using org.bn.coders;
using org.bn.types;
using org.bn;
namespace Test
{
[ASN1PreparedElement]
[ASN1Sequence(Name = "AuthorizationList", IsSet = false)]
public class AuthorizationList : IASN1PreparedElement
{
private ICollection<BigInteger> purpose_;
private bool purpose_present = false;
[ASN1Integer(Name = "")]
[ASN1SequenceOf(Name = "purpose", IsSetOf = true)]
[ASN1Element(Name = "purpose", IsOptional = true, HasTag = true, Tag = 1, TagClass = TagClasses.ContextSpecific, IsImplicitTag = false, HasDefaultValue = false)]
public ICollection<BigInteger> Purpose
{
get { return purpose_; }
set { purpose_ = value; purpose_present = true; }
}
private BigInteger algorithm_;
private bool algorithm_present = false;
[ASN1Integer(Name = "")]
[ASN1Element(Name = "algorithm", IsOptional = true, HasTag = true, Tag = 2, TagClass = TagClasses.ContextSpecific, IsImplicitTag = false, HasDefaultValue = false)]
public BigInteger Algorithm
{
get { return algorithm_; }
set { algorithm_ = value; algorithm_present = true; }
}
private BigInteger keySize_;
private bool keySize_present = false;
[ASN1Integer(Name = "")]
[ASN1Element(Name = "keySize", IsOptional = true, HasTag = true, Tag = 3, TagClass = TagClasses.ContextSpecific, IsImplicitTag = false, HasDefaultValue = false)]
public BigInteger KeySize
{
get { return keySize_; }
set { keySize_ = value; keySize_present = true; }
}
private ICollection<BigInteger> digest_;
private bool digest_present = false;
[ASN1Integer(Name = "")]
[ASN1SequenceOf(Name = "digest", IsSetOf = true)]
[ASN1Element(Name = "digest", IsOptional = true, HasTag = true, Tag = 5, TagClass = TagClasses.ContextSpecific, IsImplicitTag = false, HasDefaultValue = false)]
public ICollection<BigInteger> Digest
{
get { return digest_; }
set { digest_ = value; digest_present = true; }
}
private BigInteger ecCurve_;
private bool ecCurve_present = false;
[ASN1Integer(Name = "")]
[ASN1Element(Name = "ecCurve", IsOptional = true, HasTag = true, Tag = 10, TagClass = TagClasses.ContextSpecific, IsImplicitTag = false, HasDefaultValue = false)]
public BigInteger EcCurve
{
get { return ecCurve_; }
set { ecCurve_ = value; ecCurve_present = true; }
}
private NullObject noAuthRequired_;
private bool noAuthRequired_present = false;
[ASN1Null(Name = "noAuthRequired")]
[ASN1Element(Name = "noAuthRequired", IsOptional = true, HasTag = true, Tag = 503, TagClass = TagClasses.ContextSpecific, IsImplicitTag = false, HasDefaultValue = false)]
public NullObject NoAuthRequired
{
get { return noAuthRequired_; }
set { noAuthRequired_ = value; noAuthRequired_present = true; }
}
private BigInteger creationDateTime_;
private bool creationDateTime_present = false;
[ASN1Integer(Name = "")]
[ASN1Element(Name = "creationDateTime", IsOptional = true, HasTag = true, Tag = 701, TagClass = TagClasses.ContextSpecific, IsImplicitTag = false, HasDefaultValue = false)]
public BigInteger CreationDateTime
{
get { return creationDateTime_; }
set { creationDateTime_ = value; creationDateTime_present = true; }
}
private BigInteger origin_;
private bool origin_present = false;
[ASN1Integer(Name = "")]
[ASN1Element(Name = "origin", IsOptional = true, HasTag = true, Tag = 702, TagClass = TagClasses.ContextSpecific, IsImplicitTag = false, HasDefaultValue = false)]
public BigInteger Origin
{
get { return origin_; }
set { origin_ = value; origin_present = true; }
}
private RootOfTrust rootOfTrust_;
private bool rootOfTrust_present = false;
[ASN1Element(Name = "rootOfTrust", IsOptional = true, HasTag = true, Tag = 704, TagClass = TagClasses.ContextSpecific, IsImplicitTag = false, HasDefaultValue = false)]
public RootOfTrust RootOfTrust
{
get { return rootOfTrust_; }
set { rootOfTrust_ = value; rootOfTrust_present = true; }
}
private BigInteger osVersion_;
private bool osVersion_present = false;
[ASN1Integer(Name = "")]
[ASN1Element(Name = "osVersion", IsOptional = true, HasTag = true, Tag = 705, TagClass = TagClasses.ContextSpecific, IsImplicitTag = false, HasDefaultValue = false)]
public BigInteger OsVersion
{
get { return osVersion_; }
set { osVersion_ = value; osVersion_present = true; }
}
private BigInteger osPatchLevel_;
private bool osPatchLevel_present = false;
[ASN1Integer(Name = "")]
[ASN1Element(Name = "osPatchLevel", IsOptional = true, HasTag = true, Tag = 706, TagClass = TagClasses.ContextSpecific, IsImplicitTag = false, HasDefaultValue = false)]
public BigInteger OsPatchLevel
{
get { return osPatchLevel_; }
set { osPatchLevel_ = value; osPatchLevel_present = true; }
}
private byte[] attestationApplicationId_;
private bool attestationApplicationId_present = false;
[ASN1OctetString(Name = "")]
[ASN1Element(Name = "attestationApplicationId", IsOptional = true, HasTag = true, TagClass = TagClasses.ContextSpecific, Tag = 709, IsImplicitTag = false, HasDefaultValue = false)]
public byte[] AttestationApplicationId
{
get { return attestationApplicationId_; }
set { attestationApplicationId_ = value; attestationApplicationId_present = true; }
}
private byte[] attestationIdSerial_;
private bool attestationIdSerial_present = false;
[ASN1OctetString(Name = "")]
[ASN1Element(Name = "attestationIdSerial", IsOptional = true, HasTag = true, Tag = 713, TagClass = TagClasses.ContextSpecific, IsImplicitTag = false, HasDefaultValue = false)]
public byte[] AttestationIdSerial
{
get { return attestationIdSerial_; }
set { attestationIdSerial_ = value; attestationIdSerial_present = true; }
}
private BigInteger vendorPatchLevel_;
private bool vendorPatchLevel_present = false;
[ASN1Integer(Name = "")]
[ASN1Element(Name = "vendorPatchLevel", IsOptional = true, HasTag = true, Tag = 718, TagClass = TagClasses.ContextSpecific, IsImplicitTag = false, HasDefaultValue = false)]
public BigInteger VendorPatchLevel
{
get { return vendorPatchLevel_; }
set { vendorPatchLevel_ = value; vendorPatchLevel_present = true; }
}
private BigInteger bootPatchLevel_;
private bool bootPatchLevel_present = false;
[ASN1Integer(Name = "")]
[ASN1Element(Name = "bootPatchLevel", IsOptional = true, HasTag = true, Tag = 719, TagClass = TagClasses.ContextSpecific, IsImplicitTag = false, HasDefaultValue = false)]
public BigInteger BootPatchLevel
{
get { return bootPatchLevel_; }
set { bootPatchLevel_ = value; bootPatchLevel_present = true; }
}
public bool isPurposePresent()
{
return purpose_present == true;
}
public bool isAlgorithmPresent()
{
return algorithm_present == true;
}
public bool isKeySizePresent()
{
return keySize_present == true;
}
public bool isDigestPresent()
{
return digest_present == true;
}
public bool isEcCurvePresent()
{
return ecCurve_present == true;
}
public bool isCreationDateTimePresent()
{
return creationDateTime_present == true;
}
public bool isOriginPresent()
{
return origin_present == true;
}
public bool isRootOfTrustPresent()
{
return rootOfTrust_present == true;
}
public bool isOsVersionPresent()
{
return osVersion_present == true;
}
public bool isOsPatchLevelPresent()
{
return osPatchLevel_present == true;
}
public bool isAttestationApplicationIdPresent()
{
return attestationApplicationId_present == true;
}
public bool isAttestationIdSerialPresent()
{
return attestationIdSerial_present == true;
}
public bool isVendorPatchLevelPresent()
{
return vendorPatchLevel_present == true;
}
public bool isBootPatchLevelPresent()
{
return bootPatchLevel_present == true;
}
public void initWithDefaults()
{
}
private static IASN1PreparedElementData preparedData = CoderFactory.getInstance().newPreparedElementData(typeof(AuthorizationList));
public IASN1PreparedElementData PreparedData
{
get { return preparedData; }
}
}
}
When I was trying to figure it out myself I debugged the project and saw that the null reference exception was happening on this line when trying to encode the Digest field.
I'm sure I'm just missing something small, but I would really appreciate some help or advice. Thanks!
The text was updated successfully, but these errors were encountered:
Trying to encode this ASN.1 sequence
I used the compiler to turn that into this class
When I was trying to figure it out myself I debugged the project and saw that the null reference exception was happening on this line when trying to encode the
![Screenshot 2024-06-18 165117](https://private-user-images.githubusercontent.com/75767711/340847830-cf9268bd-779a-44d2-874e-c3da5df42412.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NjkxNDksIm5iZiI6MTczOTU2ODg0OSwicGF0aCI6Ii83NTc2NzcxMS8zNDA4NDc4MzAtY2Y5MjY4YmQtNzc5YS00NGQyLTg3NGUtYzNkYTVkZjQyNDEyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDIxMzQwOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWNjMmFkZDU5M2M4MTI3ZTg3YTQ2ZDI3NGExMDhmMzliOGIzNWVlMDRmNGZkMTFhZWQ0YjBhZjhhYzAzOWM2MDYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.s-XPwHtrP4wEvzg-dwQaccemvz9du1JStZM3a3VmC-s)
Digest
field.I'm sure I'm just missing something small, but I would really appreciate some help or advice. Thanks!
The text was updated successfully, but these errors were encountered: