Hello, I'm working on a software that uses libcrypto and the OpenSSL engine interface for a HSM.
We developed an OpenSSL engine that was working fine until we try it on a 64 bit operational system. For some reason, the function BN_copy isn't working in a 64 bits environment. The code is running on a Virtual Machine (VMPlayer) with SUSE 10 64 bits. The host machine is an Intel Core 2 Duo with Ubuntu 10.04 32 bits. The BN_copy is called inside the engine and it's used to copy the "expoent (e)" of a public key (loaded from HSM) to a new BIGNUM. Like the following code: BIGNUM* bn = BN_new(); if(!(bn = BN_copy(bn, key->pkey.rsa->e)) error.... Always returns 0. I'd like to know if anyone can identify why this isn't working on 64 bits, and if there is any compilation flag that I should be aware of when trying to compile the OpenSSL libcrypto and our engine for 64 bits. I'm using the following configuration to compile the libcrypto: $ ./config no-asm no-shared -fPIC no-shared and no-asm* are used becouse I'm compilling the libcrypto staticly with the engine. *no-asm was a solution found to static link libcrypto with my code. ( http://rt.openssl.org/Ticket/Display.html?user=guest&pass=guest&id=1521) thank you, Lucas Gonçalves Martins