Find the answer to your Linux question:
Results 1 to 5 of 5
Hi, I am trying to compile the vsftpd binary with support for ssl. I changed the builddefs.h to include #define VSF_BUILD_SSL but I get an error when make tries to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2008
    Posts
    4

    Vsftpd and SSL support


    Hi,

    I am trying to compile the vsftpd binary with support for ssl.
    I changed the builddefs.h to include #define VSF_BUILD_SSL
    but I get an error when make tries to to compile the file ssl.c:

    A part of the error after the make:

    ....
    gcc -c access.c -O2 -Wall -W -Wshadow -idirafter dummyinc
    gcc -c features.c -O2 -Wall -W -Wshadow -idirafter dummyinc
    gcc -c readwrite.c -O2 -Wall -W -Wshadow -idirafter dummyinc
    gcc -c ssl.c -O2 -Wall -W -Wshadow -idirafter dummyinc
    ssl.c:27:25: error: openssl/err.h: No such file or directory
    ssl.c:28:26: error: openssl/rand.h: No such file or directory
    ssl.c:29:25: error: openssl/bio.h: No such file or directory
    ssl.c:32: error: syntax error before '*' token
    ssl.c:32: warning: type defaults to 'int' in declaration of 'get_ssl'
    ....

    The ssl files that are needed are located at /usr/local/ssl/include/openssl

    I added /usr/local/ssl/include/openssl to the path and the errors did not change. I also included /usr/local/ssl/include/openssl in the INCLUDE environment variable.

    I also tried to change the make. Vsftpd make currently has:

    CFLAGS = -O2 -Wall -W -Wshadow
    and I changed it for
    CFLAGS = -O2 -Wall -W -Wshadow -I/usr/local/ssl/include/


    A chunk of the output after the make:

    From the ssl.c file. ( I added the line numbers at line 24.)
    /*
    * ssl.c
    * Routines to handle a SSL/TLS-based implementation of RFC 2228, i.e.
    * encryption.
    */

    #include "ssl.h"
    #include "session.h"
    #include "ftpcodes.h"
    #include "ftpcmdio.h"
    #include "defs.h"
    #include "str.h"
    #include "sysutil.h"
    #include "tunables.h"
    #include "utility.h"
    #include "builddefs.h"

    #ifdef VSF_BUILD_SSL

    #include <openssl/ssl.h>
    #include <openssl/err.h>
    #include <openssl/rand.h>
    #include <openssl/bio.h>


    static char* get_ssl_error();
    static SSL* get_ssl(struct vsf_session* p_sess, int fd);
    static int ssl_session_init(struct vsf_session* p_sess);


    Any one has any idea?

    Thanks!

  2. #2
    Just Joined!
    Join Date
    Feb 2008
    Posts
    29
    Whoa!

    I'm not sure if you need to modify the file. The entries you modified are path to header files which the program will look for basic operation.

    You might be missing some packages which is making the build to fail.

    Are you running a source install or a binary install?

    Thanks,
    Lego

  3. #3
    Just Joined!
    Join Date
    Feb 2008
    Posts
    4
    I am running a source install. I downloaded it from vsftpd - Secure, fast FTP server for UNIX-like systems
    The also installed from source tarball the packages ZLIB, and OPENSSL and they installed correctly (I am running other services that depends on them)

  4. #4
    Just Joined!
    Join Date
    Feb 2008
    Posts
    29
    Hmmm..

    On another thought, I think you need the openssl-devel package for this to work.

  5. #5
    Just Joined!
    Join Date
    Feb 2008
    Posts
    4
    there is not such source tarball for dowload.

    The only available is openssl-0.9.8g.tar.gz
    OpenSSL: Source, Tarballs

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •