360 Secure SkillHub
360 安全技能中心

Sslgen

SSLGen是基于OpenSSL的命令行工具,核心功能包括生成自签名SSL证书、证书签名请求(CSR),以及证书信息查看、有效性验证、过期时间检查、证书链拆分等。适用于开发环境快速生成证书、生产前准备CSR、日常证书运维场景。输入为命令行参数,生成类命令在当前目录输出密钥和证书/CSR文件,其他命令输出到标准输出并带颜色编码提示,需提前安装OpenSSL。

bytesagain
bytesagain
热度 40.41
最近更新 2026-03-19 19:52:01
分类:安全依赖:代码执行 / 读写文件应用场景:DevOps

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add sslgen
Metadata
name
SSLGen
description
Generate self-signed SSL certs and CAs for dev environments. Use when creating certs, validating CSRs, generating chains, formatting PEM.
version
3.0.0
author
BytesAgain
homepage
https://bytesagain.com
source
https://github.com/bytesagain/ai-skills
tags
["ssl","certificate","tls","openssl","security","developer"]
categories
["Developer Tools","Utility"]

SSLGen — SSL Certificate Generator

Generate, inspect, and verify SSL/TLS certificates from the command line. Powered by OpenSSL.

Commands

Command Description
self-signed <domain> Generate a self-signed certificate + private key (RSA 2048, 365 days, with SANs)
csr <domain> Generate a Certificate Signing Request + private key
info <certfile> Show full certificate details (subject, issuer, SANs, fingerprint, algorithm)
verify <certfile> Verify certificate validity and check expiration status
chain <certfile> Display the certificate chain (splits PEM bundles)
expiry <certfile> Check certificate expiry date with color-coded warnings

Examples

# Generate a self-signed cert for local dev
sslgen self-signed myapp.local
# → Creates myapp.local.key + myapp.local.crt

# Generate a CSR for production
sslgen csr example.com
# → Creates example.com.key + example.com.csr

# Inspect a certificate
sslgen info /etc/ssl/certs/server.crt

# Check if cert is expiring soon
sslgen expiry server.crt

# Verify a certificate
sslgen verify server.crt

# View cert chain
sslgen chain fullchain.pem

Requirements

  • openssl — must be installed and in PATH

Output

  • self-signed and csr create files in the current directory named <domain>.key, <domain>.crt, or <domain>.csr
  • All other commands output to stdout with color-coded status indicators
  • Expiry warnings: green (90+ days), yellow (30-90 days), red (<30 days), expired