/*
* certificate.c
* "AuthenticationFramework" ASN.1 module encode/decode/extracting/matching/free C src.
- * This file was generated by modified eSMACC compiler Tue Nov 23 23:28:16 2004
+ * This file was generated by modified eSMACC compiler Sun Dec 5 19:16:59 2004
* The generated files are supposed to be compiled as a module for OpenLDAP Software
*/
AsnLen *bytesDecoded _AND_
int mode)
{
- int seqDone = FALSE, old_mode = mode;
+ int seqDone = FALSE;
AsnLen totalElmtsLen1 = 0;
AsnLen elmtLen1;
AsnTag tagId1;
int mandatoryElmtCount1 = 0;
+ int old_mode = mode;
+ int rc;
ComponentAlgorithmIdentifier *k, *t, c_temp;
if (((tagId1 == MAKE_TAG_ID (UNIV, PRIM, OID_TAG_CODE))))
{
elmtLen1 = BDecLen (b, &totalElmtsLen1 );
- BDecComponentOid (mem_op, b, tagId1, elmtLen1, (&k->algorithm), &totalElmtsLen1, mode);
+ rc = BDecComponentOid (mem_op, b, tagId1, elmtLen1, (&k->algorithm), &totalElmtsLen1, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
(&k->algorithm)->identifier.bv_val = (&k->algorithm)->id_buf;
(&k->algorithm)->identifier.bv_len = strlen("algorithm");
strcpy( (&k->algorithm)->identifier.bv_val, "algorithm");
if (!seqDone) {
- SetAnyTypeByComponentOid ((&k->parameters), (&k->algorithm));
- BDecComponentAnyDefinedBy (mem_op,b, (&k->parameters), &totalElmtsLen1, mode );
+ rc = SetAnyTypeByComponentOid ((&k->parameters), (&k->algorithm));
+ rc = BDecComponentAnyDefinedBy (mem_op,b, (&k->parameters), &totalElmtsLen1, mode );
+ if ( rc != LDAP_SUCCESS ) return rc;
(&k->parameters)->identifier.bv_val = (&k->parameters)->id_buf;
(&k->parameters)->identifier.bv_len = strlen("parameters");
strcpy( (&k->parameters)->identifier.bv_val, "parameters");
return LDAP_PROTOCOL_ERROR;
}
if ( strncmp( peek_head, "algorithm", strlen("algorithm") ) == 0 ) {
- GDecComponentOid (mem_op, b, (&k->algorithm), bytesDecoded, mode);
+ rc = GDecComponentOid (mem_op, b, (&k->algorithm), bytesDecoded, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
(&k->algorithm)->identifier.bv_val = peek_head;
(&k->algorithm)->identifier.bv_len = strLen;
if( !(strLen = LocateNextGSERToken(mem_op,b,&peek_head,GSER_NO_COPY)) ){
}
}
if ( strncmp( peek_head, "parameters", strlen("parameters") ) == 0 ) {
- SetAnyTypeByComponentOid ((&k->parameters), (&k->algorithm));
- GDecComponentAnyDefinedBy (mem_op, b, (&k->parameters), bytesDecoded, mode );
+ rc = SetAnyTypeByComponentOid ((&k->parameters), (&k->algorithm));
+ rc = GDecComponentAnyDefinedBy (mem_op, b, (&k->parameters), bytesDecoded, mode );
+ if ( rc != LDAP_SUCCESS ) return rc;
(&k->parameters)->identifier.bv_val = peek_head;
(&k->parameters)->identifier.bv_len = strLen;
}
AsnLen *bytesDecoded _AND_
int mode)
{
- int seqDone = FALSE, old_mode = mode;
+ int seqDone = FALSE;
AsnLen totalElmtsLen1 = 0;
AsnLen elmtLen1;
AsnTag tagId1;
int mandatoryElmtCount1 = 0;
+ int old_mode = mode;
+ int rc;
ComponentTime *k, *t, c_temp;
case MAKE_TAG_ID (UNIV, PRIM, UTCTIME_TAG_CODE):
case MAKE_TAG_ID (UNIV, CONS, UTCTIME_TAG_CODE):
(k->choiceId) = TIME_UTCTIME;
- BDecComponentUTCTime (mem_op, b, tagId0, elmtLen0, (&k->a.utcTime), &totalElmtsLen1, DEC_ALLOC_MODE_0 );
+ rc = BDecComponentUTCTime (mem_op, b, tagId0, elmtLen0, (&k->a.utcTime), &totalElmtsLen1, DEC_ALLOC_MODE_0 );
+ if ( rc != LDAP_SUCCESS ) return rc;
(k->a.utcTime)->identifier.bv_val = (k->a.utcTime)->id_buf;
(k->a.utcTime)->identifier.bv_len = strlen("utcTime");
strcpy( (k->a.utcTime)->identifier.bv_val, "utcTime");
case MAKE_TAG_ID (UNIV, PRIM, GENERALIZEDTIME_TAG_CODE):
case MAKE_TAG_ID (UNIV, CONS, GENERALIZEDTIME_TAG_CODE):
(k->choiceId) = TIME_GENERALIZEDTIME;
- BDecComponentGeneralizedTime (mem_op, b, tagId0, elmtLen0, (&k->a.generalizedTime), &totalElmtsLen1, DEC_ALLOC_MODE_0 );
+ rc = BDecComponentGeneralizedTime (mem_op, b, tagId0, elmtLen0, (&k->a.generalizedTime), &totalElmtsLen1, DEC_ALLOC_MODE_0 );
+ if ( rc != LDAP_SUCCESS ) return rc;
(k->a.generalizedTime)->identifier.bv_val = (k->a.generalizedTime)->id_buf;
(k->a.generalizedTime)->identifier.bv_len = strlen("generalizedTime");
strcpy( (k->a.generalizedTime)->identifier.bv_val, "generalizedTime");
AsnLen *bytesDecoded _AND_
int mode)
{
- int seqDone = FALSE, old_mode = mode;
+ int seqDone = FALSE;
AsnLen totalElmtsLen1 = 0;
AsnLen elmtLen1;
AsnTag tagId1;
int mandatoryElmtCount1 = 0;
+ int old_mode = mode;
+ int rc;
ComponentExtension *k, *t, c_temp;
if (((tagId1 == MAKE_TAG_ID (UNIV, PRIM, OID_TAG_CODE))))
{
elmtLen1 = BDecLen (b, &totalElmtsLen1 );
- BDecComponentOid (mem_op, b, tagId1, elmtLen1, (&k->extnID), &totalElmtsLen1, mode);
+ rc = BDecComponentOid (mem_op, b, tagId1, elmtLen1, (&k->extnID), &totalElmtsLen1, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
(&k->extnID)->identifier.bv_val = (&k->extnID)->id_buf;
(&k->extnID)->identifier.bv_len = strlen("extnID");
strcpy( (&k->extnID)->identifier.bv_val, "extnID");
(tagId1 == MAKE_TAG_ID (UNIV, CONS, OCTETSTRING_TAG_CODE))))
{
elmtLen1 = BDecLen (b, &totalElmtsLen1 );
- BDecComponentOcts (mem_op, b, tagId1, elmtLen1, (&k->extnValue), &totalElmtsLen1, mode);
+ rc = BDecComponentOcts (mem_op, b, tagId1, elmtLen1, (&k->extnValue), &totalElmtsLen1, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
(&k->extnValue)->identifier.bv_val = (&k->extnValue)->id_buf;
(&k->extnValue)->identifier.bv_len = strlen("extnValue");
strcpy( (&k->extnValue)->identifier.bv_val, "extnValue");
return LDAP_PROTOCOL_ERROR;
}
if ( strncmp( peek_head, "extnID", strlen("extnID") ) == 0 ) {
- GDecComponentOid (mem_op, b, (&k->extnID), bytesDecoded, mode);
+ rc = GDecComponentOid (mem_op, b, (&k->extnID), bytesDecoded, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
(&k->extnID)->identifier.bv_val = peek_head;
(&k->extnID)->identifier.bv_len = strLen;
if( !(strLen = LocateNextGSERToken(mem_op,b,&peek_head,GSER_NO_COPY)) ){
}
}
if ( strncmp( peek_head, "extnValue", strlen("extnValue") ) == 0 ) {
- GDecComponentOcts (mem_op, b, (&k->extnValue), bytesDecoded, mode);
+ rc = GDecComponentOcts (mem_op, b, (&k->extnValue), bytesDecoded, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
(&k->extnValue)->identifier.bv_val = peek_head;
(&k->extnValue)->identifier.bv_len = strLen;
}
AsnLen *bytesDecoded _AND_
int mode)
{
- int seqDone = FALSE, old_mode = mode;
+ int seqDone = FALSE;
AsnLen totalElmtsLen1 = 0;
AsnLen elmtLen1;
AsnTag tagId1;
int mandatoryElmtCount1 = 0;
+ int old_mode = mode;
+ int rc;
ComponentAttributeTypeAndValue *k, *t, c_temp;
if (((tagId1 == MAKE_TAG_ID (UNIV, PRIM, OID_TAG_CODE))))
{
elmtLen1 = BDecLen (b, &totalElmtsLen1 );
- BDecComponentAttributeType (mem_op, b, tagId1, elmtLen1, (&k->type), &totalElmtsLen1, mode);
+ rc = BDecComponentAttributeType (mem_op, b, tagId1, elmtLen1, (&k->type), &totalElmtsLen1, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
(&k->type)->identifier.bv_val = (&k->type)->id_buf;
(&k->type)->identifier.bv_len = strlen("type");
strcpy( (&k->type)->identifier.bv_val, "type");
{
- SetAnyTypeByComponentOid ((&k->value), (&k->type));
- BDecComponentAnyDefinedBy (mem_op,b, (&k->value), &totalElmtsLen1, mode );
+ rc = SetAnyTypeByComponentOid ((&k->value), (&k->type));
+ rc = BDecComponentAnyDefinedBy (mem_op,b, (&k->value), &totalElmtsLen1, mode );
+ if ( rc != LDAP_SUCCESS ) return rc;
(&k->value)->identifier.bv_val = (&k->value)->id_buf;
(&k->value)->identifier.bv_len = strlen("value");
strcpy( (&k->value)->identifier.bv_val, "value");
return LDAP_PROTOCOL_ERROR;
}
if ( strncmp( peek_head, "type", strlen("type") ) == 0 ) {
- GDecComponentAttributeType (mem_op, b, (&k->type), bytesDecoded, mode);
+ rc = GDecComponentAttributeType (mem_op, b, (&k->type), bytesDecoded, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
(&k->type)->identifier.bv_val = peek_head;
(&k->type)->identifier.bv_len = strLen;
if( !(strLen = LocateNextGSERToken(mem_op,b,&peek_head,GSER_NO_COPY)) ){
}
}
if ( strncmp( peek_head, "value", strlen("value") ) == 0 ) {
- SetAnyTypeByComponentOid ((&k->value), (&k->type));
- GDecComponentAnyDefinedBy (mem_op, b, (&k->value), bytesDecoded, mode );
+ rc = SetAnyTypeByComponentOid ((&k->value), (&k->type));
+ rc = GDecComponentAnyDefinedBy (mem_op, b, (&k->value), bytesDecoded, mode );
+ if ( rc != LDAP_SUCCESS ) return rc;
(&k->value)->identifier.bv_val = peek_head;
(&k->value)->identifier.bv_len = strLen;
}
AsnLen *bytesDecoded _AND_
int mode)
{
- int seqDone = FALSE, old_mode = mode;
+ int seqDone = FALSE;
AsnLen totalElmtsLen1 = 0;
AsnLen elmtLen1;
AsnTag tagId1;
AsnLen totalElmtsLen2 = 0;
AsnLen elmtLen2;
AsnTag tagId2;
+ int old_mode = mode;
+ int rc;
ComponentValidity *k, *t, c_temp;
(tagId1 == MAKE_TAG_ID (UNIV, CONS, GENERALIZEDTIME_TAG_CODE))))
{
elmtLen1 = BDecLen (b, &totalElmtsLen1 );
- BDecComponentTime (mem_op, b, tagId1, elmtLen1, (&k->notBefore), &totalElmtsLen1, mode);
+ rc = BDecComponentTime (mem_op, b, tagId1, elmtLen1, (&k->notBefore), &totalElmtsLen1, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
(k->notBefore)->identifier.bv_val = (k->notBefore)->id_buf;
(k->notBefore)->identifier.bv_len = strlen("notBefore");
strcpy( (k->notBefore)->identifier.bv_val, "notBefore");
(tagId1 == MAKE_TAG_ID (UNIV, CONS, GENERALIZEDTIME_TAG_CODE))))
{
elmtLen1 = BDecLen (b, &totalElmtsLen1 );
- BDecComponentTime (mem_op, b, tagId1, elmtLen1, (&k->notAfter), &totalElmtsLen1, mode);
+ rc = BDecComponentTime (mem_op, b, tagId1, elmtLen1, (&k->notAfter), &totalElmtsLen1, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
(k->notAfter)->identifier.bv_val = (k->notAfter)->id_buf;
(k->notAfter)->identifier.bv_len = strlen("notAfter");
strcpy( (k->notAfter)->identifier.bv_val, "notAfter");
return LDAP_PROTOCOL_ERROR;
}
if ( strncmp( peek_head, "notBefore", strlen("notBefore") ) == 0 ) {
- GDecComponentTime (mem_op, b, (&k->notBefore), bytesDecoded, mode);
+ rc = GDecComponentTime (mem_op, b, (&k->notBefore), bytesDecoded, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
( k->notBefore)->identifier.bv_val = peek_head;
( k->notBefore)->identifier.bv_len = strLen;
if( !(strLen = LocateNextGSERToken(mem_op,b,&peek_head,GSER_NO_COPY)) ){
}
}
if ( strncmp( peek_head, "notAfter", strlen("notAfter") ) == 0 ) {
- GDecComponentTime (mem_op, b, (&k->notAfter), bytesDecoded, mode);
+ rc = GDecComponentTime (mem_op, b, (&k->notAfter), bytesDecoded, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
( k->notAfter)->identifier.bv_val = peek_head;
( k->notAfter)->identifier.bv_len = strLen;
}
AsnLen *bytesDecoded _AND_
int mode)
{
- int seqDone = FALSE, old_mode = mode;
+ int seqDone = FALSE;
AsnLen totalElmtsLen1 = 0;
AsnLen elmtLen1;
AsnTag tagId1;
int mandatoryElmtCount1 = 0;
+ int old_mode = mode;
+ int rc;
ComponentSubjectPublicKeyInfo *k, *t, c_temp;
if (((tagId1 == MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE))))
{
elmtLen1 = BDecLen (b, &totalElmtsLen1 );
- BDecComponentAlgorithmIdentifier (mem_op, b, tagId1, elmtLen1, (&k->algorithm), &totalElmtsLen1, mode);
+ rc = BDecComponentAlgorithmIdentifier (mem_op, b, tagId1, elmtLen1, (&k->algorithm), &totalElmtsLen1, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
(k->algorithm)->identifier.bv_val = (k->algorithm)->id_buf;
(k->algorithm)->identifier.bv_len = strlen("algorithm");
strcpy( (k->algorithm)->identifier.bv_val, "algorithm");
(tagId1 == MAKE_TAG_ID (UNIV, CONS, BITSTRING_TAG_CODE))))
{
elmtLen1 = BDecLen (b, &totalElmtsLen1 );
- BDecComponentBits (mem_op, b, tagId1, elmtLen1, (&k->subjectPublicKey), &totalElmtsLen1, mode);
+ rc = BDecComponentBits (mem_op, b, tagId1, elmtLen1, (&k->subjectPublicKey), &totalElmtsLen1, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
(&k->subjectPublicKey)->identifier.bv_val = (&k->subjectPublicKey)->id_buf;
(&k->subjectPublicKey)->identifier.bv_len = strlen("subjectPublicKey");
strcpy( (&k->subjectPublicKey)->identifier.bv_val, "subjectPublicKey");
return LDAP_PROTOCOL_ERROR;
}
if ( strncmp( peek_head, "algorithm", strlen("algorithm") ) == 0 ) {
- GDecComponentAlgorithmIdentifier (mem_op, b, (&k->algorithm), bytesDecoded, mode);
+ rc = GDecComponentAlgorithmIdentifier (mem_op, b, (&k->algorithm), bytesDecoded, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
( k->algorithm)->identifier.bv_val = peek_head;
( k->algorithm)->identifier.bv_len = strLen;
if( !(strLen = LocateNextGSERToken(mem_op,b,&peek_head,GSER_NO_COPY)) ){
}
}
if ( strncmp( peek_head, "subjectPublicKey", strlen("subjectPublicKey") ) == 0 ) {
- GDecComponentBits (mem_op, b, (&k->subjectPublicKey), bytesDecoded, mode);
+ rc = GDecComponentBits (mem_op, b, (&k->subjectPublicKey), bytesDecoded, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
(&k->subjectPublicKey)->identifier.bv_val = peek_head;
(&k->subjectPublicKey)->identifier.bv_len = strLen;
}
AsnLen *bytesDecoded _AND_
int mode)
{
- int seqDone = FALSE, old_mode = mode;
+ int seqDone = FALSE;
AsnLen totalElmtsLen1 = 0;
AsnLen elmtLen1;
AsnTag tagId1;
int mandatoryElmtCount1 = 0;
+ int old_mode = mode;
+ int rc;
ComponentExtensions *k, *t, c_temp;
if ((tagId1 == MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE)))
{
elmtLen1 = BDecLen (b, &totalElmtsLen1 );
- tmpVar = (ComponentExtension**) AsnListAppend (&k->comp_list);
- BDecComponentExtension (mem_op, b, tagId1, elmtLen1, tmpVar, &totalElmtsLen1, mode);
+ tmpVar = (ComponentExtension**) CompAsnListAppend (mem_op,&k->comp_list);
+ rc = BDecComponentExtension (mem_op, b, tagId1, elmtLen1, tmpVar, &totalElmtsLen1, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
} /* end of tag check if */
else /* wrong tag */
{
if( !(*peek_head == '{' || *peek_head ==',') ) {
return LDAP_PROTOCOL_ERROR;
}
- tmpVar = (ComponentExtension**) AsnListAppend (&k->comp_list);
+ tmpVar = (ComponentExtension**) CompAsnListAppend (mem_op, &k->comp_list);
if ( tmpVar == NULL ) {
Asn1Error("Error during Reading{ in encoding");
return LDAP_PROTOCOL_ERROR;
}
- GDecComponentExtension (mem_op, b, tmpVar, bytesDecoded, mode);
+ rc = GDecComponentExtension (mem_op, b, tmpVar, bytesDecoded, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
} /* end of for */
if( !(old_mode & DEC_ALLOC_MODE_1) ) {
AsnLen *bytesDecoded _AND_
int mode)
{
- int seqDone = FALSE, old_mode = mode;
+ int seqDone = FALSE;
AsnLen totalElmtsLen1 = 0;
AsnLen elmtLen1;
AsnTag tagId1;
int mandatoryElmtCount1 = 0;
+ int old_mode = mode;
+ int rc;
ComponentRelativeDistinguishedName *k, *t, c_temp;
if ((tagId1 == MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE)))
{
elmtLen1 = BDecLen (b, &totalElmtsLen1 );
- tmpVar = (ComponentAttributeTypeAndValue**) AsnListAppend (&k->comp_list);
- BDecComponentAttributeTypeAndValue (mem_op, b, tagId1, elmtLen1, tmpVar, &totalElmtsLen1, mode);
+ tmpVar = (ComponentAttributeTypeAndValue**) CompAsnListAppend (mem_op,&k->comp_list);
+ rc = BDecComponentAttributeTypeAndValue (mem_op, b, tagId1, elmtLen1, tmpVar, &totalElmtsLen1, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
} /* end of tag check if */
else /* wrong tag */
{
t->comp_desc->cd_free = (comp_free_func*)NULL;
t->comp_desc->cd_extract_i = (extract_component_from_id_func*)ExtractingComponentRelativeDistinguishedName;
t->comp_desc->cd_type = ASN_COMPOSITE;
- t->comp_desc->cd_type_id = RelativeDistinguishedName ;
+ t->comp_desc->cd_type_id = RelativeDistinguishedName;
t->comp_desc->cd_all_match = (allcomponent_matching_func*)MatchingComponentRelativeDistinguishedName;
(*bytesDecoded) += totalElmtsLen1;
return LDAP_SUCCESS;
if( !(*peek_head == '{' || *peek_head ==',') ) {
return LDAP_PROTOCOL_ERROR;
}
- tmpVar = (ComponentAttributeTypeAndValue**) AsnListAppend (&k->comp_list);
+ tmpVar = (ComponentAttributeTypeAndValue**) CompAsnListAppend (mem_op, &k->comp_list);
if ( tmpVar == NULL ) {
Asn1Error("Error during Reading{ in encoding");
return LDAP_PROTOCOL_ERROR;
}
- GDecComponentAttributeTypeAndValue (mem_op, b, tmpVar, bytesDecoded, mode);
+ rc = GDecComponentAttributeTypeAndValue (mem_op, b, tmpVar, bytesDecoded, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
} /* end of for */
if( !(old_mode & DEC_ALLOC_MODE_1) ) {
t->comp_desc->cd_free = (comp_free_func*)NULL;
t->comp_desc->cd_extract_i = (extract_component_from_id_func*)ExtractingComponentRelativeDistinguishedName;
t->comp_desc->cd_type = ASN_COMPOSITE;
- t->comp_desc->cd_type_id = RelativeDistinguishedName ;
+ t->comp_desc->cd_type_id = RelativeDistinguishedName;
t->comp_desc->cd_all_match = (allcomponent_matching_func*)MatchingComponentRelativeDistinguishedName;
return LDAP_SUCCESS;
} /* GDecRelativeDistinguishedNameContent */
AsnLen *bytesDecoded _AND_
int mode)
{
- int seqDone = FALSE, old_mode = mode;
+ int seqDone = FALSE;
AsnLen totalElmtsLen1 = 0;
AsnLen elmtLen1;
AsnTag tagId1;
int mandatoryElmtCount1 = 0;
+ int old_mode = mode;
+ int rc;
ComponentRDNSequence *k, *t, c_temp;
if ((tagId1 == MAKE_TAG_ID (UNIV, CONS, SET_TAG_CODE)))
{
elmtLen1 = BDecLen (b, &totalElmtsLen1 );
- tmpVar = (ComponentRelativeDistinguishedName**) AsnListAppend (&k->comp_list);
- BDecComponentRelativeDistinguishedName (mem_op, b, tagId1, elmtLen1, tmpVar, &totalElmtsLen1, mode);
+ tmpVar = (ComponentRelativeDistinguishedName**) CompAsnListAppend (mem_op,&k->comp_list);
+ rc = BDecComponentRelativeDistinguishedName (mem_op, b, tagId1, elmtLen1, tmpVar, &totalElmtsLen1, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
} /* end of tag check if */
else /* wrong tag */
{
if( !(*peek_head == '{' || *peek_head ==',') ) {
return LDAP_PROTOCOL_ERROR;
}
- tmpVar = (ComponentRelativeDistinguishedName**) AsnListAppend (&k->comp_list);
+ tmpVar = (ComponentRelativeDistinguishedName**) CompAsnListAppend (mem_op, &k->comp_list);
if ( tmpVar == NULL ) {
Asn1Error("Error during Reading{ in encoding");
return LDAP_PROTOCOL_ERROR;
}
- GDecComponentRelativeDistinguishedName (mem_op, b, tmpVar, bytesDecoded, mode);
+ rc = GDecComponentRelativeDistinguishedName (mem_op, b, tmpVar, bytesDecoded, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
} /* end of for */
if( !(old_mode & DEC_ALLOC_MODE_1) ) {
AsnLen *bytesDecoded _AND_
int mode)
{
- int seqDone = FALSE, old_mode = mode;
+ int seqDone = FALSE;
AsnLen totalElmtsLen1 = 0;
AsnLen elmtLen1;
AsnTag tagId1;
int mandatoryElmtCount1 = 0;
+ int old_mode = mode;
+ int rc;
ComponentName *k, *t, c_temp;
{
case MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE):
(k->choiceId) = NAME_RDNSEQUENCE;
- BDecComponentRDNSequence (mem_op, b, tagId0, elmtLen0, (&k->a.rdnSequence), &totalElmtsLen1, mode);
+ rc = BDecComponentRDNSequence (mem_op, b, tagId0, elmtLen0, (&k->a.rdnSequence), &totalElmtsLen1, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
(k->a.rdnSequence)->identifier.bv_val = (k->a.rdnSequence)->id_buf;
(k->a.rdnSequence)->identifier.bv_len = strlen("rdnSequence");
strcpy( (k->a.rdnSequence)->identifier.bv_val, "rdnSequence");
AsnLen *bytesDecoded _AND_
int mode)
{
- int seqDone = FALSE, old_mode = mode;
+ int seqDone = FALSE;
AsnLen totalElmtsLen1 = 0;
AsnLen elmtLen1;
AsnTag tagId1;
AsnLen totalElmtsLen2 = 0;
AsnLen elmtLen2;
AsnTag tagId2;
+ int old_mode = mode;
+ int rc;
ComponentTBSCertificate *k, *t, c_temp;
}
elmtLen2 = BDecLen (b, &totalElmtsLen1 );
- BDecComponentVersion (mem_op, b, tagId2, elmtLen2, (&k->version), &totalElmtsLen1, DEC_ALLOC_MODE_0 );
+ rc = BDecComponentVersion (mem_op, b, tagId2, elmtLen2, (&k->version), &totalElmtsLen1, DEC_ALLOC_MODE_0 );
+ if ( rc != LDAP_SUCCESS ) return rc;
(k->version)->identifier.bv_val = (k->version)->id_buf;
(k->version)->identifier.bv_len = strlen("version");
strcpy( (k->version)->identifier.bv_val, "version");
if (((tagId1 == MAKE_TAG_ID (UNIV, PRIM, INTEGER_TAG_CODE))))
{
elmtLen1 = BDecLen (b, &totalElmtsLen1 );
- BDecComponentCertificateSerialNumber (mem_op, b, tagId1, elmtLen1, (&k->serialNumber), &totalElmtsLen1, mode);
+ rc = BDecComponentCertificateSerialNumber (mem_op, b, tagId1, elmtLen1, (&k->serialNumber), &totalElmtsLen1, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
(&k->serialNumber)->identifier.bv_val = (&k->serialNumber)->id_buf;
(&k->serialNumber)->identifier.bv_len = strlen("serialNumber");
strcpy( (&k->serialNumber)->identifier.bv_val, "serialNumber");
if (((tagId1 == MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE))))
{
elmtLen1 = BDecLen (b, &totalElmtsLen1 );
- BDecComponentAlgorithmIdentifier (mem_op, b, tagId1, elmtLen1, (&k->signature), &totalElmtsLen1, mode);
+ rc = BDecComponentAlgorithmIdentifier (mem_op, b, tagId1, elmtLen1, (&k->signature), &totalElmtsLen1, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
(k->signature)->identifier.bv_val = (k->signature)->id_buf;
(k->signature)->identifier.bv_len = strlen("signature");
strcpy( (k->signature)->identifier.bv_val, "signature");
if (((tagId1 == MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE))))
{
elmtLen1 = BDecLen (b, &totalElmtsLen1 );
- BDecComponentName (mem_op, b, tagId1, elmtLen1, (&k->issuer), &totalElmtsLen1, mode);
+ rc = BDecComponentName (mem_op, b, tagId1, elmtLen1, (&k->issuer), &totalElmtsLen1, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
(k->issuer)->identifier.bv_val = (k->issuer)->id_buf;
(k->issuer)->identifier.bv_len = strlen("issuer");
strcpy( (k->issuer)->identifier.bv_val, "issuer");
if (((tagId1 == MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE))))
{
elmtLen1 = BDecLen (b, &totalElmtsLen1 );
- BDecComponentValidity (mem_op, b, tagId1, elmtLen1, (&k->validity), &totalElmtsLen1, mode);
+ rc = BDecComponentValidity (mem_op, b, tagId1, elmtLen1, (&k->validity), &totalElmtsLen1, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
(k->validity)->identifier.bv_val = (k->validity)->id_buf;
(k->validity)->identifier.bv_len = strlen("validity");
strcpy( (k->validity)->identifier.bv_val, "validity");
if (((tagId1 == MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE))))
{
elmtLen1 = BDecLen (b, &totalElmtsLen1 );
- BDecComponentName (mem_op, b, tagId1, elmtLen1, (&k->subject), &totalElmtsLen1, mode);
+ rc = BDecComponentName (mem_op, b, tagId1, elmtLen1, (&k->subject), &totalElmtsLen1, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
(k->subject)->identifier.bv_val = (k->subject)->id_buf;
(k->subject)->identifier.bv_len = strlen("subject");
strcpy( (k->subject)->identifier.bv_val, "subject");
if (((tagId1 == MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE))))
{
elmtLen1 = BDecLen (b, &totalElmtsLen1 );
- BDecComponentSubjectPublicKeyInfo (mem_op, b, tagId1, elmtLen1, (&k->subjectPublicKeyInfo), &totalElmtsLen1, mode);
+ rc = BDecComponentSubjectPublicKeyInfo (mem_op, b, tagId1, elmtLen1, (&k->subjectPublicKeyInfo), &totalElmtsLen1, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
(k->subjectPublicKeyInfo)->identifier.bv_val = (k->subjectPublicKeyInfo)->id_buf;
(k->subjectPublicKeyInfo)->identifier.bv_len = strlen("subjectPublicKeyInfo");
strcpy( (k->subjectPublicKeyInfo)->identifier.bv_val, "subjectPublicKeyInfo");
(tagId1 == MAKE_TAG_ID (CNTX, CONS, 1))))
{
elmtLen1 = BDecLen (b, &totalElmtsLen1 );
- BDecComponentUniqueIdentifier (mem_op, b, tagId1, elmtLen1, (&k->issuerUniqueIdentifier), &totalElmtsLen1, mode);
+ rc = BDecComponentUniqueIdentifier (mem_op, b, tagId1, elmtLen1, (&k->issuerUniqueIdentifier), &totalElmtsLen1, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
(&k->issuerUniqueIdentifier)->identifier.bv_val = (&k->issuerUniqueIdentifier)->id_buf;
(&k->issuerUniqueIdentifier)->identifier.bv_len = strlen("issuerUniqueIdentifier");
strcpy( (&k->issuerUniqueIdentifier)->identifier.bv_val, "issuerUniqueIdentifier");
(tagId1 == MAKE_TAG_ID (CNTX, CONS, 2))))
{
elmtLen1 = BDecLen (b, &totalElmtsLen1 );
- BDecComponentUniqueIdentifier (mem_op, b, tagId1, elmtLen1, (&k->subjectUniqueIdentifier), &totalElmtsLen1, mode);
+ rc = BDecComponentUniqueIdentifier (mem_op, b, tagId1, elmtLen1, (&k->subjectUniqueIdentifier), &totalElmtsLen1, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
(&k->subjectUniqueIdentifier)->identifier.bv_val = (&k->subjectUniqueIdentifier)->id_buf;
(&k->subjectUniqueIdentifier)->identifier.bv_len = strlen("subjectUniqueIdentifier");
strcpy( (&k->subjectUniqueIdentifier)->identifier.bv_val, "subjectUniqueIdentifier");
}
elmtLen2 = BDecLen (b, &totalElmtsLen1 );
- BDecComponentExtensions (mem_op, b, tagId2, elmtLen2, (&k->extensions), &totalElmtsLen1, mode);
+ rc = BDecComponentExtensions (mem_op, b, tagId2, elmtLen2, (&k->extensions), &totalElmtsLen1, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
(k->extensions)->identifier.bv_val = (k->extensions)->id_buf;
(k->extensions)->identifier.bv_len = strlen("extensions");
strcpy( (k->extensions)->identifier.bv_val, "extensions");
return LDAP_PROTOCOL_ERROR;
}
if ( strncmp( peek_head, "version", strlen("version") ) == 0 ) {
- GDecComponentVersion (mem_op, b, (&k->version), bytesDecoded, DEC_ALLOC_MODE_0 );
+ rc = GDecComponentVersion (mem_op, b, (&k->version), bytesDecoded, DEC_ALLOC_MODE_0 );
+ if ( rc != LDAP_SUCCESS ) return rc;
( k->version)->identifier.bv_val = peek_head;
( k->version)->identifier.bv_len = strLen;
if( !(strLen = LocateNextGSERToken(mem_op,b,&peek_head,GSER_NO_COPY)) ){
(k->version)->value = 0;
}
if ( strncmp( peek_head, "serialNumber", strlen("serialNumber") ) == 0 ) {
- GDecComponentCertificateSerialNumber (mem_op, b, (&k->serialNumber), bytesDecoded, mode);
+ rc = GDecComponentCertificateSerialNumber (mem_op, b, (&k->serialNumber), bytesDecoded, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
(&k->serialNumber)->identifier.bv_val = peek_head;
(&k->serialNumber)->identifier.bv_len = strLen;
if( !(strLen = LocateNextGSERToken(mem_op,b,&peek_head,GSER_NO_COPY)) ){
}
}
if ( strncmp( peek_head, "signature", strlen("signature") ) == 0 ) {
- GDecComponentAlgorithmIdentifier (mem_op, b, (&k->signature), bytesDecoded, mode);
+ rc = GDecComponentAlgorithmIdentifier (mem_op, b, (&k->signature), bytesDecoded, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
( k->signature)->identifier.bv_val = peek_head;
( k->signature)->identifier.bv_len = strLen;
if( !(strLen = LocateNextGSERToken(mem_op,b,&peek_head,GSER_NO_COPY)) ){
}
}
if ( strncmp( peek_head, "issuer", strlen("issuer") ) == 0 ) {
- GDecComponentName (mem_op, b, (&k->issuer), bytesDecoded, mode);
+ rc = GDecComponentName (mem_op, b, (&k->issuer), bytesDecoded, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
( k->issuer)->identifier.bv_val = peek_head;
( k->issuer)->identifier.bv_len = strLen;
if( !(strLen = LocateNextGSERToken(mem_op,b,&peek_head,GSER_NO_COPY)) ){
}
}
if ( strncmp( peek_head, "validity", strlen("validity") ) == 0 ) {
- GDecComponentValidity (mem_op, b, (&k->validity), bytesDecoded, mode);
+ rc = GDecComponentValidity (mem_op, b, (&k->validity), bytesDecoded, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
( k->validity)->identifier.bv_val = peek_head;
( k->validity)->identifier.bv_len = strLen;
if( !(strLen = LocateNextGSERToken(mem_op,b,&peek_head,GSER_NO_COPY)) ){
}
}
if ( strncmp( peek_head, "subject", strlen("subject") ) == 0 ) {
- GDecComponentName (mem_op, b, (&k->subject), bytesDecoded, mode);
+ rc = GDecComponentName (mem_op, b, (&k->subject), bytesDecoded, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
( k->subject)->identifier.bv_val = peek_head;
( k->subject)->identifier.bv_len = strLen;
if( !(strLen = LocateNextGSERToken(mem_op,b,&peek_head,GSER_NO_COPY)) ){
}
}
if ( strncmp( peek_head, "subjectPublicKeyInfo", strlen("subjectPublicKeyInfo") ) == 0 ) {
- GDecComponentSubjectPublicKeyInfo (mem_op, b, (&k->subjectPublicKeyInfo), bytesDecoded, mode);
+ rc = GDecComponentSubjectPublicKeyInfo (mem_op, b, (&k->subjectPublicKeyInfo), bytesDecoded, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
( k->subjectPublicKeyInfo)->identifier.bv_val = peek_head;
( k->subjectPublicKeyInfo)->identifier.bv_len = strLen;
if( !(strLen = LocateNextGSERToken(mem_op,b,&peek_head,GSER_NO_COPY)) ){
}
}
if ( strncmp( peek_head, "issuerUniqueIdentifier", strlen("issuerUniqueIdentifier") ) == 0 ) {
- GDecComponentUniqueIdentifier (mem_op, b, (&k->issuerUniqueIdentifier), bytesDecoded, mode);
+ rc = GDecComponentUniqueIdentifier (mem_op, b, (&k->issuerUniqueIdentifier), bytesDecoded, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
(&k->issuerUniqueIdentifier)->identifier.bv_val = peek_head;
(&k->issuerUniqueIdentifier)->identifier.bv_len = strLen;
if( !(strLen = LocateNextGSERToken(mem_op,b,&peek_head,GSER_NO_COPY)) ){
}
}
if ( strncmp( peek_head, "subjectUniqueIdentifier", strlen("subjectUniqueIdentifier") ) == 0 ) {
- GDecComponentUniqueIdentifier (mem_op, b, (&k->subjectUniqueIdentifier), bytesDecoded, mode);
+ rc = GDecComponentUniqueIdentifier (mem_op, b, (&k->subjectUniqueIdentifier), bytesDecoded, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
(&k->subjectUniqueIdentifier)->identifier.bv_val = peek_head;
(&k->subjectUniqueIdentifier)->identifier.bv_len = strLen;
if( !(strLen = LocateNextGSERToken(mem_op,b,&peek_head,GSER_NO_COPY)) ){
}
}
if ( strncmp( peek_head, "extensions", strlen("extensions") ) == 0 ) {
- GDecComponentExtensions (mem_op, b, (&k->extensions), bytesDecoded, mode);
+ rc = GDecComponentExtensions (mem_op, b, (&k->extensions), bytesDecoded, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
( k->extensions)->identifier.bv_val = peek_head;
( k->extensions)->identifier.bv_len = strLen;
}
AsnLen *bytesDecoded _AND_
int mode)
{
- int seqDone = FALSE, old_mode = mode;
+ int seqDone = FALSE;
AsnLen totalElmtsLen1 = 0;
AsnLen elmtLen1;
AsnTag tagId1;
int mandatoryElmtCount1 = 0;
+ int old_mode = mode;
+ int rc;
ComponentCertificate *k, *t, c_temp;
if (((tagId1 == MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE))))
{
elmtLen1 = BDecLen (b, &totalElmtsLen1 );
- BDecComponentTBSCertificate (mem_op, b, tagId1, elmtLen1, (&k->tbsCertificate), &totalElmtsLen1, mode);
+ rc = BDecComponentTBSCertificate (mem_op, b, tagId1, elmtLen1, (&k->tbsCertificate), &totalElmtsLen1, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
(k->tbsCertificate)->identifier.bv_val = (k->tbsCertificate)->id_buf;
(k->tbsCertificate)->identifier.bv_len = strlen("tbsCertificate");
strcpy( (k->tbsCertificate)->identifier.bv_val, "tbsCertificate");
if (((tagId1 == MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE))))
{
elmtLen1 = BDecLen (b, &totalElmtsLen1 );
- BDecComponentAlgorithmIdentifier (mem_op, b, tagId1, elmtLen1, (&k->signatureAlgorithm), &totalElmtsLen1, mode);
+ rc = BDecComponentAlgorithmIdentifier (mem_op, b, tagId1, elmtLen1, (&k->signatureAlgorithm), &totalElmtsLen1, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
(k->signatureAlgorithm)->identifier.bv_val = (k->signatureAlgorithm)->id_buf;
(k->signatureAlgorithm)->identifier.bv_len = strlen("signatureAlgorithm");
strcpy( (k->signatureAlgorithm)->identifier.bv_val, "signatureAlgorithm");
(tagId1 == MAKE_TAG_ID (UNIV, CONS, BITSTRING_TAG_CODE))))
{
elmtLen1 = BDecLen (b, &totalElmtsLen1 );
- BDecComponentBits (mem_op, b, tagId1, elmtLen1, (&k->signature), &totalElmtsLen1, mode);
+ rc = BDecComponentBits (mem_op, b, tagId1, elmtLen1, (&k->signature), &totalElmtsLen1, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
(&k->signature)->identifier.bv_val = (&k->signature)->id_buf;
(&k->signature)->identifier.bv_len = strlen("signature");
strcpy( (&k->signature)->identifier.bv_val, "signature");
return LDAP_PROTOCOL_ERROR;
}
if ( strncmp( peek_head, "tbsCertificate", strlen("tbsCertificate") ) == 0 ) {
- GDecComponentTBSCertificate (mem_op, b, (&k->tbsCertificate), bytesDecoded, mode);
+ rc = GDecComponentTBSCertificate (mem_op, b, (&k->tbsCertificate), bytesDecoded, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
( k->tbsCertificate)->identifier.bv_val = peek_head;
( k->tbsCertificate)->identifier.bv_len = strLen;
if( !(strLen = LocateNextGSERToken(mem_op,b,&peek_head,GSER_NO_COPY)) ){
}
}
if ( strncmp( peek_head, "signatureAlgorithm", strlen("signatureAlgorithm") ) == 0 ) {
- GDecComponentAlgorithmIdentifier (mem_op, b, (&k->signatureAlgorithm), bytesDecoded, mode);
+ rc = GDecComponentAlgorithmIdentifier (mem_op, b, (&k->signatureAlgorithm), bytesDecoded, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
( k->signatureAlgorithm)->identifier.bv_val = peek_head;
( k->signatureAlgorithm)->identifier.bv_len = strLen;
if( !(strLen = LocateNextGSERToken(mem_op,b,&peek_head,GSER_NO_COPY)) ){
}
}
if ( strncmp( peek_head, "signature", strlen("signature") ) == 0 ) {
- GDecComponentBits (mem_op, b, (&k->signature), bytesDecoded, mode);
+ rc = GDecComponentBits (mem_op, b, (&k->signature), bytesDecoded, mode);
+ if ( rc != LDAP_SUCCESS ) return rc;
(&k->signature)->identifier.bv_val = peek_head;
(&k->signature)->identifier.bv_len = strLen;
}