---
name: ssl
slug: ssl
version: 1.0.2
description: Set up HTTPS, manage TLS certificates, and debug secure connection issues.
homepage: https://clawic.com/skills/ssl
metadata:
  clawdbot:
    emoji: 🔒
    displayName: SSL
---

## Triggers

Activate on: SSL certificate, HTTPS setup, Let's Encrypt, certbot, TLS configuration, certificate expired, mixed content, certificate chain error.

## Core Tasks

| Task | Tool/Method |
|------|-------------|
| Get free cert | `certbot`, acme.sh, Caddy (auto) |
| Check cert status | `openssl s_client -connect host:443` |
| View cert details | `openssl x509 -in cert.pem -text -noout` |
| Test config | ssllabs.com/ssltest or `testssl.sh` |
| Convert formats | See `formats.md` |

## Quick Cert Commands

```bash
# Let's Encrypt with certbot (most common)
certbot certonly --nginx -d example.com -d www.example.com

# Check expiry
echo | openssl s_client -connect example.com:443 2>/dev/null | openssl x509 -noout -dates

# Verify chain is complete
openssl s_client -connect example.com:443 -servername example.com
# Look for "Verify return code: 0 (ok)"
```

## Common Errors

| Error | Cause | Fix |
|-------|-------|-----|
| `certificate has expired` | Cert past valid date | Renew with certbot renew |
| `unable to verify` / `self signed` | Missing intermediate cert | Include full chain in config |
| `hostname mismatch` | Cert doesn't cover this domain | Get cert for correct domain or add SAN |
| `mixed content` | HTTP resources on HTTPS page | Change all URLs to HTTPS or use `//` |
| `ERR_CERT_AUTHORITY_INVALID` | Self-signed or untrusted CA | Use Let's Encrypt or install CA cert |

For detailed troubleshooting steps, see `troubleshooting.md`.

## Server Config Patterns

**Nginx:**
```nginx
server {
    listen 443 ssl http2;
    ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
}
```

**Apache:**
```apache
SSLEngine on
SSLCertificateFile /path/to/cert.pem
SSLCertificateKeyFile /path/to/privkey.pem
SSLCertificateChainFile /path/to/chain.pem
```

For Node.js, Caddy, Traefik, and HAProxy, see `servers.md`.

## Renewal

Let's Encrypt certs expire in 90 days. Always automate:

```bash
# Test renewal
certbot renew --dry-run

# Cron (certbot usually adds this)
0 0 * * * certbot renew --quiet
```

## Certificate Types

| Type | Use case |
|------|----------|
| Single domain | One site (example.com) |
| Wildcard (*.domain.com) | All subdomains |
| Multi-domain (SAN) | Multiple different domains on one cert |
| Self-signed | Local dev only — browsers will warn |

## What This Doesn't Cover

- Application auth (JWT, OAuth) → see `oauth` skill
- SSH keys → see `linux` or server skills
- VPN/tunnel setup → see networking skills
- Firewall configuration → see server/infrastructure skills


---
Source attribution: clawic
Original project: https://github.com/clawic/skills/blob/f825206afbf1c697202533a9187be68c7b697e0e/skills/ssl/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

MIT License

Copyright (c) 2026 Ivan G. Davila

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Mega AI Hub resource metadata

Creator / publisher: clawic
Original project: https://github.com/clawic/skills/blob/f825206afbf1c697202533a9187be68c7b697e0e/skills/ssl/SKILL.md
Attribution basis: Source repository record

Fields of work: Development & Engineering, Operations
Roles: Backend Developer, DevOps / SRE, IT Operations
Specialties: Backend, DevOps
Tools: Caddy, Certbot, Openssl, Acme.Sh
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: 3e54f6d0656512b92f126e5205791758a6bdc34d6682b166a4ca85c5f9299e95
