Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/openldap/dist merge conflicts



details:   https://anonhg.NetBSD.org/src/rev/c99aa79eacca
branches:  trunk
changeset: 829561:c99aa79eacca
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Feb 06 01:57:23 2018 +0000

description:
merge conflicts

diffstat:

 external/bsd/openldap/dist/build/mkversion                |     6 +-
 external/bsd/openldap/dist/clients/tools/common.c         |     6 +-
 external/bsd/openldap/dist/include/Makefile.in            |     2 +-
 external/bsd/openldap/dist/include/ldap_queue.h           |    26 +-
 external/bsd/openldap/dist/include/portable.hin           |     2 +-
 external/bsd/openldap/dist/libraries/libldap/os-ip.c      |     6 +-
 external/bsd/openldap/dist/libraries/libldap/os-local.c   |     6 +-
 external/bsd/openldap/dist/libraries/libldap/tls_o.c      |   254 +-
 external/bsd/openldap/dist/libraries/liblutil/detach.c    |     6 +-
 external/bsd/openldap/dist/libraries/liblutil/md5.c       |     6 +-
 external/bsd/openldap/dist/libraries/liblutil/passwd.c    |    34 +-
 external/bsd/openldap/dist/libraries/librewrite/session.c |     4 +-
 external/bsd/openldap/dist/libtool                        |  7280 -------------
 external/bsd/openldap/dist/servers/slapd/filter.c         |     6 +-
 external/bsd/openldap/dist/servers/slapd/overlays/deref.c |     6 +-
 15 files changed, 160 insertions(+), 7490 deletions(-)

diffs (truncated from 8151 to 300 lines):

diff -r 33a99ec69d9a -r c99aa79eacca external/bsd/openldap/dist/build/mkversion
--- a/external/bsd/openldap/dist/build/mkversion        Tue Feb 06 01:53:05 2018 +0000
+++ b/external/bsd/openldap/dist/build/mkversion        Tue Feb 06 01:57:23 2018 +0000
@@ -3,7 +3,7 @@
 # $OpenLDAP$
 ## This work is part of OpenLDAP Software <http://www.openldap.org/>.
 ##
-## Copyright 1998-2016 The OpenLDAP Foundation.
+## Copyright 1998-2017 The OpenLDAP Foundation.
 ## All rights reserved.
 ##
 ## Redistribution and use in source and binary forms, with or without
@@ -54,7 +54,7 @@
 cat << __EOF__
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2016 The OpenLDAP Foundation.
+ * Copyright 1998-2017 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -67,7 +67,7 @@
  */
 
 static const char copyright[] =
-"Copyright 1998-2016 The OpenLDAP Foundation.  All rights reserved.\n"
+"Copyright 1998-2017 The OpenLDAP Foundation.  All rights reserved.\n"
 "COPYING RESTRICTIONS APPLY\n";
 
 $static $const char $SYMBOL[] =
diff -r 33a99ec69d9a -r c99aa79eacca external/bsd/openldap/dist/clients/tools/common.c
--- a/external/bsd/openldap/dist/clients/tools/common.c Tue Feb 06 01:53:05 2018 +0000
+++ b/external/bsd/openldap/dist/clients/tools/common.c Tue Feb 06 01:57:23 2018 +0000
@@ -1,10 +1,10 @@
-/*     $NetBSD: common.c,v 1.6 2017/02/09 01:53:50 christos Exp $      */
+/*     $NetBSD: common.c,v 1.7 2018/02/06 01:57:23 christos Exp $      */
 
 /* common.c - common routines for the ldap client tools */
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2016 The OpenLDAP Foundation.
+ * Copyright 1998-2017 The OpenLDAP Foundation.
  * Portions Copyright 2003 Kurt D. Zeilenga.
  * Portions Copyright 2003 IBM Corporation.
  * All rights reserved.
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: common.c,v 1.6 2017/02/09 01:53:50 christos Exp $");
+__RCSID("$NetBSD: common.c,v 1.7 2018/02/06 01:57:23 christos Exp $");
 
 #include "portable.h"
 
diff -r 33a99ec69d9a -r c99aa79eacca external/bsd/openldap/dist/include/Makefile.in
--- a/external/bsd/openldap/dist/include/Makefile.in    Tue Feb 06 01:53:05 2018 +0000
+++ b/external/bsd/openldap/dist/include/Makefile.in    Tue Feb 06 01:57:23 2018 +0000
@@ -2,7 +2,7 @@
 # $OpenLDAP$
 ## This work is part of OpenLDAP Software <http://www.openldap.org/>.
 ##
-## Copyright 1998-2016 The OpenLDAP Foundation.
+## Copyright 1998-2017 The OpenLDAP Foundation.
 ## All rights reserved.
 ##
 ## Redistribution and use in source and binary forms, with or without
