Skip to content

Conflict error when running pyarmor gen key -e while outer=1 is enabled in config ERROR --outer conflicts with any -e, --period, -b #2069

@HyeonJohn

Description

@HyeonJohn

I'm using PyArmor 9.0.8 on Windows x86_64. When I set "outer=1" in the PyArmor config (for example, via "pyarmor cfg runtime:outer=1"), running this command fails:

pyarmor gen key -e 2025-03-15

PyArmor immediately returns the error:
ERROR --outer conflicts with any -e, --period, -b

This looks like PyArmor incorrectly interprets "-e" as an internal license option, even though "pyarmor gen key -e" is supposed to generate an external (outer) key with an expiration date.

Why this is a problem:

  • The entire purpose of "pyarmor gen key -e" is to create an external/outer key that expires on a certain date.
  • If we have "outer=1" set in the config to always use external licenses, PyArmor blocks the "-e" option completely, treating it as if it were for an internal license.
  • As a result, we cannot create an outer key with an expiration date while "outer=1" is active.

Steps to Reproduce:

  1. Run "pyarmor cfg runtime:outer=1"
  2. Try to create an external key with expiration:
    pyarmor gen key -e 2025-03-15
  3. Observe the conflict error.

Expected Behavior:

  • "pyarmor gen key -e" should succeed in creating an external/outer key with the specified expiration date, even when "outer=1" is enabled.
  • PyArmor should distinguish between “internal license -e” and “external key -e”.

Actual Behavior:

  • PyArmor returns an error stating that "--outer" conflicts with "-e", preventing the creation of the external key.

Suggested Fix:

  • Separate the handling of "-e" for internal licenses vs. external keys.
  • Allow "pyarmor gen key -e" to work properly under "outer=1".

Thank you for reviewing this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions