@@ -1811,10 +1811,7 @@ static struct io_plan *handle_sign_message(struct io_conn *conn,
18111811 const u8 * msg_in )
18121812{
18131813 u8 * msg ;
1814- struct sha256_ctx sctx = SHA256_INIT ;
1815- struct sha256_double shad ;
18161814 secp256k1_ecdsa_recoverable_signature rsig ;
1817- struct privkey node_pkey ;
18181815
18191816 if (!fromwire_hsm_sign_message (tmpctx , msg_in , & msg ))
18201817 return bad_req (conn , c , msg_in );
@@ -1828,26 +1825,7 @@ static struct io_plan *handle_sign_message(struct io_conn *conn,
18281825 return bad_req_fmt (conn , c , msg_in ,
18291826 "proxy_%s error: %s" , __FUNCTION__ ,
18301827 proxy_last_message ());
1831- g_proxy_impl = PROXY_IMPL_MARSHALED ;
1832-
1833- /* FIXME - USE THE PROXIED VALUE WHEN SERVER SUPPORTS */
1834-
1835- /* Prefixing by a known string means we'll never be convinced
1836- * to sign some gossip message, etc. */
1837- sha256_update (& sctx , "Lightning Signed Message:" ,
1838- strlen ("Lightning Signed Message:" ));
1839- sha256_update (& sctx , msg , tal_count (msg ));
1840- sha256_double_done (& sctx , & shad );
1841-
1842- node_key (& node_pkey , NULL );
1843- /*~ By no small coincidence, this libsecp routine uses the exact
1844- * recovery signature format mandated by BOLT 11. */
1845- if (!secp256k1_ecdsa_sign_recoverable (secp256k1_ctx , & rsig ,
1846- shad .sha .u .u8 ,
1847- node_pkey .secret .data ,
1848- NULL , NULL )) {
1849- return bad_req_fmt (conn , c , msg_in , "Failed to sign message" );
1850- }
1828+ g_proxy_impl = PROXY_IMPL_COMPLETE ;
18511829
18521830 return req_reply (conn , c ,
18531831 take (towire_hsm_sign_message_reply (NULL , & rsig )));
0 commit comments