check-certificat.com / chkcert_V1R1M1.py / Rapport technique Technical report Informe técnico
chkcert_V1R1M1_Technical_Report.html MAJ 17.07.2026 Updated 2026-07-17 Act. 17.07.2026
Rapport Technique — chkcert_V1R1M1 — JokerSoft © 2026Technical Report — chkcert_V1R1M1 — JokerSoft © 2026Informe técnico — chkcert_V1R1M1 — JokerSoft © 2026

chkcert_V1R1M1.py

Certificate Information & Control Tool — Un outil, tous les formats de keystore Certificate Information & Control Tool — One tool, all keystore formats Certificate Information & Control Tool — Una herramienta, todos los formatos de almacén

Python 3.9+ 6 950+ ligneslineslíneas 316 KB VERSION V1R1M1 Windows · Linux · macOS · AIX Nuitka-compatible cryptography · paramiko

Résumé exécutifExecutive SummaryResumen ejecutivo

chkcert_V1R1M1.py est un outil CLI Python mono-fichier destiné à l'inspection, l'audit et le reporting de certificats TLS/PKI dans des environnements d'infrastructure variés. Il couvre l'intégralité du spectre des keystores rencontrés en entreprise : IBM MQ/GSKit (.kdb), Java (.jks, .p12, .jceks), formats ouverts (.pem, .der, .p7b, .csr) et le truststore Java cacerts. is a single-file Python CLI tool for the inspection, audit and reporting of TLS/PKI certificates across varied infrastructure environments. It covers the full spectrum of keystores found in the enterprise: IBM MQ/GSKit (.kdb), Java (.jks, .p12, .jceks), open formats (.pem, .der, .p7b, .csr) and the Java cacerts truststore. es una herramienta CLI Python de un solo fichero para la inspección, auditoría e informe de certificados TLS/PKI en entornos de infraestructura variados. Cubre todo el espectro de almacenes de claves presentes en la empresa: IBM MQ/GSKit (.kdb), Java (.jks, .p12, .jceks), formatos abiertos (.pem, .der, .p7b, .csr) y el almacén de confianza Java cacerts.

Il fonctionne en mode local ou remote SSH/SFTP, génère des rapports HTML et JSON auto-contenus, et est conçu pour être compilé avec Nuitka en binaire standalone ou onefile pour déploiement sans Python sur les serveurs cibles. It runs in local or remote SSH/SFTP mode, generates self-contained HTML and JSON reports, and is designed to be compiled with Nuitka into a standalone or onefile binary for Python-free deployment on target servers. Funciona en modo local o remoto SSH/SFTP, genera informes HTML y JSON autónomos, y está diseñado para compilarse con Nuitka como binario standalone u onefile para un despliegue sin Python en los servidores destino.

Pourquoi cet outil ?Why this tool?¿Por qué esta herramienta? Dans les grandes infrastructures, les certificats sont répartis entre des dizaines de keystores hétérogènes, sur des plateformes différentes (Linux, Windows, AIX), gérés par des équipes distinctes. Aucun outil du marché ne couvre l'ensemble de ces formats en ligne de commande, sans agent, sans serveur central. chkcert comble ce manque avec une approche sans installation, sans dépendance sur le serveur cible. In large infrastructures, certificates are spread across dozens of heterogeneous keystores, on different platforms (Linux, Windows, AIX), managed by separate teams. No tool on the market covers this full set of formats from the command line, agentless, with no central server. chkcert fills this gap with an install-free approach, with no dependency on the target server. En las grandes infraestructuras, los certificados se reparten entre decenas de almacenes heterogéneos, en plataformas distintas (Linux, Windows, AIX), gestionados por equipos separados. Ninguna herramienta del mercado cubre todo este conjunto de formatos en línea de comandos, sin agente, sin servidor central. chkcert cubre este vacío con un enfoque sin instalación, sin dependencia en el servidor destino.

Contexte & enjeuxContext & ChallengesContexto y retos

Le problème des cycles courts des Autorités de CertificationThe problem of short CA certificate cyclesEl problema de los ciclos cortos de las Autoridades de Certificación

