cert

cert inspecciona material TLS remoto y local, verifica confianza y nombres de host, comprueba pares certificado/clave, crea claves y CSR, firma certificados y convierte PEM, DER y PKCS#12.

SeguridadVersión 1.2.4Estable
lil-terminal

Resumen

Usa cert tanto para diagnóstico como para preparar certificados sin comandos OpenSSL del sistema. La verificación remota está activa por defecto; -k es una excepción diagnóstica y las claves privadas nuevas se escriben con permisos restrictivos.

Identidad, confianza y correspondencia de clave son comprobaciones distintas

Un certificado puede estar dentro de su período de validez y aun fallar por confianza o nombre de host; también puede no corresponder a la clave privada. Usa -v para confianza/nombre, -m para el par y -h -chain para la cadena que presenta realmente el servidor remoto.

Sintaxis

lil-terminal
cert <operation> [args] [options]

Referencia

cert -h me [port]

inspeccionar el certificado TLS del host actual

cert -h <host|url> [port]

inspeccionar un certificado TLS remoto

cert -i <file> [-p <pass>]

inspeccionar certificado, CSR, clave o paquete PKCS#12 local

cert -v <cert> [-ca <file>] [-chain <file>] [-host <name>] [-client]

verificar tiempo, confianza y nombre de host

cert -m <cert> <key> [-p <pass>]

verificar que certificado y clave privada coinciden

cert -key <out> [-rsa <bits>|-ec <curve>] [-p <pass>] [-f]

crear una clave privada

cert -csr <key> <out> <dn> [-san <list>] [-p <pass>] [-f]

crear una solicitud de firma de certificado

cert -self <key> <out> <dn> [-san <list>] [-p <pass>] [-f]

crear un certificado autofirmado

cert -sign <csr> <ca> <key> <out> [-san <list>] [-p <pass>] [-f]

firmar una CSR con un certificado de CA

cert -der <cert> [out] [-f]

convertir un certificado PEM a DER

cert -pem <cert> [out] [-f]

convertir un certificado DER a PEM

cert -p12 <cert> <key> [out] [-p <pass>] [-kp <pass>] [-f]

crear un paquete PKCS#12

cert -p12 -r <bundle> [dir] [-p <pass>] [-f]

extraer un paquete PKCS#12

-j | -json

mostrar resultados de -h, -i, -v o -m como JSON

-t [seconds]

usar 5 segundos o un timeout de 1 a 300 para TLS remoto

-T

usar un timeout de 300 segundos para TLS remoto

-4 | -6

usar IPv4 o IPv6 para TLS remoto

-k

permitir un certificado TLS remoto sin verificar

-chain

mostrar la cadena completa de certificados remotos

-sni <name>

sobrescribir el nombre TLS SNI

-ca <file>

usar un archivo CA explícito cuando sea compatible

-host <name>

verificar un certificado para un hostname

-client

verificar para uso como cliente TLS

-p <pass>

proporcionar una contraseña de operación

-f

permitir reemplazar archivos generados

Atajo de destino

me se resuelve como el host HTTP actual visible para PHP. Sirve para inspeccionar el certificado del sitio que está mostrando este terminal sin volver a escribir su hostname.

Seguridad

Los certificados remotos se verifican por defecto. Las claves privadas se escriben con permisos restrictivos. Usa -k solo para separar un problema de confianza de la conectividad TLS y evita colocar contraseñas en el historial cuando exista entrada oculta.

Salida JSON

Usa -j o -json con -h, -i, -v o -m cuando otro comando o flujo API necesite diagnósticos de certificados legibles por máquina.

Vista interactiva del sandbox

Ejecuta los ejemplos preparados directamente en la página. Los resultados están predefinidos y se muestran en el navegador; no se ejecuta ningún comando de terminal en el servidor.

Inspeccionar un certificado TLS remoto

Instalar y administrar

Instala la versión compatible actual. Elige Base para el conjunto completo de funciones o Minimum para el paquete reducido; usa upgrade para actualizar un módulo ya instalado.

Base y Minimum son dos paquetes de la misma versión actual del módulo.

Paquete Base

Instala el paquete completo con referencia local y todos los modos publicados.

install cert
Paquete Minimum

Instalar el paquete reducido. No incluye la referencia local; help <cmd> -i abre la referencia actual del servidor.

install cert -m
Versión pública exacta

