mpeylo / cmpossl

An OpenSSL-based implementation of the Certificate Management Protocol (CMP), defined in IETF RFCs 4210, 4211, and 6712. It is being extended according to the emerging RFCs 'CMP Updates' (CMPv3), 'CMP Algorithms', and 'Lightweight CMP Profile'.
https://github.com/mpeylo/cmpossl/wiki
Other
35 stars 13 forks source link

openssl version build issue #182

Closed gezhouyu closed 5 years ago

gezhouyu commented 5 years ago

hi sir, when I compile with 'make' command with reference to this link"https://github.com/mpeylo/cmpossl/wiki/Build-CMP-for-OpenSSL-1.0.2" , some errors have occurred.

make[2]: Entering directory /opt/gezhouyu/openssl-1.0.2m/crypto/err' gcc -I.. -I../.. -I../modes -I../asn1 -I../evp -I../../include -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H --debug -Wno-discarded-qualifiers -Wno-incompatible-pointer-types -Wno-unused-parameter -Wa,--noexecstack -m64 -DL_ENDIAN -O3 -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DRC4_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -c -o err_all.o err_all.c In file included from err_all.c:111:0: ../../include/openssl/cmp.h:410:1: error: parameter 1 has incomplete type DECLARE_ASN1_DUP_FUNCTION(OSSL_CMP_MSG) ^ ../../include/openssl/cmp.h:410:1: warning: return type defaults to 'int' [-Wreturn-type] ../../include/openssl/cmp.h: In function 'DECLARE_ASN1_DUP_FUNCTION': ../../include/openssl/cmp.h:432:3: error: storage class specified for parameter 'OSSL_cmp_option' } OSSL_cmp_option; ^ ../../include/openssl/cmp.h:433:48: error: expected declaration specifiers or '...' before 'OSSL_cmp_option' int OSSL_CMP_CTX_set_option(OSSL_CMP_CTX *ctx, OSSL_cmp_option opt, int val); ^ ../../include/openssl/cmp.h:450:16: error: storage class specified for parameter 'OSSL_cmp_http_cb_t' typedef BIO *(*OSSL_cmp_http_cb_t) (OSSL_CMP_CTX *ctx, BIO *hbio, ^ ../../include/openssl/cmp.h:452:49: error: expected declaration specifiers or '...' before 'OSSL_cmp_http_cb_t' int OSSL_CMP_CTX_set_http_cb(OSSL_CMP_CTX *ctx, OSSL_cmp_http_cb_t cb); ^ ../../include/openssl/cmp.h:455:15: error: storage class specified for parameter 'OSSL_cmp_transfer_cb_t' typedef int (*OSSL_cmp_transfer_cb_t) (OSSL_CMP_CTX *ctx, ^ ../../include/openssl/cmp.h:458:53: error: expected declaration specifiers or '...' before 'OSSL_cmp_transfer_cb_t' int OSSL_CMP_CTX_set_transfer_cb(OSSL_CMP_CTX *ctx, OSSL_cmp_transfer_cb_t cb); ^ ../../include/openssl/cmp.h:501:15: error: storage class specified for parameter 'OSSL_cmp_certConf_cb_t' typedef int (*OSSL_cmp_certConf_cb_t) (OSSL_CMP_CTX *ctx, X509 *cert, ^ ../../include/openssl/cmp.h:503:53: error: expected declaration specifiers or '...' before 'OSSL_cmp_certConf_cb_t' int OSSL_CMP_CTX_set_certConf_cb(OSSL_CMP_CTX *ctx, OSSL_cmp_certConf_cb_t cb); ^ err_all.c:116:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { ^ In file included from err_all.c:111:0: ../../include/openssl/cmp.h:410:1: error: old-style parameter declarations in prototyped function definition DECLARE_ASN1_DUP_FUNCTION(OSSL_CMP_MSG) ^ ../../include/openssl/cmp.h:410:1: error: parameter name omitted err_all.c:176:1: error: expected '{' at end of input } ^ err_all.c:176:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ err_all.c: At top level: cc1: warning: unrecognized command line option "-Wno-incompatible-pointer-types" [enabled by default] cc1: warning: unrecognized command line option "-Wno-discarded-qualifiers" [enabled by default] make[2]: *** [err_all.o] Error 1 make[2]: Leaving directory/opt/gezhouyu/openssl-1.0.2m/crypto/err' make[1]: [subdirs] Error 1 make[1]: Leaving directory `/opt/gezhouyu/openssl-1.0.2m/crypto' make: [build_crypto] Error 1

Can you help me check the errors?

Best Regards, Iya Ge

mpeylo commented 5 years ago

Please note at the beginning of the linked page.

Warning: despite the bulky compatibility quirks given below, recent CMPforOpenSSL versions likely will not build fully with OpenSSL 1.0.2 using this procedure. Better use the standalone build described in Simple, fast, and more stable way: dynamically linking with OpenSSL.

This is as we now need to aim for full compatibility with the recent upstream OpenSSL code. If the dynamically linked approach that is not an option for you, then it might be possible to use an older version of the CMP code?

DDvO commented 5 years ago

I've extended the compatibility quirks such that the latest available version of the library should build again, but not the CMP portion of the CLI.