Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixup! src: use more explicit return type in Sign::SignFinal()
  • Loading branch information
addaleax committed Oct 20, 2018
commit a765e78244487dc929dec57eb1d3a6eedc1a7be5
4 changes: 2 additions & 2 deletions src/node_crypto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3601,8 +3601,8 @@ Sign::SignResult Sign::SignFinal(
}
#endif // NODE_FIPS_MODE

MallocedBuffer<unsigned char> buffer;
buffer = Node_SignFinal(std::move(mdctx), pkey, padding, salt_len);
MallocedBuffer<unsigned char> buffer =
Node_SignFinal(std::move(mdctx), pkey, padding, salt_len);
Error error = buffer.is_empty() ? kSignPrivateKey : kSignOk;
return SignResult(error, std::move(buffer));
}
Expand Down
2 changes: 1 addition & 1 deletion src/node_crypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ class Sign : public SignBase {
Error error;
MallocedBuffer<unsigned char> signature;

explicit inline SignResult(
explicit SignResult(
Error err,
MallocedBuffer<unsigned char>&& sig = MallocedBuffer<unsigned char>())
: error(err), signature(std::move(sig)) {}
Expand Down