SSL/TLS for MQTT broker error "Client certificate and private key are not a valid pair"

Not an expert in this, so I’ve been following this guide for setting up mosquitto in a separate container next to HA in docker. To secure the connection with SSL/TLS it recommends a bash script to create the CA and client and server files.

But when I upload these files in the MQTT broker setup in HA, under Advanced Mode, I get the error “Client certificate and private key are not a valid pair”.
When checking the client.crt and client.key files with these commands they do return the same result. Any ideas why HA still thinks they are invalid?
I’ve been searching quite some time but can’t find the issue so far.

openssl x509 -noout -modulus -in client.crt | openssl md5
openssl rsa -noout -modulus -in client.key | openssl md5

They shouldn’t return the same MD5, that would be a huge security issue.

Guess you’re right, looks like I was confusing the commands here.
Got it to work now, had to slightly modify the openssl commands. Also, the HA integration could only establish connection to the broker after I deleted an old container (without SSL/TLS configured) that used the same mosquitto.conf file.