summaryrefslogtreecommitdiffstats
path: root/ldap
diff options
context:
space:
mode:
Diffstat (limited to 'ldap')
-rw-r--r--ldap/admin/lib/dsalib_pw.c2
-rw-r--r--ldap/clients/dsgw/dsgw.h4
-rw-r--r--ldap/include/proto-ntutil.h2
-rw-r--r--ldap/libraries/libutil/ntstubs.c4
-rw-r--r--ldap/servers/plugins/pwdstorage/pwdstorage.h60
-rw-r--r--ldap/servers/plugins/pwdstorage/sha_pwd.c2
-rw-r--r--ldap/servers/plugins/pwdstorage/ssha_pwd.c2
-rw-r--r--ldap/servers/slapd/daemon.c4
-rw-r--r--ldap/servers/slapd/globals.c3
-rw-r--r--ldap/servers/slapd/libglobs.c3
-rw-r--r--ldap/servers/slapd/localhost.c2
-rw-r--r--ldap/servers/slapd/main.c26
-rw-r--r--ldap/servers/slapd/ntuserpin.c4
-rw-r--r--ldap/servers/slapd/plugin_internal_op.c2
-rw-r--r--ldap/servers/slapd/pw.c3
-rw-r--r--ldap/servers/slapd/result.c3
-rw-r--r--ldap/servers/slapd/slap.h10
-rw-r--r--ldap/servers/slapd/ssl.c26
18 files changed, 5 insertions, 157 deletions
diff --git a/ldap/admin/lib/dsalib_pw.c b/ldap/admin/lib/dsalib_pw.c
index 038ac922..3c64ba0f 100644
--- a/ldap/admin/lib/dsalib_pw.c
+++ b/ldap/admin/lib/dsalib_pw.c
@@ -56,10 +56,8 @@
#include "prlong.h"
#include "prmem.h"
-#if defined(NET_SSL)
#include <pk11func.h>
#include <pk11pqg.h>
-#endif /* NET_SSL */
#define SHA1_SALT_LENGTH 8 /* number of bytes of data in salt */
#define PWD_HASH_PREFIX_START '{'
diff --git a/ldap/clients/dsgw/dsgw.h b/ldap/clients/dsgw/dsgw.h
index cbffeec8..edfcf1aa 100644
--- a/ldap/clients/dsgw/dsgw.h
+++ b/ldap/clients/dsgw/dsgw.h
@@ -39,10 +39,6 @@
* dsgw.h -- defines for HTTP gateway
*/
-#if !defined( DSGW_NO_SSL ) && !defined( NET_SSL )
-#define DSGW_NO_SSL
-#endif
-
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
diff --git a/ldap/include/proto-ntutil.h b/ldap/include/proto-ntutil.h
index d74171aa..88181469 100644
--- a/ldap/include/proto-ntutil.h
+++ b/ldap/include/proto-ntutil.h
@@ -94,10 +94,8 @@ extern BOOL SlapdGetServerNameFromCmdline(char *szServerName, char *szCmdLine, i
* ntgetpassword.c
*
*/
-#ifdef NET_SSL
extern char *Slapd_GetPassword();
extern void CenterDialog(HWND hwndParent, HWND hwndDialog);
-#endif /* NET_SSL */
#ifdef __cplusplus
}
diff --git a/ldap/libraries/libutil/ntstubs.c b/ldap/libraries/libutil/ntstubs.c
index 00238e5e..e7adbf2e 100644
--- a/ldap/libraries/libutil/ntstubs.c
+++ b/ldap/libraries/libutil/ntstubs.c
@@ -45,7 +45,7 @@
*
******************************************************/
-#if defined( _WIN32 ) && defined ( NET_SSL )
+#if defined( _WIN32 )
#include <windows.h>
#include <nspr.h>
@@ -68,5 +68,5 @@ WH_FileName (const char *name, PRFileType type)
{
return NULL;
}
-#endif /* WIN32 && NET_SSL */
+#endif /* WIN32 */
diff --git a/ldap/servers/plugins/pwdstorage/pwdstorage.h b/ldap/servers/plugins/pwdstorage/pwdstorage.h
index 70fe11ba..83e885de 100644
--- a/ldap/servers/plugins/pwdstorage/pwdstorage.h
+++ b/ldap/servers/plugins/pwdstorage/pwdstorage.h
@@ -103,64 +103,4 @@ int ns_mta_md5_pw_cmp( char *userpwd, char *dbpwd );
int md5_pw_cmp( char *userpwd, char *dbpwd );
char *md5_pw_enc( char *pwd );
-
-#if !defined(NET_SSL)
-/******************************************/
-/*
- * Some of the stuff below depends on a definition for uint32, so
- * we include one here. Other definitions appear in nspr/prtypes.h,
- * at least. All the platforms we support use 32-bit ints.
- */
-typedef unsigned int uint32;
-
-
-/******************************************/
-/*
- * The following is from ds.h, which the libsec sec.h stuff depends on (see
- * comment below).
- */
-/*
-** A status code. Status's are used by procedures that return status
-** values. Again the motivation is so that a compiler can generate
-** warnings when return values are wrong. Correct testing of status codes:
-**
-** DSStatus rv;
-** rv = some_function (some_argument);
-** if (rv != DSSuccess)
-** do_an_error_thing();
-**
-*/
-typedef enum DSStatusEnum {
- DSWouldBlock = -2,
- DSFailure = -1,
- DSSuccess = 0
-} DSStatus;
-
-
-/******************************************/
-/*
- * All of the SHA1-related defines are from libsec's "sec.h" -- including
- * it directly pulls in way too much stuff that we conflict with. Ugh.
- */
-
-/*
- * Number of bytes each hash algorithm produces
- */
-#define SHA1_LENGTH 20
-#define SHA256_LENGTH 32
-#define SHA384_LENGTH 48
-#define SHA512_LENGTH 64
-
-/******************************************/
-/*
-** SHA-1 secure hash function
-*/
-
-/*
-** Hash a null terminated string "src" into "dest" using SHA-1
-*/
-DSStatus SHA1_Hash(unsigned char *dest, char *src);
-
-#endif /* !defined(NET_SSL) */
-
#endif /* _PWDSTORAGE_H */
diff --git a/ldap/servers/plugins/pwdstorage/sha_pwd.c b/ldap/servers/plugins/pwdstorage/sha_pwd.c
index 0f4247cb..f1389f69 100644
--- a/ldap/servers/plugins/pwdstorage/sha_pwd.c
+++ b/ldap/servers/plugins/pwdstorage/sha_pwd.c
@@ -46,9 +46,7 @@
#include "pwdstorage.h"
-#if defined(NET_SSL)
#include <sechash.h>
-#endif /* NET_SSL */
#define SHA_SALT_LENGTH 8 /* number of bytes of data in salt */
#define NOT_FIRST_TIME (time_t)1 /* not the first logon */
diff --git a/ldap/servers/plugins/pwdstorage/ssha_pwd.c b/ldap/servers/plugins/pwdstorage/ssha_pwd.c
index ac72e46e..b20e5012 100644
--- a/ldap/servers/plugins/pwdstorage/ssha_pwd.c
+++ b/ldap/servers/plugins/pwdstorage/ssha_pwd.c
@@ -48,10 +48,8 @@
#include "prtime.h"
#include "prlong.h"
-#if defined(NET_SSL)
#include <pk11func.h>
#include <pk11pqg.h>
-#endif /* NET_SSL */
#define SHA_SALT_LENGTH 8 /* number of bytes of data in salt */
diff --git a/ldap/servers/slapd/daemon.c b/ldap/servers/slapd/daemon.c
index adefdd4a..7c895be5 100644
--- a/ldap/servers/slapd/daemon.c
+++ b/ldap/servers/slapd/daemon.c
@@ -83,9 +83,7 @@
#include "snmp_collator.h"
#include <private/pprio.h>
-#if defined( NET_SSL )
#include <ssl.h>
-#endif /* defined(NET_SSL) */
#include "fe.h"
@@ -1895,7 +1893,6 @@ handle_new_connection(Connection_Table *ct, int tcps, PRFileDesc *pr_acceptfd, i
*/
}
-#if defined(NET_SSL)
if( secure && config_get_SSLclientAuth() != SLAPD_SSLCLIENTAUTH_OFF ) {
/* Prepare to handle the client's certificate (if any): */
int rv;
@@ -1917,7 +1914,6 @@ handle_new_connection(Connection_Table *ct, int tcps, PRFileDesc *pr_acceptfd, i
conn->c_sd, rv, prerr);
}
}
-#endif
connection_reset(conn, ns, &from, sizeof(from), secure);
diff --git a/ldap/servers/slapd/globals.c b/ldap/servers/slapd/globals.c
index a6077f75..6ab34b7b 100644
--- a/ldap/servers/slapd/globals.c
+++ b/ldap/servers/slapd/globals.c
@@ -42,7 +42,6 @@
* SLAPD globals.c -- SLAPD library global variables
*/
-#if defined(NET_SSL)
#include "ldap.h"
#include <sslproto.h> /* cipher suite names */
#include <ldap_ssl.h>
@@ -50,8 +49,6 @@
#undef OFF
#undef LITTLE_ENDIAN
-#endif
-
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
diff --git a/ldap/servers/slapd/libglobs.c b/ldap/servers/slapd/libglobs.c
index 6af39baa..d6549cf1 100644
--- a/ldap/servers/slapd/libglobs.c
+++ b/ldap/servers/slapd/libglobs.c
@@ -45,7 +45,6 @@
*/
#define DONT_DECLARE_SLAPD_LDAP_DEBUG /* see ldaplog.h */
-#if defined(NET_SSL)
#include "ldap.h"
#include <sslproto.h>
#include <ldap_ssl.h>
@@ -53,8 +52,6 @@
#undef OFF
#undef LITTLE_ENDIAN
-#endif
-
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
diff --git a/ldap/servers/slapd/localhost.c b/ldap/servers/slapd/localhost.c
index a6c569f0..f95af184 100644
--- a/ldap/servers/slapd/localhost.c
+++ b/ldap/servers/slapd/localhost.c
@@ -56,10 +56,8 @@
#include <unistd.h>
#endif /* USE_SYSCONF */
-#if defined( NET_SSL )
#include <ssl.h>
#include "fe.h"
-#endif /* defined(NET_SSL) */
#ifndef _PATH_RESCONF /* usually defined in <resolv.h> */
#define _PATH_RESCONF "/etc/resolv.conf"
diff --git a/ldap/servers/slapd/main.c b/ldap/servers/slapd/main.c
index 0f41080b..8ef052e2 100644
--- a/ldap/servers/slapd/main.c
+++ b/ldap/servers/slapd/main.c
@@ -36,11 +36,9 @@
* All rights reserved.
* END COPYRIGHT BLOCK **/
-#if defined(NET_SSL)
#include <ldap.h>
#undef OFF
#undef LITTLE_ENDIAN
-#endif
#include <stdio.h>
#include <string.h>
@@ -108,9 +106,7 @@ static int slapd_exemode_db2ldif(int argc, char **argv);
static int slapd_exemode_db2index();
static int slapd_exemode_archive2db();
static int slapd_exemode_db2archive();
-#if defined(UPGRADEDB)
static int slapd_exemode_upgradedb();
-#endif
static int slapd_exemode_dbtest();
static int slapd_exemode_suffix2instance();
static int slapd_debug_level_string2level( const char *s );
@@ -365,21 +361,15 @@ name2exemode( char *progname, char *s, int exit_if_unknown )
} else if ( strcmp( s, "suffix2instance" ) == 0 ) {
exemode = SLAPD_EXEMODE_SUFFIX2INSTANCE;
}
-#if defined(UPGRADEDB)
else if ( strcmp( s, "upgradedb" ) == 0 )
{
exemode = SLAPD_EXEMODE_UPGRADEDB;
}
-#endif
else if ( exit_if_unknown ) {
fprintf( stderr, "usage: %s -D configdir "
"[ldif2db | db2ldif | archive2db "
"| db2archive | db2index | refer | suffix2instance"
-#if defined(UPGRADEDB)
" | upgradedb] "
-#else
- "] "
-#endif
"[options]\n", progname );
exit( 1 );
} else {
@@ -436,11 +426,9 @@ usage( char *name, char *extraname )
case SLAPD_EXEMODE_SUFFIX2INSTANCE:
usagestr = "usage: %s %s%s -D configdir {-s suffix}*\n";
break;
-#if defined(UPGRADEDB)
case SLAPD_EXEMODE_UPGRADEDB:
usagestr = "usage: %s %s%s-D configdir [-d debuglevel] [-f] -a archivedir\n";
break;
-#endif
default: /* SLAPD_EXEMODE_SLAPD */
usagestr = "usage: %s %s%s-D configdir [-d debuglevel] "
@@ -480,9 +468,7 @@ static int ldif2db_generate_uniqueid = SLAPI_UNIQUEID_GENERATE_TIME_BASED;
static int ldif2db_load_state= 1;
static char *ldif2db_namespaceid = NULL;
int importexport_encrypt = 0;
-#if defined(UPGRADEDB)
static int upgradedb_force = 0;
-#endif
/* taken from idsktune */
#if defined(__sun)
@@ -956,10 +942,8 @@ main( int argc, char **argv)
case SLAPD_EXEMODE_SUFFIX2INSTANCE:
return slapd_exemode_suffix2instance();
-#if defined(UPGRADEDB)
case SLAPD_EXEMODE_UPGRADEDB:
return slapd_exemode_upgradedb();
-#endif
case SLAPD_EXEMODE_PRINTVERSION:
slapd_print_version(1);
@@ -1085,9 +1069,7 @@ main( int argc, char **argv)
normalize_oc();
if (n_port) {
-#if defined(NET_SSL)
} else if ( config_get_security()) {
-#endif
} else {
#ifdef _WIN32
if( SlapdIsAService() )
@@ -1327,7 +1309,6 @@ process_command_line(int argc, char **argv, char *myname,
{"exclude",ArgRequired,'x'},
{0,0,0}};
-#if defined(UPGRADEDB)
char *opts_upgradedb = "vfd:a:D:";
struct opt_ext long_options_upgradedb[] = {
{"version",ArgNone,'v'},
@@ -1336,7 +1317,6 @@ process_command_line(int argc, char **argv, char *myname,
{"archive",ArgRequired,'a'},
{"configDir",ArgRequired,'D'},
{0,0,0}};
-#endif
char *opts_referral = "vd:p:r:SD:";
struct opt_ext long_options_referral[] = {
@@ -1430,12 +1410,10 @@ process_command_line(int argc, char **argv, char *myname,
opts = opts_suffix2instance;
long_opts = long_options_suffix2instance;
break;
-#if defined(UPGRADEDB)
case SLAPD_EXEMODE_UPGRADEDB:
opts = opts_upgradedb;
long_opts = long_options_upgradedb;
break;
-#endif
default: /* SLAPD_EXEMODE_SLAPD */
opts = opts_slapd;
long_opts = long_options_slapd;
@@ -1755,7 +1733,6 @@ process_command_line(int argc, char **argv, char *myname,
}
importexport_encrypt = 1;
break;
-#if defined(UPGRADEDB)
case 'f': /* upgradedb only */
if ( slapd_exemode != SLAPD_EXEMODE_UPGRADEDB ) {
usage( myname, *extraname );
@@ -1763,7 +1740,6 @@ process_command_line(int argc, char **argv, char *myname,
}
upgradedb_force = SLAPI_UPGRADEDB_FORCE;
break;
-#endif
case '1': /* db2ldif only */
if ( slapd_exemode != SLAPD_EXEMODE_DB2LDIF ) {
usage( myname, *extraname );
@@ -2500,7 +2476,6 @@ slapd_exemode_archive2db()
return return_value;
}
-#if defined(UPGRADEDB)
/*
* functions to convert idl from the old format to the new one
* (604921) Support a database uprev process any time post-install
@@ -2575,7 +2550,6 @@ slapd_exemode_upgradedb()
slapi_ch_free((void**)&myname );
return( return_value );
}
-#endif
static int
diff --git a/ldap/servers/slapd/ntuserpin.c b/ldap/servers/slapd/ntuserpin.c
index 4859903a..b420cad1 100644
--- a/ldap/servers/slapd/ntuserpin.c
+++ b/ldap/servers/slapd/ntuserpin.c
@@ -42,7 +42,7 @@
*
******************************************************/
-#if defined( _WIN32 ) && defined ( NET_SSL )
+#if defined( _WIN32 )
#include <windows.h>
#include "ntwatchdog.h"
@@ -206,4 +206,4 @@ static char *getPin(SVRCOREPinObj *obj, const char *tokenName, PRBool retry)
*/
static const SVRCOREPinMethods vtable =
{ 0, 0, destroyObject, getPin };
-#endif /* defined( _WIN32 ) && defined ( NET_SSL ) */
+#endif /* defined( _WIN32 ) */
diff --git a/ldap/servers/slapd/plugin_internal_op.c b/ldap/servers/slapd/plugin_internal_op.c
index 81513e37..1292881e 100644
--- a/ldap/servers/slapd/plugin_internal_op.c
+++ b/ldap/servers/slapd/plugin_internal_op.c
@@ -42,9 +42,7 @@
#include "slapi-plugin.h"
#include "slap.h"
-#if defined(NET_SSL)
#include <ssl.h>
-#endif
/* entry list node */
typedef struct Entry_Node{
diff --git a/ldap/servers/slapd/pw.c b/ldap/servers/slapd/pw.c
index dd312d68..ae5cfd32 100644
--- a/ldap/servers/slapd/pw.c
+++ b/ldap/servers/slapd/pw.c
@@ -43,7 +43,6 @@
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
-#if defined(NET_SSL)
#include <sechash.h>
#if defined( _WIN32 )
#undef DEBUG
@@ -52,8 +51,6 @@
#undef LDAPDebug
#endif /* _WIN32 */
-#endif /* NET_SSL */
-
#include "slap.h"
diff --git a/ldap/servers/slapd/result.c b/ldap/servers/slapd/result.c
index 03f1b289..0292c2e2 100644
--- a/ldap/servers/slapd/result.c
+++ b/ldap/servers/slapd/result.c
@@ -53,10 +53,7 @@
#include "fe.h"
#include "vattr_spi.h"
-
-#if defined( NET_SSL )
#include <ssl.h>
-#endif
PRUint64 num_entries_sent;
PRUint64 num_bytes_sent;
diff --git a/ldap/servers/slapd/slap.h b/ldap/servers/slapd/slap.h
index db818884..a8b51c42 100644
--- a/ldap/servers/slapd/slap.h
+++ b/ldap/servers/slapd/slap.h
@@ -61,9 +61,7 @@ static char ptokDes[34] = "Internal (Software) Token ";
#define SLAPD_EXEMODE_REFERRAL 8
#define SLAPD_EXEMODE_SUFFIX2INSTANCE 9
#define SLAPD_EXEMODE_PRINTVERSION 10
-#if defined(UPGRADEDB)
#define SLAPD_EXEMODE_UPGRADEDB 11
-#endif
#ifdef _WIN32
#ifndef DONT_DECLARE_SLAPD_LDAP_DEBUG
@@ -119,7 +117,6 @@ void *dlsym(void *a, char *b);
#define SLAPD_TYPICAL_ATTRIBUTE_NAME_MAX_LENGTH 256
-#if defined(NET_SSL)
typedef struct symbol_t {
const char* name;
unsigned number;
@@ -129,7 +126,6 @@ typedef struct symbol_t {
#define SLAPD_SSLCLIENTAUTH_ALLOWED 1 /* server asks for cert, but client need not send one */
#define SLAPD_SSLCLIENTAUTH_REQUIRED 2 /* server will refuse SSL session unless client sends cert */
#define SLAPD_SSLCLIENTAUTH_DEFAULT SLAPD_SSLCLIENTAUTH_ALLOWED
-#endif /* NET_SSL */
#define SLAPD_LOGGING 1
#define NUM_SNMP_INT_TBL_ROWS 5
@@ -768,9 +764,7 @@ struct slapdplugin {
IFP plg_un_db_db2index; /* database 2 index */
IFP plg_un_db_archive2db; /* ldif 2 database */
IFP plg_un_db_db2archive; /* database 2 ldif */
-#if defined(UPGRADEDB)
IFP plg_un_db_upgradedb; /* convert old idl to new */
-#endif
IFP plg_un_db_begin; /* dbase txn begin */
IFP plg_un_db_commit; /* dbase txn commit */
IFP plg_un_db_abort; /* dbase txn abort */
@@ -805,9 +799,7 @@ struct slapdplugin {
#define plg_db2index plg_un.plg_un_db.plg_un_db_db2index
#define plg_archive2db plg_un.plg_un_db.plg_un_db_archive2db
#define plg_db2archive plg_un.plg_un_db.plg_un_db_db2archive
-#if defined(UPGRADEDB)
#define plg_upgradedb plg_un.plg_un_db.plg_un_db_upgradedb
-#endif
#define plg_dbsize plg_un.plg_un_db.plg_un_db_dbsize
#define plg_dbtest plg_un.plg_un_db.plg_un_db_dbtest
#define plg_rmdb plg_un.plg_un_db.plg_un_db_rmdb
@@ -1051,9 +1043,7 @@ typedef struct backend {
#define be_poststart be_database->plg_poststart
#define be_seq be_database->plg_seq
#define be_ldif2db be_database->plg_ldif2db
-#if defined(UPGRADEDB)
#define be_upgradedb be_database->plg_upgradedb
-#endif
#define be_db2ldif be_database->plg_db2ldif
#define be_db2index be_database->plg_db2index
#define be_archive2db be_database->plg_archive2db
diff --git a/ldap/servers/slapd/ssl.c b/ldap/servers/slapd/ssl.c
index d1552442..027bb516 100644
--- a/ldap/servers/slapd/ssl.c
+++ b/ldap/servers/slapd/ssl.c
@@ -37,8 +37,6 @@
* END COPYRIGHT BLOCK **/
/* SSL-related stuff for slapd */
-#if defined(NET_SSL)
-
#if defined( _WINDOWS )
#include <windows.h>
#include <winsock.h>
@@ -102,8 +100,6 @@ static char * configDN = "cn=encryption,cn=config";
/* ----------------------- Multiple cipher support ------------------------ */
-#ifdef NET_SSL
-
static char **cipher_names = NULL;
typedef struct {
char *version;
@@ -182,9 +178,7 @@ _conf_setallciphers(int active)
if(active && !strcmp(_conf_ciphers[x].name, "rsa_null_md5")) {
continue;
}
-#ifdef NET_SSL
SSL_CipherPrefSetDefault(_conf_ciphers[x].num, active ? PR_TRUE : PR_FALSE);
-#endif
}
}
@@ -253,24 +247,12 @@ SSLPLCY_Install(void)
SECStatus s = 0;
-
-#ifdef NS_DOMESTIC
-
- s = NSS_SetDomesticPolicy();
-
-#else
- s = NSS_SetExportPolicy();
-
-#endif
-
+ s = NSS_SetDomesticPolicy();
return s?PR_FAILURE:PR_SUCCESS;
}
-
-#endif /* NET_SSL */
-
static void
slapd_SSL_report(int degree, char *fmt, va_list args)
{
@@ -1144,11 +1126,7 @@ int slapd_ssl_init2(PRFileDesc **fd, int startTLS)
SSL_OptionSetDefault(SSL_ENABLE_SSL2, PR_FALSE);
SSL_OptionSetDefault(SSL_ENABLE_SSLdirs
3, PR_TRUE);
-#ifdef NS_DOMESTIC
s = NSS_SetDomesticPolicy();
-#elif NS_EXPORT
- s = NSS_SetExportPolicy();
-
We already do pr_init, we don't need pr_setconcurrency, we already do nss_init and the rest
*/
@@ -1511,5 +1489,3 @@ char* slapd_get_tmp_dir()
#endif
return ( tmpdir );
}
-
-#endif /* NET_SSL */