Instalar exactamente esta versión publicada.

install cert -v 1.2.4
Comprobar o actualizar

upgrade comprueba la compatibilidad y sustituye el bloque solo cuando hace falta.

upgrade cert
Eliminar módulo

Elimina el bloque de extensión sin tocar el núcleo ni otros módulos.

install cert -u

Ejemplos

Los ejemplos se pueden copiar, pero el sitio no los ejecuta. Revisa rutas, permisos y opciones destructivas.

Inspeccionar un certificado TLS remoto
cert -h me
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
Host       example.test
IP         192.0.2.80
Port       443
Status     verified
Time       14.8 ms
TLS        TLSv1.3
Cipher     TLS_AES_256_GCM_SHA384
Hostname   valid (example.test)
Subject    CN=example.test
Issuer     CN=Training CA
Valid to   2027-10-31 00:00:00 UTC
Inspeccionar un certificado TLS remoto
cert -h example.test
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
Host       example.test
IP         192.0.2.80
Port       443
Status     verified
Time       14.8 ms
TLS        TLSv1.3
Cipher     TLS_AES_256_GCM_SHA384
Hostname   valid (example.test)
Subject    CN=example.test
Issuer     CN=Training CA
Valid to   2027-10-31 00:00:00 UTC
Inspeccionar un certificado TLS remoto
cert -h example.test -t 5
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
Host       example.test
IP         192.0.2.80
Port       443
Status     verified
Time       14.8 ms
TLS        TLSv1.3
Cipher     TLS_AES_256_GCM_SHA384
Hostname   valid (example.test)
Subject    CN=example.test
Issuer     CN=Training CA
Valid to   2027-10-31 00:00:00 UTC
Inspeccionar un certificado TLS remoto
cert -h example.test -T
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
Host       example.test
IP         192.0.2.80
Port       443
Status     verified
Time       14.8 ms
TLS        TLSv1.3
Cipher     TLS_AES_256_GCM_SHA384
Hostname   valid (example.test)
Subject    CN=example.test
Issuer     CN=Training CA
Valid to   2027-10-31 00:00:00 UTC
Inspeccionar un certificado TLS remoto
cert -h example.test -4
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
Host       example.test
IP         192.0.2.80
Port       443
Status     verified
Time       14.8 ms
TLS        TLSv1.3
Cipher     TLS_AES_256_GCM_SHA384
Hostname   valid (example.test)
Subject    CN=example.test
Issuer     CN=Training CA
Valid to   2027-10-31 00:00:00 UTC
Inspeccionar un certificado TLS remoto
cert -h example.test -6
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
Host       example.test
IP         2001:db8::80
Port       443
Status     verified
Time       14.8 ms
TLS        TLSv1.3
Cipher     TLS_AES_256_GCM_SHA384
Hostname   valid (example.test)
Subject    CN=example.test
Issuer     CN=Training CA
Valid to   2027-10-31 00:00:00 UTC
Inspeccionar un certificado TLS remoto
cert -h example.test -chain
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
Host       example.test
IP         192.0.2.80
Port       443
Status     verified
Time       14.8 ms
TLS        TLSv1.3
Cipher     TLS_AES_256_GCM_SHA384
Hostname   valid (example.test)
Subject    CN=example.test
Issuer     CN=Training CA
Valid to   2027-10-31 00:00:00 UTC
Chain      2 certificates
Inspeccionar un certificado TLS remoto
cert -h example.test -sni www.example.test
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
Host       example.test
SNI        www.example.test
IP         192.0.2.80
Port       443
Status     verified
Time       14.8 ms
TLS        TLSv1.3
Cipher     TLS_AES_256_GCM_SHA384
Hostname   valid (www.example.test)
Subject    CN=example.test
Issuer     CN=Training CA
Valid to   2027-10-31 00:00:00 UTC
Inspeccionar un certificado TLS remoto
cert -h example.test -k
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
Host       example.test
IP         192.0.2.80
Port       443
Status     unverified
Time       14.8 ms
TLS        TLSv1.3
Cipher     TLS_AES_256_GCM_SHA384
Hostname   valid (example.test)
Subject    CN=example.test
Issuer     CN=Training CA
Valid to   2027-10-31 00:00:00 UTC
Inspeccionar un certificado TLS remoto
cert -h example.test -j
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
{
    "rows": [
        {
            "name": "Host",
            "value": "example.test"
        },
        {
            "name": "IP",
            "value": "192.0.2.80"
        },
        {
            "name": "Port",
            "value": "443"
        },
        {
            "name": "Status",
            "value": "verified"
        },
        {
            "name": "Time",
            "value": "14.8 ms"
        },
        {
            "name": "TLS",
            "value": "TLSv1.3"
        },
        {
            "name": "Cipher",
            "value": "TLS_AES_256_GCM_SHA384"
        },
        {
            "name": "Hostname",
            "value": "valid (example.test)"
        },
        {
            "name": "Subject",
            "value": "CN=example.test"
        },
        {
            "name": "Issuer",
            "value": "CN=Training CA"
        },
        {
            "name": "Valid to",
            "value": "2027-10-31 00:00:00 UTC"
        }
    ]
}
Inspeccionar un certificado TLS remoto
cert -h example.test -o tmp/chain.pem
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
Host       example.test
IP         192.0.2.80
Port       443
Status     verified
Time       14.8 ms
TLS        TLSv1.3
Cipher     TLS_AES_256_GCM_SHA384
Hostname   valid (example.test)
Subject    CN=example.test
Issuer     CN=Training CA
Valid to   2027-10-31 00:00:00 UTC
Saved      sandbox/tmp/chain.pem
Inspeccionar certificado, CSR, clave o paquete PKCS#12 local
cert -i certs/server.crt
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
File              sandbox/certs/server.crt
Certificates      1

