Fix possible memory leaks and change exception messages
Add Service tests for RSA-SHA1 signature