witnessmenow / arduino-sample-api-request

24 stars 15 forks source link

Missing python library? #3

Closed Bolukan closed 4 years ago

Bolukan commented 4 years ago

python certs-from-mozilla.py

AC Camerfirma, S.A.:AC Camerfirma SA CIF A82743287:http://www.chambersign.org -> data/ca_000.der
Traceback (most recent call last):
  File "certs-from-mozilla.py", line 55, in <module>
    ssl = Popen(['openssl','x509','-inform','PEM','-outform','DER','-out', certName], shell = False, stdin = PIPE)
  File "C:\Users\Bolukan\.platformio\python37\lib\subprocess.py", line 800, in __init__
    restore_signals, start_new_session)
  File "C:\Users\Bolukan\.platformio\python37\lib\subprocess.py", line 1207, in _execute_child
    startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified

Does this error hint to something I need to install? Using Python 3.7.5, running script from 'root' of platformio project directory.

Bolukan commented 4 years ago

It is Windows related: I found openssl and could run it: ssl = Popen(['C:/Program Files/Git/usr/bin/openssl.exe','x509','-inform','PEM','-outform','DER','-out', certName], shell = False, stdin = PIPE) and further more you need the archiving program ar, which can be found in Arduino IDE and platformio installations. I used: arCmd = ['C:/Users/Bolukan/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf/bin/ar.exe', 'q', 'data/certs.ar'] + derFiles;