26.01.2013 14:12, Aleksey Avdeev пишет: > 15.01.2013 22:21, Aleksey Avdeev пишет: >> Приветствую. >> >> Я планирую перевести дефолтные настройки apache2-mod_ssl{,-compat} на >> использование общесистемного хранилища сертификатов /var/lib/ssl. >> (Сейчас apache2-mod_ssl использует своё внутреннее хранилище, >> /etc/httpd2/conf/ssl.*.) > > Содержащий данные изменения apache2-2.2.22-alt15 ушёл в Сизиф (см. > ): Изменения добрались до бранчей: t6 -- apache2-2.2.22-alt14.M60T.1 (см. ). 5.1 -- apache2-2.2.22-alt14.M51.1 (см. ). 5.0 -- apache2-2.2.22-alt14.M50.1 (см. ). В p6 и p5 пакеты уйдут примерно через неделю. > теперь при старте/рестарте сервера в /var/lib/ssl, средствами > cert-sh-functions, создаётся ключ и сертификат с именем httpd2, если > выполняются условия: > > 1. Существует /etc/httpd2/conf/mods-enabled/ssl.load (модуль ssl грузится). > > 2. Существует как минимум один файл (ссылка) из > /etc/httpd2/conf/sites-enabled/{000-,}default_https{,-compat}.conf (т. > е. используется что-то из > /etc/httpd2/conf/sites-available/default_https{-compat,}.conf). > > 3. В файлах п. 2 значения SSLCertificate{,Key}File соответствуют > умолчальным. > >> >> Пока планирую сделать в >> /etc/httpd2/conf/sites-available/default_https{-compat,}.conf такие >> настройки (в значениях помеченных "????" я неуверен): > > Сделано: > >> >> # Server Certificate: >> # Point SSLCertificateFile at a PEM encoded certificate. If >> # the certificate is encrypted, then you will be prompted for a >> # pass phrase. Note that a kill -HUP will prompt again. Keep >> # in mind that if you have both an RSA and a DSA certificate you >> # can configure both in parallel (to also allow the use of DSA >> # ciphers, etc.) >> SSLCertificateFile "/var/lib/ssl/certs/server.crt" >> #SSLCertificateFile "/var/lib/ssl/certs/server-dsa.crt" > > SSLCertificateFile "/var/lib/ssl/certs/httpd2.cert" > #SSLCertificateFile "/var/lib/ssl/certs/httpd2-dsa.cert" > >> >> # Server Private Key: >> # If the key is not combined with the certificate, use this >> # directive to point at the key file. Keep in mind that if >> # you've both a RSA and a DSA private key you can configure >> # both in parallel (to also allow the use of DSA ciphers, etc.) >> SSLCertificateKeyFile "/var/lib/ssl/private/server.key" >> #SSLCertificateKeyFile "/var/lib/ssl/private/server-dsa.key" > > SSLCertificateKeyFile "/var/lib/ssl/private/httpd2.key" > #SSLCertificateKeyFile "/var/lib/ssl/private/httpd2-dsa.key" > > Для обеспечения преемственности настроек, при обновлении > apache2-mod_ssl{,-compat} <= 2.2.22-alt14 запускается триггер, который > при условиях (должны выполняться все): > > 1. Существовании старых сертификата и ключа (файлов > /etc/httpd2/conf/ssl.{crt/server.crt,key/server.key}). > > 2. Замены старого конфига > /etc/httpd2/conf/sites-available/default_https{-compat,}.conf на новый > (за счёт %config(noreplace), такое происходит только если поставленный > из пакета файл не редактировался). > > В файлах /etc/httpd2/conf/sites-available/default_https{-compat,}.conf > для SSLCertificateKeyFile и SSLCertificateKeyFile сохраняется > использование старых значений: > > # New certificate file > #SSLCertificateFile "/var/lib/ssl/certs/httpd2.cert" > # Old certificate file > SSLCertificateFile "/etc/httpd2/conf/ssl.crt/server.crt" > #SSLCertificateFile "/var/lib/ssl/certs/httpd2-dsa.cert" > > и > > # New certificate key file > #SSLCertificateKeyFile "/var/lib/ssl/private/httpd2.key" > # Old certificate key file > SSLCertificateKeyFile "/etc/httpd2/conf/ssl.key/server.key" > #SSLCertificateKeyFile "/var/lib/ssl/private/httpd2-dsa.key" > > За счёт этого сохраняется использование старых ключа и сертификата (и > новые при этом не создаются). > >> >> # Server Certificate Chain: >> # Point SSLCertificateChainFile at a file containing the >> # concatenation of PEM encoded CA certificates which form the >> # certificate chain for the server certificate. Alternatively >> # the referenced file can be the same as SSLCertificateFile >> # when the CA certificates are directly appended to the server >> # certificate for convinience. >> #SSLCertificateChainFile "/var/lib/ssl/certs/ca-root.pem" > > #SSLCertificateChainFile "/var/lib/ssl/certs/ca-root.pem" > >> >> # Certificate Authority (CA): >> # Set the CA certificate verification path where to find CA >> # certificates for client authentication or alternatively one >> # huge file containing all of them (file must be PEM encoded) >> # Note: Inside SSLCACertificatePath you need hash symlinks >> # to point to the certificate files. Use the provided >> # Makefile to update the hash symlinks after changes. >> #SSLCACertificatePath "/var/lib/ssl/certs" >> #SSLCACertificateFile "/var/lib/ssl/certs/ca-root.pem" > > #SSLCACertificatePath "/var/lib/ssl/certs" > #SSLCACertificateFile "/var/lib/ssl/certs/ca-root.pem" > >> >> # Certificate Revocation Lists (CRL): >> # Set the CA revocation path where to find CA CRLs for client >> # authentication or alternatively one huge file containing all >> # of them (file must be PEM encoded) >> # Note: Inside SSLCARevocationPath you need hash symlinks >> # to point to the certificate files. Use the provided >> # Makefile to update the hash symlinks after changes. >> #SSLCARevocationPath "/var/lib/ssl/certs" >> #SSLCARevocationFile "/var/lib/ssl/certs/ca-bundle.crl" > > #SSLCARevocationPath "/var/lib/ssl/certs" > #SSLCARevocationFile "/var/lib/ssl/certs/ca-bundle.crl" > > PS: В бранчи данный вариант отправлю примерно через неделю (если > проблемы не выплывут). -- С уважением. Алексей.