/* * call-seq: * conn.start_tls => nil * * Initiate START_TLS for the connection, +conn+. */ VALUE rb_ldap_conn_start_tls_s (int argc, VALUE argv[], VALUE self) { #ifdef HAVE_LDAP_START_TLS_S VALUE arg1, arg2; RB_LDAP_DATA *ldapdata; LDAPControl **serverctrls; LDAPControl **clientctrls; switch (rb_scan_args (argc, argv, "02", &arg1, &arg2)) { case 0: serverctrls = NULL; clientctrls = NULL; break; case 1: case 2: rb_notimplement (); default: rb_bug ("rb_ldap_conn_start_tls_s"); }; GET_LDAP_DATA (self, ldapdata); ldapdata->err = ldap_start_tls_s (ldapdata->ldap, serverctrls, clientctrls); Check_LDAP_Result (ldapdata->err); #else rb_notimplement (); #endif return Qnil; }