Skip to content

TLSServerCredential.import_signed() fails if certificate string is long #79

@cs-1

Description

@cs-1

TLSServerCredential.import_signed() will fail if certificate or key given is long. It will try to use the certificate string as a filename and this will fail with an error that the filename is too long.

Proposed improvement:

  • Use x509.load_pem_x509_certificate(...) to check if the string given is actually a valid certificate. If yes, don't try to use the string as a filename.
  • Use serialization.load_pem_private_key(...) to do the same for the private key.

Currently there's no way to import TLS credentials via TLSServerCredential.import_signed() with long certificate strings.

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