aboutsummaryrefslogtreecommitdiffstats
path: root/mayor-orig/www/policy/public/naplo
diff options
context:
space:
mode:
authorM.Gergo2018-07-06 11:14:41 +0200
committerM.Gergo2018-07-06 11:14:41 +0200
commit43de9af71f7f4ca5731b94a06d688ae8412ba427 (patch)
tree54835de1dfcda504c02da261f0dc26885aed2e89 /mayor-orig/www/policy/public/naplo
parent50310b0e4513ee3fcce67351ae61e8fff851130e (diff)
downloadmayor-43de9af71f7f4ca5731b94a06d688ae8412ba427.tar.gz
mayor-43de9af71f7f4ca5731b94a06d688ae8412ba427.zip
2018/Feb/28 -i állapot hozzáadva, mint a módosítások kiindulási állapota
Diffstat (limited to 'mayor-orig/www/policy/public/naplo')
-rw-r--r--mayor-orig/www/policy/public/naplo/rpc/rpc-pre.php48
-rw-r--r--mayor-orig/www/policy/public/naplo/rpc/rpc.php7
2 files changed, 55 insertions, 0 deletions
diff --git a/mayor-orig/www/policy/public/naplo/rpc/rpc-pre.php b/mayor-orig/www/policy/public/naplo/rpc/rpc-pre.php
new file mode 100644
index 00000000..53328c7c
--- /dev/null
+++ b/mayor-orig/www/policy/public/naplo/rpc/rpc-pre.php
@@ -0,0 +1,48 @@
+<?php
+
+ require_once('include/share/ssl/ssl.php');
+ /* Class: Interconnect AES */
+
+ /* remote procedure call remote controller */
+ $rpcDetails = $_GET['detail'];
+ $initOMKod = readVariable($_GET['init'],'strictstring',0);
+
+ try
+ {
+ $RPC = new Interconnect();
+ $RPC->setRemoteOMKod($initOMKod);
+ $REQUEST = $RPC->processRequest($rpcDetails);
+ $func = $REQUEST->func;
+ }
+ catch (Exception $e)
+ {
+ $func='';
+ $DATA = array('error'=>$e->getMessage());
+ }
+ // processing
+
+ // MASTER BOSS -> portal/rpc/rpc, ez itt ELAVULT
+ $DATA = array();
+ if (isset($func) && $func!='') {
+ switch ($func) {
+ case 'getVersion':
+ case 'ping':
+ $DATA = $RPC->prepareReply(
+ array('func'=>'getVersion','response_revision'=>_MAYORREV,'pong')
+ );
+ $RPC->setResponse($DATA);
+ break;
+ case 'checkRegistration':
+ $otherPublicKey = getSslPublicKeyByOMKod($REQUEST->OMKOD);
+ if ($otherPublicKey===false) $valid=0;
+ elseif ($REQUEST->publicKey == $otherPublicKey) $valid=1;
+ else $valid=2;
+ $DATA = $RPC->prepareReply(
+ array('func'=>$func,'response'=>serialize($REQUEST),'valid'=>$valid)
+ );
+ $RPC->setResponse($DATA);
+ default:
+ break;
+ }
+ }
+?>
diff --git a/mayor-orig/www/policy/public/naplo/rpc/rpc.php b/mayor-orig/www/policy/public/naplo/rpc/rpc.php
new file mode 100644
index 00000000..be00b0a5
--- /dev/null
+++ b/mayor-orig/www/policy/public/naplo/rpc/rpc.php
@@ -0,0 +1,7 @@
+<?php
+
+ global $DATA;
+
+ if (count($DATA)>0) putResponse($DATA); // reply
+
+?>