Comments (4)
What is the configure command?
BUILD_WITH_ECS_LOCL_H is not needed with OpenSSL-1.0.2
40 /* To build this mode,
41 * OpenSSL has ECDSA_METHOD defined in internal header file ecs_locl.h
42 * Until this is resolved use something like:
43 * CPPFLAGS="-DBUILD_WITH_ECS_LOCL_H -I/path.to.openssl-1.0.1e/src/crypto/ec dsa"
44 * See OpenSSL bug report #2459 02/23/2011
45 * Once OpenSSL addresses the issues this code will be changed.
46 *
47 * OpenSSL mods were submitted 09/2013 that will set ECDSA_F_ECDSA_METHOD_NE W
48 * and define the ECDSA_METHOD_new and friends functions
49 * These mods are in OpenSSL-1.0.2-beta
50 * We will try both methods.
51 */
Note line 49
On 11/2/2015 1:47 AM, Ivan Wallis wrote:
Hi,
Getting an error when attempting to build libp11 0.3.0 against openssl-1.0.2d:
make all-recursive
make[1]: Entering directory |/root/libp11-master'
Making all in src
make[2]: Entering directory|/root/libp11-master/src'
CC libp11_la-p11_ec.lo
p11_ec.c:54:7: warning: #warning "Both BUILD_WITH_ECS_LOCL_H and ECDSA_F_ECDSA_METHOD_NEW defined" [-Wcpp]
#warning "Both BUILD_WITH_ECS_LOCL_H and ECDSA_F_ECDSA_METHOD_NEW defined"
^
p11_ec.c:55:7: warning: #warning "Consider not using BUILD_WITH_ECS_LOCL_H" [-Wcpp]
#warning "Consider not using BUILD_WITH_ECS_LOCL_H"
^
p11_ec.c:59:6: warning: #warning "Consider not using BUILD_WITH_ECS_LOCL_H" [-Wcpp]
#warning "Consider not using BUILD_WITH_ECS_LOCL_H"
^
p11_ec.c:60:6: warning: #warning "newer version of OpenSSL >-1.0.2 does not need BUILD_WITH_ECS_LOCL_H" [-Wcpp]
#warning "newer version of OpenSSL >-1.0.2 does not need BUILD_WITH_ECS_LOCL_H"
^
p11_ec.c:61:26: fatal error: ecs_locl.h: No such file or directory
#include "ecs_locl.h"
^
compilation terminated.
make[2]: *** [libp11_la-p11_ec.lo] Error 1
make[2]: Leaving directory |/root/libp11-master/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory|/root/libp11-master'
make: *** [all] Error 2β
Reply to this email directly or view it on GitHub #32.
Douglas E. Engert [email protected]
from libp11.
For OpenSSL:
/Configure linux-x86_64 --prefix=/opt/openssl-1.0.2d shared
for libp11:
./configure OPENSSL_CFLAGS="-I/opt/openssl-1.0.2d/include" OPENSSL_LIBS="-L/opt/openssl-1.0.2d/lib -lcrypt"
from libp11.
Something in your source or build process is defining BUILD_WITH_ECS_LOCL_H.
That was a temporary fix to allow the ECDSA to work with older versions of OpenSSL.
(It took OpenSSL 5 years to add ECDSA_F_ECDSA_METHOD_NEW).
Try grep for BUILD_WITH_ECS_LOCL_H.
Also try changing src/Makefile:
AM_DEFAULT_VERBOSITY = 0
to
AM_DEFAULT_VERBOSITY = 1
Then in the src directory, do a
make clean
make
This should then show what is getting pased.
On Ubuntu using the gitbub source from today, I get:
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../src/src -I.. -I/opt/smartcard/include -g -MT libp11_la-p11_ec.lo -MD -MP -MF .deps/libp11_la-p11_ec.Tpo -c -o libp11_la-p11_ec.lo test -f 'p11_ec.c' || echo '../../src/src/'
p11_ec.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../src/src -I.. -I/opt/smartcard/include -g -MT libp11_la-p11_ec.lo -MD -MP -MF .deps/libp11_la-p11_ec.Tpo -c ../../src/src/p11_ec.c -fPIC -DPIC -o .libs/libp11_la-p11_ec.o
../../src/src/p11_ec.c: In function 'PKCS11_get_ecdsa_method':
../../src/src/p11_ec.c:265:2: warning: passing argument 1 of 'ECDSA_METHOD_new' discards 'const' qualifier from pointer target type [enabled by default]
ops = ECDSA_METHOD_new(ECDSA_OpenSSL());
^
In file included from ../../src/src/p11_ec.c:38:0:
/opt/smartcard/include/openssl/ecdsa.h:236:15: note: expected 'struct ECDSA_METHOD *' but argument is of type 'const struct ECDSA_METHOD *'
ECDSA_METHOD *ECDSA_METHOD_new(ECDSA_METHOD *ecdsa_method);
^
from libp11.
ok, cleaned the build environment and its selecting the METHOD_NEW, however it fails upon attempting to build the examples:
Making all in examples
make[2]: Entering directory /root/libp11-master/examples' CCLD auth auth.o: In function
main':
/root/libp11-master/examples/auth.c:49: undefined reference to ERR_get_error' /root/libp11-master/examples/auth.c:49: undefined reference to
ERR_reason_error_string'
/root/libp11-master/examples/auth.c:215: undefined reference to ERR_print_errors_fp' /root/libp11-master/examples/auth.c:181: undefined reference to
X509_get_pubkey'
/root/libp11-master/examples/auth.c:188: undefined reference to RSA_verify' /root/libp11-master/examples/auth.c:196: undefined reference to
EVP_PKEY_free'
/root/libp11-master/examples/auth.c:207: undefined reference to CRYPTO_cleanup_all_ex_data' /root/libp11-master/examples/auth.c:208: undefined reference to
ERR_free_strings'
../src/.libs/libp11.so: undefined reference to o2i_ECPublicKey' ../src/.libs/libp11.so: undefined reference to
BIO_new_fp'
../src/.libs/libp11.so: undefined reference to CRYPTO_free' ../src/.libs/libp11.so: undefined reference to
ECDSA_METHOD_free'
../src/.libs/libp11.so: undefined reference to ECDSA_METHOD_set_sign_setup' ../src/.libs/libp11.so: undefined reference to
ECDSA_OpenSSL'
../src/.libs/libp11.so: undefined reference to i2d_X509' ../src/.libs/libp11.so: undefined reference to
RSA_get_ex_data'
../src/.libs/libp11.so: undefined reference to CRYPTO_malloc' ../src/.libs/libp11.so: undefined reference to
BN_new'
../src/.libs/libp11.so: undefined reference to i2d_X509_SIG' ../src/.libs/libp11.so: undefined reference to
d2i_ASN1_OCTET_STRING'
../src/.libs/libp11.so: undefined reference to RSA_set_ex_data' ../src/.libs/libp11.so: undefined reference to
OBJ_nid2obj'
../src/.libs/libp11.so: undefined reference to BN_num_bits' ../src/.libs/libp11.so: undefined reference to
ECDSA_METHOD_set_sign'
../src/.libs/libp11.so: undefined reference to BN_bin2bn' ../src/.libs/libp11.so: undefined reference to
RSA_free'
../src/.libs/libp11.so: undefined reference to RSA_set_method' ../src/.libs/libp11.so: undefined reference to
ASN1_STRING_free'
../src/.libs/libp11.so: undefined reference to EVP_PKEY_get1_EC_KEY' ../src/.libs/libp11.so: undefined reference to
RSA_get_default_method'
../src/.libs/libp11.so: undefined reference to ECDSA_set_ex_data' ../src/.libs/libp11.so: undefined reference to
OPENSSL_cleanse'
../src/.libs/libp11.so: undefined reference to BN_free' ../src/.libs/libp11.so: undefined reference to
ECDSA_SIG_new'
../src/.libs/libp11.so: undefined reference to ECDSA_get_ex_data' ../src/.libs/libp11.so: undefined reference to
ERR_clear_error'
../src/.libs/libp11.so: undefined reference to d2i_ECParameters' ../src/.libs/libp11.so: undefined reference to
EVP_PKEY_get1_RSA'
../src/.libs/libp11.so: undefined reference to ERR_load_strings' ../src/.libs/libp11.so: undefined reference to
BIO_free'
../src/.libs/libp11.so: undefined reference to BN_bn2bin' ../src/.libs/libp11.so: undefined reference to
RSA_new'
../src/.libs/libp11.so: undefined reference to EVP_PKEY_new' ../src/.libs/libp11.so: undefined reference to
EC_KEY_free'
../src/.libs/libp11.so: undefined reference to EVP_PKEY_assign' ../src/.libs/libp11.so: undefined reference to
X509_free'
../src/.libs/libp11.so: undefined reference to BN_cmp' ../src/.libs/libp11.so: undefined reference to
d2i_X509'
../src/.libs/libp11.so: undefined reference to EC_KEY_new' ../src/.libs/libp11.so: undefined reference to
BUF_strdup'
../src/.libs/libp11.so: undefined reference to ECDSA_METHOD_new' ../src/.libs/libp11.so: undefined reference to
CRYPTO_realloc'
../src/.libs/libp11.so: undefined reference to EVP_PKEY_set1_EC_KEY' ../src/.libs/libp11.so: undefined reference to
BN_clear_free'
../src/.libs/libp11.so: undefined reference to RSA_generate_key' ../src/.libs/libp11.so: undefined reference to
ERR_put_error'
../src/.libs/libp11.so: undefined reference to EVP_PKEY_set1_RSA' collect2: error: ld returned 1 exit status make[2]: *** [auth] Error 1 make[2]: Leaving directory
/root/libp11-master/examples'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/libp11-master'
make: *** [all] Error 2
Any way to disable building examples besides hacking the makefile?
from libp11.
Related Issues (20)
- PKCS#11 Library Initialization - issues in multithreaded env - apache worker mode HOT 1
- PIN requested when it is not required
- OpenSSL 3 can't parse an RSA private key HOT 6
- testsuite: hidden Segmentation fault HOT 2
- [engine] ctx_load_privkey lists all the private keys on the token when an ID is provided HOT 3
- keyid longer than MAX_VALUE_LEN HOT 5
- pkcs#11 unicode pin HOT 12
- PKCS11_store_certificate generates CKR_ATTRIBUTE_TYPE_INVALID error HOT 8
- Segmentation Fault in pkcs11_get_session when signing with proCertum card HOT 2
- User not logged in after logging in HOT 8
- Private key received via ENGINE_load_private_key from pkcs11.so ENGINE not freeβd by EVP_PKEY_free
- OpenSSL Update CKM_RSA_PKCS_PSS/CKM_RSA_X_509 HOT 2
- Cryptoki - CKR_ARGUMENTS_BAD connecting MQTT with pkcs11 using ATECC608B
- libp11 hangs/deadlocks in p11_slot.c:pkcs11_get_session()
- Softhsm2 blames pcks11.so for heap corruption segfault
- Library cleanup issues with OpenSSL - libp11 - yubihsm_pkcs11.so chain
- Loading `libpkcs11.so` from program with statically compiled OpenSSL? HOT 11
- Softhsm and PKCS11 OpenSSL engine not working HOT 6
- Max PKCS#11 id URI length of 100 characters? HOT 9
- PIN asked twice, and no way to pass it from outside
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libp11.