fixes for -Wpointer-sign

This commit is contained in:
Omar Polo 2023-06-11 11:31:22 +00:00
parent d1739e3f03
commit b8d68fc8e4
4 changed files with 10 additions and 8 deletions

View File

@ -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);

4
gmid.h
View File

@ -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);

View File

@ -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;

View File

@ -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;