Menu

Error while building mod-csrf code

2017-05-12
2017-05-12
  • Ritesh Negi

    Ritesh Negi - 2017-05-12

    Hi,

    I am getting below error while building the code.
    Has anyone built the module successfully?

    [root apache2]# apxs -i -c mod_csrf.c -lcrypto

    /usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -prefer-pic -O2
    -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
    --param=ssp-buffer-size=4 -m64 -mtune=generic -Wformat-security
    -fno-strict-aliasing -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -pthread
    -I/usr/include/httpd -I/usr/include/apr-1 -I/usr/include/apr-1 -c -o
    mod_csrf.lo mod_csrf.c && touch mod_csrf.slo

    mod_csrf.c:34:25: error: openssl/ssl.h: No such file or directory

    mod_csrf.c:35:28: error: openssl/crypto.h: No such file or directory

    mod_csrf.c:36:24: error: openssl/dh.h: No such file or directory

    mod_csrf.c:37:24: error: openssl/bn.h: No such file or directory

    mod_csrf.c:38:26: error: openssl/rand.h: No such file or directory

    mod_csrf.c:39:25: error: openssl/evp.h: No such file or directory

    mod_csrf.c:40:26: error: openssl/hmac.h: No such file or directory

    mod_csrf.c:41:25: error: openssl/err.h: No such file or directory

    mod_csrf.c:119: error: âEVP_MAX_KEY_LENGTHâ undeclared here (not in a
    function)

    mod_csrf.c: In function âcsrf_dec64â:

    mod_csrf.c:449: error: âEVP_CIPHER_CTXâ undeclared (first use in this
    function)

    mod_csrf.c:449: error: (Each undeclared identifier is reported only once

    mod_csrf.c:449: error: for each function it appears in.)

    mod_csrf.c:449: error: expected â;â before âcipher_ctxâ

    mod_csrf.c:460: warning: implicit declaration of function
    âEVP_CIPHER_CTX_initâ

    mod_csrf.c:460: error: âcipher_ctxâ undeclared (first use in this function)

    mod_csrf.c:461: warning: implicit declaration of function âEVP_DecryptInitâ

    mod_csrf.c:461: warning: implicit declaration of function âEVP_des_ede3_cbcâ

    mod_csrf.c:462: warning: implicit declaration of function
    âEVP_DecryptUpdateâ

    mod_csrf.c:467: warning: implicit declaration of function âEVP_DecryptFinalâ

    mod_csrf.c:471: warning: implicit declaration of function
    âEVP_CIPHER_CTX_cleanupâ

    mod_csrf.c: In function âcsrf_enc64â:

    mod_csrf.c:502: error: âEVP_CIPHER_CTXâ undeclared (first use in this
    function)

    mod_csrf.c:502: error: expected â;â before âcipher_ctxâ

    mod_csrf.c:509: warning: implicit declaration of function
    âEVP_CIPHER_block_sizeâ

    mod_csrf.c:528: error: âcipher_ctxâ undeclared (first use in this function)

    mod_csrf.c:529: warning: implicit declaration of function âEVP_EncryptInitâ

    mod_csrf.c:530: warning: implicit declaration of function
    âEVP_EncryptUpdateâ

    mod_csrf.c:545: warning: implicit declaration of function âEVP_EncryptFinalâ

    mod_csrf.c: In function âcsrf_pwd_cmdâ:

    mod_csrf.c:1326: warning: implicit declaration of function âEVP_BytesToKeyâ

    mod_csrf.c:1326: warning: implicit declaration of function âEVP_sha1â

    apxs:Error: Command failed with rc=65536

    Regards,

    Ritesh

     
  • Pascal Buchbinder

    Installing the "openssl-devel" package will probably sove the problem.

     
  • Ritesh Negi

    Ritesh Negi - 2017-05-15

    Thanks Pascal. That worked.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.