brian7704 / OpenTAKServer

Yet another open source TAK Server for ATAK, iTAK, and WinTAK
GNU General Public License v3.0
41 stars 6 forks source link

Certificate authority creation fails on Windows #16

Closed brian7704 closed 2 months ago

brian7704 commented 2 months ago
[2024-04-21 10:36:53] - OpenTAKServer[5656] - certificate_authority - INFO - Creating CA...
..+.+..+..........+..+....+.....+.........+.+..+....+.....+...+...............+.............+...+......+.....+......+...+.+.....+.+............+......+..+..........+..+.+.........+......+..............+.+..+..................+.+...........+....+...+...+.....+...+.+......+...............+..+++++++++++++++++++++++++++++++++++++++*.+.+......+..+...+++++++++++++++++++++++++++++++++++++++*...+..+....+...........+..........+........+..........+...+.....+...................+.....+...+.......+.....+......+...+..........+..+...+......+.+..+.+.........+..+................+..+.+.....+..........+.....+.+......+...+..+....+.....+...+.......+...+........+.......+........+....+.........+.....+............+...+.........+.+.....+.......+............+...........+.+......+........+....+...+..+............+....+............+...+...........+.+..+.+.....+......+...+...+....+.....+...+............++++++
.....+....+..+..........+...+......+..+....+......+++++++++++++++++++++++++++++++++++++++*............+++++++++++++++++++++++++++++++++++++++*.+...+..+..........+.................+.+..............+.+..+...+......+..................+.+.....+....+........+...+.+.........+.........+..+...+..........+......+.........+.....+...+...................+.........+..+...+.......+............+........+...............+....+........+.......+...........+.........+..................+.......+...+...+.....+...+....+...........+.......+...+..............+...+...+.......+..+......+.......+...+...........+...+.+..+.......+..+......+.......+..+....+..+.......+...+............+..+..........+...+......+..+...+....+..+...+.......+.....+....+...........+...............+..................+................+............+.........+.....+...+.+...........+.+..+..........+..+.+..+...+...+....+...+...+.........+..+....+......+...........+....+...+.....+...+..................+......+...+.............+..+..........+..+.+.....+.........+......+............+.+......+......+.....+....+...+......+......+.........+.........+........+.......+......+...............+...........+....+..+...+.......+............+..+...+............+....+......+.....+......+...+.+...+..+.+.....+...+....+............+........+......+.+......+............+...+..+......+......+.+..+......+.......+.........+.........+...........+.+...+......+..............+.......+..+......+.+.....+..................+.............+..+...+...+............+...+......+...+...............+.+.........+...+...+..+...+.+.....+.+..............+....+..+.......+.....+.......+.....+....+..+...+....+........+.............+..+.......+...+..+.......+.....+.+.........+......+.....+..........++++++
-----
Providers:
  default
    name: OpenSSL Default Provider
    version: 3.3.0
    status: active
Picked up _JAVA_OPTIONS: -Xmx2048M
Certificate was added to keystore
Using configuration from C:\Users\NotAdmin\ots\ca\ca_config.cfg
...+...+...+..+......................+.....+...+...+....+......+.....+....+.....+++++++++++++++++++++++++++++++++++++++*..+...+.+.........+.....+..................+.........+.+..+...+....+++++++++++++++++++++++++++++++++++++++*....+...+.......+..+...+....+...+.....+...+....+........+.+..+...+.+.........+......+.....+....+..+.........+.........+.+...+........+.........+....+.........+..+.........+.+........+.............+..+......+...............+.......+..+..................+...+....+...+.........+...+..+....+.........+...+...+.....+................+.....+...+...+....+..............+....+..+.............+...+.....+.........................+..+...+.......+..+...+.+.................+...+......+...+...++++++
...........+.............+..+....+..+...+....+..+.+..+.+.........+.....+......+++++++++++++++++++++++++++++++++++++++*.........+..+......+.............+..+.......+...+...+.....+.+.....+++++++++++++++++++++++++++++++++++++++*...+...+............+.......................+.............+.....+.........+.+...........+.+..+.+.....+....+..+.+..+.......+.........+.........+.................+....+..+...+.+......+.....+...+......+...+............++++++
-----
Certificate request self-signature ok
subject=C=WW, ST=XX, L=YY, O=ZZ, OU=OpenTAKServer, CN=opentakserver
Providers:
  default
    name: OpenSSL Default Provider
    version: 3.3.0
    status: active
The system cannot find the path specified.
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\users\notadmin\ots\.venv\Lib\site-packages\opentakserver\app.py", line 198, in <module>
    app = create_app()
          ^^^^^^^^^^^^
  File "C:\users\notadmin\ots\.venv\Lib\site-packages\opentakserver\app.py", line 173, in create_app
    init_extensions(app)
  File "C:\users\notadmin\ots\.venv\Lib\site-packages\opentakserver\app.py", line 79, in init_extensions
    ca.create_ca()
  File "C:\users\notadmin\ots\.venv\Lib\site-packages\opentakserver\certificate_authority.py", line 119, in create_ca
    self.issue_certificate("opentakserver", True)
  File "C:\users\notadmin\ots\.venv\Lib\site-packages\opentakserver\certificate_authority.py", line 200, in issue_certificate
    raise Exception("Failed to import key. Exit code {}".format(exit_code))
Exception: Failed to import key. Exit code 1
brian7704 commented 2 months ago

I ended up removing JKS creation in 1.1.5 which fixes this error