diff options
author | Omar Polo <op@omarpolo.com> | 2023-06-11 11:31:22 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2023-06-11 11:31:22 +0000 |
commit | b8d68fc8e49b3eeac2ba3106e9694ef463a646e1 (patch) | |
tree | e3dace75ff4ba9c65e28678be0ea20b5dcc48e79 | |
parent | d1739e3f03a014fa9baded61a49eeb49293c751f (diff) |
fixes for -Wpointer-sign
-rw-r--r-- | crypto.c | 3 | ||||
-rw-r--r-- | gmid.h | 4 | ||||
-rw-r--r-- | server.c | 3 | ||||
-rw-r--r-- | utils.c | 8 |
4 files changed, 10 insertions, 8 deletions
@@ -122,7 +122,8 @@ crypto_dispatch_server(int fd, struct privsep_proc *p, struct imsg *imsg) const void *from; unsigned char *to; size_t datalen; - int n, len, ret; + int n, ret; + unsigned int len; datalen = IMSG_DATA_SIZE(imsg); @@ -451,8 +451,8 @@ void gen_certificate(const char*, const char*, const char*); X509_STORE *load_ca(int); int validate_against_ca(X509_STORE*, const uint8_t*, size_t); void ssl_error(const char *); -char *ssl_pubkey_hash(const char *, size_t); -EVP_PKEY *ssl_load_pkey(const char *, size_t); +char *ssl_pubkey_hash(const uint8_t *, size_t); +EVP_PKEY *ssl_load_pkey(const uint8_t *, size_t); struct vhost *new_vhost(void); struct location *new_location(void); struct proxy *new_proxy(void); @@ -1190,7 +1190,8 @@ start_reply(struct client *c, int code, const char *meta) bufferevent_write(c->bev, "\r\n", 2); if (!vhost_disable_log(c->host, c->iri.path)) - log_request(c, EVBUFFER_DATA(evb), EVBUFFER_LENGTH(evb)); + log_request(c, (char *)EVBUFFER_DATA(evb), + EVBUFFER_LENGTH(evb)); if (code != 20) c->type = REQUEST_DONE; @@ -262,15 +262,15 @@ ssl_error(const char *where) } char * -ssl_pubkey_hash(const char *buf, size_t len) +ssl_pubkey_hash(const uint8_t *buf, size_t len) { static const char hex[] = "0123456789abcdef"; BIO *in; X509 *x509 = NULL; char *hash = NULL; size_t off; - char digest[EVP_MAX_MD_SIZE]; - int dlen, i; + unsigned char digest[EVP_MAX_MD_SIZE]; + unsigned int dlen, i; if ((in = BIO_new_mem_buf(buf, len)) == NULL) { log_warnx("%s: BIO_new_mem_buf failed", __func__); @@ -314,7 +314,7 @@ ssl_pubkey_hash(const char *buf, size_t len) } EVP_PKEY * -ssl_load_pkey(const char *buf, size_t len) +ssl_load_pkey(const uint8_t *buf, size_t len) { BIO *in; EVP_PKEY *pkey; |