/* $OpenLDAP$ */
/*
- * Copyright 1998-2000 The OpenLDAP Foundation, Redwood City, California, USA
+ * Copyright 1998-2001 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
- * Redistribution and use in source and binary forms are permitted only
- * as authorized by the OpenLDAP Public License. A copy of this
- * license is available at http://www.OpenLDAP.org/license.html or
- * in file LICENSE in the top-level directory of the distribution.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted only as authorized by the OpenLDAP
+ * Public License. A copy of this license is available at
+ * http://www.OpenLDAP.org/license.html or in file LICENSE in the
+ * top-level directory of the distribution.
*/
/* Portions
* Copyright (c) 1990 Regents of the University of Michigan.
*/
#define LDAP_API_VERSION 2004
#define LDAP_VENDOR_NAME "OpenLDAP"
+
/*
* vendor version number
* 2.0.0 -> 20000
* 2.3.16 -> 20316
*/
-#define LDAP_VENDOR_VERSION 20007
+#define LDAP_VENDOR_VERSION 20019
/* OpenLDAP API Features */
#define LDAP_API_FEATURE_X_OPENLDAP LDAP_VENDOR_VERSION
#define LDAP_OPT_URI 0x5006
/* OpenLDAP TLS options */
-#define LDAP_OPT_X_TLS_CACERTFILE 0x6001
-#define LDAP_OPT_X_TLS_CACERTDIR 0x6002
-#define LDAP_OPT_X_TLS_CERT 0x6003
+#define LDAP_OPT_X_TLS 0x6000
+#define LDAP_OPT_X_TLS_CTX 0x6001 /* SSL CTX */
+#define LDAP_OPT_X_TLS_CACERTFILE 0x6002
+#define LDAP_OPT_X_TLS_CACERTDIR 0x6003
#define LDAP_OPT_X_TLS_CERTFILE 0x6004
#define LDAP_OPT_X_TLS_KEYFILE 0x6005
#define LDAP_OPT_X_TLS_REQUIRE_CERT 0x6006
-#define LDAP_OPT_X_TLS 0x6007
-#define LDAP_OPT_X_TLS_PROTOCOL 0x6008
-#define LDAP_OPT_X_TLS_CIPHER_SUITE 0x6009
-#define LDAP_OPT_X_TLS_RANDOM_FILE 0x600a
+/* #define LDAP_OPT_X_TLS_PROTOCOL 0x6007 */
+#define LDAP_OPT_X_TLS_CIPHER_SUITE 0x6008
+#define LDAP_OPT_X_TLS_RANDOM_FILE 0x6009
#define LDAP_OPT_X_TLS_NEVER 0
#define LDAP_OPT_X_TLS_HARD 1
} LDAPControl;
/* LDAP Controls */
- /* chase referrals controls */
+
+#ifdef undef
+ /* chase referrals client control (not yet implemented) */
#define LDAP_CONTROL_REFERRALS "1.2.840.113666.1.4.616"
#define LDAP_CHASE_SUBORDINATE_REFERRALS 0x0020U
#define LDAP_CHASE_EXTERNAL_REFERRALS 0x0040U
+#endif
#define LDAP_CONTROL_MANAGEDSAIT "2.16.840.1.113730.3.4.2"
/* sasl methods */
#define LDAP_SASL_SIMPLE ((char*)0)
+#define LDAP_SASL_NULL ("")
/* authentication methods available */
#define LDAP_AUTH_NONE ((ber_tag_t) 0x00U) /* no authentication */
#define LDAP_AUTH_SIMPLE ((ber_tag_t) 0x80U) /* context specific + primitive */
-#define LDAP_AUTH_SASL ((ber_tag_t) 0xa3U) /* context specific + primitive */
+#define LDAP_AUTH_SASL ((ber_tag_t) 0xa3U) /* context specific + constructed */
#define LDAP_AUTH_KRBV4 ((ber_tag_t) 0xffU) /* means do both of the following */
#define LDAP_AUTH_KRBV41 ((ber_tag_t) 0x81U) /* context specific + primitive */
#define LDAP_AUTH_KRBV42 ((ber_tag_t) 0x82U) /* context specific + primitive */
#define LDAP_SUBSTRING_FINAL ((ber_tag_t) 0x82U) /* context specific */
/* search scopes */
+#define LDAP_SCOPE_DEFAULT ((ber_int_t) -1)
#define LDAP_SCOPE_BASE ((ber_int_t) 0x0000)
#define LDAP_SCOPE_ONELEVEL ((ber_int_t) 0x0001)
#define LDAP_SCOPE_SUBTREE ((ber_int_t) 0x0002)
#define LDAP_AUTH_METHOD_NOT_SUPPORTED 0x07
#define LDAP_STRONG_AUTH_NOT_SUPPORTED LDAP_AUTH_METHOD_NOT_SUPPORTED
#define LDAP_STRONG_AUTH_REQUIRED 0x08
-#define LDAP_PARTIAL_RESULTS 0x09 /* not listed in v3 */
+#define LDAP_PARTIAL_RESULTS 0x09 /* LDAPv2+ (not LDAPv3) */
#define LDAP_REFERRAL 0x0a /* LDAPv3 */
#define LDAP_ADMINLIMIT_EXCEEDED 0x0b /* LDAPv3 */
#define LDAP_OTHER 0x50
#define LDAP_API_ERROR(n) LDAP_RANGE((n),0x51,0x61) /* 81-97 */
+#define LDAP_API_RESULT(n) (((n) == LDAP_SUCCESS) || \
+ LDAP_RANGE((n),0x51,0x61)) /* 0,81-97 */
#define LDAP_SERVER_DOWN 0x51
#define LDAP_LOCAL_ERROR 0x52
struct timeval *timeout,
LDAPMessage **res ));
-
-/*
- * in ufn.c
- * (deprecated)
- */
-LDAP_F( int )
-ldap_ufn_search_c LDAP_P(( /* deprecated */
- LDAP *ld,
- LDAP_CONST char *ufn,
- char **attrs,
- int attrsonly,
- LDAPMessage **res,
- int (*cancelproc)( void *cl ),
- void *cancelparm ));
-
-LDAP_F( int )
-ldap_ufn_search_ct LDAP_P(( /* deprecated */
- LDAP *ld,
- LDAP_CONST char *ufn,
- char **attrs,
- int attrsonly,
- LDAPMessage **res,
- int (*cancelproc)( void *cl ),
- void *cancelparm,
- char *tag1,
- char *tag2,
- char *tag3 ));
-
-LDAP_F( int )
-ldap_ufn_search_s LDAP_P(( /* deprecated */
- LDAP *ld,
- LDAP_CONST char *ufn,
- char **attrs,
- int attrsonly,
- LDAPMessage **res ));
-
-LDAP_F( LDAPFiltDesc *)
-ldap_ufn_setfilter LDAP_P(( /* deprecated */
- LDAP *ld,
- LDAP_CONST char *fname ));
-
-LDAP_F( void )
-ldap_ufn_setprefix LDAP_P(( /* deprecated */
- LDAP *ld,
- LDAP_CONST char *prefix ));
-
-LDAP_F( int )
-ldap_ufn_timeout LDAP_P(( /* deprecated */
- void *tvparam ));
-
-
/*
* in unbind.c
*/