//
// sm_cms.cpp - class member functions for ASN.1 module CryptographicMessageSyntax
//
-// This file was generated by snacc on Wed Jun 27 16:40:55 2001
+// This file was generated by snacc on Mon Apr 22 22:34:19 2002
// UBC snacc written by Mike Sample
// A couple of enhancements made by IBM European Networking Center
#include "pkcs7.h"
#include "pkcs8.h"
#include "appleoids.h"
+#include "pkcs10.h"
//------------------------------------------------------------------------------
// value defs
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -100);
+ SnaccExcep::throwMe(-100);
}
if ((tag1 == MAKE_TAG_ID (UNIV, PRIM, BITSTRING_TAG_CODE))
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -101);
+ SnaccExcep::throwMe(-101);
}
bytesDecoded += seqBytesDecoded;
else if (seqBytesDecoded != elmtLen0)
{
Asn1Error << "ERROR - Length discrepancy on sequence." << endl;
- longjmp (env, -102);
+ SnaccExcep::throwMe(-102);
}
else
return;
if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE))
{
Asn1Error << "OriginatorPublicKey::BDec: ERROR - wrong tag" << endl;
- longjmp (env, -103);
+ SnaccExcep::throwMe(-103);
}
elmtLen1 = BDecLen (b, bytesDecoded, env);
BDecContent (b, tag, elmtLen1, bytesDecoded, env);
}
-int OriginatorPublicKey::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
-{
- bytesEncoded = BEnc (b);
- return !b.WriteError();
-}
-
-int OriginatorPublicKey::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
-{
- ENV_TYPE env;
- int val;
-
- bytesDecoded = 0;
- if ((val = setjmp (env)) == 0)
- {
- BDec (b, bytesDecoded, env);
- return !b.ReadError();
- }
- else
- return false;
-}
-
void OriginatorPublicKey::Print (ostream &os) const
{
#ifndef NDEBUG
if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, CONS, SET_TAG_CODE))
{
Asn1Error << "CertificateRevocationLists::BDec: ERROR - wrong tag" << endl;
- longjmp (env, -104);
+ SnaccExcep::throwMe(-104);
}
elmtLen1 = BDecLen (b, bytesDecoded, env);
BDecContent (b, tag, elmtLen1, bytesDecoded, env);
if ((tag1 != MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE)))
{
Asn1Error << "Unexpected Tag" << endl;
- longjmp (env, -105);
+ SnaccExcep::throwMe(-105);
}
elmtLen1 = BDecLen (b, listBytesDecoded, env);
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -106);
+ SnaccExcep::throwMe(-106);
}
if ((tag1 == MAKE_TAG_ID (UNIV, PRIM, INTEGER_TAG_CODE))
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -107);
+ SnaccExcep::throwMe(-107);
}
bytesDecoded += seqBytesDecoded;
else if (seqBytesDecoded != elmtLen0)
{
Asn1Error << "ERROR - Length discrepancy on sequence." << endl;
- longjmp (env, -108);
+ SnaccExcep::throwMe(-108);
}
else
return;
if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE))
{
Asn1Error << "IssuerAndSerialNumber::BDec: ERROR - wrong tag" << endl;
- longjmp (env, -109);
+ SnaccExcep::throwMe(-109);
}
elmtLen1 = BDecLen (b, bytesDecoded, env);
BDecContent (b, tag, elmtLen1, bytesDecoded, env);
}
-int IssuerAndSerialNumber::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
-{
- bytesEncoded = BEnc (b);
- return !b.WriteError();
-}
-
-int IssuerAndSerialNumber::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
-{
- ENV_TYPE env;
- int val;
-
- bytesDecoded = 0;
- if ((val = setjmp (env)) == 0)
- {
- BDec (b, bytesDecoded, env);
- return !b.ReadError();
- }
- else
- return false;
-}
-
void IssuerAndSerialNumber::Print (ostream &os) const
{
#ifndef NDEBUG
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -110);
+ SnaccExcep::throwMe(-110);
}
// ANY type
else if (seqBytesDecoded != elmtLen0)
{
Asn1Error << "ERROR - Length discrepancy on sequence." << endl;
- longjmp (env, -111);
+ SnaccExcep::throwMe(-111);
}
else
return;
if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE))
{
Asn1Error << "OtherKeyAttribute::BDec: ERROR - wrong tag" << endl;
- longjmp (env, -112);
+ SnaccExcep::throwMe(-112);
}
elmtLen1 = BDecLen (b, bytesDecoded, env);
BDecContent (b, tag, elmtLen1, bytesDecoded, env);
}
-int OtherKeyAttribute::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
-{
- bytesEncoded = BEnc (b);
- return !b.WriteError();
-}
-
-int OtherKeyAttribute::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
-{
- ENV_TYPE env;
- int val;
-
- bytesDecoded = 0;
- if ((val = setjmp (env)) == 0)
- {
- BDec (b, bytesDecoded, env);
- return !b.ReadError();
- }
- else
- return false;
-}
-
void OtherKeyAttribute::Print (ostream &os) const
{
#ifndef NDEBUG
if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, CONS, SET_TAG_CODE))
{
Asn1Error << "DigestAlgorithmIdentifiers::BDec: ERROR - wrong tag" << endl;
- longjmp (env, -113);
+ SnaccExcep::throwMe(-113);
}
elmtLen1 = BDecLen (b, bytesDecoded, env);
BDecContent (b, tag, elmtLen1, bytesDecoded, env);
if ((tag1 != MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE)))
{
Asn1Error << "Unexpected Tag" << endl;
- longjmp (env, -114);
+ SnaccExcep::throwMe(-114);
}
elmtLen1 = BDecLen (b, listBytesDecoded, env);
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -115);
+ SnaccExcep::throwMe(-115);
}
if ((tag1 == MAKE_TAG_ID (CNTX, CONS, 0)))
&& (tag1 != MAKE_TAG_ID (UNIV, CONS, OCTETSTRING_TAG_CODE)))
{
Asn1Error << "Unexpected Tag" << endl;
- longjmp (env, -116);
+ SnaccExcep::throwMe(-116);
}
elmtLen2 = BDecLen (b, seqBytesDecoded, env);
else if (seqBytesDecoded != elmtLen0)
{
Asn1Error << "ERROR - Length discrepancy on sequence." << endl;
- longjmp (env, -117);
+ SnaccExcep::throwMe(-117);
}
else
return;
if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE))
{
Asn1Error << "EncapsulatedContentInfo::BDec: ERROR - wrong tag" << endl;
- longjmp (env, -118);
+ SnaccExcep::throwMe(-118);
}
elmtLen1 = BDecLen (b, bytesDecoded, env);
BDecContent (b, tag, elmtLen1, bytesDecoded, env);
}
-int EncapsulatedContentInfo::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
-{
- bytesEncoded = BEnc (b);
- return !b.WriteError();
-}
-
-int EncapsulatedContentInfo::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
-{
- ENV_TYPE env;
- int val;
-
- bytesDecoded = 0;
- if ((val = setjmp (env)) == 0)
- {
- BDec (b, bytesDecoded, env);
- return !b.ReadError();
- }
- else
- return false;
-}
-
void EncapsulatedContentInfo::Print (ostream &os) const
{
#ifndef NDEBUG
default:
Asn1Error << "ERROR - unexpected tag in CHOICE" << endl;
- longjmp (env, -119);
+ SnaccExcep::throwMe(-119);
break;
} // end switch
} // SignerIdentifier::BDecContent
BDecContent (b, tag, elmtLen, bytesDecoded, env);
}
-int SignerIdentifier::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
-{
- bytesEncoded = BEnc (b);
- return !b.WriteError();
-}
-
-int SignerIdentifier::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
-{
- ENV_TYPE env;
- int val;
-
- bytesDecoded = 0;
- if ((val = setjmp (env)) == 0)
- {
- BDec (b, bytesDecoded, env);
- return !b.ReadError();
- }
- else
- return false;
-}
-
void SignerIdentifier::Print (ostream &os) const
{
#ifndef NDEBUG
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -120);
+ SnaccExcep::throwMe(-120);
}
if ((tag1 == MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE)))
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -121);
+ SnaccExcep::throwMe(-121);
}
if ((tag1 == MAKE_TAG_ID (CNTX, PRIM, 0))
else if (seqBytesDecoded != elmtLen0)
{
Asn1Error << "ERROR - Length discrepancy on sequence." << endl;
- longjmp (env, -122);
+ SnaccExcep::throwMe(-122);
}
else
return;
if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE))
{
Asn1Error << "EncryptedContentInfo::BDec: ERROR - wrong tag" << endl;
- longjmp (env, -123);
+ SnaccExcep::throwMe(-123);
}
elmtLen1 = BDecLen (b, bytesDecoded, env);
BDecContent (b, tag, elmtLen1, bytesDecoded, env);
}
-int EncryptedContentInfo::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
-{
- bytesEncoded = BEnc (b);
- return !b.WriteError();
-}
-
-int EncryptedContentInfo::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
-{
- ENV_TYPE env;
- int val;
-
- bytesDecoded = 0;
- if ((val = setjmp (env)) == 0)
- {
- BDec (b, bytesDecoded, env);
- return !b.ReadError();
- }
- else
- return false;
-}
-
void EncryptedContentInfo::Print (ostream &os) const
{
#ifndef NDEBUG
default:
Asn1Error << "ERROR - unexpected tag in CHOICE" << endl;
- longjmp (env, -124);
+ SnaccExcep::throwMe(-124);
break;
} // end switch
} // RecipientIdentifier::BDecContent
BDecContent (b, tag, elmtLen, bytesDecoded, env);
}
-int RecipientIdentifier::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
-{
- bytesEncoded = BEnc (b);
- return !b.WriteError();
-}
-
-int RecipientIdentifier::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
-{
- ENV_TYPE env;
- int val;
-
- bytesDecoded = 0;
- if ((val = setjmp (env)) == 0)
- {
- BDec (b, bytesDecoded, env);
- return !b.ReadError();
- }
- else
- return false;
-}
-
void RecipientIdentifier::Print (ostream &os) const
{
#ifndef NDEBUG
default:
Asn1Error << "ERROR - unexpected tag in CHOICE" << endl;
- longjmp (env, -125);
+ SnaccExcep::throwMe(-125);
break;
} // end switch
} // OriginatorIdentifierOrKey::BDecContent
BDecContent (b, tag, elmtLen, bytesDecoded, env);
}
-int OriginatorIdentifierOrKey::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
-{
- bytesEncoded = BEnc (b);
- return !b.WriteError();
-}
-
-int OriginatorIdentifierOrKey::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
-{
- ENV_TYPE env;
- int val;
-
- bytesDecoded = 0;
- if ((val = setjmp (env)) == 0)
- {
- BDec (b, bytesDecoded, env);
- return !b.ReadError();
- }
- else
- return false;
-}
-
void OriginatorIdentifierOrKey::Print (ostream &os) const
{
#ifndef NDEBUG
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -126);
+ SnaccExcep::throwMe(-126);
}
if ((tag1 == MAKE_TAG_ID (UNIV, PRIM, GENERALIZEDTIME_TAG_CODE))
else if (seqBytesDecoded != elmtLen0)
{
Asn1Error << "ERROR - Length discrepancy on sequence." << endl;
- longjmp (env, -127);
+ SnaccExcep::throwMe(-127);
}
else
return;
if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE))
{
Asn1Error << "RecipientKeyIdentifier::BDec: ERROR - wrong tag" << endl;
- longjmp (env, -128);
+ SnaccExcep::throwMe(-128);
}
elmtLen1 = BDecLen (b, bytesDecoded, env);
BDecContent (b, tag, elmtLen1, bytesDecoded, env);
}
-int RecipientKeyIdentifier::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
-{
- bytesEncoded = BEnc (b);
- return !b.WriteError();
-}
-
-int RecipientKeyIdentifier::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
-{
- ENV_TYPE env;
- int val;
-
- bytesDecoded = 0;
- if ((val = setjmp (env)) == 0)
- {
- BDec (b, bytesDecoded, env);
- return !b.ReadError();
- }
- else
- return false;
-}
-
void RecipientKeyIdentifier::Print (ostream &os) const
{
#ifndef NDEBUG
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -129);
+ SnaccExcep::throwMe(-129);
}
if ((tag1 == MAKE_TAG_ID (UNIV, PRIM, GENERALIZEDTIME_TAG_CODE))
else if (seqBytesDecoded != elmtLen0)
{
Asn1Error << "ERROR - Length discrepancy on sequence." << endl;
- longjmp (env, -130);
+ SnaccExcep::throwMe(-130);
}
else
return;
if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE))
{
Asn1Error << "KEKIdentifier::BDec: ERROR - wrong tag" << endl;
- longjmp (env, -131);
+ SnaccExcep::throwMe(-131);
}
elmtLen1 = BDecLen (b, bytesDecoded, env);
BDecContent (b, tag, elmtLen1, bytesDecoded, env);
}
-int KEKIdentifier::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
-{
- bytesEncoded = BEnc (b);
- return !b.WriteError();
-}
-
-int KEKIdentifier::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
-{
- ENV_TYPE env;
- int val;
-
- bytesDecoded = 0;
- if ((val = setjmp (env)) == 0)
- {
- BDec (b, bytesDecoded, env);
- return !b.ReadError();
- }
- else
- return false;
-}
-
void KEKIdentifier::Print (ostream &os) const
{
#ifndef NDEBUG
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -132);
+ SnaccExcep::throwMe(-132);
}
if ((tag1 == MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE)))
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -133);
+ SnaccExcep::throwMe(-133);
}
if ((tag1 == MAKE_TAG_ID (UNIV, CONS, SET_TAG_CODE)))
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -134);
+ SnaccExcep::throwMe(-134);
}
bytesDecoded += seqBytesDecoded;
else if (seqBytesDecoded != elmtLen0)
{
Asn1Error << "ERROR - Length discrepancy on sequence." << endl;
- longjmp (env, -135);
+ SnaccExcep::throwMe(-135);
}
else
return;
if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE))
{
Asn1Error << "ExtendedCertificateInfo::BDec: ERROR - wrong tag" << endl;
- longjmp (env, -136);
+ SnaccExcep::throwMe(-136);
}
elmtLen1 = BDecLen (b, bytesDecoded, env);
BDecContent (b, tag, elmtLen1, bytesDecoded, env);
}
-int ExtendedCertificateInfo::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
-{
- bytesEncoded = BEnc (b);
- return !b.WriteError();
-}
-
-int ExtendedCertificateInfo::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
-{
- ENV_TYPE env;
- int val;
-
- bytesDecoded = 0;
- if ((val = setjmp (env)) == 0)
- {
- BDec (b, bytesDecoded, env);
- return !b.ReadError();
- }
- else
- return false;
-}
-
void ExtendedCertificateInfo::Print (ostream &os) const
{
#ifndef NDEBUG
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -137);
+ SnaccExcep::throwMe(-137);
}
if ((tag1 == MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE))
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -138);
+ SnaccExcep::throwMe(-138);
}
if ((tag1 == MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE)))
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -139);
+ SnaccExcep::throwMe(-139);
}
if ((tag1 == MAKE_TAG_ID (CNTX, CONS, 0)))
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -140);
+ SnaccExcep::throwMe(-140);
}
if ((tag1 == MAKE_TAG_ID (UNIV, PRIM, OCTETSTRING_TAG_CODE))
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -141);
+ SnaccExcep::throwMe(-141);
}
if ((tag1 == MAKE_TAG_ID (CNTX, CONS, 1)))
else if (seqBytesDecoded != elmtLen0)
{
Asn1Error << "ERROR - Length discrepancy on sequence." << endl;
- longjmp (env, -142);
+ SnaccExcep::throwMe(-142);
}
else
return;
if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE))
{
Asn1Error << "SignerInfo::BDec: ERROR - wrong tag" << endl;
- longjmp (env, -143);
+ SnaccExcep::throwMe(-143);
}
elmtLen1 = BDecLen (b, bytesDecoded, env);
BDecContent (b, tag, elmtLen1, bytesDecoded, env);
}
-int SignerInfo::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
-{
- bytesEncoded = BEnc (b);
- return !b.WriteError();
-}
-
-int SignerInfo::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
-{
- ENV_TYPE env;
- int val;
-
- bytesDecoded = 0;
- if ((val = setjmp (env)) == 0)
- {
- BDec (b, bytesDecoded, env);
- return !b.ReadError();
- }
- else
- return false;
-}
-
void SignerInfo::Print (ostream &os) const
{
#ifndef NDEBUG
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -144);
+ SnaccExcep::throwMe(-144);
}
if ((tag1 == MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE))
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -145);
+ SnaccExcep::throwMe(-145);
}
if ((tag1 == MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE)))
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -146);
+ SnaccExcep::throwMe(-146);
}
if ((tag1 == MAKE_TAG_ID (UNIV, PRIM, OCTETSTRING_TAG_CODE))
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -147);
+ SnaccExcep::throwMe(-147);
}
bytesDecoded += seqBytesDecoded;
else if (seqBytesDecoded != elmtLen0)
{
Asn1Error << "ERROR - Length discrepancy on sequence." << endl;
- longjmp (env, -148);
+ SnaccExcep::throwMe(-148);
}
else
return;
if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE))
{
Asn1Error << "KeyTransRecipientInfo::BDec: ERROR - wrong tag" << endl;
- longjmp (env, -149);
+ SnaccExcep::throwMe(-149);
}
elmtLen1 = BDecLen (b, bytesDecoded, env);
BDecContent (b, tag, elmtLen1, bytesDecoded, env);
}
-int KeyTransRecipientInfo::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
-{
- bytesEncoded = BEnc (b);
- return !b.WriteError();
-}
-
-int KeyTransRecipientInfo::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
-{
- ENV_TYPE env;
- int val;
-
- bytesDecoded = 0;
- if ((val = setjmp (env)) == 0)
- {
- BDec (b, bytesDecoded, env);
- return !b.ReadError();
- }
- else
- return false;
-}
-
void KeyTransRecipientInfo::Print (ostream &os) const
{
#ifndef NDEBUG
default:
Asn1Error << "ERROR - unexpected tag in CHOICE" << endl;
- longjmp (env, -150);
+ SnaccExcep::throwMe(-150);
break;
} // end switch
} // KeyAgreeRecipientIdentifier::BDecContent
BDecContent (b, tag, elmtLen, bytesDecoded, env);
}
-int KeyAgreeRecipientIdentifier::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
-{
- bytesEncoded = BEnc (b);
- return !b.WriteError();
-}
-
-int KeyAgreeRecipientIdentifier::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
-{
- ENV_TYPE env;
- int val;
-
- bytesDecoded = 0;
- if ((val = setjmp (env)) == 0)
- {
- BDec (b, bytesDecoded, env);
- return !b.ReadError();
- }
- else
- return false;
-}
-
void KeyAgreeRecipientIdentifier::Print (ostream &os) const
{
#ifndef NDEBUG
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -151);
+ SnaccExcep::throwMe(-151);
}
if ((tag1 == MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE)))
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -152);
+ SnaccExcep::throwMe(-152);
}
if ((tag1 == MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE)))
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -153);
+ SnaccExcep::throwMe(-153);
}
if ((tag1 == MAKE_TAG_ID (UNIV, PRIM, OCTETSTRING_TAG_CODE))
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -154);
+ SnaccExcep::throwMe(-154);
}
bytesDecoded += seqBytesDecoded;
else if (seqBytesDecoded != elmtLen0)
{
Asn1Error << "ERROR - Length discrepancy on sequence." << endl;
- longjmp (env, -155);
+ SnaccExcep::throwMe(-155);
}
else
return;
if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE))
{
Asn1Error << "KEKRecipientInfo::BDec: ERROR - wrong tag" << endl;
- longjmp (env, -156);
+ SnaccExcep::throwMe(-156);
}
elmtLen1 = BDecLen (b, bytesDecoded, env);
BDecContent (b, tag, elmtLen1, bytesDecoded, env);
}
-int KEKRecipientInfo::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
-{
- bytesEncoded = BEnc (b);
- return !b.WriteError();
-}
-
-int KEKRecipientInfo::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
-{
- ENV_TYPE env;
- int val;
-
- bytesDecoded = 0;
- if ((val = setjmp (env)) == 0)
- {
- BDec (b, bytesDecoded, env);
- return !b.ReadError();
- }
- else
- return false;
-}
-
void KEKRecipientInfo::Print (ostream &os) const
{
#ifndef NDEBUG
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -157);
+ SnaccExcep::throwMe(-157);
}
if ((tag1 == MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE)))
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -158);
+ SnaccExcep::throwMe(-158);
}
if ((tag1 == MAKE_TAG_ID (UNIV, PRIM, BITSTRING_TAG_CODE))
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -159);
+ SnaccExcep::throwMe(-159);
}
bytesDecoded += seqBytesDecoded;
else if (seqBytesDecoded != elmtLen0)
{
Asn1Error << "ERROR - Length discrepancy on sequence." << endl;
- longjmp (env, -160);
+ SnaccExcep::throwMe(-160);
}
else
return;
if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE))
{
Asn1Error << "ExtendedCertificate::BDec: ERROR - wrong tag" << endl;
- longjmp (env, -161);
+ SnaccExcep::throwMe(-161);
}
elmtLen1 = BDecLen (b, bytesDecoded, env);
BDecContent (b, tag, elmtLen1, bytesDecoded, env);
}
-int ExtendedCertificate::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
-{
- bytesEncoded = BEnc (b);
- return !b.WriteError();
-}
-
-int ExtendedCertificate::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
-{
- ENV_TYPE env;
- int val;
-
- bytesDecoded = 0;
- if ((val = setjmp (env)) == 0)
- {
- BDec (b, bytesDecoded, env);
- return !b.ReadError();
- }
- else
- return false;
-}
-
void ExtendedCertificate::Print (ostream &os) const
{
#ifndef NDEBUG
if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, CONS, SET_TAG_CODE))
{
Asn1Error << "SignerInfos::BDec: ERROR - wrong tag" << endl;
- longjmp (env, -162);
+ SnaccExcep::throwMe(-162);
}
elmtLen1 = BDecLen (b, bytesDecoded, env);
BDecContent (b, tag, elmtLen1, bytesDecoded, env);
if ((tag1 != MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE)))
{
Asn1Error << "Unexpected Tag" << endl;
- longjmp (env, -163);
+ SnaccExcep::throwMe(-163);
}
elmtLen1 = BDecLen (b, listBytesDecoded, env);
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -164);
+ SnaccExcep::throwMe(-164);
}
if ((tag1 == MAKE_TAG_ID (UNIV, PRIM, OCTETSTRING_TAG_CODE))
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -165);
+ SnaccExcep::throwMe(-165);
}
bytesDecoded += seqBytesDecoded;
else if (seqBytesDecoded != elmtLen0)
{
Asn1Error << "ERROR - Length discrepancy on sequence." << endl;
- longjmp (env, -166);
+ SnaccExcep::throwMe(-166);
}
else
return;
if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE))
{
Asn1Error << "RecipientEncryptedKey::BDec: ERROR - wrong tag" << endl;
- longjmp (env, -167);
+ SnaccExcep::throwMe(-167);
}
elmtLen1 = BDecLen (b, bytesDecoded, env);
BDecContent (b, tag, elmtLen1, bytesDecoded, env);
}
-int RecipientEncryptedKey::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
-{
- bytesEncoded = BEnc (b);
- return !b.WriteError();
-}
-
-int RecipientEncryptedKey::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
-{
- ENV_TYPE env;
- int val;
-
- bytesDecoded = 0;
- if ((val = setjmp (env)) == 0)
- {
- BDec (b, bytesDecoded, env);
- return !b.ReadError();
- }
- else
- return false;
-}
-
void RecipientEncryptedKey::Print (ostream &os) const
{
#ifndef NDEBUG
default:
Asn1Error << "ERROR - unexpected tag in CHOICE" << endl;
- longjmp (env, -168);
+ SnaccExcep::throwMe(-168);
break;
} // end switch
} // CertificateChoices::BDecContent
BDecContent (b, tag, elmtLen, bytesDecoded, env);
}
-int CertificateChoices::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
-{
- bytesEncoded = BEnc (b);
- return !b.WriteError();
-}
-
-int CertificateChoices::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
-{
- ENV_TYPE env;
- int val;
-
- bytesDecoded = 0;
- if ((val = setjmp (env)) == 0)
- {
- BDec (b, bytesDecoded, env);
- return !b.ReadError();
- }
- else
- return false;
-}
-
void CertificateChoices::Print (ostream &os) const
{
#ifndef NDEBUG
if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, CONS, SET_TAG_CODE))
{
Asn1Error << "CertificateSet::BDec: ERROR - wrong tag" << endl;
- longjmp (env, -169);
+ SnaccExcep::throwMe(-169);
}
elmtLen1 = BDecLen (b, bytesDecoded, env);
BDecContent (b, tag, elmtLen1, bytesDecoded, env);
|| (tag1 == MAKE_TAG_ID (CNTX, CONS, 1))))
{
Asn1Error << "Unexpected Tag" << endl;
- longjmp (env, -170);
+ SnaccExcep::throwMe(-170);
}
elmtLen1 = BDecLen (b, listBytesDecoded, env);
else if (seqBytesDecoded != elmtLen0)
{
Asn1Error << "ERROR - Length discrepancy on sequence." << endl;
- longjmp (env, -171);
+ SnaccExcep::throwMe(-171);
}
else
return;
if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE))
{
Asn1Error << "OriginatorInfo::BDec: ERROR - wrong tag" << endl;
- longjmp (env, -172);
+ SnaccExcep::throwMe(-172);
}
elmtLen1 = BDecLen (b, bytesDecoded, env);
BDecContent (b, tag, elmtLen1, bytesDecoded, env);
}
-int OriginatorInfo::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
-{
- bytesEncoded = BEnc (b);
- return !b.WriteError();
-}
-
-int OriginatorInfo::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
-{
- ENV_TYPE env;
- int val;
-
- bytesDecoded = 0;
- if ((val = setjmp (env)) == 0)
- {
- BDec (b, bytesDecoded, env);
- return !b.ReadError();
- }
- else
- return false;
-}
-
void OriginatorInfo::Print (ostream &os) const
{
#ifndef NDEBUG
if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE))
{
Asn1Error << "RecipientEncryptedKeys::BDec: ERROR - wrong tag" << endl;
- longjmp (env, -173);
+ SnaccExcep::throwMe(-173);
}
elmtLen1 = BDecLen (b, bytesDecoded, env);
BDecContent (b, tag, elmtLen1, bytesDecoded, env);
if ((tag1 != MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE)))
{
Asn1Error << "Unexpected Tag" << endl;
- longjmp (env, -174);
+ SnaccExcep::throwMe(-174);
}
elmtLen1 = BDecLen (b, listBytesDecoded, env);
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -175);
+ SnaccExcep::throwMe(-175);
}
if ((tag1 == MAKE_TAG_ID (CNTX, CONS, 0)))
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -176);
+ SnaccExcep::throwMe(-176);
}
if ((tag1 == MAKE_TAG_ID (CNTX, CONS, 1)))
&& (tag1 != MAKE_TAG_ID (UNIV, CONS, OCTETSTRING_TAG_CODE)))
{
Asn1Error << "Unexpected Tag" << endl;
- longjmp (env, -177);
+ SnaccExcep::throwMe(-177);
}
elmtLen2 = BDecLen (b, seqBytesDecoded, env);
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -178);
+ SnaccExcep::throwMe(-178);
}
if ((tag1 == MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE)))
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -179);
+ SnaccExcep::throwMe(-179);
}
bytesDecoded += seqBytesDecoded;
else if (seqBytesDecoded != elmtLen0)
{
Asn1Error << "ERROR - Length discrepancy on sequence." << endl;
- longjmp (env, -180);
+ SnaccExcep::throwMe(-180);
}
else
return;
if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE))
{
Asn1Error << "KeyAgreeRecipientInfo::BDec: ERROR - wrong tag" << endl;
- longjmp (env, -181);
+ SnaccExcep::throwMe(-181);
}
elmtLen1 = BDecLen (b, bytesDecoded, env);
BDecContent (b, tag, elmtLen1, bytesDecoded, env);
}
-int KeyAgreeRecipientInfo::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
-{
- bytesEncoded = BEnc (b);
- return !b.WriteError();
-}
-
-int KeyAgreeRecipientInfo::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
-{
- ENV_TYPE env;
- int val;
-
- bytesDecoded = 0;
- if ((val = setjmp (env)) == 0)
- {
- BDec (b, bytesDecoded, env);
- return !b.ReadError();
- }
- else
- return false;
-}
-
void KeyAgreeRecipientInfo::Print (ostream &os) const
{
#ifndef NDEBUG
default:
Asn1Error << "ERROR - unexpected tag in CHOICE" << endl;
- longjmp (env, -182);
+ SnaccExcep::throwMe(-182);
break;
} // end switch
} // RecipientInfo::BDecContent
BDecContent (b, tag, elmtLen, bytesDecoded, env);
}
-int RecipientInfo::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
-{
- bytesEncoded = BEnc (b);
- return !b.WriteError();
-}
-
-int RecipientInfo::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
-{
- ENV_TYPE env;
- int val;
-
- bytesDecoded = 0;
- if ((val = setjmp (env)) == 0)
- {
- BDec (b, bytesDecoded, env);
- return !b.ReadError();
- }
- else
- return false;
-}
-
void RecipientInfo::Print (ostream &os) const
{
#ifndef NDEBUG
if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, CONS, SET_TAG_CODE))
{
Asn1Error << "RecipientInfos::BDec: ERROR - wrong tag" << endl;
- longjmp (env, -183);
+ SnaccExcep::throwMe(-183);
}
elmtLen1 = BDecLen (b, bytesDecoded, env);
BDecContent (b, tag, elmtLen1, bytesDecoded, env);
|| (tag1 == MAKE_TAG_ID (CNTX, CONS, 2))))
{
Asn1Error << "Unexpected Tag" << endl;
- longjmp (env, -184);
+ SnaccExcep::throwMe(-184);
}
elmtLen1 = BDecLen (b, listBytesDecoded, env);
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -185);
+ SnaccExcep::throwMe(-185);
}
if ((tag1 == MAKE_TAG_ID (CNTX, CONS, 0)))
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -186);
+ SnaccExcep::throwMe(-186);
}
bytesDecoded += seqBytesDecoded;
else if (seqBytesDecoded != elmtLen0)
{
Asn1Error << "ERROR - Length discrepancy on sequence." << endl;
- longjmp (env, -187);
+ SnaccExcep::throwMe(-187);
}
else
return;
if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE))
{
Asn1Error << "ContentInfo::BDec: ERROR - wrong tag" << endl;
- longjmp (env, -188);
+ SnaccExcep::throwMe(-188);
}
elmtLen1 = BDecLen (b, bytesDecoded, env);
BDecContent (b, tag, elmtLen1, bytesDecoded, env);
}
-int ContentInfo::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
-{
- bytesEncoded = BEnc (b);
- return !b.WriteError();
-}
-
-int ContentInfo::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
-{
- ENV_TYPE env;
- int val;
-
- bytesDecoded = 0;
- if ((val = setjmp (env)) == 0)
- {
- BDec (b, bytesDecoded, env);
- return !b.ReadError();
- }
- else
- return false;
-}
-
void ContentInfo::Print (ostream &os) const
{
#ifndef NDEBUG
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -189);
+ SnaccExcep::throwMe(-189);
}
if ((tag1 == MAKE_TAG_ID (UNIV, CONS, SET_TAG_CODE)))
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -190);
+ SnaccExcep::throwMe(-190);
}
if ((tag1 == MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE)))
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -191);
+ SnaccExcep::throwMe(-191);
}
if ((tag1 == MAKE_TAG_ID (CNTX, CONS, 0)))
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -192);
+ SnaccExcep::throwMe(-192);
}
bytesDecoded += seqBytesDecoded;
else if (seqBytesDecoded != elmtLen0)
{
Asn1Error << "ERROR - Length discrepancy on sequence." << endl;
- longjmp (env, -193);
+ SnaccExcep::throwMe(-193);
}
else
return;
if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE))
{
Asn1Error << "SignedData::BDec: ERROR - wrong tag" << endl;
- longjmp (env, -194);
+ SnaccExcep::throwMe(-194);
}
elmtLen1 = BDecLen (b, bytesDecoded, env);
BDecContent (b, tag, elmtLen1, bytesDecoded, env);
}
-int SignedData::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
-{
- bytesEncoded = BEnc (b);
- return !b.WriteError();
-}
-
-int SignedData::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
-{
- ENV_TYPE env;
- int val;
-
- bytesDecoded = 0;
- if ((val = setjmp (env)) == 0)
- {
- BDec (b, bytesDecoded, env);
- return !b.ReadError();
- }
- else
- return false;
-}
-
void SignedData::Print (ostream &os) const
{
#ifndef NDEBUG
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -195);
+ SnaccExcep::throwMe(-195);
}
if ((tag1 == MAKE_TAG_ID (CNTX, CONS, 0)))
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -196);
+ SnaccExcep::throwMe(-196);
}
if ((tag1 == MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE)))
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -197);
+ SnaccExcep::throwMe(-197);
}
if ((tag1 == MAKE_TAG_ID (CNTX, CONS, 1)))
else if (seqBytesDecoded != elmtLen0)
{
Asn1Error << "ERROR - Length discrepancy on sequence." << endl;
- longjmp (env, -198);
+ SnaccExcep::throwMe(-198);
}
else
return;
if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE))
{
Asn1Error << "EnvelopedData::BDec: ERROR - wrong tag" << endl;
- longjmp (env, -199);
+ SnaccExcep::throwMe(-199);
}
elmtLen1 = BDecLen (b, bytesDecoded, env);
BDecContent (b, tag, elmtLen1, bytesDecoded, env);
}
-int EnvelopedData::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
-{
- bytesEncoded = BEnc (b);
- return !b.WriteError();
-}
-
-int EnvelopedData::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
-{
- ENV_TYPE env;
- int val;
-
- bytesDecoded = 0;
- if ((val = setjmp (env)) == 0)
- {
- BDec (b, bytesDecoded, env);
- return !b.ReadError();
- }
- else
- return false;
-}
-
void EnvelopedData::Print (ostream &os) const
{
#ifndef NDEBUG
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -200);
+ SnaccExcep::throwMe(-200);
}
if ((tag1 == MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE)))
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -201);
+ SnaccExcep::throwMe(-201);
}
if ((tag1 == MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE)))
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -202);
+ SnaccExcep::throwMe(-202);
}
if ((tag1 == MAKE_TAG_ID (UNIV, PRIM, OCTETSTRING_TAG_CODE))
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -203);
+ SnaccExcep::throwMe(-203);
}
bytesDecoded += seqBytesDecoded;
else if (seqBytesDecoded != elmtLen0)
{
Asn1Error << "ERROR - Length discrepancy on sequence." << endl;
- longjmp (env, -204);
+ SnaccExcep::throwMe(-204);
}
else
return;
if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE))
{
Asn1Error << "DigestedData::BDec: ERROR - wrong tag" << endl;
- longjmp (env, -205);
+ SnaccExcep::throwMe(-205);
}
elmtLen1 = BDecLen (b, bytesDecoded, env);
BDecContent (b, tag, elmtLen1, bytesDecoded, env);
}
-int DigestedData::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
-{
- bytesEncoded = BEnc (b);
- return !b.WriteError();
-}
-
-int DigestedData::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
-{
- ENV_TYPE env;
- int val;
-
- bytesDecoded = 0;
- if ((val = setjmp (env)) == 0)
- {
- BDec (b, bytesDecoded, env);
- return !b.ReadError();
- }
- else
- return false;
-}
-
void DigestedData::Print (ostream &os) const
{
#ifndef NDEBUG
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -206);
+ SnaccExcep::throwMe(-206);
}
if ((tag1 == MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE)))
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -207);
+ SnaccExcep::throwMe(-207);
}
bytesDecoded += seqBytesDecoded;
else if (seqBytesDecoded != elmtLen0)
{
Asn1Error << "ERROR - Length discrepancy on sequence." << endl;
- longjmp (env, -208);
+ SnaccExcep::throwMe(-208);
}
else
return;
if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE))
{
Asn1Error << "EncryptedData::BDec: ERROR - wrong tag" << endl;
- longjmp (env, -209);
+ SnaccExcep::throwMe(-209);
}
elmtLen1 = BDecLen (b, bytesDecoded, env);
BDecContent (b, tag, elmtLen1, bytesDecoded, env);
}
-int EncryptedData::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
-{
- bytesEncoded = BEnc (b);
- return !b.WriteError();
-}
-
-int EncryptedData::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
-{
- ENV_TYPE env;
- int val;
-
- bytesDecoded = 0;
- if ((val = setjmp (env)) == 0)
- {
- BDec (b, bytesDecoded, env);
- return !b.ReadError();
- }
- else
- return false;
-}
-
void EncryptedData::Print (ostream &os) const
{
#ifndef NDEBUG
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -210);
+ SnaccExcep::throwMe(-210);
}
if ((tag1 == MAKE_TAG_ID (CNTX, CONS, 0)))
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -211);
+ SnaccExcep::throwMe(-211);
}
if ((tag1 == MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE)))
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -212);
+ SnaccExcep::throwMe(-212);
}
if ((tag1 == MAKE_TAG_ID (CNTX, CONS, 1)))
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -213);
+ SnaccExcep::throwMe(-213);
}
if ((tag1 == MAKE_TAG_ID (CNTX, CONS, 2)))
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -214);
+ SnaccExcep::throwMe(-214);
}
if ((tag1 == MAKE_TAG_ID (CNTX, CONS, 3)))
else if (seqBytesDecoded != elmtLen0)
{
Asn1Error << "ERROR - Length discrepancy on sequence." << endl;
- longjmp (env, -215);
+ SnaccExcep::throwMe(-215);
}
else
return;
if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE))
{
Asn1Error << "AuthenticatedData::BDec: ERROR - wrong tag" << endl;
- longjmp (env, -216);
+ SnaccExcep::throwMe(-216);
}
elmtLen1 = BDecLen (b, bytesDecoded, env);
BDecContent (b, tag, elmtLen1, bytesDecoded, env);
}
-int AuthenticatedData::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
-{
- bytesEncoded = BEnc (b);
- return !b.WriteError();
-}
-
-int AuthenticatedData::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
-{
- ENV_TYPE env;
- int val;
-
- bytesDecoded = 0;
- if ((val = setjmp (env)) == 0)
- {
- BDec (b, bytesDecoded, env);
- return !b.ReadError();
- }
- else
- return false;
-}
-
void AuthenticatedData::Print (ostream &os) const
{
#ifndef NDEBUG
if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, CONS, SET_TAG_CODE))
{
Asn1Error << "UserKeyingMaterials::BDec: ERROR - wrong tag" << endl;
- longjmp (env, -217);
+ SnaccExcep::throwMe(-217);
}
elmtLen1 = BDecLen (b, bytesDecoded, env);
BDecContent (b, tag, elmtLen1, bytesDecoded, env);
&& (tag1 != MAKE_TAG_ID (UNIV, CONS, OCTETSTRING_TAG_CODE)))
{
Asn1Error << "Unexpected Tag" << endl;
- longjmp (env, -218);
+ SnaccExcep::throwMe(-218);
}
elmtLen1 = BDecLen (b, listBytesDecoded, env);
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -219);
+ SnaccExcep::throwMe(-219);
}
if ((tag1 == MAKE_TAG_ID (UNIV, PRIM, OCTETSTRING_TAG_CODE))
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -220);
+ SnaccExcep::throwMe(-220);
}
bytesDecoded += seqBytesDecoded;
else if (seqBytesDecoded != elmtLen0)
{
Asn1Error << "ERROR - Length discrepancy on sequence." << endl;
- longjmp (env, -221);
+ SnaccExcep::throwMe(-221);
}
else
return;
if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE))
{
Asn1Error << "RC2CBCParameter::BDec: ERROR - wrong tag" << endl;
- longjmp (env, -222);
+ SnaccExcep::throwMe(-222);
}
elmtLen1 = BDecLen (b, bytesDecoded, env);
BDecContent (b, tag, elmtLen1, bytesDecoded, env);
}
-int RC2CBCParameter::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
-{
- bytesEncoded = BEnc (b);
- return !b.WriteError();
-}
-
-int RC2CBCParameter::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
-{
- ENV_TYPE env;
- int val;
-
- bytesDecoded = 0;
- if ((val = setjmp (env)) == 0)
- {
- BDec (b, bytesDecoded, env);
- return !b.ReadError();
- }
- else
- return false;
-}
-
void RC2CBCParameter::Print (ostream &os) const
{
#ifndef NDEBUG
default:
Asn1Error << "ERROR - unexpected tag in CHOICE" << endl;
- longjmp (env, -223);
+ SnaccExcep::throwMe(-223);
break;
} // end switch
} // ExtendedCertificateOrCertificate::BDecContent
BDecContent (b, tag, elmtLen, bytesDecoded, env);
}
-int ExtendedCertificateOrCertificate::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
-{
- bytesEncoded = BEnc (b);
- return !b.WriteError();
-}
-
-int ExtendedCertificateOrCertificate::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
-{
- ENV_TYPE env;
- int val;
-
- bytesDecoded = 0;
- if ((val = setjmp (env)) == 0)
- {
- BDec (b, bytesDecoded, env);
- return !b.ReadError();
- }
- else
- return false;
-}
-
void ExtendedCertificateOrCertificate::Print (ostream &os) const
{
#ifndef NDEBUG
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -224);
+ SnaccExcep::throwMe(-224);
}
if ((tag1 == MAKE_TAG_ID (UNIV, PRIM, OCTETSTRING_TAG_CODE))
else
{
Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
- longjmp (env, -225);
+ SnaccExcep::throwMe(-225);
}
bytesDecoded += seqBytesDecoded;
else if (seqBytesDecoded != elmtLen0)
{
Asn1Error << "ERROR - Length discrepancy on sequence." << endl;
- longjmp (env, -226);
+ SnaccExcep::throwMe(-226);
}
else
return;
if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE))
{
Asn1Error << "DigestInfo::BDec: ERROR - wrong tag" << endl;
- longjmp (env, -227);
+ SnaccExcep::throwMe(-227);
}
elmtLen1 = BDecLen (b, bytesDecoded, env);
BDecContent (b, tag, elmtLen1, bytesDecoded, env);
}
-int DigestInfo::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
-{
- bytesEncoded = BEnc (b);
- return !b.WriteError();
-}
-
-int DigestInfo::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
-{
- ENV_TYPE env;
- int val;
-
- bytesDecoded = 0;
- if ((val = setjmp (env)) == 0)
- {
- BDec (b, bytesDecoded, env);
- return !b.ReadError();
- }
- else
- return false;
-}
-
void DigestInfo::Print (ostream &os) const
{
#ifndef NDEBUG