52 + } |
56 + } |
53 + |
57 + |
54 if ($target =~ m/^CygWin32(-.*)$/) { |
58 if ($target =~ m/^CygWin32(-.*)$/) { |
55 $target = "Cygwin".$1; |
59 $target = "Cygwin".$1; |
56 } |
60 } |
57 @@ -1209,6 +1226,8 @@ |
61 @@ -1215,6 +1232,8 @@ |
58 if ($flags ne "") { $cflags="$flags$cflags"; } |
62 if ($flags ne "") { $cflags="$flags$cflags"; } |
59 else { $no_user_cflags=1; } |
63 else { $no_user_cflags=1; } |
60 |
64 |
61 +$cflags="-DPK11_LIB_LOCATION=\"$pk11_libname\" $cflags"; |
65 +$cflags="-DPK11_LIB_LOCATION=\"$pk11_libname\" $cflags"; |
62 + |
66 + |
63 # Kerberos settings. The flavor must be provided from outside, either through |
67 # Kerberos settings. The flavor must be provided from outside, either through |
64 # the script "config" or manually. |
68 # the script "config" or manually. |
65 if (!$no_krb5) |
69 if (!$no_krb5) |
66 @@ -1598,6 +1617,7 @@ |
70 @@ -1604,6 +1623,7 @@ |
67 s/^VERSION=.*/VERSION=$version/; |
71 s/^VERSION=.*/VERSION=$version/; |
68 s/^MAJOR=.*/MAJOR=$major/; |
72 s/^MAJOR=.*/MAJOR=$major/; |
69 s/^MINOR=.*/MINOR=$minor/; |
73 s/^MINOR=.*/MINOR=$minor/; |
70 + s/^PK11_LIB_LOCATION=.*/PK11_LIB_LOCATION=$pk11_libname/; |
74 + s/^PK11_LIB_LOCATION=.*/PK11_LIB_LOCATION=$pk11_libname/; |
71 s/^SHLIB_VERSION_NUMBER=.*/SHLIB_VERSION_NUMBER=$shlib_version_number/; |
75 s/^SHLIB_VERSION_NUMBER=.*/SHLIB_VERSION_NUMBER=$shlib_version_number/; |
132 - LIBDEPS='-L.. -lcrypto $(EX_LIBS)' \ |
136 - LIBDEPS='-L.. -lcrypto $(EX_LIBS)' \ |
133 + LIBDEPS='-L.. -lcrypto -lcryptoutil $(EX_LIBS)' \ |
137 + LIBDEPS='-L.. -lcrypto -lcryptoutil $(EX_LIBS)' \ |
134 link_o.$(SHLIB_TARGET); \ |
138 link_o.$(SHLIB_TARGET); \ |
135 done; \ |
139 done; \ |
136 else \ |
140 else \ |
137 --- openssl-1.0.1f/crypto/engine/eng_all.c.~1~ Thu Jan 30 10:55:48 2014 |
141 --- crypto/engine/eng_all.c Thu Sep 5 12:59:50 2013 |
138 +++ openssl-1.0.1f/crypto/engine/eng_all.c Thu Jan 30 10:57:29 2014 |
142 +++ openssl-1.0.1e/crypto/engine/eng_all.c Thu Sep 5 12:59:50 2013 |
139 @@ -59,6 +59,16 @@ |
143 @@ -60,6 +60,16 @@ |
140 #include "cryptlib.h" |
144 #include "cryptlib.h" |
141 #include "eng_int.h" |
145 #include "eng_int.h" |
142 |
146 |
143 +/* |
147 +/* |
144 + * pkcs11 engine no longer is a built-in engine, and ENGINE_load_pk11() needs to be |
148 + * pkcs11 engine no longer is a built-in engine, and ENGINE_load_pk11() needs to be |
145 + * defined in libcrypto.so for ssh. Instead of load pkcs11 engine, it loads dynamic |
149 + * defined in libcrypto.so for ssh. Instead of load pkcs11 engine, it load dynamic |
146 + * engines. |
150 + * engines. |
147 + */ |
151 + */ |
148 +void ENGINE_load_pk11(void) |
152 +void ENGINE_load_pk11(void) |
149 + { |
153 + { |
150 + ENGINE_load_dynamic(); |
154 + ENGINE_load_dynamic(); |
151 + } |
155 + } |
152 + |
156 + |
153 void ENGINE_load_builtin_engines(void) |
157 void ENGINE_load_builtin_engines(void) |
154 { |
158 { |
155 /* Some ENGINEs need this */ |
159 /* Some ENGINEs need this */ |
156 --- openssl-1.0.1f/crypto/dso/dso_lib.c.~1~ Thu Jan 30 11:04:41 2014 |
160 --- crypto/dso/dso_lib.c Thu Sep 5 12:59:50 2013 |
157 +++ openssl-1.0.1f/crypto/dso/dso_lib.c Thu Jan 30 11:29:40 2014 |
161 +++ openssl-1.0.1e/crypto/dso/dso_lib.c Thu Sep 5 12:59:50 2013 |
158 @@ -426,6 +426,26 @@ |
162 @@ -396,6 +396,24 @@ |
159 DSOerr(DSO_F_DSO_CONVERT_FILENAME,DSO_R_NO_FILENAME); |
163 DSOerr(DSO_F_DSO_CONVERT_FILENAME, DSO_R_NO_FILENAME); |
160 return(NULL); |
164 return (NULL); |
161 } |
165 } |
162 +/* |
166 + /* |
163 + * For pkcs11 engine, use libpk11.so (instead of libpkcs11.so) to |
167 + * For pkcs11 engine, use libpk11.so (instead of libpkcs11.so) to |
164 + * avoid the name collision with PKCS#11 library. |
168 + * avoid the name collision with PKCS#11 library. |
165 + */ |
169 + */ |
166 + if (strcmp(filename, "pkcs11") == 0) |
170 + if (strcmp(filename, "pkcs11") == 0) { |
167 + { |
171 +#ifdef _LP64 |
168 +#ifdef _LP64 |
172 + static const char fullpath[] = "/lib/openssl/engines/64/libpk11.so"; |
169 + static const char fullpath[] = "/lib/openssl/engines/64/libpk11.so"; |
|
170 +#else |
173 +#else |
171 + static const char fullpath[] = "/lib/openssl/engines/libpk11.so"; |
174 + static const char fullpath[] = "/lib/openssl/engines/libpk11.so"; |
172 +#endif |
175 +#endif |
173 + result = OPENSSL_malloc(strlen(fullpath) + 1); |
176 + result = OPENSSL_malloc(strlen(fullpath) + 1); |
174 + if (result == NULL) |
177 + if(result == NULL) { |
175 + { |
178 + DSOerr(DSO_F_DSO_CONVERT_FILENAME, ERR_R_MALLOC_FAILURE); |
176 + DSOerr(DSO_F_DSO_CONVERT_FILENAME, ERR_R_MALLOC_FAILURE); |
179 + return(NULL); |
177 + return(NULL); |
180 + } |
178 + } |
181 + BUF_strlcpy(result, fullpath, strlen(fullpath) + 1); |
179 + BUF_strlcpy(result, fullpath, sizeof(fullpath)); |
182 + return (result); |
180 + return(result); |
183 + } |
181 + } |
184 if ((dso->flags & DSO_FLAG_NO_NAME_TRANSLATION) == 0) { |
182 if((dso->flags & DSO_FLAG_NO_NAME_TRANSLATION) == 0) |
185 if (dso->name_converter != NULL) |
183 { |
186 result = dso->name_converter(dso, filename); |
184 if(dso->name_converter != NULL) |
|
185 --- /tmp/engine.h Fri Feb 11 14:46:24 2011 |
187 --- /tmp/engine.h Fri Feb 11 14:46:24 2011 |
186 +++ openssl-1.0.0d/crypto/engine/engine.h Fri Feb 11 14:47:32 2011 |
188 +++ openssl-1.0.0d/crypto/engine/engine.h Fri Feb 11 14:47:32 2011 |
187 @@ -351,6 +351,7 @@ |
189 @@ -413,6 +413,7 @@ |
188 #endif |
190 # endif |
189 #endif |
191 # endif |
190 void ENGINE_load_cryptodev(void); |
192 void ENGINE_load_cryptodev(void); |
191 +void ENGINE_load_pk11(void); |
193 +void ENGINE_load_pk11(void); |
192 void ENGINE_load_rsax(void); |
194 void ENGINE_load_rsax(void); |
193 void ENGINE_load_rdrand(void); |
195 void ENGINE_load_rdrand(void); |
194 void ENGINE_load_builtin_engines(void); |
196 void ENGINE_load_builtin_engines(void); |