Error while uploading certificate in Tyk Dashboard

I’m trying to upload a PEM certificate in Tyk Dashboard (on-premise). When I hit the upload button, I get this error: Could not create certificate: Failed to create certificate: Post http://localhost:8443/tyk/certs/?org_id=5b9a49d7c679832e13f49529: net/http: HTTP/1.x transport connection broken: malformed HTTP response “\x15\x03\x01\x00\x02\x02\x16”

As shown here:

When I remove the certificate and upload another one (or the same), I get this error: Failed to read response body, body empty

I can create users and API’s via the Dashboard, so the connection between dashboard en gateway should be ok. I also tried different certificate file formats, but they all give the same error. Does anyone know where to look?

Edit: I get the same error while creating a Key in Dashboard.
Edit2: I can add certificates with the gateway API and see them with another API call, but they are still not visible in the dashboard. When I add a certificate with the dashboard API, I see this error: {“Status”:“Error”,“Message”:“Failed to read response body, body empty”,“Meta”:null}