Depuis 2020, les grandes AC (DigiCert, Sectigo, GlobalSign, Let's Encrypt) ont progressivement réduit la durée de validité maximale des certificats TLS : Since 2020, the major CAs (DigiCert, Sectigo, GlobalSign, Let's Encrypt) have progressively shortened the maximum validity period of TLS certificates: Desde 2020, las grandes AC (DigiCert, Sectigo, GlobalSign, Let's Encrypt) han reducido progresivamente el período de validez máximo de los certificados TLS:

  • Avant 2020 :Before 2020:Antes de 2020: certificats valables jusqu'à 3 ans (1095 jours)certificates valid for up to 3 years (1095 days)certificados válidos hasta 3 años (1095 días)
  • 2020 : passage à 398 jours maximum (13 mois)shift to 398 days maximum (13 months)paso a 398 días máximo (13 meses)
  • 2023 : Apple/Mozilla poussent vers 90 jours (Let's Encrypt)Apple/Mozilla push toward 90 days (Let's Encrypt)Apple/Mozilla empujan hacia 90 días (Let's Encrypt)
  • 2026–2027 : Google Chrome impose 90 jours maximum pour les certificats DV/OV publics. CA/Browser Forum vote en faveur de 47 jours d'ici 2027.Google Chrome mandates 90 days maximum for public DV/OV certificates. CA/Browser Forum votes in favour of 47 days by 2027.Google Chrome impone 90 días máximo para los certificados DV/OV públicos. El CA/Browser Forum vota a favor de 47 días para 2027.

Cette réduction drastique rend le suivi manuel des expirations impossible à l'échelle — un parc de 50 keystores nécessite potentiellement 200+ renouvellements par an si les cycles passent à 47 jours. This drastic reduction makes manual expiry tracking impossible at scale — a fleet of 50 keystores potentially needs 200+ renewals per year once cycles drop to 47 days. Esta drástica reducción hace que el seguimiento manual de expiraciones sea imposible a escala — un parque de 50 almacenes necesitará potencialmente 200+ renovaciones al año si los ciclos bajan a 47 días.

L'hétérogénéité des formats : le défi des grandes infrastructuresFormat heterogeneity: the challenge of large infrastructuresLa heterogeneidad de formatos: el reto de las grandes infraestructuras

Une infrastructure financière ou industrielle typique mêle :A typical financial or industrial infrastructure mixes:Una infraestructura financiera o industrial típica combina:

IBM MQ / WebSphere.kdb / .cms — runmqakm / gsk8capicmd
Java EE / Spring.jks / .jceks / .p12 — keytool
Nginx / Apache / HAProxy.pem / .crt / .cer — openssl
PKCS#12 / PFX.pfx — Windows / IIS
Chaînes PKCS#7PKCS#7 chainsCadenas PKCS#7.p7b — bundles AC intermédiairesintermediate CA bundlesbundles de AC intermedias
CSR en attentePending CSRCSR pendiente.csr — pipeline de renouvellementrenewal pipelinepipeline de renovación
cacerts JDKTruststore Java — auto-détectéJava truststore — auto-detectedAlmacén de confianza Java — autodetectado
DER binaireBinary DERDER binario.der — export des outils Microsoftexports from Microsoft toolsexportaciones de herramientas Microsoft

Chaque format nécessite un outil différent. chkcert unifie l'analyse de tous ces formats sous une interface CLI commune et une sortie JSON homogène. Each format requires a different tool. chkcert unifies the analysis of all these formats under a common CLI interface and a homogeneous JSON output. Cada formato requiere una herramienta diferente. chkcert unifica el análisis de todos estos formatos bajo una interfaz CLI común y una salida JSON homogénea.

Incidents réels — le coût des certificats expirésReal incidents — the cost of expired certificatesIncidentes reales — el coste de los certificados caducados

Les expirations de certificats ne sont pas anodines. Voici des incidents documentés qui illustrent l'enjeu :Certificate expirations are not trivial. Here are documented incidents that illustrate the stakes:Las expiraciones de certificados no son triviales. Estos son incidentes documentados que ilustran lo que está en juego:

🔴 Microsoft Teams — Panne mondiale (février 2020)Global outage (February 2020)Caída global (febrero de 2020)
DURÉEDURATIONDURACIÓN : ~3 heureshourshoras · IMPACTIMPACTIMPACTO : plusieurs dizaines de millions d'utilisateurstens of millions of usersdecenas de millones de usuarios · CAUSECAUSECAUSA : certificat TLS expiréexpired TLS certificatecertificado TLS caducado

Microsoft Teams est devenu inaccessible dans le monde entier pendant environ 3 heures. La cause racine était l'expiration d'un certificat TLS utilisé pour l'authentification des services. Des millions de salariés se sont trouvés dans l'incapacité de communiquer, d'accéder aux fichiers partagés ou de rejoindre des réunions. L'incident est survenu un lundi matin, en pleine heure de pointe. Microsoft Teams became unreachable worldwide for about 3 hours. The root cause was the expiry of a TLS certificate used for service authentication. Millions of employees were unable to communicate, access shared files, or join meetings. The incident occurred on a Monday morning, at peak hours. Microsoft Teams quedó inaccesible en todo el mundo durante unas 3 horas. La causa raíz fue la expiración de un certificado TLS usado para la autenticación de servicios. Millones de empleados no pudieron comunicarse, acceder a ficheros compartidos ni unirse a reuniones. El incidente ocurrió un lunes por la mañana, en plena hora punta.

Coût estimé : plusieurs millions d'euros en perte de productivité (entreprises utilisant Teams comme outil principal).Estimated cost: several million euros in lost productivity (companies using Teams as their primary tool).Coste estimado: varios millones de euros en pérdida de productividad (empresas que usan Teams como herramienta principal).

🔴 Ericsson — Panne réseau mobile mondiale (décembre 2018)Global mobile network outage (December 2018)Caída global de red móvil (diciembre de 2018)
DURÉEDURATIONDURACIÓN : 11 heureshourshoras · IMPACTIMPACTIMPACTO : O2 UK, SoftBank Japan, +11 opérateursoperatorsoperadores · CAUSECAUSECAUSA : certificat OCSP expiré dans le logiciel réseauexpired OCSP certificate in network softwarecertificado OCSP caducado en el software de red

Un certificat expiré dans le logiciel de gestion réseau d'Ericsson a provoqué la désactivation simultanée de réseaux 4G chez une douzaine d'opérateurs mondiaux. En Grande-Bretagne, O2 a perdu 32 millions d'abonnés pendant 11 heures. Les systèmes de paiement sans contact, les terminaux de point de vente et les applications de transport en commun ont été paralysés. An expired certificate in Ericsson's network management software caused the simultaneous shutdown of 4G networks at a dozen global operators. In Britain, O2 lost 32 million subscribers for 11 hours. Contactless payment systems, point-of-sale terminals and public transit apps were paralysed. Un certificado caducado en el software de gestión de red de Ericsson provocó la desactivación simultánea de redes 4G en una docena de operadores globales. En Gran Bretaña, O2 perdió 32 millones de abonados durante 11 horas. Los sistemas de pago sin contacto, los terminales de punto de venta y las aplicaciones de transporte público quedaron paralizados.

Coût Ericsson : ~95 millions d'euros en compensation + atteinte massive à la réputation.Ericsson's cost: ~€95 million in compensation + massive reputational damage.Coste de Ericsson: ~95 millones de euros en compensaciones + un daño reputacional masivo.

🔴 Spotify — Interruption de service (mars 2023)Service outage (March 2023)Interrupción del servicio (marzo de 2023)
DURÉEDURATIONDURACIÓN : ~2 heureshourshoras · IMPACTIMPACTIMPACTO : millions d'utilisateursmillions of usersmillones de usuarios · CAUSECAUSECAUSA : certificat TLS expiré sur infrastructure interneexpired TLS certificate on internal infrastructurecertificado TLS caducado en infraestructura interna

Spotify a subi une interruption de service sur son application mobile et web suite à l'expiration d'un certificat TLS sur un composant interne d'authentification. L'incident s'est produit en dehors des heures de bureau, retardant la détection. Spotify suffered a service outage on its mobile and web app following the expiry of a TLS certificate on an internal authentication component. The incident occurred outside office hours, delaying detection. Spotify sufrió una interrupción del servicio en su aplicación móvil y web tras la expiración de un certificado TLS en un componente interno de autenticación. El incidente ocurrió fuera del horario de oficina, retrasando su detección.

Perte estimée en abonnements + dommage image en période de forte concurrence (Apple Music, Amazon Music).Estimated subscription loss + brand damage amid fierce competition (Apple Music, Amazon Music).Pérdida estimada de suscripciones + daño de imagen en un período de fuerte competencia (Apple Music, Amazon Music).

🟠 LinkedIn — Dégradation de service (2021)Service degradation (2021)Degradación del servicio (2021)
DURÉEDURATIONDURACIÓN : ~1h30 · IMPACTIMPACTIMPACTO : accès HTTPS dégradédegraded HTTPS accessacceso HTTPS degradado · CAUSECAUSECAUSA : certificat intermédiaire expiré dans la chaîne de confianceexpired intermediate certificate in the trust chaincertificado intermedio caducado en la cadena de confianza

L'expiration d'un certificat CA intermédiaire a rompu la chaîne de confiance SSL de LinkedIn, rendant le site inaccessible sur certains navigateurs et clients mobiles. Ce type d'incident illustre que le certificat leaf n'est pas le seul à surveiller — les CA intermédiaires ont également des dates d'expiration. The expiry of an intermediate CA certificate broke LinkedIn's SSL trust chain, making the site unreachable on some browsers and mobile clients. This type of incident shows that the leaf certificate isn't the only one to watch — intermediate CAs also have expiry dates. La expiración de un certificado de CA intermedia rompió la cadena de confianza SSL de LinkedIn, dejando el sitio inaccesible en algunos navegadores y clientes móviles. Este tipo de incidente muestra que el certificado leaf no es el único a vigilar — las CA intermedias también tienen fechas de expiración.

📌 Ce que chkcert apporte :What chkcert brings:Lo que aporta chkcert: La simulation de date (--date 2038-12-31) permet de projeter dans le futur et de détecter les expirations avant qu'elles ne surviennent — y compris sur les CA intermédiaires et racines. Les fichiers JSON joints à ce rapport illustrent précisément ce cas : des certificats Sectigo analysés avec date de référence 2038-12-31 révèlent une expiration de 1014 jours. Date simulation (--date 2038-12-31) lets you project into the future and detect expirations before they happen — including on intermediate and root CAs. The JSON files attached to this report illustrate exactly this case: Sectigo certificates analysed with a 2038-12-31 reference date reveal a 1014-day expiry. La simulación de fecha (--date 2038-12-31) permite proyectarse al futuro y detectar expiraciones antes de que ocurran — incluso en CA intermedias y raíz. Los ficheros JSON adjuntos a este informe ilustran precisamente este caso: certificados Sectigo analizados con fecha de referencia 2038-12-31 revelan una expiración de 1014 días.

Métriques clésKey MetricsMétricas clave

6 950+
Lignes de codeLines of codeLíneas de código
316 KB
Taille sourceSource sizeTamaño del fuente
167
Fonctions / méthodesFunctions / methodsFunciones / métodos
5
DataClasses
8
Familles de formatsFormat familiesFamilias de formatos
4
Plateformes ciblesTarget platformsPlataformas objetivo
3
Sorties CLI/JSON/HTMLCLI/JSON/HTML outputsSalidas CLI/JSON/HTML
27
Args CLICLI argsArgs CLI
DimensionValeurDétail
Dépendances tierces obligatoires1cryptography (paramiko optionnel — mode remote)
OS supportés4Windows, Linux, macOS, AIX (via binaire Nuitka)
Compatibilité compilateurNuitka--onefile + --standalone, NUITKA_ONEFILE_PARENT géré
Encodage cibleUTF-8Avec reconfigure() pour Windows
Taille min RSA (défaut)2048 bitsPlancher absolu — surchargeable à la hausse via constantes_V1R1M1.properties
Taille RSA pour les CSR générés4096 bitsSurcharger via constantes_V1R1M1.properties
Taille min clé EC224 bitsMIN_EC_KEY_SIZE — P-256/P-384/P-521 tous valides
Profondeur max chaîne de cert20_CHAIN_MAX_DEPTH
Seuil clé faible/désactivée≤ 1024 bitsWEAK_KEY_THRESHOLD (fixe dans le code, RSA/DSA uniquement)
DimensionValueDetail
Mandatory third-party dependencies1cryptography (paramiko optional — remote mode)
Supported OS4Windows, Linux, macOS, AIX (via Nuitka binary)
Compiler compatibilityNuitka--onefile + --standalone, NUITKA_ONEFILE_PARENT handled
Target encodingUTF-8With reconfigure() for Windows
Min RSA size (default)2048 bitsAbsolute floor — overridable upward via constantes_V1R1M1.properties
RSA size for generated CSRs4096 bitsOverride via constantes_V1R1M1.properties
Min EC key size224 bitsMIN_EC_KEY_SIZE — P-256/P-384/P-521 all valid
Max cert chain depth20_CHAIN_MAX_DEPTH
Weak/disabled key threshold≤ 1024 bitsWEAK_KEY_THRESHOLD (fixed in code, RSA/DSA only)
DimensiónValorDetalle
Dependencias de terceros obligatorias1cryptography (paramiko opcional — modo remoto)
SO soportados4Windows, Linux, macOS, AIX (vía binario Nuitka)
Compatibilidad del compiladorNuitka--onefile + --standalone, NUITKA_ONEFILE_PARENT gestionado
Codificación destinoUTF-8Con reconfigure() para Windows
Tamaño RSA mínimo (por defecto)2048 bitsLímite absoluto — ajustable al alza vía constantes_V1R1M1.properties
Tamaño RSA para los CSR generados4096 bitsAjustar vía constantes_V1R1M1.properties
Tamaño mínimo de clave EC224 bitsMIN_EC_KEY_SIZE — P-256/P-384/P-521 todas válidas
Profundidad máx. de cadena20_CHAIN_MAX_DEPTH
Umbral de clave débil/desactivada≤ 1024 bitsWEAK_KEY_THRESHOLD (fijo en el código, solo RSA/DSA)

Plateformes ciblesTarget platformsPlataformas objetivo — Unix & Windows

chkcert est conçu pour fonctionner de manière identique sur toutes les plateformes d'infrastructure rencontrées en entreprise. Le binaire Nuitka onefile supprime toute dépendance à Python sur le serveur cible. chkcert is designed to run identically across every infrastructure platform found in the enterprise. The Nuitka onefile binary removes any Python dependency on the target server. chkcert está diseñado para funcionar de forma idéntica en todas las plataformas de infraestructura presentes en la empresa. El binario Nuitka onefile elimina cualquier dependencia de Python en el servidor destino.

🐧 Linux — Distribution principaleLinux — Primary distributionLinux — Distribución principal

Environnement naturel de l'outil. Testé sur RHEL/AlmaLinux, Ubuntu, Debian. Compatible avec les systèmes de fichiers case-sensitive. Supports ANSI natif. The tool's natural environment. Tested on RHEL/AlmaLinux, Ubuntu, Debian. Compatible with case-sensitive filesystems. Native ANSI support. Entorno natural de la herramienta. Probado en RHEL/AlmaLinux, Ubuntu, Debian. Compatible con sistemas de ficheros sensibles a mayúsculas. Soporte ANSI nativo.

Outils externesExternal toolsHerramientas externas : runmqakm (IBM MQ), gsk8capicmd_64 (GSKit), keytool (JDK)

🪟 Windows — Support completWindows — Full supportWindows — Soporte completo

Activation automatique des codes ANSI via GetConsoleMode / SetConsoleMode (ENABLE_VIRTUAL_TERMINAL_PROCESSING). Encodage UTF-8 forcé via reconfigure(). Séparateurs de chemins normalisés. Automatic ANSI code activation via GetConsoleMode / SetConsoleMode (ENABLE_VIRTUAL_TERMINAL_PROCESSING). UTF-8 encoding forced via reconfigure(). Normalised path separators. Activación automática de códigos ANSI vía GetConsoleMode / SetConsoleMode (ENABLE_VIRTUAL_TERMINAL_PROCESSING). Codificación UTF-8 forzada vía reconfigure(). Separadores de ruta normalizados.

Compatible PowerShell, cmd.exe, Windows Terminal. Binaire .exe via Nuitka --windows-console-mode=attachCompatible with PowerShell, cmd.exe, Windows Terminal. .exe binary via Nuitka --windows-console-mode=attachCompatible con PowerShell, cmd.exe, Windows Terminal. Binario .exe vía Nuitka --windows-console-mode=attach

🍎 macOS

Tests partiels sur macOS. Pas de runmqakm natif en général (ANSI fonctionnels). Partial testing on macOS. No native runmqakm in general (ANSI functional). Pruebas parciales en macOS. Sin runmqakm nativo en general (ANSI funcional).

⚙️ AIX / IBM i

Supporté via le binaire Nuitka compilé sur Linux et copié sur AIX (si compatible ABI). Principal usage : analyse des keystores IBM MQ sur plateformes Unix propriétaires. Python n'est pas requis sur AIX. Supported via the Nuitka binary compiled on Linux and copied to AIX (if ABI-compatible). Main use case: analysing IBM MQ keystores on proprietary Unix platforms. Python is not required on AIX. Soportado mediante el binario Nuitka compilado en Linux y copiado a AIX (si es compatible a nivel ABI). Uso principal: análisis de almacenes IBM MQ en plataformas Unix propietarias. Python no es necesario en AIX.

Gestion des outils externes par OSExternal tools management by OSGestión de herramientas externas por SO

FormatLinux/AIXWindowsmacOS
.kdbrunmqakm · gsk8capicmd_64runmqakm.exe · gsk8capicmd.exegsk8capicmd (GSKit macOS rare)
.jks .p12keytool · runmqktoolkeytool.exe · runmqktool.exekeytool (JDK macOS)
.pem .der .p7b .csraucun — cryptography purenone — pure cryptographyninguna — cryptography puroaucun — cryptography purenone — pure cryptographyninguna — cryptography puroaucun — cryptography purenone — pure cryptographyninguna — cryptography puro
cacertskeytool auto-détectéauto-detectedautodetectadokeytool.exe auto-détectéauto-detectedautodetectadokeytool auto-détectéauto-detectedautodetectado

💡 Principe fondamental :Core principle:Principio fundamental: Python et cryptography ne sont jamais requis sur le serveur cible en mode remote. Seul SSH/SFTP est nécessaire. Toute l'analyse s'effectue en local sur la machine de l'opérateur. Python and cryptography are never required on the target server in remote mode. Only SSH/SFTP is needed. All analysis happens locally on the operator's machine. Python y cryptography nunca son necesarios en el servidor destino en modo remoto. Solo se necesita SSH/SFTP. Todo el análisis se realiza localmente en la máquina del operador.

ArchitectureArchitectureArquitectura généraleoverviewgeneral

Le script est mono-fichier et se décompose en 12 couches logiques : The script is single-file and breaks down into 12 logical layers: El script es de un solo fichero y se descompone en 12 capas lógicas:

__main__Orchestration, argparse, routingOrchestration, argparse, routingOrquestación, argparse, enrutamiento
CLI (argparse)27 arguments, groupes mutuellement exclusifsarguments, mutually exclusive groupsargumentos, grupos mutuamente excluyentes
AnalysisContext (_ctx)Singleton d'état partagéShared-state singletonSingleton de estado compartido
Dispatching FormatsFormat dispatchingEnrutamiento de formatosExtension + MIME → process_*
Processeurs de fichiersFile processorsProcesadores de ficheropem · kdb · p7b · jks · csr · remote
Analyse X.509X.509 analysisAnálisis X.509cryptography lib, show_cert(), audit
Export JSON/HTMLJSON/HTML exportExportación JSON/HTMLgenerate_json_output / generate_html_output
Rapport remédiationRemediation reportInforme de remediaciónP1/P2/P3, show_remediation_report()
Chaînage PKIPKI chainingEncadenamiento PKIshow_chain_summary / serial, _resolve_chain()
Remote SSH/SFTPparamiko — _ssh_connect, _run_remote_analysis
Simulation temporelleTime simulationSimulación temporal--date YYYY-MM-DD ouoro +N/-N joursdaysdías
Couleurs ANSIANSI coloursColores ANSIc_colors, cross-platform Win/Unix
__main__
  ├─ init couleurs + quiet mode
  ├─ argparse → args
  ├─ _ctx.reset_all()
  ├─ résolution de password (_resolve_password)
  ├─ construction de files_to_process
  │    ├─ --remote  → _run_remote_analysis()   [SFTP]
  │    ├─ --dir     → rglob + filtre extensions
  │    └─ --file    → glob ou chemin direct
  └─ for file in files_to_process:
       ├─ trial preflight (_trial_preflight, si non licencié)
       ├─ process_one_file()
       │    └─ detect_file_type() → _dispatch_file()
       │         ├─ process_pem()           .cer .pem .crt .arm .der
       │         ├─ process_p7b()           .p7b
       │         ├─ process_kdb()           .kdb  [runmqakm/gsk]
       │         ├─ process_java_keystore() .p12 .pfx .jks .jck .jceks
       │         ├─ process_cacerts()       cacerts JKS
       │         └─ process_csr()           .csr
       ├─ show_chain_summary / show_chain_serial
       ├─ show_diagnostics_resume()
       ├─ show_remediation_report() [si --report + mono-fichier]
       └─ generate_json_output / generate_html_output [si --output]

Un outil — tous les formats de keystoreOne tool — all keystore formatsUna herramienta — todos los formatos de almacén

C'est la valeur ajoutée centrale de chkcert : une seule commande, quelle que soit la technologie du keystore. L'outil détecte automatiquement le format et appelle l'outil externe approprié ou utilise la librairie Python cryptography directement. This is chkcert's central value proposition: a single command, regardless of the keystore technology. The tool automatically detects the format and calls the right external tool, or uses the Python cryptography library directly. Este es el valor añadido central de chkcert: un único comando, sea cual sea la tecnología del almacén. La herramienta detecta automáticamente el formato y llama a la herramienta externa adecuada, o usa directamente la biblioteca Python cryptography.

Extension(s)FormatOutil requisRequired toolHerramienta requeridaEncodage autoAuto-detect encodingCodificación autoCSRsUsage typiqueTypical useUso típico
.kdb / .cmsIBM MQ CMS/GSKitrunmqakm · gsk8capicmd_64WebSphere, MQ Channel SSL
.jks / .jck / .jceksJava KeyStorekeytool · runmqktoolTomcat, Spring, WAS
.p12 / .pfx / .pkcs12PKCS#12keytoolIIS, Exchange, Java
.pem / .cer / .crt / .armX.509 PEM / DER auto-détectéauto-detectedautodetectadoaucunnoneningunaNginx, Apache, HAProxy
.derX.509 DER binairebinarybinarioaucunnoneningunaExports Microsoft, Java
.p7bPKCS#7 bundleaucunnoneningunaChaînes AC intermédiairesIntermediate CA chainsCadenas de AC intermedias
.csrCertificate Signing RequestaucunnoneningunaN/APipeline de renouvellementRenewal pipelinePipeline de renovación
cacerts (JKS)Java cacerts truststorekeytool (auto-detect JDK)Audit du truststore JVMJVM truststore auditAuditoría del almacén JVM

Auto-détection PEM/DER :PEM/DER auto-detection:Autodetección PEM/DER: _detect_pem_or_der() utilise une heuristique à 4 règles — marqueurs PEM (-----BEGIN), tag ASN.1 0x30, validité UTF-8, fallback binaire — sans se fier uniquement à l'extension fichier. Un fichier .cer peut être PEM ou DER : chkcert le détecte automatiquement. _detect_pem_or_der() uses a 4-rule heuristic — PEM markers (-----BEGIN), ASN.1 0x30 tag, UTF-8 validity, binary fallback — rather than trusting the file extension alone. A .cer file can be PEM or DER: chkcert detects it automatically. _detect_pem_or_der() usa una heurística de 4 reglas — marcadores PEM (-----BEGIN), etiqueta ASN.1 0x30, validez UTF-8, fallback binario — sin fiarse únicamente de la extensión del fichero. Un fichero .cer puede ser PEM o DER: chkcert lo detecta automáticamente.

Fonctions principalesMain functionsFunciones principales

FonctionRôleRetour
show_cert(cert, ext, alias, count)Orchestrateur analyse : extraction, expiration, audit algo/clé/self-signed, affichage, actions, registreNone
difference_between_dates(expiry, ref)Calcule durée restante avec référence date simulée (--date) ou nowtuple[str, str, str]
_is_self_signed(cert)Vérification cryptographique RSA/EC/Ed* — plus robuste qu'une comparaison DNbool
check_cert_strength(cert)Classifie l'algorithme de signature : OK/Weak/Insecure/disabled/Unknowntuple[str, str]
_extract_certificate_info(cert, alias)Extrait toutes les métadonnées X.509 en CertificateInfoCertificateInfo
_build_csr_cmd(source, alias, dn, size, algo)Génère la commande de renouvellement CSR adaptée au formatstr
_resolve_chain(rec, registry, token_map)Remonte la chaîne jusqu'à la racine (max 20 niveaux)list[str]
generate_json_output(filename)Sérialise _ctx en JSON horodaté dans json/YYYYMMDD/<ext>/str (chemin)
generate_html_output(filename)Rapport HTML auto-contenu avec tables, badges, remédiation, chaînesstr (chemin)
_validate_class_bcolors_source(source)Contrôle le fichier de personnalisation couleurs avant chargementtuple[bool, str]
_is_licensed()Vérifie la présence d'une licence validebool
_output_root()Résout le répertoire de sortie : W/U_FLD_TARGET_ANA_CER ou répertoire du scriptstr
_parse_reference_date(date_arg)Parse --date : YYYY-MM-DD, +N ou -N jours depuis todaydatetime UTC
process_one_file(filename, pw, args)Valide chemin, détecte format, dispatche vers process_*()None
FunctionRoleReturn
show_cert(cert, ext, alias, count)Analysis orchestrator: extraction, expiry, algo/key/self-signed audit, display, actions, registryNone
difference_between_dates(expiry, ref)Computes remaining time using the simulated reference date (--date) or nowtuple[str, str, str]
_is_self_signed(cert)Cryptographic RSA/EC/Ed* check — more robust than a DN comparisonbool
check_cert_strength(cert)Classifies the signature algorithm: OK/Weak/Insecure/disabled/Unknowntuple[str, str]
_extract_certificate_info(cert, alias)Extracts all X.509 metadata into CertificateInfoCertificateInfo
_build_csr_cmd(source, alias, dn, size, algo)Generates the renewal command matching the source formatstr
_resolve_chain(rec, registry, token_map)Walks the chain up to the root (max 20 levels)list[str]
generate_json_output(filename)Serialises _ctx as timestamped JSON under json/YYYYMMDD/<ext>/str (path)
generate_html_output(filename)Self-contained HTML report with tables, badges, remediation, chainsstr (path)
_validate_class_bcolors_source(source)Checks the colour customisation file before loadingtuple[bool, str]
_is_licensed()Checks whether a valid licence is presentbool
_output_root()Resolves the output directory: W/U_FLD_TARGET_ANA_CER or the script's directorystr
_parse_reference_date(date_arg)Parses --date: YYYY-MM-DD, +N or -N days from todaydatetime UTC
process_one_file(filename, pw, args)Validates path, detects format, dispatches to process_*()None
FunciónRolRetorno
show_cert(cert, ext, alias, count)Orquestador del análisis: extracción, expiración, auditoría algo/clave/autofirmado, visualización, acciones, registroNone
difference_between_dates(expiry, ref)Calcula el tiempo restante con la fecha de referencia simulada (--date) o nowtuple[str, str, str]
_is_self_signed(cert)Verificación criptográfica RSA/EC/Ed* — más robusta que una comparación de DNbool
check_cert_strength(cert)Clasifica el algoritmo de firma: OK/Weak/Insecure/disabled/Unknowntuple[str, str]
_extract_certificate_info(cert, alias)Extrae todos los metadatos X.509 en CertificateInfoCertificateInfo
_build_csr_cmd(source, alias, dn, size, algo)Genera el comando de renovación adaptado al formatostr
_resolve_chain(rec, registry, token_map)Recorre la cadena hasta la raíz (máx. 20 niveles)list[str]
generate_json_output(filename)Serializa _ctx como JSON con marca de tiempo en json/YYYYMMDD/<ext>/str (ruta)
generate_html_output(filename)Informe HTML autónomo con tablas, badges, remediación, cadenasstr (ruta)
_validate_class_bcolors_source(source)Verifica el fichero de personalización de colores antes de cargarsetuple[bool, str]
_is_licensed()Comprueba si existe una licencia válidabool
_output_root()Resuelve el directorio de salida: W/U_FLD_TARGET_ANA_CER o el directorio del scriptstr
_parse_reference_date(date_arg)Parsea --date: YYYY-MM-DD, +N o -N días desde todaydatetime UTC
process_one_file(filename, pw, args)Valida la ruta, detecta el formato, despacha a process_*()None

Interface CLICLI interfaceInterfaz CLI

ArgumentCatégorieDescription
-h, --helputilitaireAide complète
--versionutilitaireVersion de l'outil
--examplesutilitaireExemples d'usage intégrés
--file FILEinputFichier unique ou glob (*.kdb, **/*.pem)
--dir DIRinputRépertoire — scan récursif rglob
--cacerts [FILE]inputJKS cacerts Java — auto-detect JDK ou chemin explicite
--password PASSauthMot de passe du keystore
--stashedauthUtiliser le fichier .sth (KDB uniquement)
--alias PATTERNfiltreFiltre case-insensitive sur alias/CN/subject/issuer
--ext EXT [EXT...]filtreFiltre extension : individuelles ou alias (keystore, certificate, request)
--date DATEsimulationDate de référence YYYY-MM-DD ou +N/-N jours — visible dans HTML/JSON
--chaining MODEPKIalias | serial | both — construction et affichage des chaînes
--output FORMATexportjson | html | both — défaut piloté par OUTPUT_FORMAT_DFT si --quiet
--reportexportRapport de remédiation prioritisé P1/P2/P3
--cmdexportInclure les commandes de renouvellement dans --report
--remote HOSTremoteHostname SSH du serveur distant
--remote-user USERremoteUtilisateur SSH
--remote-key KEYFILEremoteClé privée SSH (recommandé)
--remote-pass PASSWORDremoteMot de passe SSH (à éviter au profit de --remote-key)
--remote-port PORTremotePort SSH (défaut : 22)
--remote-timeout SECONDSremoteTimeout connexion SSH (défaut : 30s)
--trust-new-hostremoteAccepte et cache une clé d'hôte SSH inconnue (1re connexion)
--quietaffichageSupprime la console — conserve JSON/HTML
--no-coloraffichageDésactive les codes ANSI (scripts, logs)
ArgumentCategoryDescription
-h, --helputilityFull help
--versionutilityTool version
--examplesutilityBuilt-in usage examples
--file FILEinputSingle file or glob (*.kdb, **/*.pem)
--dir DIRinputDirectory — recursive rglob scan
--cacerts [FILE]inputJava JKS cacerts — auto-detect JDK or explicit path
--password PASSauthKeystore password
--stashedauthUse the .sth file (KDB only)
--alias PATTERNfilterCase-insensitive filter on alias/CN/subject/issuer
--ext EXT [EXT...]filterExtension filter: individual or alias (keystore, certificate, request)
--date DATEsimulationReference date YYYY-MM-DD or +N/-N days — visible in HTML/JSON
--chaining MODEPKIalias | serial | both — chain construction and display
--output FORMATexportjson | html | both — default driven by OUTPUT_FORMAT_DFT if --quiet
--reportexportPrioritised remediation report P1/P2/P3
--cmdexportInclude renewal commands in --report
--remote HOSTremoteSSH hostname of the remote server
--remote-user USERremoteSSH username
--remote-key KEYFILEremoteSSH private key (recommended)
--remote-pass PASSWORDremoteSSH password (prefer --remote-key instead)
--remote-port PORTremoteSSH port (default: 22)
--remote-timeout SECONDSremoteSSH connection timeout (default: 30s)
--trust-new-hostremoteAccepts and caches an unknown SSH host key (first connection)
--quietdisplaySuppresses console — keeps JSON/HTML
--no-colordisplayDisables ANSI codes (scripts, logs)
ArgumentoCategoríaDescripción
-h, --helputilidadAyuda completa
--versionutilidadVersión de la herramienta
--examplesutilidadEjemplos de uso integrados
--file FILEentradaFichero único o glob (*.kdb, **/*.pem)
--dir DIRentradaDirectorio — escaneo recursivo rglob
--cacerts [FILE]entradaJKS cacerts Java — autodetección JDK o ruta explícita
--password PASSautenticaciónContraseña del almacén
--stashedautenticaciónUsar el fichero .sth (solo KDB)
--alias PATTERNfiltroFiltro sin distinguir mayúsculas sobre alias/CN/subject/issuer
--ext EXT [EXT...]filtroFiltro de extensión: individuales o alias (keystore, certificate, request)
--date DATEsimulaciónFecha de referencia YYYY-MM-DD o +N/-N días — visible en HTML/JSON
--chaining MODEPKIalias | serial | both — construcción y visualización de cadenas
--output FORMATexportaciónjson | html | both — por defecto según OUTPUT_FORMAT_DFT si --quiet
--reportexportaciónInforme de remediación priorizado P1/P2/P3
--cmdexportaciónIncluye los comandos de renovación en --report
--remote HOSTremotoHostname SSH del servidor remoto
--remote-user USERremotoUsuario SSH
--remote-key KEYFILEremotoClave privada SSH (recomendado)
--remote-pass PASSWORDremotoContraseña SSH (mejor usar --remote-key)
--remote-port PORTremotoPuerto SSH (por defecto: 22)
--remote-timeout SECONDSremotoTimeout de conexión SSH (por defecto: 30s)
--trust-new-hostremotoAcepta y almacena en caché una clave de host SSH desconocida (1ª conexión)
--quietvisualizaciónSuprime la consola — conserva JSON/HTML
--no-colorvisualizaciónDesactiva los códigos ANSI (scripts, logs)

Sorties généréesGenerated outputsSalidas generadas

Structure des répertoires de sortieOutput directory structureEstructura de directorios de salida

<output_root>/               ← W/U_FLD_TARGET_ANA_CER ou répertoire script
  html/<YYYYMMDD>/<ext>/    ← rapports HTML par fichier
  html/<YYYYMMDD>/summary/  ← résumé multi-fichiers HTML
  json/<YYYYMMDD>/<ext>/    ← exports JSON par fichier
  json/<YYYYMMDD>/summary/  ← résumé multi-fichiers JSON

Avec --date 2038-12-31, le répertoire prend la date simulée (20381231/) et un badge rouge 📅 ref 2038-12-31 apparaît dans l'en-tête HTML. Le champ reference_date est présent dans tous les JSON. With --date 2038-12-31, the directory takes the simulated date (20381231/) and a red 📅 ref 2038-12-31 badge appears in the HTML header. The reference_date field is present in every JSON. Con --date 2038-12-31, el directorio toma la fecha simulada (20381231/) y aparece un badge rojo 📅 ref 2038-12-31 en la cabecera HTML. El campo reference_date está presente en todos los JSON.

JSON — schéma complet par fichierJSON — full schema per fileJSON — esquema completo por fichero

{
"source_file": "/home/joker/Tools/certificate/new_sectigo/AuthentificationCAEVR36.cer",
"hostname": "check-certificat",
"generated_at": "2026-06-02T14:49:27.628332+00:00",
"reference_date": "2038-12-31", ← date simulée --date
"certificates": [ { label, subject, issuer, serial, key_size, key_algo, ca_flag,
sig_algo, key_usage, eku, san, basic_constraints, matched } ],
"chain_alias": [ { "chain": [...], "tag": "" } ],
"chain_serial": [ { "chain": [...], "tag": "(root)" } ],
"warnings": [],
"errors": [ "❌ Error: Certificate 1 Serial 6d4f... expired 1014 days ago." ],
"action_items": [{
"priority": 1, "severity": "CRITICAL", "category": "EXPIRY",
"message": "Renew certificate before production use", "cmd": "openssl genrsa -out ..."
}],
"totals": { "errors": 1, "warnings": 0 }
}

Intégration PKI — cas d'usage du JSONPKI integration — JSON use casesIntegración PKI — casos de uso del JSON

Usage PKIChamp JSON utiliséExemple
Déclenchement d'alertes expirationaction_items[].severity = "CRITICAL"Email/Slack si P1 présent
Tableau de bord conformitétotals.errors / totals.warningsDashboard Grafana / Kibana
Inventaire automatiquecertificates[].serial_numberBase de données PKI centrale
Déclenchement renouvellementaction_items[].cmdPipeline CI/CD automatisé
Audit algorithmiquecertificates[].signature_algorithmDétection SHA-1/MD5 à éliminer
Simulation d'anticipationreference_date + errors[]Prévision des expirations à 6/12 mois
Suivi des chaînes de confiancechain_alias[].chainDétection des CA intermédiaires expirés
PKI useJSON field usedExample
Expiry alert triggeringaction_items[].severity = "CRITICAL"Email/Slack if P1 present
Compliance dashboardtotals.errors / totals.warningsGrafana / Kibana dashboard
Automatic inventorycertificates[].serial_numberCentral PKI database
Renewal triggeringaction_items[].cmdAutomated CI/CD pipeline
Algorithm auditcertificates[].signature_algorithmSHA-1/MD5 detection for elimination
Anticipation simulationreference_date + errors[]6/12-month expiry forecast
Trust chain monitoringchain_alias[].chainDetection of expired intermediate CAs
Uso PKICampo JSON usadoEjemplo
Disparo de alertas de expiraciónaction_items[].severity = "CRITICAL"Email/Slack si hay P1
Panel de cumplimientototals.errors / totals.warningsDashboard Grafana / Kibana
Inventario automáticocertificates[].serial_numberBase de datos PKI central
Disparo de renovaciónaction_items[].cmdPipeline CI/CD automatizado
Auditoría de algoritmoscertificates[].signature_algorithmDetección de SHA-1/MD5 a eliminar
Simulación de anticipaciónreference_date + errors[]Previsión de expiraciones a 6/12 meses
Seguimiento de cadenas de confianzachain_alias[].chainDetección de CA intermedias caducadas

ArchitectureArchitectureArquitectura d'intégration suggéréesuggested integrationde integración sugerida

Cron / Scheduler (quotidien)
  └─ chkcert --dir /path/to/keystores --quiet --output json
       └─ json/YYYYMMDD/summary/hostname_summary_*.json
            └─ Collecteur PKI central (Python / Node / Go)
                 ├─ Parsing JSON chkcert
                 ├─ Base de données inventaire (PostgreSQL / SQLite)
                 ├─ Alertes (Prometheus Alert / PagerDuty / Teams webhook)
                 ├─ Dashboard (Grafana / Kibana)
                 └─ Déclencheur renouvellement (Ansible / Terraform / script)

⚠️ Limitation actuelle :Current limitation:Limitación actual: chkcert produit les JSON mais ne dispose pas encore d'un collecteur central intégré. L'intégration PKI maison nécessite un développement complémentaire côté consommateur du JSON. C'est l'étape V1R2M0 envisagée. chkcert produces the JSON but does not yet ship an integrated central collector. In-house PKI integration requires additional development on the JSON-consuming side. This is the planned V1R2M0 step. chkcert produce el JSON pero todavía no dispone de un colector central integrado. La integración PKI propia requiere desarrollo adicional en el lado consumidor del JSON. Es el paso previsto para V1R2M0.

Exemples réels — fichiers jointsReal examples — attached filesEjemplos reales — ficheros adjuntos

Les fichiers JSON joints à ce rapport illustrent chkcert en action sur des certificats réels avec simulation temporelle. The JSON files attached to this report illustrate chkcert in action on real certificates with time simulation. Los ficheros JSON adjuntos a este informe ilustran chkcert en acción sobre certificados reales con simulación temporal.

Cas 1 — Certificats Sectigo avec date future 2038-Case 1 — Sectigo certificates with future date 2038-Caso 1 — Certificados Sectigo con fecha futura 2038-

Commande utiliséeCommand usedComando usado : ./chkcert --dir /home/joker/Tools/certificate/new_sectigo/ --date 2038-12-31 --output json --report

Résultat (summary) : 2 erreurs CRITICAL sur 3 fichiers — les certificats CA EV R36 et CA OV R36 de Sectigo seraient expirés depuis 1014 jours à la date de référence 2038-12-31. Seul le Root R46 reste valide. Result (summary): 2 CRITICAL errors out of 3 files — Sectigo's CA EV R36 and CA OV R36 certificates would be expired for 1014 days at the 2038-12-31 reference date. Only the Root R46 remains valid. Resultado (summary): 2 errores CRITICAL de 3 ficheros — los certificados CA EV R36 y CA OV R36 de Sectigo estarían caducados desde hace 1014 días en la fecha de referencia 2038-12-31. Solo el Root R46 permanece válido.

FichierCertificatCléAlgo sig.Statut à 2038-12-31
AuthentificationCAEVR36.cerSectigo Public Server Authentication CA EV R36RSA 3072sha384WithRSA❌ EXPIRÉ +1014 jours
AuthentificationCAOVR36.cerSectigo Public Server Authentication CA OV R36RSA 3072sha384WithRSA❌ EXPIRÉ +1014 jours
AuthentificationRootR46.cerSectigo Public Server Authentication Root R46RSA 4096sha384WithRSA✅ OK

💡 Ce cas illustre l'utilité critique de la vérification des CA intermédiaires — pas seulement des certificats leaf. Un Root valide ne suffit pas si l'intermédiaire est expiré (cas LinkedIn 2021 ci-dessus). This case shows the critical value of checking intermediate CAs — not just leaf certificates. A valid Root isn't enough if the intermediate is expired (LinkedIn 2021 case above). Este caso ilustra la utilidad crítica de verificar las CA intermedias — no solo los certificados leaf. Un Root válido no basta si la intermedia está caducada (caso LinkedIn 2021 arriba).

Cas 2 — Certificat WMQ IBM MQ, date future 2038-07Case 2 — IBM MQ WMQ certificate, future date 2038-07Caso 2 — Certificado WMQ IBM MQ, fecha futura 2038-07

FichierFileFichero : test01.cerCertificatCertificateCertificado WMQ_HORS_PROD_QMGR_QMU01R (Crédit Agricole Group, PKI privée).

Statut à 2038-07-02 : expiré depuis 4814 jours (~13 ans). Ce certificat RSA 2048 / SHA-256 / clientAuth+serverAuth est ancré dans une PKI privée (CA Credit Agricole Server non trouvée dans le keystore). Status at 2038-07-02: expired for 4814 days (~13 years). This RSA 2048 / SHA-256 / clientAuth+serverAuth certificate is anchored in a private PKI (CA Credit Agricole Server not found in the keystore). Estado a 2038-07-02: caducado desde hace 4814 días (~13 años). Este certificado RSA 2048 / SHA-256 / clientAuth+serverAuth está anclado en una PKI privada (CA Credit Agricole Server no encontrada en el almacén).

ChampValeur
CNWMQ_HORS_PROD_QMGR_QMU01R
ÉmetteurCN=CA Credit Agricole Server,O=Credit Agricole Group,C=FR
Numéro de sérieb90d11720203952a40635488
Clé / AlgoRSA 2048 / sha256WithRSA
UsageDigitalSignature, KeyEncipherment, clientAuth, serverAuth
SAN DNSwmq_hors_prod_qmgr_qmu01r
Statut à 2038-07-02❌ EXPIRÉ depuis 4814 jours
Commande de renouvellement généréeopenssl genrsa -out "test01.key" 4096
openssl req -new -key "test01.key" -out "test01.csr"

Cas 3 — Formats DER et CSR (tests multiformat)Case 3 — DER and CSR formats (multiformat tests)Caso 3 — Formatos DER y CSR (pruebas multiformato)

Tests réels sur comodo_inter.der, globalsign_root.der, comodo_inter.csr, sectigo_inter.csr — tous analysés sans erreur à la date courante 2026-06-02. Illustre la polyvalence des formats : DER binaire (Comodo CA Limited Issuing CA G5 / RSA 3072), Root auto-signé (GMO GlobalSign RSA 4096), CSR en attente de signature (Sectigo / Comodo, RSA 3072, sha256WithRSA). Real tests on comodo_inter.der, globalsign_root.der, comodo_inter.csr, sectigo_inter.csr — all analysed without error at the current date 2026-06-02. Illustrates format versatility: binary DER (Comodo CA Limited Issuing CA G5 / RSA 3072), self-signed Root (GMO GlobalSign RSA 4096), pending CSR (Sectigo / Comodo, RSA 3072, sha256WithRSA). Pruebas reales sobre comodo_inter.der, globalsign_root.der, comodo_inter.csr, sectigo_inter.csr — todos analizados sin error en la fecha actual 2026-06-02. Ilustra la versatilidad de formatos: DER binario (Comodo CA Limited Issuing CA G5 / RSA 3072), Root autofirmado (GMO GlobalSign RSA 4096), CSR pendiente de firma (Sectigo / Comodo, RSA 3072, sha256WithRSA).

FichierTypeCNCléStatut
comodo_inter.derCERT DERComodo CA Limited Issuing CA G5RSA 3072✅ OK
globalsign_root.derCERT DER (root)GMO GlobalSign nv-sa Root CA G5RSA 4096✅ OK (root)
comodo_inter.csrCSRComodo CA Limited Issuing CA G5RSA 3072✅ Non signé (pending)
sectigo_inter.csrCSRSectigo Limited Issuing CA G5RSA 3072✅ Non signé (pending)

Vérifications cryptographiquesCryptographic checksVerificaciones criptográficas

Classification des algorithmes de signatureSignature algorithm classificationClasificación de algoritmos de firma

AlgorithmeStatutAction recommandéeRecommended actionAcción recomendada
SHA256 / SHA384 / SHA512 / SHA224OKAucuneNoneNinguna
SHA3-256 / SHA3-384 / SHA3-512OKAucuneNoneNinguna
SHA1withRSAWeakPlanifier migration SHA256Plan migration to SHA256Planificar migración a SHA256
SHA256withDSA (DSA)disabledRemplacer par RSA ou ECReplace with RSA or ECSustituir por RSA o EC
MD5InsecureRemplacer immédiatementReplace immediatelySustituir inmediatamente
Ed25519 / Ed448UnknownHash intrinsèque — classification partielle (voir note R5)Intrinsic hash — partial classification (see note R5)Hash intrínseco — clasificación parcial (ver nota R5)

Classification des tailles de clé RSARSA key size classificationClasificación de tamaños de clave RSA

ConditionConditionCondiciónStatut
≤ 1024 bitsCRITICAL — clé faibleweak keyclave débil
< 2048 bits (> 1024)WARNING
≥ 2048 bitsOK
EC (≥ 224 bits — P-256/P-384/P-521)OK
DSA (tout typeany typecualquier tipo)ERROR — désactivédisableddesactivado

Niveaux d'expirationExpiry levelsNiveles de expiración

Jours restantsDays remainingDías restantesStatutAffichageDisplayVisualización
≤ 0 (expiréexpiredcaducado)❌ CRITICALrouge — P1 dans le rapportred — P1 in the reportrojo — P1 en el informe
1–8❌ Errorrouge — P1red — P1rojo — P1
9–30⚠️ Warningorange — P2orange — P2naranja — P2
> 30✅ OKvertgreenverde

Protection des fichiers de personnalisationCustomisation file protectionProtección de ficheros de personalización

Le fichier optionnel properties/class_bcolors.py est contrôlé avant chargement pour empêcher tout contenu non conforme. Détail : bilan de protection. The optional properties/class_bcolors.py file is checked before loading to prevent any non-compliant content. Detail: protection overview. El fichero opcional properties/class_bcolors.py se verifica antes de cargarse para impedir cualquier contenido no conforme. Detalle: balance de protección.

Mode RemoteRemote modeModo Remote SSH/SFTP

⚠️
Bémol V1R1M1 — Mode remote non testé en conditions réellesV1R1M1 caveat — Remote mode not tested under real conditionsSalvedad V1R1M1 — Modo remoto no probado en condiciones reales

Le mode remote (--remote HOST) est implémenté et fonctionnel dans le code (connexion Paramiko SSH, téléchargement SFTP, analyse locale, nettoyage des temporaires). Cependant, aucun test end-to-end en conditions réelles n'a encore été réalisé dans cette version : accès SSH vers un serveur IBM MQ distant, téléchargement d'un .kdb avec son .sth companion, analyse remote cross-platform (Windows vers Linux, Linux vers AIX). Remote mode (--remote HOST) is implemented and functional in the code (Paramiko SSH connection, SFTP download, local analysis, temp-file cleanup). However, no end-to-end real-world test has been performed in this version: SSH access to a remote IBM MQ server, downloading a .kdb with its companion .sth, cross-platform remote analysis (Windows to Linux, Linux to AIX). El modo remoto (--remote HOST) está implementado y es funcional en el código (conexión Paramiko SSH, descarga SFTP, análisis local, limpieza de temporales). Sin embargo, todavía no se ha realizado ninguna prueba end-to-end en condiciones reales en esta versión: acceso SSH a un servidor IBM MQ remoto, descarga de un .kdb con su .sth asociado, análisis remoto multiplataforma (Windows a Linux, Linux a AIX).

Le mode remote sera validé en priorité dans la version V1R2M0. Les utilisateurs souhaitant l'utiliser dès maintenant sont invités à signaler tout comportement inattendu à licence@jokersoft.com. Remote mode will be validated as a priority in version V1R2M0. Users wishing to use it now are encouraged to report any unexpected behaviour to licence@jokersoft.com. El modo remoto se validará con prioridad en la versión V1R2M0. Los usuarios que deseen usarlo desde ya pueden reportar cualquier comportamiento inesperado a licence@jokersoft.com.

ArchitectureArchitectureArquitectura du mode remote (implémentée)of remote mode (implemented)del modo remoto (implementada)

Principe : Python et cryptography ne sont pas requis sur le serveur distant. Seul SSH/SFTP est nécessaire. Principle: Python and cryptography are not required on the remote server. Only SSH/SFTP is needed. Principio: Python y cryptography no son necesarios en el servidor remoto. Solo se necesita SSH/SFTP.

ScénarioConfigurationStatut test
Linux → Linux (cas principal)--remote-key ~/.ssh/id_rsaNon testé V1R1M1
Windows → Linux--remote-key %USERPROFILE%\.ssh\id_rsaNon testé V1R1M1
Linux → AIX / IBM i--remote-key ~/.ssh/id_ed25519Non testé V1R1M1
Windows → Windows (OpenSSH)OpenSSH activé sur la cibleNon testé V1R1M1
Password auth--remote-passNon testé V1R1M1
ScenarioConfigurationTest status
Linux → Linux (primary case)--remote-key ~/.ssh/id_rsaNot tested V1R1M1
Windows → Linux--remote-key %USERPROFILE%\.ssh\id_rsaNot tested V1R1M1
Linux → AIX / IBM i--remote-key ~/.ssh/id_ed25519Not tested V1R1M1
Windows → Windows (OpenSSH)OpenSSH enabled on targetNot tested V1R1M1
Password auth--remote-passNot tested V1R1M1
EscenarioConfiguraciónEstado de la prueba
Linux → Linux (caso principal)--remote-key ~/.ssh/id_rsaNo probado V1R1M1
Windows → Linux--remote-key %USERPROFILE%\.ssh\id_rsaNo probado V1R1M1
Linux → AIX / IBM i--remote-key ~/.ssh/id_ed25519No probado V1R1M1
Windows → Windows (OpenSSH)OpenSSH activado en el destinoNo probado V1R1M1
Password auth--remote-passNo probado V1R1M1

💡 Le fichier .sth companion des keystores .kdb est automatiquement récupéré via SFTP si présent sur le serveur distant. Le hostname remote alimente _ctx._remote_hostname pour nommer les fichiers JSON/HTML de sortie. The .sth companion file for .kdb keystores is automatically retrieved via SFTP if present on the remote server. The remote hostname feeds _ctx._remote_hostname, used to name the output JSON/HTML files. El fichero .sth asociado a los almacenes .kdb se recupera automáticamente vía SFTP si está presente en el servidor remoto. El hostname remoto alimenta _ctx._remote_hostname, usado para nombrar los ficheros JSON/HTML de salida.

Cycles de renouvellementRenewal cyclesCiclos de renovación & anticipationanticipationanticipación

Face à la réduction des durées de validité imposée par les AC et les navigateurs, chkcert intègre plusieurs mécanismes d'anticipation : Facing the shortened validity periods imposed by CAs and browsers, chkcert includes several anticipation mechanisms: Frente a la reducción de los períodos de validez impuesta por las AC y los navegadores, chkcert integra varios mecanismos de anticipación:

Simulation temporelle (--date)Time simulation (--date)Simulación temporal (--date)

L'option --date YYYY-MM-DD (ou +N / -N jours) permet de simuler l'état du parc de certificats à une date future. Exemples pratiques : The --date YYYY-MM-DD option (or +N / -N days) simulates the state of the certificate fleet at a future date. Practical examples: La opción --date YYYY-MM-DD (o +N / -N días) permite simular el estado del parque de certificados en una fecha futura. Ejemplos prácticos:

./chkcert --dir /opt/mq/ssl/ --date +90 --report  # Que sera expiré dans 90 jours ?
./chkcert --dir /opt/mq/ssl/ --date +365 --report # Plan de renouvellement annuel
./chkcert --dir /opt/mq/ssl/ --date 2027-01-01 --output html  # Audit au 1er janvier 2027

Génération des commandes de renouvellement (--cmd)Renewal command generation (--cmd)Generación de comandos de renovación (--cmd)

Avec --report --cmd, chkcert génère les commandes exactes de renouvellement adaptées au format du keystore : With --report --cmd, chkcert generates the exact renewal commands matching the keystore format: Con --report --cmd, chkcert genera los comandos exactos de renovación adaptados al formato del almacén:

FormatCommande généréeGenerated commandComando generado
.kdbrunmqakm -certreq -create -db ... -label ... -dn ... -size 4096 -sig_alg sha256
.jks / .p12keytool -certreq -keystore ... -alias ... -file out.csr -sigalg SHA256withRSA
.pem / .ceropenssl genrsa -out key.pem 4096 && openssl req -new -key key.pem -out csr.pem

Impact des cycles 47 jours (CA/Browser Forum 2027)47-day cycles impact (CA/Browser Forum 2027)Impacto de los ciclos de 47 días (CA/Browser Forum 2027)

Si le CA/Browser Forum adopte la durée de 47 jours maximum (vote prévu 2026–2027), un parc de 100 certificats TLS nécessitera ~780 renouvellements par an. Sans automatisation et sans outil de surveillance centralisé, le risque d'expiration accidentelle est proche de 100%. If the CA/Browser Forum adopts the 47-day maximum (vote expected 2026–2027), a fleet of 100 TLS certificates will need ~780 renewals per year. Without automation and centralised monitoring, the risk of accidental expiry approaches 100%. Si el CA/Browser Forum adopta el máximo de 47 días (votación prevista 2026–2027), un parque de 100 certificados TLS necesitará ~780 renovaciones al año. Sin automatización ni herramienta de supervisión centralizada, el riesgo de expiración accidental se acerca al 100%.

chkcert + export JSON + PKI maison constitue la base de cette automatisation : détection → alerte → commande de renouvellement générée → pipeline CI/CD. chkcert + JSON export + in-house PKI form the basis of this automation: detection → alert → generated renewal command → CI/CD pipeline. chkcert + exportación JSON + PKI propia constituyen la base de esta automatización: detección → alerta → comando de renovación generado → pipeline CI/CD.

ObservationsFindingsObservaciones & Recommandations V1R1M1V1R1M1 RecommendationsRecomendaciones V1R1M1

R2 — Correction TOCTOU mkstemp (résolu)R2 — TOCTOU mkstemp fix (resolved)R2 — Corrección TOCTOU mkstemp (resuelto)

os.remove(filenameT) ajouté après os.close(_fd) pour les formats KDB — runmqakm refusait d'écrire sur un fichier existant (CTGSK3036W). Corrigé pour cert-extract et certreq-extract. os.remove(filenameT) added after os.close(_fd) for KDB formats — runmqakm refused to write to an existing file (CTGSK3036W). Fixed for cert-extract and certreq-extract. os.remove(filenameT) añadido tras os.close(_fd) para los formatos KDB — runmqakm se negaba a escribir en un fichero existente (CTGSK3036W). Corregido para cert-extract y certreq-extract.

R3 — Plancher RSA 2048 dans constantes_V1R1M1.properties (résolu)R3 — RSA 2048 floor in constantes_V1R1M1.properties (resolved)R3 — Límite RSA 2048 en constantes_V1R1M1.properties (resuelto)

Validation ajoutée : toute valeur en dessous de 2048 dans MIN_RSA_KEY_SIZE est rejetée avec un warning et ignorée. Le plancher absolu est incontournable même par le fichier de configuration externe. Validation added: any value below 2048 in MIN_RSA_KEY_SIZE is rejected with a warning and ignored. The absolute floor cannot be bypassed, even via the external configuration file. Validación añadida: cualquier valor por debajo de 2048 en MIN_RSA_KEY_SIZE se rechaza con un warning y se ignora. El límite absoluto es infranqueable incluso desde el fichero de configuración externo.

R4 — Correction du seuil de clé faible (résolu)R4 — Weak key threshold fix (resolved)R4 — Corrección del umbral de clave débil (resuelto)

WEAK_KEY_THRESHOLD corrigé de 1048 (coquille) à 1024 bits — la valeur erronée classait par erreur certaines clés 1024 bits comme non critiques. WEAK_KEY_THRESHOLD corrected from 1048 (typo) to 1024 bits — the wrong value was mistakenly classifying some 1024-bit keys as non-critical. WEAK_KEY_THRESHOLD corregido de 1048 (errata) a 1024 bits — el valor incorrecto clasificaba erróneamente algunas claves de 1024 bits como no críticas.

W/U_FLD_TARGET_ANA_CER — Répertoire de sortie configurable (implémenté)Configurable output directory (implemented)Directorio de salida configurable (implementado)

Les clés W_FLD_TARGET_ANA_CER (Windows) et U_FLD_TARGET_ANA_CER (Unix) sont maintenant chargées depuis constantes_V1R1M1.properties et utilisées par les 4 fonctions de sortie. Fallback silencieux sur le répertoire du script si absent. The W_FLD_TARGET_ANA_CER (Windows) and U_FLD_TARGET_ANA_CER (Unix) keys are now loaded from constantes_V1R1M1.properties and used by the 4 output functions. Silent fallback to the script directory if absent. Las claves W_FLD_TARGET_ANA_CER (Windows) y U_FLD_TARGET_ANA_CER (Unix) ahora se cargan desde constantes_V1R1M1.properties y son usadas por las 4 funciones de salida. Fallback silencioso al directorio del script si están ausentes.

--date visible dans les rapports HTML et JSON (implémenté)visible in HTML and JSON reports (implemented)visible en los informes HTML y JSON (implementado)

Badge 📅 ref YYYY-MM-DD dans l'en-tête HTML. Champ reference_date dans tous les JSON (per-file et summary). Le répertoire de sortie utilise la date simulée comme YYYYMMDD. 📅 ref YYYY-MM-DD badge in the HTML header. reference_date field in every JSON (per-file and summary). The output directory uses the simulated date as YYYYMMDD. Badge 📅 ref YYYY-MM-DD en la cabecera HTML. Campo reference_date en todos los JSON (per-file y summary). El directorio de salida usa la fecha simulada como YYYYMMDD.

Validation AST de class_bcolors.py (implémenté)AST validation of class_bcolors.py (implemented)Validación AST de class_bcolors.py (implementado)

Le fichier de personnalisation couleurs est désormais contrôlé avant chargement — élimine un vecteur identifié lors de l'audit sécurité. The colour customisation file is now checked before loading — eliminates a vector identified during the security audit. El fichero de personalización de colores ahora se verifica antes de cargarse — elimina un vector identificado durante la auditoría de seguridad.

⚠️
R5 — Ed25519/Ed448 retournent 'Unknown' (partiellement résolu)R5 — Ed25519/Ed448 return 'Unknown' (partially resolved)R5 — Ed25519/Ed448 devuelven 'Unknown' (parcialmente resuelto)

check_cert_strength() retourne ('Unknown', 'Unknown') pour Ed25519/Ed448 car signature_hash_algorithm est None pour ces algorithmes (hash intrinsèque). Un statut spécifique 'Modern-EdDSA' est prévu en V1R2M0. check_cert_strength() returns ('Unknown', 'Unknown') for Ed25519/Ed448 because signature_hash_algorithm is None for these algorithms (intrinsic hash). A dedicated 'Modern-EdDSA' status is planned for V1R2M0. check_cert_strength() devuelve ('Unknown', 'Unknown') para Ed25519/Ed448 porque signature_hash_algorithm es None para estos algoritmos (hash intrínseco). Se prevé un estado específico 'Modern-EdDSA' para V1R2M0.

⚠️
Mode remote — Tests end-to-end non réalisés en V1R1M1Remote mode — End-to-end tests not performed in V1R1M1Modo remoto — Pruebas end-to-end no realizadas en V1R1M1

Voir section dédiée ci-dessus. L'implémentation est complète mais les scénarios cross-platform (Linux → AIX, Windows → Linux + KDB/STH) n'ont pas encore été validés en conditions réelles. Prévu V1R2M0. See dedicated section above. The implementation is complete but cross-platform scenarios (Linux → AIX, Windows → Linux + KDB/STH) have not yet been validated under real conditions. Planned for V1R2M0. Ver sección dedicada arriba. La implementación está completa pero los escenarios multiplataforma (Linux → AIX, Windows → Linux + KDB/STH) todavía no se han validado en condiciones reales. Previsto para V1R2M0.

ℹ️
V1R2M0 — Roadmap

Prochaines évolutions prévues : (1) validation du mode remote en conditions réelles toutes plateformes, (2) statut EdDSA correct, (3) licence serveur (Option Fort — appel HTTPS api.jokersoft.com), (4) collecteur PKI central consommateur du JSON, (5) support OCSP stapling dans l'analyse. Planned next steps: (1) real-world validation of remote mode across all platforms, (2) correct EdDSA status, (3) server licence (Fort option — HTTPS call to api.jokersoft.com), (4) central PKI collector consuming the JSON, (5) OCSP stapling support in analysis. Próximas evoluciones previstas: (1) validación del modo remoto en condiciones reales en todas las plataformas, (2) estado EdDSA correcto, (3) licencia de servidor (Opción Fort — llamada HTTPS a api.jokersoft.com), (4) colector PKI central consumidor del JSON, (5) soporte de OCSP stapling en el análisis.


chkcert_V1R1M1_Technical_Report.html — JokerSoft © 2026
Version V1R1M1 · 6 950+ ligneslineslíneas · 316 KB · check-certificat.com