polish

parent b6778e5a
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
*/ */
static unsigned long static inline unsigned long
crypto_thread_id(void) crypto_thread_id(void)
{ {
return ((unsigned long)pthread_self()); return ((unsigned long)pthread_self());
...@@ -65,8 +65,8 @@ crypto_thread_id(void) ...@@ -65,8 +65,8 @@ crypto_thread_id(void)
static pthread_mutex_t *crypto_locks = NULL; static pthread_mutex_t *crypto_locks = NULL;
static size_t crypto_locks_n = 0; static size_t crypto_locks_n = 0;
static void static inline void
crypto_lock(int mode, size_t n, const char *file, int line) crypto_lock(int mode, int n, const char *file, int line)
{ {
(void) file; (void) file;
(void) line; (void) line;
...@@ -539,7 +539,7 @@ crypto_err_cb(const char *s, size_t l, void *u) ...@@ -539,7 +539,7 @@ crypto_err_cb(const char *s, size_t l, void *u)
{ {
VRT_CTX; VRT_CTX;
CAST_OBJ_NOTNULL(ctx, u, VRT_CTX_MAGIC); CAST_OBJ_NOTNULL(ctx, u, VRT_CTX_MAGIC);
VSLb(ctx->vsl, SLT_Debug, "crypto %.*s", l, s); VSLb(ctx->vsl, SLT_Debug, "crypto %.*s", (int)l, s);
return (0); return (0);
} }
...@@ -569,7 +569,7 @@ vmod_verifier__init(VRT_CTX, ...@@ -569,7 +569,7 @@ vmod_verifier__init(VRT_CTX,
return; return;
} }
if (args->valid_pem ^ args->valid_key == 0) { if ((args->valid_pem ^ args->valid_key) == 0) {
VRT_fail(ctx, "Need either pem or key, but not both"); VRT_fail(ctx, "Need either pem or key, but not both");
return; return;
} }
...@@ -762,7 +762,7 @@ vmod_signer__init(VRT_CTX, ...@@ -762,7 +762,7 @@ vmod_signer__init(VRT_CTX,
return; return;
} }
if (args->valid_pem ^ args->valid_key == 0) { if ((args->valid_pem ^ args->valid_key) == 0) {
VRT_fail(ctx, "Need either pem or key, but not both"); VRT_fail(ctx, "Need either pem or key, but not both");
return; return;
} }
...@@ -929,7 +929,7 @@ VCL_BLOB vmod_signer_final(VRT_CTX, struct vmod_crypto_signer *vcs) ...@@ -929,7 +929,7 @@ VCL_BLOB vmod_signer_final(VRT_CTX, struct vmod_crypto_signer *vcs)
return (VRT_blob(ctx, "xsigner.final()", sig, siglen, 0x6bba960e)); return (VRT_blob(ctx, "xsigner.final()", sig, siglen, 0x6bba960e));
err: err:
VSLb(ctx->vsl, SLT_Debug, "%s.final() failed: %s", VSLb(ctx->vsl, SLT_Debug, "%s.final() failed: 0x%lx",
vcs->vcl_name, ERR_get_error()); vcs->vcl_name, ERR_get_error());
ERR_print_errors_cb(crypto_err_cb, (void *)ctx); ERR_print_errors_cb(crypto_err_cb, (void *)ctx);
return (NULL); return (NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment