Source

ediarpc / README.md

Diff from to

File README.md

 >>> server.serve_forever()
 ```
 
+## What happens if you don't use the correct passphrase?
+
+If you're running with signature checking, this happens:
+
+```
+>>> from ediarpc import rpc_client
+>>> cli = rpc_client.ServerProxy('localhost', 5959, 'wrongpass')
+>>> cli.ping(hello='world')
+Traceback (most recent call last):
+  ...
+ediarpc.message.InvalidSignatureException
+```
+
+But why does that happen, you're probably wondering.  Lets disable signature
+checking:
+
+```
+>>> from ediarpc import rpc_client
+>>> cli = rpc_client.ServerProxy('127.0.0.1', 5959, 'wrongpass', allow_untrusted=True)
+>>> cli.ping(hello='world')
+{u'error_message': u'Unauthorized, invalid passphrase', u'error_code': 403}
+```
+
+The error message is signed by the RPC server.  But since the error is signed using
+a different passphrase, we don't trust the authenticity of it.
+
 ## Call syntax
 
 ```