Certificate 1:    
Subject           CN=example.test, O=lil
Issuer            CN=example.test, O=lil
Serial            01FAB2F36D62878EE1C3EF872CC4924ADAE7FACD
Valid from        2026-08-09 08:38:07 UTC
Valid to          2036-08-06 08:38:07 UTC
Validity          valid, 3566 days remaining
SAN               DNS:example.test, DNS:www.example.test
Key               RSA
Key bits          2048
Signature         RSA-SHA256
SHA256            FE:BE:96:6B:FD:A6:EA:E5:98:E1:66:7E:A3:32:72:7D:E3:DE:37:CC:D8:2F:64:63:76:73:26:C6:4B:F5:7D:CD
Constraints       CA:FALSE
Key usage         Digital Signature, Key Encipherment
Extended usage    TLS Web Server Authentication
Subject key ID    D6:14:0F:93:56:90:A8:E6:CC:3D:8C:D5:16:AE:EB:05:0C:07:8B:1D
Authority key ID  D6:14:0F:93:56:90:A8:E6:CC:3D:8C:D5:16:AE:EB:05:0C:07:8B:1D
Inspeccionar certificado, CSR, clave o paquete PKCS#12 local
cert -i certs/server.csr
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
File      sandbox/certs/server.csr
Type      CSR
Subject   CN=example.test, O=lil
Key       RSA
Key bits  2048
Inspeccionar certificado, CSR, clave o paquete PKCS#12 local
cert -i certs/server.key
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
File      sandbox/certs/server.key
Type      private key
Key       RSA
Key bits  2048
Inspeccionar certificado, CSR, clave o paquete PKCS#12 local
cert -i certs/server.p12 -p demo
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
File            sandbox/certs/server.p12
Type            PKCS#12
Certificates    1
Private key     yes

