Commits

Michael Granger committed abac465

Starting work on the STARTTLS op

Comments (0)

Files changed (2)

+starttls-op
+# HG changeset patch
+# Parent 649505788865e6763454f74595d406bc91ee9934
+Adding STARTTLS operations
+
+diff --git a/ext/connection.c b/ext/connection.c
+--- a/ext/connection.c
++++ b/ext/connection.c
+@@ -208,5 +208,6 @@
+ 
+ 	rb_define_method( ropenldap_cOpenLDAPConnection, "initialize", ropenldap_conn_initialize, 1 );
+ 
++	
+ }
+ 
+diff --git a/ext/openldap.c b/ext/openldap.c
+--- a/ext/openldap.c
++++ b/ext/openldap.c
+@@ -271,6 +271,21 @@
+ 	/* versions */
+ 	rb_define_const( ropenldap_mOpenLDAP, "LDAP_API_VERSION", INT2FIX(LDAP_API_VERSION) );
+ 
++	/* Ports */
++	rb_define_const( ropenldap_mOpenLDAP, "LDAP_PORT", INT2FIX(LDAP_PORT) );
++	rb_define_const( ropenldap_mOpenLDAP, "LDAPS_PORT", INT2FIX(LDAPS_PORT) );
++
++	/* RFC constants */
++	rb_define_const( ropenldap_mOpenLDAP, "LDAP_ROOT_DSE", rb_str_new2(LDAP_ROOT_DSE) );
++	rb_define_const( ropenldap_mOpenLDAP, "LDAP_NO_ATTRS", rb_str_new2(LDAP_NO_ATTRS) );
++	rb_define_const( ropenldap_mOpenLDAP, "LDAP_ALL_USER_ATTRIBUTES",
++	                 rb_str_new2(LDAP_ALL_USER_ATTRIBUTES) );
++	rb_define_const( ropenldap_mOpenLDAP, "LDAP_ALL_OPERATIONAL_ATTRIBUTES",
++				     rb_str_new2(LDAP_ALL_OPERATIONAL_ATTRIBUTES) );
++
++	/* RFC4511 maxInt */
++ 	rb_define_const( ropenldap_mOpenLDAP, "LDAP_MAXINT", INT2NUM(LDAP_MAXINT) );
++
+ 	/* search scopes */
+ 	rb_define_const( ropenldap_mOpenLDAP, "LDAP_SCOPE_BASE", INT2FIX(LDAP_SCOPE_BASE) );
+ 	rb_define_const( ropenldap_mOpenLDAP, "LDAP_SCOPE_BASEOBJECT", INT2FIX(LDAP_SCOPE_BASEOBJECT) );