don't let crypto_dispatch_server handle IMSG_CRYPTO_ECDSA_SIGN

in this codepath.  otherwise we end up with a mismatch where we
expect a request but were sent a response.
This commit is contained in:
Omar Polo 2023-08-28 21:38:09 +00:00
parent 3cba037a11
commit a6c8b8051e
1 changed files with 2 additions and 1 deletions

View File

@ -455,7 +455,8 @@ ecdsae_send_enc_imsg(const unsigned char *dgst, int dgst_len,
imsg.hdr.peerid, "crypto", imsg.hdr.pid);
#endif
if (crypto_dispatch_server(ibuf->fd, p, &imsg) == 0) {
if (imsg.hdr.type != IMSG_CRYPTO_ECDSA_SIGN &&
crypto_dispatch_server(ibuf->fd, p, &imsg) == 0) {
/* Message was handled by the callback */
imsg_free(&imsg);
continue;