> ## Content Index
> Fetch the complete content index at: https://www.bagz.fr/llms.txt
> Use this file to discover other available public pages before exploring further.

# Check expiration dates for local certificates
- URL: https://www.bagz.fr/check-expiration-dates-for-local-certificates/
- Published: 2023-08-10T16:00:56.000Z
- Updated: 2023-08-10T16:00:56.000Z
- Author: bgazui
- Tags: Linux, #Migrated-1790668826633, #wp, #wp-post, #Import 2026-09-29 08:00

This script does allow a quick check of the local certificates, in order to make sure none of them is expired:

```
for pem in /etc/ssl/certs/*.crt /etc/ssl/certs/*.pem /etc/pki/tls/certs/*.pem /etc/pki/tls/certs/*.crt; do
  printf '%s: %s\n' \
    "$(date --date="$(openssl x509 -enddate -noout -in "$pem"|cut -d= -f 2)" --iso-8601)" \
    "$pem"
done | sort
```

The output will look like:

```
2017-11-06: /etc/pki/tls/certs/ldapserver.pem
2022-12-15: /etc/pki/tls/certs/ca-bundle.crt
2022-12-15: /etc/pki/tls/certs/ca-bundle.trust.crt
2023-02-08: /etc/pki/tls/certs/localhost.crt
2025-07-11: /etc/pki/tls/certs/ldap.local.crt
2033-05-08: /etc/pki/tls/certs/local.crt

```