您的位置:首页 > 运维架构

openssl-1.0.0 正式发布 编译安装记录

2010-03-31 20:48 495 查看
 

 

对openssl的使用从openssl-0.9.8a开始,主要用了0.9.8a 0.9.8i两个版本代码。

历经a-n以及2009-4-1的1.0.0-beta1到2010-1-20的1.0.0-beta5之后,前天发布了1.0.0正式版。赶紧下来看看wimax需要的sha256等是否支持了。

Tarballs

Here you can find all distribution tarballs (and sometimes corresponding patches) of the various OpenSSL release versions. Alternatively you can also download them via FTP from the OpenSSL FTP area under ftp://ftp.openssl.org/source/ . Tarballs containing a snapshot of the latest development version can be found under ftp://ftp.openssl.org/snapshot/ .

   Bytes      Timestamp       Filename

________ ____________________ ____________________________

 4010166 Mar 29 15:24:59 2010 openssl-1.0.0.tar.gz

编译记录:

【1】>perl Configure VC-WIN32 --prefix=e:/OpensslDev/bin

此之后,crypto/opensslconf.h里面

1:开头增加了

#ifndef OPENSSL_SYSNAME_WIN32

# define OPENSSL_SYSNAME_WIN32

#endif

2:

#ifndef OPENSSL_NO_DYNAMIC_ENGINE

# define OPENSSL_NO_DYNAMIC_ENGINE

#endif

变为了

#ifndef OPENSSL_THREADS

# define OPENSSL_THREADS

#endif

3:增加了

#define OPENSSL_CPUID_OBJ

4:目录变动:

#if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */

#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)

#define ENGINESDIR "/usr/local/ssl/lib/engines"

#define OPENSSLDIR "/usr/local/ssl"

#endif

#endif

变为了

#if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */

#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)

#define ENGINESDIR "e://openssldev//bin///lib/engines"

#define OPENSSLDIR "e://openssldev//bin///ssl"

#endif

#endif

5:

#undef OPENSSL_EXPORT_VAR_AS_FUNCTION

变为了

#undef OPENSSL_EXPORT_VAR_AS_FUNCTION

#define OPENSSL_EXPORT_VAR_AS_FUNCTION

这是bug,该将undef改为define即可得

6:define大数

#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H)

#define CONFIG_HEADER_BN_H

#undef BN_LLONG  ===>>#define

/* Should we define BN_DIV2W here? */

/* Only one for the following should be defined */

#undef SIXTY_FOUR_BIT_LONG

#undef SIXTY_FOUR_BIT

#define THIRTY_TWO_BIT

#endif

7:define RC4_INDEX

#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H)

#define CONFIG_HEADER_RC4_LOCL_H

/* if this is defined data[i] is used instead of *data, this is a %20

 * speedup on x86 */

#undef RC4_INDEX      ====> #define RC4_INDEX

#endif

【2】ms目录下增加version32.rc的资源文件

【3】Makefile的改动

1:

VERSION=1.0.0

MAJOR=1

MINOR=0.0

SHLIB_VERSION_NUMBER=1.0.0

SHLIB_VERSION_HISTORY=

SHLIB_MAJOR=1

SHLIB_MINOR=0.0

SHLIB_EXT=

PLATFORM=dist

OPTIONS= no-gmp no-jpake no-krb5 no-md2 no-rc5 no-rfc3779 no-shared no-store no-zlib no-zlib-dynamic static-engine

CONFIGURE_ARGS=dist

SHLIB_TARGET=

VERSION=1.0.0

MAJOR=1

MINOR=0.0

SHLIB_VERSION_NUMBER=1.0.0

SHLIB_VERSION_HISTORY=

SHLIB_MAJOR=1

SHLIB_MINOR=0.0

SHLIB_EXT=

PLATFORM=VC-WIN32

OPTIONS=--prefix=e:/openssldev/bin/ no-gmp no-jpake no-krb5 no-md2 no-rc5 no-rfc3779 no-shared no-store no-zlib no-zlib-dynamic

CONFIGURE_ARGS=VC-WIN32 --prefix=e:/openssldev/bin/

SHLIB_TARGET=

2:

# INSTALL_PREFIX is for package builders so that they can configure

# for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/.

# Normally it is left empty.

INSTALL_PREFIX=

INSTALLTOP=/usr/local/ssl

# Do not edit this manually. Use Configure --openssldir=DIR do change this!

OPENSSLDIR=/usr/local/ssl

