aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitmodules5
-rw-r--r--php-client/class.phpipam-api.php8
m---------phpipam-pyclient0
m---------phpipamsdk0
4 files changed, 9 insertions, 4 deletions
diff --git a/.gitmodules b/.gitmodules
index 5f13f77..9fe3334 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -3,4 +3,7 @@
url = https://github.com/yoke88/PSPHPIPAM.git
[submodule "phpipam-pyclient"]
path = phpipam-pyclient
- url = https://github.com/viniciusarcanjo/phpipam-pyclient.git
+ url = https://github.com/viniarck/phpipam-pyclient.git
+[submodule "phpipamsdk"]
+ path = phpipamsdk
+ url = https://github.com/efenian/phpipamsdk.git
diff --git a/php-client/class.phpipam-api.php b/php-client/class.phpipam-api.php
index f377aa3..64d8a34 100644
--- a/php-client/class.phpipam-api.php
+++ b/php-client/class.phpipam-api.php
@@ -77,7 +77,7 @@ class phpipam_api_client {
* @var bool
* @access private
*/
- private $Connecton = false;
+ private $Connection = false;
/**
* Access token for phpipam
@@ -643,7 +643,7 @@ class phpipam_api_client {
*/
private function curl_set_connection ($token_file) {
// check if it exists
- if ($this->Connection!==false) {
+ if ($this->Connection===false) {
// Get cURL resource
$this->Connection = curl_init();
@@ -698,7 +698,9 @@ class phpipam_api_client {
$params['controller'] = $this->api_server_controller;
// create encrypted request
- $encrypted_request = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $this->api_key, json_encode($params), MCRYPT_MODE_ECB));
+ $ivlen = openssl_cipher_iv_length($cipher="AES-128-CBC");
+ $iv = openssl_random_pseudo_bytes($ivlen);
+ $encrypted_request = base64_encode(openssl_encrypt(json_encode($params),$cipher,$this->api_key,$options=OPENSSL_RAW_DATA, $iv));
// escape +
$encrypted_request = urlencode($encrypted_request);
diff --git a/phpipam-pyclient b/phpipam-pyclient
-Subproject 6012e0267c1aa27e7629c58417e53ae89c82889
+Subproject dfa659fd15d19ede6985f0d0dea292a0f1f7ee0
diff --git a/phpipamsdk b/phpipamsdk
new file mode 160000
+Subproject 80ccd5924ad95d8695218762dede4cfd09fbaa3