osrf / ros2_test_cases

Tracking of tests to be performed on a ROS 2 release
16 stars 4 forks source link

Check ROS 2 security CLI on Windows #537

Closed Yadunund closed 1 year ago

Yadunund commented 1 year ago

Setup

Links

Checks


You can find the code used to generate this test case here

bai-ivan commented 1 year ago

Working on this.

It requres Administrator on Windows.

Following the tutorial letter by letter got this.

C:\dev\ros2\sros2_demo>ros2 security create_keystore demo_keystore
Traceback (most recent call last):
  File "C:\dev\ros2_iron\Scripts\ros2-script.py", line 33, in <module>
    sys.exit(load_entry_point('ros2cli==0.25.0', 'console_scripts', 'ros2')())
  File "C:\dev\ros2_iron\Lib\site-packages\ros2cli\cli.py", line 89, in main
    rc = extension.main(parser=parser, args=args)
  File "C:\dev\ros2_iron\Lib\site-packages\sros2\command\security.py", line 36, in main
    return extension.main(args=args)
  File "C:\dev\ros2_iron\Lib\site-packages\sros2\verb\create_keystore.py", line 38, in main
    sros2.keystore.create_keystore(args.ROOT)
  File "C:\dev\ros2_iron\Lib\site-packages\sros2\keystore\_keystore.py", line 82, in create_keystore
    _utilities.create_smime_signed_file(
  File "C:\dev\ros2_iron\Lib\site-packages\sros2\_utilities.py", line 67, in create_smime_signed_file
    f.write(_sign_bytes(cert, private_key, content))
  File "C:\dev\ros2_iron\Lib\site-packages\sros2\_utilities.py", line 140, in _sign_bytes
    flags = SSLBinding.lib.PKCS7_DETACHED
AttributeError: module 'lib' has no attribute 'PKCS7_DETACHED'
Yadunund commented 1 year ago

To clarify, do you get this error when running without Admin privileges? Or even with?

bai-ivan commented 1 year ago

I get this as Administrator. Without administrative access it complains about permissions.

Yadunund commented 1 year ago

Gotcha. I've opened this ticket upstream https://github.com/ros2/sros2/issues/285

Yadunund commented 1 year ago

Closing this since we have a bug ticketed.