if (RSA_verify (nid, raw_digest, dlen, ctx->b, ctx->blen,
key->key.key_rsa) != 1) {
msg_debug_dkim ("headers rsa verify failed");
+ ERR_clear_error ();
res->rcode = DKIM_REJECT;
res->fail_reason = "headers rsa verify failed";
RSPAMD_DKIM_KEY_ID_LEN, rspamd_dkim_key_id (key),
ctx->dkim_header);
msg_debug_dkim ("headers ecdsa verify failed");
+ ERR_clear_error ();
res->rcode = DKIM_REJECT;
res->fail_reason = "headers ecdsa verify failed";
}
signature->str, signature->len, rsa);
if (ret == 0) {
- msg_info ("cannot check rsa signature for data: %s",
- ERR_error_string (ERR_get_error (), NULL));
lua_pushboolean (L, FALSE);
+ lua_pushstring (L, ERR_error_string (ERR_get_error (), NULL));
+
+ return 2;
}
else {
lua_pushboolean (L, TRUE);