SSL: key values mismatch, except they doesn't

Hello!

According to this topic, you can receive this error when your certificate crt and key doesn’t match:

2022/06/24 19:46:22 [emerg] 15710#0: SSL_CTX_use_PrivateKey("/etc/gitlab/ssl/private.key") failed (SSL: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch)

Except they doesn’t mismatch:

root@gitlab-test:/etc/gitlab/ssl# openssl x509 -noout -modulus -in certificate.crt | openssl md5
(stdin)= 7c757291b6ab3ae7eb6fe14f07da7145
root@gitlab-test:/etc/gitlab/ssl# openssl rsa -noout -modulus -in private.key | openssl md5
(stdin)= 7c757291b6ab3ae7eb6fe14f07da7145

We are pretty sure that our cert/key matches because our current official/commercial certificate is expiring and we are updating our hosts with exactly this new pair of crt/key, and they are working. This issue is only happening with Gitlab. With the previous pair (from the same provider) it is working fine

We are using Gitlab 15.0.3.

This doesn’t happen with 13.12.15, for example.

Does anybody knows what could be possible wrong here?

Thanks.
Regards.