aboutsummaryrefslogtreecommitdiff
path: root/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils.c')
-rw-r--r--utils.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/utils.c b/utils.c
index 5d831f1..1fda993 100644
--- a/utils.c
+++ b/utils.c
@@ -96,6 +96,16 @@ xstrdup(const char *s)
return d;
}
+void *
+xcalloc(size_t nmemb, size_t size)
+{
+ void *d;
+
+ if ((d = calloc(nmemb, size)) == NULL)
+ err(1, "calloc");
+ return d;
+}
+
void
gen_certificate(const char *hostname, const char *certpath, const char *keypath)
{