mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-08-15 13:31:29 +02:00
wc_LmsKey_Sign computes the signature with the one-time key at the current leaf and only afterwards advances the leaf index and writes it to non-volatile storage. When that write failed the signature was erased but the key state was left as OK, so the same in-memory key could sign again while storage still recorded the already consumed leaf. A restart followed by wc_LmsKey_Reload would then resume from that leaf and sign a second message with the same LM-OTS private key. Set the key state to bad before signing and only restore it to OK once the advanced private key has been committed to storage, matching what wc_xmsskey_signupdate already does for XMSS. Exhausted keys keep their existing NOSIGS state. Fixes F-7411.
Before creating any new configure files (.conf) read the CONF_FILES_README.md