All "deployment-grade" signature schemes on the market are only secure if they're secure under UUFEUF-CMA - which means you have to somehow prevent the server from querying the signature of hashes of your messages.
One way to do that, is that make sure the hash of your messages are of different length than the challenges (prepending/appending to challenge/hash some fixed/randomized string).
Another way is to devise a more secure handshake protocol - sign a (ephemeral) key exchange publickey to use with the server.