Dies ist eine alte Version des Dokuments!


Erstellen eines DFN-signierten Zertifikates

Das Rechenzentrum kann Zitate ausstellen, die gegen die DFN-CA signiert sind und daher bspw. von Browsern ohne Nachfrage akzeptiert werden. Anschprechpartner ist Ulrich Schwarz.

Zertifikatsantrag (.csr) erstellen

Folgende OpenSSL Konfiguration erstellen (als openssl-web.cnf):

# OpenSSL configuration.
#
HOME                    = /home/_admin_/ssl/ssl_spd.ltsh.de/apache
RANDFILE                = ::HOME/.rnd

[ ca ]
default_ca              = CA_default

[ CA_default ]
dir                     = /home/_admin_/ssl/ssl_spd.ltsh.de
serial                  = $dir/serial
database                = $dir/index.txt
new_certs_dir           = $dir/newcerts
certs                   = $dir/certs
certificate             = $certs/cacert.pem
private_key             = $dir/private/cakey.pem
default_days            = 365
default_md              = md5
preserve                = no
email_in_dn             = no
nameopt                 = default_ca
certopt                 = default_ca
policy                  = policy_match
copy_extensions         = copy

[ policy_match ]
countryName             = match
stateOrProvinceName     = match
organizationName        = match
organizationalUnitName  = optional
commonName              = supplied
emailAddress            = optional

[ req ]
default_bits            = 4096                  # Size of keys
default_keyfile         = key.pem               # name of generated keys
default_md              = sha256                # message digest algorithm
string_mask             = nombstr               # permitted characters
distinguished_name      = req_distinguished_name
req_extensions          = v3_req
x509_extensions         = v3_req

[ req_distinguished_name ]
# Variable name           Prompt string
#----------------------   ----------------------------------
0.organizationName      = Organization Name (company)
organizationalUnitName  = Organizational Unit Name (department, division)
emailAddress            = Email Address
emailAddress_max        = 40
localityName            = Locality Name (city, district)
stateOrProvinceName     = State or Province Name (full name)
countryName             = Country Name (2 letter code)
countryName_min         = 2
countryName_max         = 2
commonName              = Common Name (hostname, IP, or your name)
commonName_max          = 64

# Default values for the above, for consistency and less typing.
# Variable name                   Value
#------------------------------   ------------------------------
0.organizationName_default      = Christian-Albrechts-Universitaet zu Kiel
localityName_default            = Kiel
stateOrProvinceName_default     = Schleswig-Holstein
countryName_default             = DE
commonName_default		= <host>.informatik.uni-kiel.de
emailAddress_default             = ps-admin@informatik.uni-kiel.de
organizationalUnitName_default  = Computer Science Institute

[ v3_ca ]
basicConstraints        = CA:TRUE
subjectKeyIdentifier    = hash
authorityKeyIdentifier  = keyid:always,issuer:always

[ v3_req ]
# Extensions to add to a certificate request
basicConstraints = CA:FALSE
keyUsage = nonRepudiation, digitalSignature, keyEncipherment, keyEncipherment, dataEncipherment, keyAgreement

# Some CAs do not yet support subjectAltName in CSRs.
# Instead the additional names are form entries on web
# pages where one requests the certificate...
subjectAltName          = @alt_names



[alt_names]

### SARASVATI: ILEARN
DNS.1 = sarasvati.informatik.uni-kiel.de
DNS.2 = ilearn.informatik.uni-kiel.de

### LYNCH: JENKINS
#DNS.1 = lynch.informatik.uni-kiel.de
#DNS.2 = jenkins.ps.informatik.uni-kiel.de

### ISSAN: GIT-PS
#DNS.1 = issan.informatik.uni-kiel.de
#DNS.2 = git-ps.informatik.uni-kiel.de
#DNS.3 = git.ps.informatik.uni-kiel.de

### GISCOURS: WWW-PS
#DNS.1 = giscours.informatik.uni-kiel.de
#DNS.2 = www-ps.informatik.uni-kiel.de
#DNS.3 = www.ps.informatik.uni-kiel.de
#DNS.4 = wiki.ps.informatik.uni-kiel.de
#DNS.5 = ilearn.ps.informatik.uni-kiel.de
#DNS.6 = owncloud.ps.informatik.uni-kiel.de
#DNS.7 = errbit.ps.informatik.uni-kiel.de
#DNS.8 = redmine.ps.informatik.uni-kiel.de
#DNS.9 = mdb.ps.informatik.uni-kiel.de
#DNS.10 = packages.ps.informatik.uni-kiel.de

### MEDOC
#DNS.1 = medoc.informatik.uni-kiel.de
#DNS.2 = ldap.ps.informatik.uni-kiel.de
#DNS.3 = broker.ps.informatik.uni-kiel.de
#DNS.4 = master.ps.informatik.uni-kiel.de

### PESSAC
#DNS.1 = pessac.informatik.uni-kiel.de
#DNS.2 = mitarbeiter.ps.informatik.uni-kiel.de

### CHEVALBLANC
#DNS.1 = chevalblanc.informatik.uni-kiel.de
#DNS.2 = jenkins.ps.informatik.uni-kiel.de

### HEPHEISTOS
#DNS.1 = hepheistos.informatik.uni-kiel.de
#DNS.2 = urlaub.informatik.uni-kiel.de

[ server ]
# Make a cert with nsCertType set to "server"
basicConstraints=CA:FALSE
nsCertType                      = server
nsComment                       = "OpenSSL Generated Server Certificate"
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid,issuer:always

[ client ]
# Make a cert with nsCertType set to "client"
basicConstraints=CA:FALSE
nsCertType                      = client
nsComment                       = "OpenSSL Generated Client Certificate"
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid,issuer:always

Im selben Ordner, das Skript web_reqcert.sh anlegen und ausführbar machen:

#!/bin/bash

if [ -z "$1" ]; then
        echo "usage: $(basename $0) <fqdn>"
        exit 1
fi

FQDN="$1"
FQDNunderscores=$(echo $FQDN | sed 's/\./_/g')

base="$(pwd)"

test -d "$base/private" || mkdir -p "$base/private"

if [ -f "$base/private/${FQDNunderscores}.key" ]; then
    openssl  req  -config "$base/openssl-web.cnf" \
                  -nodes  -new \
                  -key "$base/private/${FQDNunderscores}.key" \
                  -out "$base/${FQDNunderscores}.csr"
else
    openssl  req  -config "$base/openssl-web.cnf" \
                  -nodes  -new \
                  -keyout "$base/private/${FQDNunderscores}.key" \
                  -out "$base/${FQDNunderscores}.csr"
fi

Das Skript ausführen:

  $ ./web_certreq <fqdn>

Den entstehenden Key ./private/<fqdn>.key gut aufbewahren (bzw. auf den Webserver kopieren). Der Key wird sich bei Verlängerungsanträgen nicht mehr ändern. Die Datei muss vorm Zugriff dritter geschützt werden.

Die entstehende <fqdn>.csr Datei (Certificate Signing Request) wird im folgenden Schritt benötigt.

Zertifikatsantrag (.csr) beim DfN hochladen

/srv/dokuwiki/adminwiki/data/attic/admin/tasks/zertifikat.1547471687.txt.gz · Zuletzt geändert: 2019-01-14 14:14 von mga
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0