Actions
Issue #6025
closedPulp 3.0 remote cert sha256 value doesn't match the input or the cert
Start date:
01/19/2020
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 66
Quarter:
Description
When I list a remote, the certs are showed like below
{
"ca_cert": "b8bd944ff40f1756c08743800453b724f133029725dc762ed9ce6504a828a5ec",
"client_cert": "d24baa45b4b554e782dd134e6c5f1eb1f88e1d88122d3d417b05f7f8153954a1",
"client_key": "55ece66e807b5c979f425e55f90958b8fbc769320a0bdb5f4c3563464e8c9530",
...
}
Tied to compare the hexdigest from the ca_cert input string and using openssl command give the same sha256 sum but not match when query pulp.
hashlib.sha256(bytes(ca_cert_string, "utf8")).hexdigest()
- openssl dgst -sha256 redhat-uep.pem
SHA256(redhat-uep.pem)= 39e65fabe7560d366be3bc4d133bcdef13e30d41ac552a05d182e2f66395422d
This prevent us from comparing the current cert on the system with the cert configured in the pulp. The sha256 sum don't match even the cert is working and configured correctly.
Files
Actions
Do not trim leading and trailing whitespace characters
In this commit, there was also fixed the documentation. The field itself returns a hash of a file content, not a hash of a certificate stored within a file.
closes #6025 https://pulp.plan.io/issues/6025