改为了

# INSTALL_PREFIX is for package builders so that they can configure

# for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/.

# Normally it is left empty.

INSTALL_PREFIX=

INSTALLTOP=e:/openssldev/bin/

# Do not edit this manually. Use Configure --openssldir=DIR do change this!

OPENSSLDIR=e:/openssldev/bin//ssl

3:编译选项

CC= cc

CFLAG= -O

DEPFLAG= -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_STORE

PEX_LIBS=

EX_LIBS=

EXE_EXT=

ARFLAGS=

AR= ar $(ARFLAGS) r

RANLIB= /usr/bin/ranlib

NM= nm

PERL= /usr/bin/perl

TAR= tar

TARFLAGS= --no-recursion

MAKEDEPPROG=makedepend

LIBDIR=lib

改为

CC= cl

CFLAG= -DOPENSSL_THREADS  -DDSO_WIN32 -W3 -WX -Gs0 -GF -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -DWHIRLPOOL_ASM

DEPFLAG= -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_STORE

PEX_LIBS=

EX_LIBS=

EXE_EXT=

ARFLAGS=

AR= ar $(ARFLAGS) r

RANLIB= true

NM= nm

PERL= /usr/bin/perl

TAR= tar

TARFLAGS= --no-recursion

MAKEDEPPROG=makedepend

LIBDIR=lib

4:CPUID的汇编代码库

# CPUID module collects small commonly used assembler snippets

CPUID_OBJ= mem_clr.o

BN_ASM= bn_asm.o

DES_ENC= des_enc.o fcrypt_b.o

AES_ENC= aes_core.o aes_cbc.o

BF_ENC= bf_enc.o

CAST_ENC= c_enc.o

RC4_ENC= rc4_enc.o rc4_skey.o

RC5_ENC= rc5_enc.o

MD5_ASM_OBJ=

SHA1_ASM_OBJ=

RMD160_ASM_OBJ=

WP_ASM_OBJ= wp_block.o

CMLL_ENC= camellia.o cmll_misc.o cmll_cbc.o

PERLASM_SCHEME=

改为

# CPUID module collects small commonly used assembler snippets

CPUID_OBJ= x86cpuid.o

BN_ASM= bn-586.o co-586.o x86-mont.o

DES_ENC= des-586.o crypt586.o

AES_ENC= aes-586.o

BF_ENC= bf-586.o

CAST_ENC= cast-586.o

RC4_ENC= rc4-586.o

RC5_ENC= rc5-586.o

MD5_ASM_OBJ= md5-586.o

SHA1_ASM_OBJ= sha1-586.o sha256-586.o sha512-586.o

RMD160_ASM_OBJ= rmd-586.o

WP_ASM_OBJ= wp_block.o wp-mmx.o

CMLL_ENC= cmll-x86.o

PERLASM_SCHEME= win32n

> ms/do_ms

到vc9目录下拷了个ml才过

> nmake -f ms/ntdll.mak

链接的时候报错:

link: extra operand `/opt:ref'

Try `link --help' for more information.

NMAKE : fatal error U1077: 'link' : return code '0x1'

Stop.

通过help

E:/OpenSSLDev/openssl-1.0.0>link --help

Usage: link FILE1 FILE2

  or:  link OPTION

Call the link function to create a link named FILE2 to an existing FILE1.

      --help     display this help and exit

      --version  output version information and exit

Report bugs to <bug-coreutils@gnu.org>.

看出link居然是gnu的,应该用错了。

where link查到的是

E:/OpenSSLDev/openssl-1.0.0>where link

d:/cygwin/bin/link.exe

D:/Program Files/Microsoft Visual Studio/VC98/Bin/LINK.EXE

原来是用了cygwin的link,临时将cygwin的目录改了下,使系统使用VC的link,终于通过

以上编译过程与以前没什么不同,只是本次记录了一下遇到的问题。

正在修改能适用于本版本的dsw,

目前的问题为

Compiling...

d1_both.c

D:/Program Files/Microsoft Visual Studio/VC98/INCLUDE/mswsock.h(69) : error C2146: syntax error : missing ')' before identifier 's'

D:/Program Files/Microsoft Visual Studio/VC98/INCLUDE/mswsock.h(69) : error C2061: syntax error : identifier 's'

D:/Program Files/Microsoft Visual Studio/VC98/INCLUDE/mswsock.h(69) : error C2059: syntax error : ';'

.....

解决过程再开篇记录
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息