prefix primitive types with der_
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18443 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -199,7 +199,7 @@ loop (unsigned char *buf, size_t len, int indent)
|
|||||||
if (ret)
|
if (ret)
|
||||||
errx (1, "der_get_oid: %s", error_message (ret));
|
errx (1, "der_get_oid: %s", error_message (ret));
|
||||||
ret = der_print_heim_oid(&o, '.', &p);
|
ret = der_print_heim_oid(&o, '.', &p);
|
||||||
free_oid(&o);
|
der_free_oid(&o);
|
||||||
if (ret)
|
if (ret)
|
||||||
errx (1, "der_print_heim_oid: %s", error_message (ret));
|
errx (1, "der_print_heim_oid: %s", error_message (ret));
|
||||||
printf("%s\n", p);
|
printf("%s\n", p);
|
||||||
|
@@ -48,21 +48,21 @@ der_copy_general_string (const heim_general_string *from,
|
|||||||
int
|
int
|
||||||
der_copy_utf8string (const heim_utf8_string *from, heim_utf8_string *to)
|
der_copy_utf8string (const heim_utf8_string *from, heim_utf8_string *to)
|
||||||
{
|
{
|
||||||
return copy_general_string(from, to);
|
return der_copy_general_string(from, to);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
der_copy_printable_string (const heim_printable_string *from,
|
der_copy_printable_string (const heim_printable_string *from,
|
||||||
heim_printable_string *to)
|
heim_printable_string *to)
|
||||||
{
|
{
|
||||||
return copy_general_string(from, to);
|
return der_copy_general_string(from, to);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
der_copy_ia5_string (const heim_printable_string *from,
|
der_copy_ia5_string (const heim_printable_string *from,
|
||||||
heim_printable_string *to)
|
heim_printable_string *to)
|
||||||
{
|
{
|
||||||
return copy_general_string(from, to);
|
return der_copy_general_string(from, to);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@@ -382,7 +382,7 @@ der_get_oid (const unsigned char *p, size_t len,
|
|||||||
u1 = u * 128 + (*p++ % 128);
|
u1 = u * 128 + (*p++ % 128);
|
||||||
/* check that we don't overflow the element */
|
/* check that we don't overflow the element */
|
||||||
if (u1 < u) {
|
if (u1 < u) {
|
||||||
free_oid(data);
|
der_free_oid(data);
|
||||||
return ASN1_OVERRUN;
|
return ASN1_OVERRUN;
|
||||||
}
|
}
|
||||||
u = u1;
|
u = u1;
|
||||||
@@ -390,7 +390,7 @@ der_get_oid (const unsigned char *p, size_t len,
|
|||||||
data->components[n] = u;
|
data->components[n] = u;
|
||||||
}
|
}
|
||||||
if (n > 2 && p[-1] & 0x80) {
|
if (n > 2 && p[-1] & 0x80) {
|
||||||
free_oid (data);
|
der_free_oid (data);
|
||||||
return ASN1_OVERRUN;
|
return ASN1_OVERRUN;
|
||||||
}
|
}
|
||||||
data->length = n;
|
data->length = n;
|
||||||
|
@@ -86,7 +86,7 @@ copy_type (const char *from, const char *to, const Type *t, int preserve)
|
|||||||
if ((t->type == TSequence || t->type == TChoice) && preserve) {
|
if ((t->type == TSequence || t->type == TChoice) && preserve) {
|
||||||
fprintf(codefile,
|
fprintf(codefile,
|
||||||
"{ int ret;\n"
|
"{ int ret;\n"
|
||||||
"ret = copy_octet_string(&(%s)->_save, &(%s)->_save);\n"
|
"ret = der_copy_octet_string(&(%s)->_save, &(%s)->_save);\n"
|
||||||
"if (ret) goto fail;\n"
|
"if (ret) goto fail;\n"
|
||||||
"}\n",
|
"}\n",
|
||||||
from, to);
|
from, to);
|
||||||
@@ -140,7 +140,7 @@ copy_type (const char *from, const char *to, const Type *t, int preserve)
|
|||||||
if (have_ellipsis) {
|
if (have_ellipsis) {
|
||||||
fprintf(codefile, "case %s: {\n"
|
fprintf(codefile, "case %s: {\n"
|
||||||
"int ret;\n"
|
"int ret;\n"
|
||||||
"ret = copy_octet_string(&(%s)->u.%s, &(%s)->u.%s);\n"
|
"ret=der_copy_octet_string(&(%s)->u.%s, &(%s)->u.%s);\n"
|
||||||
"if (ret) goto fail;\n"
|
"if (ret) goto fail;\n"
|
||||||
"break;\n"
|
"break;\n"
|
||||||
"}\n",
|
"}\n",
|
||||||
|
@@ -78,7 +78,7 @@ free_type (const char *name, const Type *t, int preserve)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
if ((t->type == TSequence || t->type == TChoice) && preserve)
|
if ((t->type == TSequence || t->type == TChoice) && preserve)
|
||||||
fprintf(codefile, "free_octet_string(&data->_save);\n");
|
fprintf(codefile, "der_free_octet_string(&data->_save);\n");
|
||||||
|
|
||||||
if(t->type == TChoice)
|
if(t->type == TChoice)
|
||||||
fprintf(codefile, "switch((%s)->element) {\n", name);
|
fprintf(codefile, "switch((%s)->element) {\n", name);
|
||||||
@@ -115,7 +115,7 @@ free_type (const char *name, const Type *t, int preserve)
|
|||||||
if (have_ellipsis)
|
if (have_ellipsis)
|
||||||
fprintf(codefile,
|
fprintf(codefile,
|
||||||
"case %s:\n"
|
"case %s:\n"
|
||||||
"free_octet_string(&(%s)->u.%s);\n"
|
"der_free_octet_string(&(%s)->u.%s);\n"
|
||||||
"break;",
|
"break;",
|
||||||
have_ellipsis->label,
|
have_ellipsis->label,
|
||||||
name, have_ellipsis->gen_name);
|
name, have_ellipsis->gen_name);
|
||||||
|
@@ -247,7 +247,7 @@ length_type (const char *name, const Type *t,
|
|||||||
if (tname == NULL)
|
if (tname == NULL)
|
||||||
errx(1, "malloc");
|
errx(1, "malloc");
|
||||||
length_type (name, t->subtype, variable, tname);
|
length_type (name, t->subtype, variable, tname);
|
||||||
fprintf (codefile, "ret += %lu + length_len (ret);\n",
|
fprintf (codefile, "ret += %lu + der_length_len (ret);\n",
|
||||||
(unsigned long)length_tag(t->tag.tagvalue));
|
(unsigned long)length_tag(t->tag.tagvalue));
|
||||||
free(tname);
|
free(tname);
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user