diff options
author | Ivan Stakhov <50211739+left-try@users.noreply.github.com> | 2024-10-23 17:09:53 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-23 17:09:53 +0300 |
commit | 1e72912cfbb2cceb0f7572f2e07c432e8ec2ed24 (patch) | |
tree | 5d83cecd306d5c22b55e1456bb9da2495dc41a23 /src | |
parent | 7ca76b8768adcdd1205b7bc8c7000be3bbc281fe (diff) | |
parent | 1ad4dba75b5db1e8f3e6677ad68f09706be15a48 (diff) | |
download | rspamd-1e72912cfbb2cceb0f7572f2e07c432e8ec2ed24.tar.gz rspamd-1e72912cfbb2cceb0f7572f2e07c432e8ec2ed24.zip |
Merge branch 'rspamd:master' into master
Diffstat (limited to 'src')
-rw-r--r-- | src/libserver/protocol.c | 1 | ||||
-rw-r--r-- | src/lua/lua_rsa.c | 4 | ||||
-rw-r--r-- | src/rspamd_proxy.c | 1 |
3 files changed, 6 insertions, 0 deletions
diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c index 7d007370b..2dc641dfe 100644 --- a/src/libserver/protocol.c +++ b/src/libserver/protocol.c @@ -2092,6 +2092,7 @@ void rspamd_protocol_write_reply(struct rspamd_task *task, ev_tstamp timeout, st memcpy(&stat_copy, srv->stat, sizeof(stat_copy)); output = rspamd_metrics_to_prometheus_string( rspamd_worker_metrics_object(srv->cfg, &stat_copy, now - srv->start_time)); + rspamd_printf_fstring(&output, "# EOF\n"); rspamd_http_message_set_body_from_fstring_steal(msg, output); ctype = "application/openmetrics-text; version=1.0.0; charset=utf-8"; break; diff --git a/src/lua/lua_rsa.c b/src/lua/lua_rsa.c index 4b9aa0354..5f7db606f 100644 --- a/src/lua/lua_rsa.c +++ b/src/lua/lua_rsa.c @@ -716,6 +716,8 @@ lua_rsa_verify_memory(lua_State *L) EVP_PKEY_CTX *pctx = EVP_PKEY_CTX_new(pkey, NULL); g_assert(pctx != NULL); g_assert(EVP_PKEY_verify_init(pctx) == 1); + g_assert(EVP_PKEY_CTX_set_rsa_padding(pctx, RSA_PKCS1_PADDING) == 1); + g_assert(EVP_PKEY_CTX_set_signature_md(pctx, EVP_sha256()) == 1); ret = EVP_PKEY_verify(pctx, signature->str, signature->len, data, sz); @@ -766,6 +768,8 @@ lua_rsa_sign_memory(lua_State *L) g_assert(pctx != NULL); g_assert(EVP_PKEY_sign_init(pctx) == 1); + g_assert(EVP_PKEY_CTX_set_rsa_padding(pctx, RSA_PKCS1_PADDING) == 1); + g_assert(EVP_PKEY_CTX_set_signature_md(pctx, EVP_sha256()) == 1); size_t slen = signature->allocated; ret = EVP_PKEY_sign(pctx, signature->str, &slen, data, sz); diff --git a/src/rspamd_proxy.c b/src/rspamd_proxy.c index e2a866178..694e87c12 100644 --- a/src/rspamd_proxy.c +++ b/src/rspamd_proxy.c @@ -1768,6 +1768,7 @@ rspamd_proxy_scan_self_reply(struct rspamd_task *task) memcpy(&stat_copy, session->ctx->srv->stat, sizeof(stat_copy)); output = rspamd_metrics_to_prometheus_string( rspamd_worker_metrics_object(task->cfg, &stat_copy, ev_time() - session->ctx->srv->start_time)); + rspamd_printf_fstring(&output, "# EOF\n"); rspamd_http_message_set_body_from_fstring_steal(msg, output); ctype = "application/openmetrics-text; version=1.0.0; charset=utf-8"; break; |