сборка с ssl

Nikolay Grebnev nick на algen.spb.ru
Сб Дек 12 23:57:05 MSK 2009


Добрый день.

Чего-то напрочь не удается собрать с поддержкой ssl нормально.

OS - CentOS 5.2 (вроде как - или 5.1)

При сборке с базовыми либами ругается
        objs/ngx_modules.o \
        -lcrypt -lpcre -lssl -lcrypto -ldl -lz
objs/src/http/ngx_http_request.o: In function `ngx_http_ssl_servername':
ngx_http_request.c:(.text+0xc85): undefined reference to
`SSL_get_servername'
ngx_http_request.c:(.text+0xd76): undefined reference to `SSL_set_SSL_CTX'
collect2: выполнение ld завершилось с кодом возврата 1
make[1]: *** [objs/nginx] Ошибка 1
make[1]: Leaving directory `/root/nginx-ssl/nginx-0.8.29'
make: *** [build] Ошибка 2

При сборке с внешним ssl -
./configure --with-openssl=/root/nginx-ssl/openssl-0.9.8l
--with-http_ssl_module

# make -j 5
make -f objs/Makefile
make[1]: Entering directory `/root/nginx-ssl/nginx-0.8.29'
cd /root/nginx-ssl/openssl-0.9.8l \
        && make clean \
        && ./config --prefix=/root/nginx-ssl/openssl-0.9.8l/.openssl
no-shared  no-threads \
        && make \
        && make install
make[2]: Entering directory `/root/nginx-ssl/openssl-0.9.8l'
rm -f *.map *.so *.so.* *.dll engines/*.so engines/*.dll *.a engines/*.a
*/lib */*/lib
rm: невозможно удалить `openssl/lib': Это каталог
make[2]: *** [libclean] Ошибка 1
make[2]: Leaving directory `/root/nginx-ssl/openssl-0.9.8l'
make[1]: *** [/root/nginx-ssl/openssl-0.9.8l/.openssl/include/openssl/ssl.h]
Ошибка 2
make[1]: Leaving directory `/root/nginx-ssl/nginx-0.8.29'
make: *** [build] Ошибка 2


Это был 0.8.29.
=====================

0.7.64 собирается с собственным ssl (./configure
--with-openssl=/root/nginx-ssl/openssl-0.9.8l --with-http_ssl_module)
# /usr/local/nginx/sbin/nginx -V
nginx version: nginx/0.7.64
TLS SNI support enabled
configure arguments: --with-openssl=/root/nginx-ssl/openssl-0.9.8l
--with-http_ssl_module

но не может запуститься
# /usr/local/nginx/sbin/nginx -t -c conf/nginx.conf-ssl
[emerg]: SSL_CTX_use_certificate_chain_file("/usr/local/nginx/conf/srv.pem")
failed (SSL: error:0906D066:PEM routines:PEM_read_bio:bad end line
error:140DC009:SSL routines:SSL_CTX_use_certificate_chain_file:PEM lib)
configuration file /usr/local/nginx/conf/nginx.conf-ssl test failed


Жутко умаялся, посоветуйте плиз что делать.

Да, ssl самый простенький от globessl.
srv.pem собирался из 2 файлов - crt и ca-bundle
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx-ru/attachments/20091212/0565b552/attachment.html>


Подробная информация о списке рассылки nginx-ru