# SSL SELF-SIGNED Certificate Issue

**URL:** <https://forum.ansible.com/t/ssl-self-signed-certificate-issue/40744>\
**Category:** Get Help\
**Tags:** rhel, ansible-lint, linux\
**Created:** [March 3, 2025, 10:11am UTC](https://forum.ansible.com/t/ssl-self-signed-certificate-issue/40744 "2025-03-03T10:11:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shaffique.babu](https://avatars.discourse-cdn.com/v4/letter/s/7ba0ec/32.png) [@Shaffique.babu](https://forum.ansible.com/u/Shaffique.babu)\
**Post date:** [March 3, 2025, 10:11am UTC](https://forum.ansible.com/t/ssl-self-signed-certificate-issue/40744/1 "2025-03-03T10:11:07Z")

</div>

SSL Self Signed certificate was got expired. I have renewed the certificate in RHEL v8.10. After that through Ansible still old date of SSL certificate are reflecting in reports (AIOPS)

---

<div class="post-metadata">

**Author:** ![kristianheljas](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kristianheljas/32/7702_2.png) [@kristianheljas](https://forum.ansible.com/u/kristianheljas)\
**Post date:** [March 3, 2025, 11:35am UTC](https://forum.ansible.com/t/ssl-self-signed-certificate-issue/40744/2 "2025-03-03T11:35:24Z")

</div>

Please add more details how you check the ceritifcate date validity.

Sharing task(s) you use to check the dates is a good start.

---

<div class="post-metadata">

**Author:** ![Shaffique.babu](https://avatars.discourse-cdn.com/v4/letter/s/7ba0ec/32.png) [@Shaffique.babu](https://forum.ansible.com/u/Shaffique.babu)\
**Post date:** [March 3, 2025, 6:36pm UTC](https://forum.ansible.com/t/ssl-self-signed-certificate-issue/40744/3 "2025-03-03T18:36:30Z")

</div>

**Logs from the server**  
**# openssl x509 -in /var/nexus/etc/ssl/nexus.crt -noout -text | grep -A 2 “Validity”**  
\*\* Validity\*\*  
\*\* Not Before: Feb 19 05:51:41 2025 GMT\*\*  
\*\* Not After : Feb 19 05:51:41 2026 GMT\*\*  
**-------------------------------------------------------------------------------------------**  
**# openssl x509 -in /var/nexus/etc/ssl/nexus.key -noout -text | grep -A 2 “Validity”**  
**unable to load certificate**  
**139780946007872:error:0909006C:PEM routines:get\_name:no start line:crypto/pem/pem\_lib.c:745:Expecting: TRUSTED CERTIFICATE**  
**---------------------------------------------------------------------------------------------**  
**Logs from the AIOPS**  
**|Platform|Hostname|Certificate\_ Expiration\_Date|Certificate Status|Certificate CN|Certificate Issuer|**  
**|—|—|—|—|—|—|**  
**|Linux|prvlkojxxxxx|13-Apr-24|Expired|C = US; ST = New York; L = Armonk; O = IBM; CN = XX.XX.XX.XX|SELF-SIGNED|**  
**|Linux|prvlkojpxxxx|02-May-24|Expired|C = US; ST = New York; L = Armonk; O = IBM; CN = XX.XX.XX.XX|SELF-SIGNED|**

---

<div class="post-metadata">

**Author:** ![dnmvisser](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@dnmvisser](https://forum.ansible.com/u/dnmvisser)\
**Post date:** [March 4, 2025, 8:19am UTC](https://forum.ansible.com/t/ssl-self-signed-certificate-issue/40744/4 "2025-03-04T08:19:08Z")

</div>

That is an openssl shell command, not ansible code.  
The error you get on the second command is because you’re trying to do x509 logic on a private key, that won’t work.

If I had to guess, you have an ansible playbook that renewed a certificate, but failed to reload the service that is using it?

In any case, we’d need to see the related ansible playbooks/etc to help you.

BTW you don’t have to use grep as `openssl` has a native option to get what you want: `openssl x509 -in /var/nexus/etc/ssl/nexus.key -noout -dates`.
