summaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
authorsuchinton2001 <suchinton.2001@gmail.com>2023-09-14 18:23:03 +0530
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2023-09-18 15:57:12 +0000
commitc9e50f62b3a59133b64d98d15bfe18c52b2ba7f5 (patch)
tree69395b0c2abc5d4c7cbc7d844da0cf6bea00c2d3 /extras
parent8de9f422be3296961cc8a7f36f43837323a1476b (diff)
Update default config
- Add License header - Add CA.pem file path to enable "Secure mode" connection with kuksa Bug-AGL: SPEC-4905 Signed-off-by: suchinton2001 <suchinton.2001@gmail.com> Change-Id: Ib9c8d7d2984db97563d6ba62d03d272b79979823
Diffstat (limited to 'extras')
-rw-r--r--extras/config.py24
1 files changed, 22 insertions, 2 deletions
diff --git a/extras/config.py b/extras/config.py
index 5056cc3..cc61c57 100644
--- a/extras/config.py
+++ b/extras/config.py
@@ -1,14 +1,34 @@
+"""
+ Copyright 2023 Suchinton Chakravarty
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+"""
+
import os
import platform
-python_version = "python" + platform.python_version_tuple()[0] + "." + platform.python_version_tuple()[1]
+python_version = f"python{'.'.join(platform.python_version_tuple()[:2])}"
+
+CA = os.path.abspath(os.path.join(os.path.dirname(__file__), "../assets/CA.pem"))
KUKSA_CONFIG = {
"ip": 'localhost',
"port": "8090",
'protocol': 'ws',
'insecure': False,
+ 'cacertificate': CA,
+ 'tls_server_name': "Server",
}
TOKEN_PATH = os.path.join(os.path.expanduser("~"),
- f".local/lib/{python_version}/site-packages/kuksa_certificates/jwt/super-admin.json.token") \ No newline at end of file
+ f".local/lib/{python_version}/site-packages/kuksa_certificates/jwt/super-admin.json.token")