I am writing a Solidity contract which publishes documents (or, more precisely, stores the documents' hashes) on the Ethereum blockchain. Currently, I have no idea how to write the code so that the contract only executes after both the 2 involved parties have agreed on the document's content.
Digital signature is one solution I have thought of. However, my intent is to not let any single party to publish the document after they have modified its content as they want.
UPDATE / EDIT
Maybe I was complicating the problem. Just store a list of documents (actually their hashes) agreed by one party and another list of documents agreed by both. Each party runs the contract from their address. It only executes if the calling address is of an involved party which has not agreed.
The verification process only needs to deal with the second list.
What is the possible solution to this?