Skip to content

load_certificate ignores format argument and infers format from file extension #1927

@DieserFelix

Description

@DieserFelix

Describe the bug

When loading a certificate from a file using server.load_certificate, the file's extension takes precedence over the format argument.

To Reproduce

Store a certificate in DER encoding in a file certificate.pem. Try to load it using server.load_certificate("certificate.pem", format="der").

Expected behavior

server.load_certificate should not try to infer the certificate's format from the file's extension if the format argument is provided.

Screenshots

Image

Version

Python-Version: 3.11.6

opcua-asyncio Version (e.g. master branch, 0.9): 1.1.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions