Only seed database for Debian install if we're using default config
[onak.git] / armor.c
diff --git a/armor.c b/armor.c
index 6d3fc138f6bee1445f9ac9fea4a0f20139723468..bb0085e348d3b73846367b7bab80938e0cc75f21 100644 (file)
--- a/armor.c
+++ b/armor.c
@@ -9,6 +9,7 @@
 #include <stdlib.h>
 
 #include "armor.h"
+#include "config.h"
 #include "keystructs.h"
 #include "log.h"
 #include "onak-conf.h"
@@ -187,6 +188,8 @@ static int armor_putchar(void *ctx, size_t count, unsigned char *c)
 {
        int i;
 
+       log_assert(c != NULL);
+
        for (i = 0; i < count; i++) {
                armor_putchar_int(ctx, c[i]);
        }
@@ -320,8 +323,8 @@ int armor_openpgp_stream(int (*putchar_func)(void *ctx, size_t count,
         */
        putchar_func(ctx, sizeof("-----BEGIN PGP PUBLIC KEY BLOCK-----\n") - 1,
                (unsigned char *) "-----BEGIN PGP PUBLIC KEY BLOCK-----\n");
-       putchar_func(ctx, sizeof("Version: onak " VERSION "\n\n") - 1,
-               (unsigned char *) "Version: onak " VERSION "\n\n");
+       putchar_func(ctx, sizeof("Version: onak " PACKAGE_VERSION "\n\n") - 1,
+               (unsigned char *) "Version: onak " PACKAGE_VERSION "\n\n");
        
        armor_init(&armor_ctx);
        armor_ctx.putchar_func = putchar_func;