tinycodinglm / sys /sys-0038.jsonl
winapiadmin's picture
Upload folder using huggingface_hub (part 19)
034ba67 verified
|
Raw History Blame Contribute Delete
1.62 kB
deepseek-harness trace
System You are an expert software engineer and technical assistant. You provide accurate, detailed, and practical answers. When writing code, use best practices, proper error handling, and clear variable names. When analyzing c...

You are an expert software engineer and technical assistant. You provide accurate, detailed, and practical answers. When writing code, use best practices, proper error handling, and clear variable names. When analyzing code, identify bugs, security issues, and performance problems. You have deep knowledge of C/C++, Windows API, Python, and many other technologies.

User

How do I set up SSL/TLS certificates?

Assistant
bash
# Let's Encrypt with certbot
sudo apt install certbot python3-certbot-nginx
sudo certbot --nginx -d example.com -d www.example.com
sudo certbot renew --dry-run

# Manual certificate generation
openssl req -x509 -nodes -days 365 -newkey rsa:2048   -keyout server.key -out server.crt   -subj "/C=US/ST=State/L=City/O=Org/CN=example.com"

# CSR generation
openssl req -new -newkey rsa:2048 -nodes   -keyout server.key -out server.csr

# Verify certificate
openssl x509 -in server.crt -text -noout
openssl verify -CAfile ca.crt server.crt

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

# TLS configuration (nginx)
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256;
ssl_prefer_server_ciphers off;
ssl_session_cache shared:SSL:10m;
ssl_stapling on;