# SSL/TLS Certificates for LDAP This directory should contain your SSL/TLS certificates for the LDAP server. ## Required Files The OpenLDAP container expects the following files in this directory: - `ca.crt` - Certificate Authority certificate (your dev-ca root certificate) - `server.crt` - Server certificate for ldap.testing.local - `server.key` - Private key for the server certificate ## Using Your Custom Dev-CA Certificates If you maintain your own dev-ca (as mentioned), simply copy your certificates here: ```bash # Copy your dev-ca generated certificates to this directory cp /path/to/your/dev-ca/certs/ldap-server.crt ./server.crt cp /path/to/your/dev-ca/private/ldap-server.key ./server.key cp /path/to/your/dev-ca/ca-cert.pem ./ca.crt ``` **Important Notes:** - The server certificate should be issued for the hostname `ldap.testing.local` - The certificate can also include SANs (Subject Alternative Names) like: - `DNS:ldap.testing.local` - `DNS:localhost` - `IP:127.0.0.1` - Ensure the private key is readable by the container (permissions should be 600 or 644) ## Generating Self-Signed Certificates (Quick Start) If you don't have your dev-ca handy and want to quickly test, you can generate self-signed certificates: ### Option 1: Using OpenSSL (Manual) ```bash # Generate CA private key openssl genrsa -out ca.key 4096 # Generate CA certificate openssl req -new -x509 -days 3650 -key ca.key -out ca.crt \ -subj "/C=US/ST=State/L=City/O=Testing Org/CN=Testing CA" # Generate server private key openssl genrsa -out server.key 4096 # Generate server certificate signing request openssl req -new -key server.key -out server.csr \ -subj "/C=US/ST=State/L=City/O=Testing Org/CN=ldap.testing.local" # Create extensions file for SAN cat > server-ext.cnf <