removed unused test
test is performed by sc_asn1_read_tag
This commit is contained in:
parent
5918e005d7
commit
293d02ea4b
|
@ -351,10 +351,6 @@ const u8 *sc_asn1_find_tag(sc_context_t *ctx, const u8 * buf,
|
||||||
/* read a tag */
|
/* read a tag */
|
||||||
if (sc_asn1_read_tag(&p, left, &cla, &tag, &taglen) != SC_SUCCESS)
|
if (sc_asn1_read_tag(&p, left, &cla, &tag, &taglen) != SC_SUCCESS)
|
||||||
return NULL;
|
return NULL;
|
||||||
if (left < (size_t)(p - buf)) {
|
|
||||||
sc_debug(ctx, SC_LOG_DEBUG_ASN1, "invalid TLV object\n");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
left -= (p - buf);
|
left -= (p - buf);
|
||||||
/* we need to shift the class byte to the leftmost
|
/* we need to shift the class byte to the leftmost
|
||||||
* byte of the tag */
|
* byte of the tag */
|
||||||
|
@ -371,10 +367,6 @@ const u8 *sc_asn1_find_tag(sc_context_t *ctx, const u8 * buf,
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
/* otherwise continue reading tags */
|
/* otherwise continue reading tags */
|
||||||
if (left < taglen) {
|
|
||||||
sc_debug(ctx, SC_LOG_DEBUG_ASN1, "invalid TLV object\n");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
left -= taglen;
|
left -= taglen;
|
||||||
p += taglen;
|
p += taglen;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue