@@ -64,18 +64,18 @@ bool SignatureUtil::verifySignature(std::string_view bytecode, std::string &mess
6464 */
6565
6666 std::string_view payload;
67- if (!BytecodeUtil::getCustomSection (bytecode, " signature_wasmsign " , payload)) {
67+ if (!BytecodeUtil::getCustomSection (bytecode, " signature " , payload)) {
6868 message = " Failed to parse corrupted Wasm module" ;
6969 return false ;
7070 }
7171
7272 if (payload.empty ()) {
73- message = " Custom Section \" signature_wasmsign \" not found" ;
73+ message = " Custom Section \" signature \" not found" ;
7474 return false ;
7575 }
7676
7777 if (bytecode.data () + bytecode.size () != payload.data () + payload.size ()) {
78- message = " Custom Section \" signature_wasmsign \" not at the end of Wasm module" ;
78+ message = " Custom Section \" signature \" not at the end of Wasm module" ;
7979 return false ;
8080 }
8181
@@ -100,7 +100,7 @@ bool SignatureUtil::verifySignature(std::string_view bytecode, std::string &mess
100100 SHA512_Update (&ctx, " WasmSignature" , sizeof (" WasmSignature" ) - 1 );
101101 const uint32_t ad_len = 0 ;
102102 SHA512_Update (&ctx, &ad_len, sizeof (uint32_t ));
103- const size_t section_len = 3 + sizeof (" signature_wasmsign " ) - 1 + 68 ;
103+ const size_t section_len = 3 + sizeof (" signature " ) - 1 + 68 ;
104104 SHA512_Update (&ctx, bytecode.data (), bytecode.size () - section_len);
105105 uint8_t hash[SHA512_DIGEST_LENGTH];
106106 SHA512_Final (hash, &ctx);
0 commit comments