pike.git / lib / modules / Sql.pmod / pgsql.pike

version» Context lines:

pike.git/lib/modules/Sql.pmod/pgsql.pike:633:    { case 0:PD("Ok\n");    _mstate=authenticated;    break;    case 2:PD("KerberosV5\n");    errtype=protocolunsupported;    break;    case 3:PD("ClearTextPassword\n");    sendpass=pass;    break;    case 4:PD("CryptPassword\n"); -  if(msglen<2) -  errtype=protocolerror; -  sendpass=_c.getstring(msglen);msglen=0; // salt -  errtype=protocolunsupported; // Pike lacks function that takes salt +  errtype=protocolunsupported;    break;    case 5:PD("MD5Password\n");    if(msglen<4)    errtype=protocolerror;   #if constant(Crypto.MD5.hash)   #define md5hex(x) String.string2hex(Crypto.MD5.hash(x))    sendpass=md5hex(pass+user);    sendpass="md5"+md5hex(sendpass+_c.getstring(msglen));   #else    _c.getstring(msglen);