|
1 --- /tmp/Configure Fri Feb 11 14:40:39 2011 |
|
2 +++ openssl-1.0.0d/Configure Fri Feb 11 14:41:36 2011 |
|
3 @@ -10,7 +10,7 @@ |
|
4 |
|
5 # see INSTALL for instructions. |
|
6 |
|
7 -my $usage="Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [experimental-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-dso] [no-krb5] [sctp] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--test-sanity] os/compiler[:flags]\n"; |
|
8 +my $usage="Usage: Configure --pk11-libname=PK11_LIB_LOCATION [no-<cipher> ...] [enable-<cipher> ...] [experimental-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-dso] [no-krb5] [sctp] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--test-sanity] os/compiler[:flags]\n"; |
|
9 |
|
10 # Options: |
|
11 # |
|
12 @@ -19,6 +19,9 @@ |
|
13 # --prefix prefix for the OpenSSL include, lib and bin directories |
|
14 # (Default: the OPENSSLDIR directory) |
|
15 # |
|
16 +# --pk11-libname PKCS#11 library name. |
|
17 +# (Default: none) |
|
18 +# |
|
19 # --install_prefix Additional prefix for package builders (empty by |
|
20 # default). This needn't be set in advance, you can |
|
21 # just as well use "make INSTALL_PREFIX=/whatever install". |
|
22 @@ -657,6 +661,9 @@ |
|
23 my $idx_arflags = $idx++; |
|
24 my $idx_multilib = $idx++; |
|
25 |
|
26 +# PKCS#11 engine patch |
|
27 +my $pk11_libname=""; |
|
28 + |
|
29 my $prefix=""; |
|
30 my $libdir=""; |
|
31 my $openssldir=""; |
|
32 @@ -876,6 +879,10 @@ |
|
33 $_ =~ s/%([0-9a-f]{1,2})/chr(hex($1))/gei; |
|
34 $flags.=$_." "; |
|
35 } |
|
36 + elsif (/^--pk11-libname=(.*)$/) |
|
37 + { |
|
38 + $pk11_libname=$1; |
|
39 + } |
|
40 elsif (/^--prefix=(.*)$/) |
|
41 { |
|
42 $prefix=$1; |
|
43 @@ -1043,6 +1054,13 @@ |
|
44 exit 0; |
|
45 } |
|
46 |
|
47 +if (! $pk11_libname) |
|
48 + { |
|
49 + print STDERR "You must set --pk11-libname for PKCS#11 library.\n"; |
|
50 + print STDERR "See README.pkcs11 for more information.\n"; |
|
51 + exit 1; |
|
52 + } |
|
53 + |
|
54 if ($target =~ m/^CygWin32(-.*)$/) { |
|
55 $target = "Cygwin".$1; |
|
56 } |
|
57 @@ -1209,6 +1226,8 @@ |
|
58 if ($flags ne "") { $cflags="$flags$cflags"; } |
|
59 else { $no_user_cflags=1; } |
|
60 |
|
61 +$cflags="-DPK11_LIB_LOCATION=\"$pk11_libname\" $cflags"; |
|
62 + |
|
63 # Kerberos settings. The flavor must be provided from outside, either through |
|
64 # the script "config" or manually. |
|
65 if (!$no_krb5) |
|
66 @@ -1598,6 +1617,7 @@ |
|
67 s/^VERSION=.*/VERSION=$version/; |
|
68 s/^MAJOR=.*/MAJOR=$major/; |
|
69 s/^MINOR=.*/MINOR=$minor/; |
|
70 + s/^PK11_LIB_LOCATION=.*/PK11_LIB_LOCATION=$pk11_libname/; |
|
71 s/^SHLIB_VERSION_NUMBER=.*/SHLIB_VERSION_NUMBER=$shlib_version_number/; |
|
72 s/^SHLIB_VERSION_HISTORY=.*/SHLIB_VERSION_HISTORY=$shlib_version_history/; |
|
73 s/^SHLIB_MAJOR=.*/SHLIB_MAJOR=$shlib_major/; |
|
74 --- /tmp/Makefile.org Fri Feb 11 14:41:54 2011 |
|
75 +++ openssl-1.0.0d/Makefile.org Fri Feb 11 14:38:01 2011 |
|
76 @@ -26,6 +26,9 @@ |
|
77 INSTALL_PREFIX= |
|
78 INSTALLTOP=/usr/local/ssl |
|
79 |
|
80 +# You must set this through --pk11-libname configure option. |
|
81 +PK11_LIB_LOCATION= |
|
82 + |
|
83 # Do not edit this manually. Use Configure --openssldir=DIR do change this! |
|
84 OPENSSLDIR=/usr/local/ssl |
|
85 |
|
86 --- /tmp/Makefile Fri Feb 11 14:42:03 2011 |
|
87 +++ openssl-1.0.0d/crypto/engine/Makefile Fri Feb 11 14:45:43 2011 |
|
88 @@ -22,13 +22,13 @@ |
|
89 tb_rsa.c tb_dsa.c tb_ecdsa.c tb_dh.c tb_ecdh.c tb_rand.c tb_store.c \ |
|
90 tb_cipher.c tb_digest.c tb_pkmeth.c tb_asnmth.c \ |
|
91 eng_openssl.c eng_cnf.c eng_dyn.c eng_cryptodev.c \ |
|
92 - eng_rsax.c eng_rdrand.c |
|
93 + eng_rsax.c eng_rdrand.c hw_pk11.c hw_pk11_pub.c hw_pk11_uri.c |
|
94 LIBOBJ= eng_err.o eng_lib.o eng_list.o eng_init.o eng_ctrl.o \ |
|
95 eng_table.o eng_pkey.o eng_fat.o eng_all.o \ |
|
96 tb_rsa.o tb_dsa.o tb_ecdsa.o tb_dh.o tb_ecdh.o tb_rand.o tb_store.o \ |
|
97 tb_cipher.o tb_digest.o tb_pkmeth.o tb_asnmth.o \ |
|
98 eng_openssl.o eng_cnf.o eng_dyn.o eng_cryptodev.o \ |
|
99 - eng_rsax.o eng_rdrand.o |
|
100 + eng_rsax.o eng_rdrand.o hw_pk11.o hw_pk11_pub.o hw_pk11_uri.o |
|
101 |
|
102 SRC= $(LIBSRC) |
|
103 |
|
104 --- /tmp/eng_all.c Fri Feb 11 14:46:11 2011 |
|
105 +++ openssl-1.0.0d/crypto/engine/eng_all.c Fri Feb 11 14:38:01 2011 |
|
106 @@ -80,6 +80,9 @@ |
|
107 ENGINE_load_rdrand(); |
|
108 #endif |
|
109 ENGINE_load_dynamic(); |
|
110 +#ifndef OPENSSL_NO_HW_PKCS11 |
|
111 + ENGINE_load_pk11(); |
|
112 +#endif |
|
113 #ifndef OPENSSL_NO_STATIC_ENGINE |
|
114 #ifndef OPENSSL_NO_HW |
|
115 #ifndef OPENSSL_NO_HW_4758_CCA |
|
116 --- /tmp/engine.h Fri Feb 11 14:46:24 2011 |
|
117 +++ openssl-1.0.0d/crypto/engine/engine.h Fri Feb 11 14:47:32 2011 |
|
118 @@ -351,6 +351,7 @@ |
|
119 #endif |
|
120 #endif |
|
121 void ENGINE_load_cryptodev(void); |
|
122 +void ENGINE_load_pk11(void); |
|
123 void ENGINE_load_rsax(void); |
|
124 void ENGINE_load_rdrand(void); |
|
125 void ENGINE_load_builtin_engines(void); |