Patch: Declare some undeclared TLS functions (ITS#1708) ================ Written by Hallvard B. Furuseth and placed into the public domain. This software is not subject to any license of the University of Oslo. ================ This patch declares some functions that are used but not declared. ldap_pvt_tls_sb_ctx() is the most important one, since it does not return int. Casting the return type back to void*, like the code does now, only works if int and void* have the same size and casting doesn't change the value. Hallvard B. Furuseth , April 2002. diff -u2 -r include/ldap_pvt.h include/ldap_pvt.h --- include/ldap_pvt.h Sat Jan 5 10:33:38 2002 +++ include/ldap_pvt.h Sun Mar 31 17:44:05 2002 @@ -160,4 +160,6 @@ /* tls.c */ +LDAP_F (int) ldap_int_tls_config LDAP_P(( struct ldap *ld, + int option, const char *arg )); LDAP_F (int) ldap_pvt_tls_get_option LDAP_P(( struct ldap *ld, int option, void *arg )); @@ -167,6 +169,8 @@ LDAP_F (void) ldap_pvt_tls_destroy LDAP_P(( void )); LDAP_F (int) ldap_pvt_tls_init LDAP_P(( void )); +LDAP_F (int) ldap_pvt_tls_init_def_ctx LDAP_P(( void )); LDAP_F (int) ldap_pvt_tls_accept LDAP_P(( Sockbuf *sb, void *ctx_arg )); LDAP_F (int) ldap_pvt_tls_inplace LDAP_P(( Sockbuf *sb )); +LDAP_F (void *) ldap_pvt_tls_sb_ctx LDAP_P(( Sockbuf *sb )); LDAP_F (void *) ldap_pvt_tls_get_ctx LDAP_P(( Sockbuf *sb )); diff -u2 -r libraries/libldap/tls.c libraries/libldap/tls.c --- libraries/libldap/tls.c Sun Jan 27 03:48:08 2002 +++ libraries/libldap/tls.c Sun Mar 31 17:21:22 2002 @@ -1153,5 +1153,5 @@ } - ssl = (void *) ldap_pvt_tls_sb_ctx( sb ); + ssl = ldap_pvt_tls_sb_ctx( sb ); assert( ssl != NULL ); diff -u2 -r servers/slapd/connection.c servers/slapd/connection.c --- servers/slapd/connection.c Tue Jan 29 06:06:20 2002 +++ servers/slapd/connection.c Sun Mar 31 17:22:00 2002 @@ -1132,5 +1132,5 @@ /* we need to let SASL know */ - ssl = (void *)ldap_pvt_tls_sb_ctx( c->c_sb ); + ssl = ldap_pvt_tls_sb_ctx( c->c_sb ); c->c_tls_ssf = (slap_ssf_t) ldap_pvt_tls_get_strength( ssl );