hx509: Fix hxtool building w/o ASN.1 templating
This commit is contained in:
@@ -110,6 +110,10 @@ hxtool_LDADD = \
|
||||
$(LIB_roken) \
|
||||
$(top_builddir)/lib/sl/libsl.la
|
||||
|
||||
if ASN1_TEMPLATING
|
||||
hxtool_CPPFLAGS = -DASN1_PRINTING_WORKS
|
||||
endif
|
||||
|
||||
CLEANFILES = $(BUILT_SOURCES) sel-gram.c sel-lex.c \
|
||||
$(TESTS) \
|
||||
hxtool-commands.c hxtool-commands.h *.tmp \
|
||||
|
@@ -718,6 +718,7 @@ print_f(hx509_context hxcontext, void *ctx, hx509_cert cert)
|
||||
static int HX509_LIB_CALL
|
||||
print_fjson(hx509_context hxcontext, void *ctx, hx509_cert cert)
|
||||
{
|
||||
#ifdef ASN1_PRINTING_WORKS
|
||||
const Certificate *c = NULL;
|
||||
char *json = NULL;
|
||||
|
||||
@@ -730,6 +731,10 @@ print_fjson(hx509_context hxcontext, void *ctx, hx509_cert cert)
|
||||
hx509_err(context, 1, errno, "Could not format certificate as JSON");
|
||||
free(json);
|
||||
return 0;
|
||||
#else
|
||||
err(1, "JSON printing of certificates not supported; try enabling or "
|
||||
"not disabling ASN.1 templating in Heimdal build configuration");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user