Selbstsigniertes SSL-Zertifikat: Unterschied zwischen den Versionen

Aus MattWiki
Keine Bearbeitungszusammenfassung
Zeile 3: Zeile 3:
  mkdir -p /etc/apache2/ssl  # Optional Standardpfad /etc/ssl/xxx verwenden
  mkdir -p /etc/apache2/ssl  # Optional Standardpfad /etc/ssl/xxx verwenden
  cd /etc/apache2/ssl
  cd /etc/apache2/ssl
  openssl req -x509 -newkey rsa:4096 -days 365 -nodes -out cert.pem -keyout cert.pem
openssl req -x509 -new -days 365 -nodes -out cert.pem -keyout cert.pem
  openssl req -x509 -newkey rsa:4096 -days 365 -nodes -out cert.pem -keyout cert.pem   # 4096 Bit Key
 


Folgende Werte eingeben:
Folgende Werte eingeben:

Version vom 6. Juni 2015, 14:02 Uhr

Selbst signiertes Zertifikat erzeugen

Zertifikat mit privaten und öffentlichen Schlüssel in einer Datei anlegen:

mkdir -p /etc/apache2/ssl   # Optional Standardpfad /etc/ssl/xxx verwenden
cd /etc/apache2/ssl
openssl req -x509 -new -days 365 -nodes -out cert.pem -keyout cert.pem 
openssl req -x509 -newkey rsa:4096 -days 365 -nodes -out cert.pem -keyout cert.pem    # 4096 Bit Key


Folgende Werte eingeben:

Country Name: DE
State or Province: .  ("." entspricht "leer")
Locality Name: .
Organization Name: .
Organizational Unit Name: .
Common Name (FQDN-Name): domain.tld
E-Mail Address: webmaster@localhost

Unter Umständen unnötig:

ln -sf /etc/apache2/ssl/cert.pem /etc/apache2/ssl/`/usr/bin/openssl x509 -noout -hash < /etc/apache2/ssl/cert.pem` # Geht ggf. auch ohne

Zugriffsrechte einschränken:

chmod 600 /etc/apache2/ssl/cert.pem
ggf. noch Ownergruppen der cert.pem anpassen? (vgl. andere Dateien)

Zertifikat überprüfen siehe Zertifikat überprüfen (Debian)