diff -r 33a99ec69d9a -r c99aa79eacca external/bsd/openldap/dist/include/ldap_queue.h
--- a/external/bsd/openldap/dist/include/ldap_queue.h   Tue Feb 06 01:53:05 2018 +0000
+++ b/external/bsd/openldap/dist/include/ldap_queue.h   Tue Feb 06 01:57:23 2018 +0000
@@ -1,10 +1,10 @@
-/*     $NetBSD: ldap_queue.h,v 1.4 2017/02/09 01:53:50 christos Exp $  */
+/*     $NetBSD: ldap_queue.h,v 1.5 2018/02/06 01:57:23 christos Exp $  */
 
 /* ldap_queue.h -- queue macros */
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2001-2016 The OpenLDAP Foundation.
+ * Copyright 2001-2017 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -227,7 +227,7 @@
 } while (0)
 
 #define LDAP_STAILQ_ENTRY_INIT(var, field) {                           \
-       (entry)->field.stqe_next = NULL;                                \
+       (var)->field.stqe_next = NULL;                                  \
 }
 
 #define LDAP_STAILQ_FIRST(head)        ((head)->stqh_first)
@@ -386,26 +386,20 @@
 #define LDAP_TAILQ_FOREACH(var, head, field)                           \
        for (var = LDAP_TAILQ_FIRST(head); var; var = LDAP_TAILQ_NEXT(var, field))
 
-#define LDAP_TAILQ_FOREACH_REVERSE(var, head, type, field)             \
-       for ((var) = LDAP_TAILQ_LAST((head), type, field);              \
+#define LDAP_TAILQ_FOREACH_REVERSE(var, head, headname, field)         \
+       for ((var) = LDAP_TAILQ_LAST((head), headname);                 \
             (var);                                                     \
-            (var) = LDAP_TAILQ_PREV((var), head, type, field))
+            (var) = LDAP_TAILQ_PREV((var), headname, field))
 
 #define        LDAP_TAILQ_FIRST(head) ((head)->tqh_first)
 
-#define LDAP_TAILQ_LAST(head, type, field)                             \
-       (LDAP_TAILQ_EMPTY(head) ?                                       \
-               NULL :                                                  \
-               ((struct type *)                                        \
-               ((char *)((head)->tqh_last) - offsetof(struct type, field))))
+#define        LDAP_TAILQ_LAST(head, headname) \
+       (*(((struct headname *)((head)->tqh_last))->tqh_last))
 
 #define        LDAP_TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
 
