return of der_match_tag2

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24191 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2008-12-15 04:30:42 +00:00
parent 01dbb35475
commit ff17f1e5a1

View File

@@ -518,6 +518,20 @@ der_get_tag (const unsigned char *p, size_t len,
int int
der_match_tag (const unsigned char *p, size_t len, der_match_tag (const unsigned char *p, size_t len,
Der_class class, Der_type type,
unsigned int tag, size_t *size)
{
Der_type thistype;
int e;
e = der_match_tag2(p, len, class, &thistype, tag, size);
if (e) return e;
if (thistype != type) return ASN1_BAD_ID;
return 0;
}
int
der_match_tag2 (const unsigned char *p, size_t len,
Der_class class, Der_type *type, Der_class class, Der_type *type,
unsigned int tag, size_t *size) unsigned int tag, size_t *size)
{ {
@@ -546,7 +560,7 @@ der_match_tag_and_length (const unsigned char *p, size_t len,
size_t l, ret = 0; size_t l, ret = 0;
int e; int e;
e = der_match_tag (p, len, class, type, tag, &l); e = der_match_tag2 (p, len, class, type, tag, &l);
if (e) return e; if (e) return e;
p += l; p += l;
len -= l; len -= l;