[sysadmin-bin] Convert create-auth to use 636 as well



commit 9140c4ccc30965924f0075c3f1faf26bb50dcc23
Author: Andrea Veri <averi redhat com>
Date:   Mon Oct 1 17:05:51 2018 +0200

    Convert create-auth to use 636 as well

 create-auth | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/create-auth b/create-auth
index 332ec69..010ca73 100755
--- a/create-auth
+++ b/create-auth
@@ -33,8 +33,10 @@ execfile('/home/admin/secret/freeipa')
 
 ## first you must open a connection to the server
 try:
-    l = ldap.open('view.gnome.org')
-    l.simple_bind("cn=Directory Manager", ldap_password)
+    ldap.set_option(ldap.OPT_X_TLS_CACERTFILE, LDAP_CA_PATH)
+
+    l = ldap.initialize('ldaps://view.gnome.org:636')
+    l.simple_bind_s("cn=Directory Manager", ldap_password)
 except ldap.LDAPError, e:
     print >>sys.stderr, e
     sys.exit(1)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]