public void HandleRpc(ISender caller, string method, IList args, object rs)
{
object result = null;
try {
if(method.Equals("AddCertificate")) {
ReqrepManager.ReplyState rqrs = caller as ReqrepManager.ReplyState;
if(rqrs == null || !(rqrs.ReturnPath is Node)) {
throw new Exception("Call must be made locally for security reasons!");
}
string path = (string) args[0];
result = _ch.AddCertificate(path);
} else {
throw new Exception("Invalid method");
}
} catch (Exception e) {
result = new AdrException(-32602, e);
}
_node.Rpc.SendResult(rs, result);
}