-#ifdef LDAP_COMPAT30
- if ( conn->c_version == 30 ) {
- switch ( method ) {
- case LDAP_AUTH_SIMPLE_30:
- method = LDAP_AUTH_SIMPLE;
- break;
-#ifdef HAVE_KERBEROS
- case LDAP_AUTH_KRBV41_30:
- method = LDAP_AUTH_KRBV41;
- break;
- case LDAP_AUTH_KRBV42_30:
- method = LDAP_AUTH_KRBV42;
- break;
-#endif
+
+ op->o_protocol = version;
+
+ if( method != LDAP_AUTH_SASL ) {
+ tag = ber_scanf( ber, /*{*/ "o}", &cred );
+
+ } else {
+ tag = ber_scanf( ber, "{a" /*}*/, &mech );
+
+ if ( tag != LBER_ERROR ) {
+ ber_len_t len;
+ tag = ber_peek_tag( ber, &len );
+
+ if ( tag == LDAP_TAG_LDAPCRED ) {
+ tag = ber_scanf( ber, "o", &cred );
+ }
+
+ if ( tag != LBER_ERROR ) {
+ tag = ber_scanf( ber, /*{{*/ "}}" );
+ }