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.
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:
Currently there's no way to import TLS credentials via TLSServerCredential.import_signed() with long certificate strings.