atom feed4 messages in org.openssl.openssl-usersRe: Problem finding ordinal numbers i...
FromSent OnAttachments
Marcus CareySep 4, 2002 5:13 pm 
Dr. Stephen HensonSep 4, 2002 5:24 pm 
Marcus CareySep 4, 2002 6:18 pm 
Marcus CareySep 4, 2002 7:46 pm 
Subject:Re: Problem finding ordinal numbers in libeay32.dll
From:Marcus Carey (marc@public.gmane.org)
Date:Sep 4, 2002 6:18:02 pm
List:org.openssl.openssl-users

Sorry Dr. Henson

I typed the openssl version -a command in the openssl-0.9.6 directory but I am compiling the example program with 0.9.7.

G:\openssl-0.9.7\out32dll>openssl version -a OpenSSL 0.9.7-beta3 30 Jul 2002 built on: Sat Aug 31 23:19:05 2002 platform: VC-WIN32 options: bn(64,32) md2(int) rc4(idx,int) des(idx,cisc,4,long) idea(int) blowfish(idx) compiler: cl /MD /W3 /WX /G5 /Ox /O2 /Ob2 /Gs0 /GF /Gy /nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 /Fdout32dll -DOPENSSL_NO_KRB5 OPENSSLDIR: "/usr/local/ssl"

The program compiles except the for the following errors

f:\crypt\crypt.c(56) : warning C4090: 'initializing' : different 'const' qualifiers f:\crypt\crypt.c(60) : warning C4090: 'function' : different 'const' qualifiers f:\crypt\crypt.c(60) : warning C4024: 'EVP_EncryptInit_ex' : different types for formal and actual parameter 3

I copyed the librarys into the same directory as the application and now I am getting the following errors: The Instructions at referenced memory at "0x10048246" referenced memory at "0x00000018". The memory could not be "read".

And when I run the debugger I get an: . Unhandled exception in crypt.exe (LIBEAY32.dll): 0xC00000005: Access Violation

Marcus

----- Original Message ----- From: "Dr. Stephen Henson" <steve-MCmKBN63+BlAf@public.gmane.org> To: <openssl-users-MCmKBN63+BlAf@public.gmane.org> Sent: Wednesday, September 04, 2002 5:24 PM Subject: Re: Problem finding ordinal numbers in libeay32.dll

On Wed, Sep 04, 2002, Marcus Carey wrote:

I have compiled the openssl-0.9.7-stable-SNAP-20020830 release on Windows 2000 Server using MS VC++ 6.0. OpenSSL 0.9.6 24 Sep 2000 built on: Fri Feb 2 10:50:59 2001 platform: Cygwin32 options: bn(64,32) md2(int) rc4(idx,int) des(ptr,risc1,16,long) idea(int) blowfish(idx) compiler: gcc -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall

Everything works accept for applications that using the EVP API

functions. These applications crash because they cannot find some of the ordinal values in LIBEAY32.dll.

The ordinal 2894 could not be located in the dynamic link library LIBEAY32.dll.

http://www.openssl.org/docs/crypto/EVP_EncryptInit.html#EXAMPLES int do_crypt(char *outfile) { unsigned char outbuf[1024]; int outlen, tmplen;

unsigned char key[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; unsigned char iv[] = {1,2,3,4,5,6,7,8}; char intext[] = "Some Crypto Text"; EVP_CIPHER_CTX ctx; FILE *out; EVP_CIPHER_CTX_init(&ctx); EVP_EncryptInit_ex(&ctx, NULL, EVP_bf_cbc(), key, iv);

if(!EVP_EncryptUpdate(&ctx, outbuf, &outlen, intext, strlen(intext))) {

return 0; }

if(!EVP_EncryptFinal_ex(&ctx, outbuf + outlen, &tmplen)) {

return 0; } outlen += tmplen; EVP_CIPHER_CTX_cleanup(&ctx);

out = fopen(outfile, "wb"); fwrite(outbuf, 1, outlen, out); fclose(out); return 1; }

The string above suggests you are using OpenSSL 0.9.6 . The documents at the above URL are for the latest development version of OpenSSL and some EVP functions are not present in 0.9.6.

In particular ordinal 2894 is EVP_EncryptInit_ex which is in 0.9.7 but not 0.9.6.

So either use 0.9.7 or follow the docs in 0.9.6 which give EVP examples which don't use the 0.9.7 specific functions.