-#define LDAP_TAILQ_PREV(elm, head, type, field)                        \
-       ((struct type *)((elm)->field.tqe_prev) == LDAP_TAILQ_FIRST(head) ? \
-       NULL :                                                          \
-       ((struct type *)                                                \
-       ((char *)((elm)->field.tqe_prev) - offsetof(struct type, field))))
+#define LDAP_TAILQ_PREV(elm, headname, field) \
+       (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
 
 #define        LDAP_TAILQ_INIT(head) do {                                      \
        (head)->tqh_first = NULL;                                       \
diff -r 33a99ec69d9a -r c99aa79eacca external/bsd/openldap/dist/include/portable.hin
--- a/external/bsd/openldap/dist/include/portable.hin   Tue Feb 06 01:53:05 2018 +0000
+++ b/external/bsd/openldap/dist/include/portable.hin   Tue Feb 06 01:57:23 2018 +0000
@@ -4,7 +4,7 @@
 /* begin of portable.h.pre */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2016 The OpenLDAP Foundation
+ * Copyright 1998-2017 The OpenLDAP Foundation
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -r 33a99ec69d9a -r c99aa79eacca external/bsd/openldap/dist/libraries/libldap/os-ip.c
--- a/external/bsd/openldap/dist/libraries/libldap/os-ip.c      Tue Feb 06 01:53:05 2018 +0000
+++ b/external/bsd/openldap/dist/libraries/libldap/os-ip.c      Tue Feb 06 01:57:23 2018 +0000
@@ -1,10 +1,10 @@
-/*     $NetBSD: os-ip.c,v 1.7 2017/02/09 01:53:51 christos Exp $       */
+/*     $NetBSD: os-ip.c,v 1.8 2018/02/06 01:57:23 christos Exp $       */
 
 /* os-ip.c -- platform-specific TCP & UDP related code */
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2016 The OpenLDAP Foundation.
+ * Copyright 1998-2017 The OpenLDAP Foundation.
  * Portions Copyright 1999 Lars Uffmann.
  * All rights reserved.
  *
@@ -24,7 +24,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: os-ip.c,v 1.7 2017/02/09 01:53:51 christos Exp $");
+__RCSID("$NetBSD: os-ip.c,v 1.8 2018/02/06 01:57:23 christos Exp $");
 
 #include "portable.h"
 
diff -r 33a99ec69d9a -r c99aa79eacca external/bsd/openldap/dist/libraries/libldap/os-local.c
--- a/external/bsd/openldap/dist/libraries/libldap/os-local.c   Tue Feb 06 01:53:05 2018 +0000
+++ b/external/bsd/openldap/dist/libraries/libldap/os-local.c   Tue Feb 06 01:57:23 2018 +0000
@@ -1,10 +1,10 @@
-/*     $NetBSD: os-local.c,v 1.8 2017/02/09 01:53:51 christos Exp $    */
+/*     $NetBSD: os-local.c,v 1.9 2018/02/06 01:57:23 christos Exp $    */
 
 /* os-local.c -- platform-specific domain socket code */
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2016 The OpenLDAP Foundation.
+ * Copyright 1998-2017 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: os-local.c,v 1.8 2017/02/09 01:53:51 christos Exp $");
+__RCSID("$NetBSD: os-local.c,v 1.9 2018/02/06 01:57:23 christos Exp $");
 
 #include "portable.h"
 
diff -r 33a99ec69d9a -r c99aa79eacca external/bsd/openldap/dist/libraries/libldap/tls_o.c
--- a/external/bsd/openldap/dist/libraries/libldap/tls_o.c      Tue Feb 06 01:53:05 2018 +0000
+++ b/external/bsd/openldap/dist/libraries/libldap/tls_o.c      Tue Feb 06 01:57:23 2018 +0000
@@ -1,10 +1,10 @@
-/*     $NetBSD: tls_o.c,v 1.5 2017/02/09 01:53:51 christos Exp $       */
+/*     $NetBSD: tls_o.c,v 1.6 2018/02/06 01:57:23 christos Exp $       */
 
 /* tls_o.c - Handle tls/ssl using OpenSSL */
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2008-2016 The OpenLDAP Foundation.
+ * Copyright 2008-2017 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -19,7 +19,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: tls_o.c,v 1.5 2017/02/09 01:53:51 christos Exp $");
+__RCSID("$NetBSD: tls_o.c,v 1.6 2018/02/06 01:57:23 christos Exp $");
 
 #include "portable.h"
 
@@ -52,6 +52,10 @@
 #include <ssl.h>
 #endif
 
+#if OPENSSL_VERSION_NUMBER >= 0x10100000
+#define ASN1_STRING_data(x)    ASN1_STRING_get0_data(x)
+#endif
+
 typedef SSL_CTX tlso_ctx;
 typedef SSL tlso_session;
 
@@ -62,26 +66,18 @@
 static void tlso_info_cb( const SSL *ssl, int where, int ret );
 static int tlso_verify_cb( int ok, X509_STORE_CTX *ctx );
 static int tlso_verify_ok( int ok, X509_STORE_CTX *ctx );
+static int tlso_seed_PRNG( const char *randfile );
+#if OPENSSL_VERSION_NUMBER < 0x10100000
+/*
+ * OpenSSL 1.1 API and later has new locking code
+*/
 static RSA * tlso_tmp_rsa_cb( SSL *ssl, int is_export, int key_length );
 
-static DH * tlso_tmp_dh_cb( SSL *ssl, int is_export, int key_length );
-
-typedef struct dhplist {
-       struct dhplist *next;
-       int keylength;
-       DH *param;
-} dhplist;
-
-static dhplist *tlso_dhparams;
-
-static int tlso_seed_PRNG( const char *randfile );
-
 #ifdef LDAP_R_COMPILE
 /*
  * provide mutexes for the OpenSSL library.
  */
 static ldap_pvt_thread_mutex_t tlso_mutexes[CRYPTO_NUM_LOCKS];
-static ldap_pvt_thread_mutex_t tlso_dh_mutex;
 
 static void tlso_locking_cb( int mode, int type, const char *file, int line )
 {
@@ -112,11 +108,15 @@
        for( i=0; i< CRYPTO_NUM_LOCKS ; i++ ) {
                ldap_pvt_thread_mutex_init( &tlso_mutexes[i] );
        }
-       ldap_pvt_thread_mutex_init( &tlso_dh_mutex );
        CRYPTO_set_locking_callback( tlso_locking_cb );
        CRYPTO_set_id_callback( tlso_thread_self );
 }
 #endif /* LDAP_R_COMPILE */
+#else
+#ifdef LDAP_R_COMPILE
+static void tlso_thr_init( void ) {}
+#endif
+#endif /* OpenSSL 1.1 */
 
 static STACK_OF(X509_NAME) *
 tlso_ca_list( char * bundle, char * dir )
@@ -162,9 +162,13 @@
        (void) tlso_seed_PRNG( lo->ldo_tls_randfile );
 #endif
 
+#if OPENSSL_VERSION_NUMBER < 0x10100000
        SSL_load_error_strings();
        SSL_library_init();
        OpenSSL_add_all_digests();
+#else
+       OPENSSL_init_ssl(0, NULL);
+#endif
 
        /* FIXME: mod_ssl does this */
        X509V3_add_standard_extensions();
@@ -180,9 +184,15 @@
 {
        struct ldapoptions *lo = LDAP_INT_GLOBAL_OPT();   
 
+#if OPENSSL_VERSION_NUMBER < 0x10100000
        EVP_cleanup();
+#if OPENSSL_VERSION_NUMBER < 0x10000000
        ERR_remove_state(0);
+#else
+       ERR_remove_thread_state(NULL);
+#endif
        ERR_free_strings();
+#endif



Home | Main Index | Thread Index | Old Index