Certificate 1:  
Subject         CN=example.test, O=lil
Issuer          CN=example.test, O=lil
Serial          01FAB2F36D62878EE1C3EF872CC4924ADAE7FACD
Valid from      2026-08-09 08:38:07 UTC
Valid to        2036-08-06 08:38:07 UTC
Validity        valid, 3566 days remaining
SAN             DNS:example.test, DNS:www.example.test
Key             RSA
Key bits        2048
Signature       RSA-SHA256
SHA256          FE:BE:96:6B:FD:A6:EA:E5:98:E1:66:7E:A3:32:72:7D:E3:DE:37:CC:D8:2F:64:63:76:73:26:C6:4B:F5:7D:CD
Inspeccionar certificado, CSR, clave o paquete PKCS#12 local
cert -i certs/server.crt -json
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
{
    "rows": [
        {
            "name": "File",
            "value": "sandbox/certs/server.crt"
        },
        {
            "name": "Certificates",
            "value": "1"
        },
        {
            "name": "Certificate 1:",
            "value": ""
        },
        {
            "name": "Subject",
            "value": "CN=example.test, O=lil"
        },
        {
            "name": "Issuer",
            "value": "CN=example.test, O=lil"
        },
        {
            "name": "Serial",
            "value": "01FAB2F36D62878EE1C3EF872CC4924ADAE7FACD"
        },
        {
            "name": "Valid from",
            "value": "2026-08-09 08:38:07 UTC"
        },
        {
            "name": "Valid to",
            "value": "2036-08-06 08:38:07 UTC"
        },
        {
            "name": "Validity",
            "value": "valid, 3566 days remaining"
        },
        {
            "name": "SAN",
            "value": "DNS:example.test, DNS:www.example.test"
        },
        {
            "name": "Key",
            "value": "RSA"
        },
        {
            "name": "Key bits",
            "value": "2048"
        },
        {
            "name": "Signature",
            "value": "RSA-SHA256"
        },
        {
            "name": "SHA256",
            "value": "FE:BE:96:6B:FD:A6:EA:E5:98:E1:66:7E:A3:32:72:7D:E3:DE:37:CC:D8:2F:64:63:76:73:26:C6:4B:F5:7D:CD"
        },
        {
            "name": "Constraints",
            "value": "CA:FALSE"
        },
        {
            "name": "Key usage",
            "value": "Digital Signature, Key Encipherment"
        },
        {
            "name": "Extended usage",
            "value": "TLS Web Server Authentication"
        },
        {
            "name": "Subject key ID",
            "value": "D6:14:0F:93:56:90:A8:E6:CC:3D:8C:D5:16:AE:EB:05:0C:07:8B:1D"
        },
        {
            "name": "Authority key ID",
            "value": "D6:14:0F:93:56:90:A8:E6:CC:3D:8C:D5:16:AE:EB:05:0C:07:8B:1D"
        }
    ]
}
Verificar tiempo, confianza y nombre de host
cert -v certs/server.crt -host example.test
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
File      sandbox/certs/server.crt
Purpose   TLS server
Time      valid
Trust     invalid
Hostname  valid (example.test)
Result    invalid
Verificar tiempo, confianza y nombre de host
cert -v certs/server.crt -ca certs/server.crt
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
File     sandbox/certs/server.crt
Purpose  TLS server
Time     valid
Trust    valid
Result   valid
Verificar tiempo, confianza y nombre de host
cert -v certs/server.crt -client
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
File     sandbox/certs/server.crt
Purpose  TLS client
Time     valid
Trust    invalid
Result   invalid
Verificar que certificado y clave privada coinciden
cert -m certs/server.crt certs/server.key
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
Certificate  sandbox/certs/server.crt
Private key  sandbox/certs/server.key
Result       match
Verificar que certificado y clave privada coinciden
cert -m certs/server.crt certs/server.key -j
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
{
    "rows": [
        {
            "name": "Certificate",
            "value": "sandbox/certs/server.crt"
        },
        {
            "name": "Private key",
            "value": "sandbox/certs/server.key"
        },
        {
            "name": "Result",
            "value": "match"
        }
    ]
}
Crear una clave privada
cert -key tmp/demo.key -rsa 2048
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
README.txt
current.txt
demo.key
draft.txt
new.txt
Crear una clave privada
cert -key tmp/demo-ec.key -ec prime256v1
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
README.txt
current.txt
demo-ec.key
draft.txt
new.txt
Crear una solicitud de firma de certificado
cert -csr certs/server.key tmp/demo.csr "CN=example.test" -san DNS:example.test
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
README.txt
current.txt
demo.csr
draft.txt
new.txt
Crear un certificado autofirmado
cert -self certs/server.key tmp/demo.crt "CN=example.test" -san DNS:example.test
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
README.txt
current.txt
demo.crt
draft.txt
new.txt
Convertir un certificado PEM a DER
cert -der certs/server.crt tmp/demo.der
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
README.txt
current.txt
demo.der
draft.txt
new.txt
Convertir un certificado DER a PEM
cert -pem certs/server.der tmp/demo.pem
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
README.txt
current.txt
demo.pem
draft.txt
new.txt
Crear un paquete PKCS#12
cert -p12 certs/server.crt certs/server.key tmp/demo.p12
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
README.txt
current.txt
demo.p12
draft.txt
new.txt
Cert · demo
cert -p12 -r certs/server.p12 tmp/unpacked -p demo
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
server.cert.pem
server.key.pem
Firmar una CSR con un certificado de CA
cert -sign certs/server.csr certs/server.crt certs/server.key tmp/signed.crt
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
CA certificate is not allowed to sign certificates
Verificar tiempo, confianza y nombre de host
cert -v certs/server.crt -chain certs/server.crt
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
File     sandbox/certs/server.crt
Purpose  TLS server
Time     valid
Trust    invalid
Result   invalid
Inspeccionar un certificado TLS remoto
cert -h example.test -4 -6
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
Choose either IPv4 or IPv6
Inspeccionar un certificado TLS remoto
cert -h example.test -t 301
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
Invalid timeout
Inspeccionar certificado, CSR, clave o paquete PKCS#12 local
cert -i certs/missing.pem
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
File not found
Verificar tiempo, confianza y nombre de host
cert -v certs/missing.pem
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
Certificate not found
Verificar que certificado y clave privada coinciden
cert -m certs/server.crt certs/missing.key
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
Private key not found
Crear una clave privada
cert -key tmp/demo.key -rsa 1024
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
RSA bits must be 2048–16384 in steps of 256
Inspeccionar un certificado TLS remoto
cert -h example.test -sni
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
SNI name required
Crear una clave privada
cert -key tmp/demo.key -ec unknown
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
Use prime256v1, secp384r1, or secp521r1
Crear una clave privada
cert -key tmp/demo.key -f -rsa 2048
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
README.txt
current.txt
demo.key
draft.txt
new.txt
Crear un certificado autofirmado
cert -self certs/missing.key tmp/missing.crt "CN=example.test"
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
Private key not found
Inspeccionar un certificado TLS remoto
cert -h example.test -ca missing-ca.pem
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
CA file not found
Cert · -unknown
cert -unknown
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
Unknown cert operation
Inspeccionar certificado, CSR, clave o paquete PKCS#12 local
cert -i certs/server.crt -j -json
Ejemplo didáctico sin conexiones HTTP, correo ni TLS reales
{
    "rows": [
        {
            "name": "File",
            "value": "sandbox/certs/server.crt"
        },
        {
            "name": "Certificates",
            "value": "1"
        },
        {
            "name": "Certificate 1:",
            "value": ""
        },
        {
            "name": "Subject",
            "value": "CN=example.test, O=lil"
        },
        {
            "name": "Issuer",
            "value": "CN=example.test, O=lil"
        },
        {
            "name": "Serial",
            "value": "01FAB2F36D62878EE1C3EF872CC4924ADAE7FACD"
        },
        {
            "name": "Valid from",
            "value": "2026-08-09 08:38:07 UTC"
        },
        {
            "name": "Valid to",
            "value": "2036-08-06 08:38:07 UTC"
        },
        {
            "name": "Validity",
            "value": "valid, 3566 days remaining"
        },
        {
            "name": "SAN",
            "value": "DNS:example.test, DNS:www.example.test"
        },
        {
            "name": "Key",
            "value": "RSA"
        },
        {
            "name": "Key bits",
            "value": "2048"
        },
        {
            "name": "Signature",
            "value": "RSA-SHA256"
        },
        {
            "name": "SHA256",
            "value": "FE:BE:96:6B:FD:A6:EA:E5:98:E1:66:7E:A3:32:72:7D:E3:DE:37:CC:D8:2F:64:63:76:73:26:C6:4B:F5:7D:CD"
        },
        {
            "name": "Constraints",
            "value": "CA:FALSE"
        },
        {
            "name": "Key usage",
            "value": "Digital Signature, Key Encipherment"
        },
        {
            "name": "Extended usage",
            "value": "TLS Web Server Authentication"
        },
        {
            "name": "Subject key ID",
            "value": "D6:14:0F:93:56:90:A8:E6:CC:3D:8C:D5:16:AE:EB:05:0C:07:8B:1D"
        },
        {
            "name": "Authority key ID",
            "value": "D6:14:0F:93:56:90:A8:E6:CC:3D:8C:D5:16:AE:EB:05:0C:07:8B:1D"
        }
    ]
}

Documentación relacionada

Versión pública actual

v1.2.42026-08-09

Sincronización lingüística

Completa la sincronización de la ayuda local y del servidor y refuerza la seguridad de localización de cert.