asn1: Fix extra.c printer functions

This commit is contained in:
Nicolas Williams
2021-04-01 01:04:39 -05:00
parent e2e0dc331e
commit e7a8457fd2
2 changed files with 12 additions and 8 deletions

View File

@@ -92,12 +92,13 @@ free_heim_any(heim_any *data)
}
char *
print_heim_any(const heim_any *data)
print_heim_any(const heim_any *data, int flags)
{
char *s2 = NULL;
char *s = der_print_octet_string(data, 0);
int r = -1;
(void)flags;
if (s)
r = rk_strasvis(&s2, s, VIS_CSTYLE|VIS_TAB|VIS_NL, "\"");
free(s);
@@ -141,12 +142,13 @@ free_HEIM_ANY(heim_any *data)
}
char *
print_HEIM_ANY(const heim_any *data)
print_HEIM_ANY(const heim_any *data, int flags)
{
char *s2 = NULL;
char *s = der_print_octet_string(data, 0);
int r = -1;
(void)flags;
if (s)
r = rk_strasvis(&s2, s, VIS_CSTYLE|VIS_TAB|VIS_NL, "\"");
free(s);
@@ -190,12 +192,13 @@ free_heim_any_set(heim_any_set *data)
}
char *
print_heim_any_set(const heim_any_set *data)
print_heim_any_set(const heim_any_set *data, int flags)
{
char *s2 = NULL;
char *s = der_print_octet_string(data, 0);
int r = -1;
(void)flags;
if (s)
r = rk_strasvis(&s2, s, VIS_CSTYLE|VIS_TAB|VIS_NL, "\"");
free(s);
@@ -245,12 +248,13 @@ free_HEIM_ANY_SET(heim_any_set *data)
}
char *
print_HEIM_ANY_SET(const heim_any_set *data)
print_HEIM_ANY_SET(const heim_any_set *data, int flags)
{
char *s2 = NULL;
char *s = der_print_octet_string(data, 0);
int r = -1;
(void)flags;
if (s)
r = rk_strasvis(&s2, s, VIS_CSTYLE|VIS_TAB|VIS_NL, "\"");
free(s);

View File

@@ -37,7 +37,7 @@
int encode_heim_any(unsigned char *, size_t, const heim_any *, size_t *);
int decode_heim_any(const unsigned char *, size_t, heim_any *, size_t *);
void free_heim_any(heim_any *);
char *print_heim_any(const heim_any *);
char *print_heim_any(const heim_any *, int);
size_t length_heim_any(const heim_any *);
int copy_heim_any(const heim_any *, heim_any *);
@@ -46,7 +46,7 @@ int encode_heim_any_set(unsigned char *, size_t,
int decode_heim_any_set(const unsigned char *, size_t,
heim_any_set *,size_t *);
void free_heim_any_set(heim_any_set *);
char *print_heim_any_set(const heim_any_set *);
char *print_heim_any_set(const heim_any_set *, int);
size_t length_heim_any_set(const heim_any_set *);
int copy_heim_any_set(const heim_any_set *, heim_any_set *);
int heim_any_cmp(const heim_any_set *, const heim_any_set *);
@@ -54,7 +54,7 @@ int heim_any_cmp(const heim_any_set *, const heim_any_set *);
int encode_HEIM_ANY(unsigned char *, size_t, const heim_any *, size_t *);
int decode_HEIM_ANY(const unsigned char *, size_t, heim_any *, size_t *);
void free_HEIM_ANY(heim_any *);
char *print_HEIM_ANY(const heim_any *);
char *print_HEIM_ANY(const heim_any *, int);
size_t length_HEIM_ANY(const heim_any *);
int copy_HEIM_ANY(const heim_any *, heim_any *);
@@ -63,7 +63,7 @@ int encode_HEIM_ANY_SET(unsigned char *, size_t,
int decode_HEIM_ANY_SET(const unsigned char *, size_t,
heim_any_set *,size_t *);
void free_HEIM_ANY_SET(heim_any_set *);
char *print_HEIM_ANY_SET(const heim_any_set *);
char *print_HEIM_ANY_SET(const heim_any_set *, int);
size_t length_HEIM_ANY_SET(const heim_any_set *);
int copy_HEIM_ANY_SET(const heim_any_set *, heim_any_set *);
int heim_any_cmp(const heim_any_set *, const heim_any_set *);