Skip to content

windows_cert_connect.py --cert argument required and unrecognized #359

Closed
@ecepep

Description

@ecepep

Describe the bug

windows_cert_connect.py fails when provided the "--cert" argument because it is unrecognized and fails when it is lacking "--cert" because it is required. 🤯

Expected Behavior

One can provide --cert without exit

Current Behavior

With "--cert":
python.exe windows_cert_connect.py --cert LocalMachine\\MY\\<thumbprint> --endpoint [...]-ats.iot.eu-west-1.amazonaws.com --client_id me-cert-store

usage: windows_cert_connect.py [-h] --endpoint [--ca_file ]
[--verbosity ] [--client_id ]
windows_cert_connect.py: error: unrecognized arguments: --cert LocalMachine\MY\

Without "--cert":
python.exe windows_cert_connect.py --endpoint [...]-ats.iot.eu-west-1.amazonaws.com --client_id me-cert-store

usage: windows_cert_connect.py [-h] --endpoint [--ca_file ]
[--verbosity ] [--client_id ]

Send and receive messages through and MQTT connection.

optional arguments:
-h, --help show this help message and exit
--endpoint The endpoint of the mqtt server not including a port.
--ca_file Path to AmazonRootCA1.pem (optional, system trust
store used by default)
--verbosity
Logging level.
--client_id Client ID to use for MQTT connection (optional,
default='test-*').
Command --cert required.

Process finished with exit code 0

Reproduction Steps

python.exe windows_cert_connect.py --cert LocalMachine\\MY\\<thumbprint> --endpoint [...]-ats.iot.eu-west-1.amazonaws.com --client_id me-cert-store

python.exe windows_cert_connect.py --endpoint [...]-ats.iot.eu-west-1.amazonaws.com --client_id me-cert-store

Possible Solution

No response

Additional Information/Context

No response

SDK version used

aws-iot-device-sdk-python-v2 checkout at tag: v1.11.9

Environment details (OS name and version, etc.)

Win 10 Python 3.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions