Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 269745 | Differences between
and this patch

Collapse All | Expand All

(-)configure.ac.old (-45 lines)
Lines 156-192 Link Here
156
fi
156
fi
157
LIBS="$saved_LIBS -lcrypto"
157
LIBS="$saved_LIBS -lcrypto"
158
158
159
# Now test RSA support
160
saved_LIBS="$LIBS"
161
AC_MSG_CHECKING([for RSA support])
162
for WANTS_RSAREF in "" 1 ; do
163
	if test -z "$WANTS_RSAREF" ; then
164
		LIBS="$saved_LIBS"
165
	else
166
		LIBS="$saved_LIBS -lRSAglue -lrsaref"
167
	fi
168
	AC_RUN_IFELSE([AC_LANG_SOURCE([[
169
#include <string.h>
170
#include <openssl/rand.h>
171
#include <openssl/rsa.h>
172
#include <openssl/bn.h>
173
#include <openssl/sha.h>
174
int main(void) 
175
{
176
	int num; RSA *key; static unsigned char p_in[] = "blahblah";
177
	unsigned char c[256], p[256];
178
	memset(c, 0, sizeof(c)); RAND_add(c, sizeof(c), sizeof(c));
179
	if ((key=RSA_generate_key(512, 3, NULL, NULL))==NULL) return(1);
180
	num = RSA_public_encrypt(sizeof(p_in) - 1, p_in, c, key, RSA_PKCS1_PADDING);
181
	return(-1 == RSA_private_decrypt(num, c, p, key, RSA_PKCS1_PADDING));
182
}
183
	]])],[
184
		rsa_works=1
185
		break;
186
	],[],[])
187
done
188
LIBS="$saved_LIBS"
189
190
if test ! -z "$no_rsa" ; then
159
if test ! -z "$no_rsa" ; then
191
	AC_MSG_RESULT(disabled)
160
	AC_MSG_RESULT(disabled)
192
	RSA_MSG="disabled"
161
	RSA_MSG="disabled"
Lines 206-225 Link Here
206
	fi
175
	fi
207
fi
176
fi
208
177
209
# Sanity check OpenSSL headers
210
AC_MSG_CHECKING([whether OpenSSL's headers match the library])
211
AC_RUN_IFELSE([AC_LANG_SOURCE([[
212
#include <string.h>
213
#include <openssl/opensslv.h>
214
int main(void) { return(SSLeay() == OPENSSL_VERSION_NUMBER ? 0 : 1); }
215
	]])],[
216
		AC_MSG_RESULT(yes)
217
	],[
218
		AC_MSG_RESULT(no)
219
		AC_MSG_ERROR(Your OpenSSL headers do not match your library)
220
	
221
],[])
222
223
dnl Checks for header files.
178
dnl Checks for header files.
224
179
225
AC_HEADER_STDC
180
AC_HEADER_STDC

Return to bug 269745