[OpenSIPS-Users] patch for compatibility with openssl-1.0.0

John Khvatov ivaxer at gmail.com
Fri Nov 6 09:32:19 CET 2009


Hello all!

Fedora 12 will be with new OpenSSL. Could you apply attached patch for
fine build with new OpenSSL?

Current version of the code fails to build:
tls/tls_init.c: In function 'check_for_krb':
tls/tls_init.c:470: error: 'struct stack_st_SSL_CIPHER' has no member
named 'num'
tls/tls_init.c:471: error: 'struct stack_st_SSL_CIPHER' has no member
named 'data'
make: *** [tls/tls_init.o] Error 1

-- 
WBR, John Khvatov
-------------- next part --------------
diff -up opensips-1.6.0/tls/tls_init.c.openssl opensips-1.6.0/tls/tls_init.c
--- opensips-1.6.0/tls/tls_init.c.openssl	2008-11-24 21:52:33.000000000 +0100
+++ opensips-1.6.0/tls/tls_init.c	2009-08-25 20:18:45.000000000 +0200
@@ -468,8 +468,8 @@ static int check_for_krb(void)
 	if (xx==NULL)
 		return -1;
 
-	for( j=0 ; j<M_sk_num(xx->cipher_list) ; j++) {
-		SSL_CIPHER *yy = (SSL_CIPHER*)M_sk_value(xx->cipher_list,j);
+	for( j=0 ; j<sk_SSL_CIPHER_num(xx->cipher_list) ; j++) {
+		SSL_CIPHER *yy = sk_SSL_CIPHER_value(xx->cipher_list,j);
 		if ( yy->id>=SSL3_CK_KRB5_DES_64_CBC_SHA &&
 		 yy->id<=SSL3_CK_KRB5_RC4_40_MD5 ) {
 			LM_INFO("KRB5 cipher %s found\n", yy->name);


More information about the Users mailing list