New der_put_heim_integer signature.
Test der_parse_heim_oid git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18431 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -706,17 +706,30 @@ test_heim_oid_format_same(const char *str, const heim_oid *oid)
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
char *p;
|
char *p;
|
||||||
|
heim_oid o2;
|
||||||
|
|
||||||
ret = der_print_heim_oid(oid, &p);
|
ret = der_print_heim_oid(oid, ' ', &p);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
printf("fail to print oid: %s\n", str);
|
printf("fail to print oid: %s\n", str);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
ret = strcmp(p, str);
|
ret = strcmp(p, str);
|
||||||
if (ret)
|
if (ret) {
|
||||||
printf("oid %s != formated oid %s\n", str, p);
|
printf("oid %s != formated oid %s\n", str, p);
|
||||||
free(p);
|
free(p);
|
||||||
return ret != 0;
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = der_parse_heim_oid(p, " ", &o2);
|
||||||
|
if (ret) {
|
||||||
|
printf("failed to parse %s\n", p);
|
||||||
|
free(p);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
ret = heim_oid_cmp(&o2, oid);
|
||||||
|
free_oid(&o2);
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@@ -243,7 +243,8 @@ int der_get_tag_num(const char *);
|
|||||||
int der_parse_hex_heim_integer(const char *, heim_integer *);
|
int der_parse_hex_heim_integer(const char *, heim_integer *);
|
||||||
int der_print_hex_heim_integer(const heim_integer *, char **);
|
int der_print_hex_heim_integer(const heim_integer *, char **);
|
||||||
|
|
||||||
int der_print_heim_oid (const heim_oid *data, char **);
|
int der_print_heim_oid (const heim_oid *, char, char **);
|
||||||
|
int der_parse_heim_oid (const char *, const char *, heim_oid *);
|
||||||
|
|
||||||
|
|
||||||
#endif /* __DER_H__ */
|
#endif /* __DER_H__ */
|
||||||
|
Reference in New Issue
Block a user