diff options
author | Omar Polo <op@omarpolo.com> | 2021-02-12 12:47:20 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2021-02-12 12:47:20 +0000 |
commit | 52418c8d828bc25e0e84cc25d5e349a84be0b397 (patch) | |
tree | 480166acacfecd667dcd69e68df8f6a305792277 /utils.c | |
parent | 3cb3dd4d422cdead2dd09f1e3ce3eff35a9e6dc8 (diff) |
fix various compilation errors
Include gmid.h as first header in every file, as it then includes
config.h (that defines _GNU_SOURCE for instance).
Fix also a warning about unsigned vs signed const char pointers in
openssl.
Diffstat (limited to 'utils.c')
-rw-r--r-- | utils.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -14,6 +14,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include "gmid.h" + #include <errno.h> #include <string.h> @@ -22,8 +24,6 @@ #include <openssl/x509_vfy.h> #include <openssl/x509v3.h> -#include "gmid.h" - static sigset_t set; void @@ -115,7 +115,7 @@ xstrdup(const char *s) } void -gen_certificate(const char *host, const char *certpath, const char *keypath) +gen_certificate(const char *hostname, const char *certpath, const char *keypath) { BIGNUM *e; EVP_PKEY *pkey; @@ -123,7 +123,8 @@ gen_certificate(const char *host, const char *certpath, const char *keypath) X509 *x509; X509_NAME *name; FILE *f; - const char *org = "gmid"; + const unsigned char *org = (const unsigned char*)"gmid"; + const unsigned char *host = (const unsigned char*)hostname; log_notice(NULL, "generating new certificate for %s (it could take a while)", |