]> git.sur5r.net Git - openldap/commitdiff
Return okay after setting LDAP_OPT_X_TLS_CERT (ITS#447)
authorKurt Zeilenga <kurt@openldap.org>
Sat, 18 Mar 2000 23:55:51 +0000 (23:55 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sat, 18 Mar 2000 23:55:51 +0000 (23:55 +0000)
libraries/libldap/tls.c

index 4b10a08f0352d00cdb72811f78d72d494bb42ba4..d1d786a541053b4efc99376c3ec76589e996dc3b 100644 (file)
@@ -467,22 +467,28 @@ ldap_pvt_tls_set_option( struct ldapoptions *lo, int option, void *arg )
                case LDAP_OPT_X_TLS_ALLOW:
                case LDAP_OPT_X_TLS_TRY:
                case LDAP_OPT_X_TLS_HARD:
-                       if (lo != NULL)
+                       if (lo != NULL) {
                                lo->ldo_tls_mode = *(int *)arg;
+                       }
+
                        return 0;
-               default:
-                       return -1;
                }
-               break;
+               return -1;
+
        case LDAP_OPT_X_TLS_CERT:
-               if ( lo == NULL )
+               if ( lo == NULL ) {
                        tls_def_ctx = (SSL_CTX *) arg;
-               else
+
+               } else {
                        lo->ldo_tls_ctx = arg;
-               break;
+               }
+               return 0;
        }
-       if ( lo != NULL )
+
+       if ( lo != NULL ) {
                return -1;
+       }
+
        switch( option ) {
        case LDAP_OPT_X_TLS_CACERTFILE:
                if ( tls_opt_cacertfile ) free( tls_opt_cacertfile );