private Asn1Object BuildObject(
int tag,
int tagNo,
int length)
{
bool isConstructed = (tag & Asn1Tags.Constructed) != 0;
DefiniteLengthInputStream defIn = new DefiniteLengthInputStream(this.s, length);
if((tag & Asn1Tags.Application) != 0)
{
throw new IOException("invalid ECDSA sig");
}
if((tag & Asn1Tags.Tagged) != 0)
{
throw new IOException("invalid ECDSA sig");
}
if(isConstructed)
{
switch(tagNo)
{
case Asn1Tags.Sequence:
return CreateDerSequence(defIn);
default:
throw new IOException("unknown tag " + tagNo + " encountered");
}
}
return CreatePrimitiveDerObject(tagNo, defIn, tmpBuffers);
}