hx509: Fix hxtool building w/o ASN.1 templating
This commit is contained in:
@@ -110,6 +110,10 @@ hxtool_LDADD = \
|
|||||||
$(LIB_roken) \
|
$(LIB_roken) \
|
||||||
$(top_builddir)/lib/sl/libsl.la
|
$(top_builddir)/lib/sl/libsl.la
|
||||||
|
|
||||||
|
if ASN1_TEMPLATING
|
||||||
|
hxtool_CPPFLAGS = -DASN1_PRINTING_WORKS
|
||||||
|
endif
|
||||||
|
|
||||||
CLEANFILES = $(BUILT_SOURCES) sel-gram.c sel-lex.c \
|
CLEANFILES = $(BUILT_SOURCES) sel-gram.c sel-lex.c \
|
||||||
$(TESTS) \
|
$(TESTS) \
|
||||||
hxtool-commands.c hxtool-commands.h *.tmp \
|
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
|
static int HX509_LIB_CALL
|
||||||
print_fjson(hx509_context hxcontext, void *ctx, hx509_cert cert)
|
print_fjson(hx509_context hxcontext, void *ctx, hx509_cert cert)
|
||||||
{
|
{
|
||||||
|
#ifdef ASN1_PRINTING_WORKS
|
||||||
const Certificate *c = NULL;
|
const Certificate *c = NULL;
|
||||||
char *json = 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");
|
hx509_err(context, 1, errno, "Could not format certificate as JSON");
|
||||||
free(json);
|
free(json);
|
||||||
return 0;
|
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