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

version» Context lines:

pike.git/lib/modules/Sql.pmod/pgsql.pike:796:    k = 1;    }   #ifdef PG_DEBUG    msglen -= sizeof(word) + 1;    if (msglen < 1)    break;   #endif    }    if (k) {    SASLcontext = Crypto.SCRAM(Crypto.SHA256); -  word = SASLcontext.client_first(""); +  word = SASLcontext.client_1();    authresponse(({    "SCRAM-SHA-256", 0, sprintf("%4c", sizeof(word)), word    }));    } else    errtype = PROTOCOLUNSUPPORTED;   #ifdef PG_DEBUG    if(msglen != 1)    errtype=PROTOCOLERROR;    msglen=0;   #endif    break;    }    case 11: {    PD("AuthenticationSASLContinue\n");    string response;    if (response -  = SASLcontext.client_final(pass, cr->read_buffer(msglen))) +  = SASLcontext.client_2(pass, cr->read_buffer(msglen)))    authresponse(response);    else    errtype = PROTOCOLERROR;   #ifdef PG_DEBUG    msglen = 0;   #endif    break;    }    case 12:    PD("AuthenticationSASLFinal\n"); -  if (SASLcontext.server_final(cr->read_buffer(msglen))) +  if (SASLcontext.client_3(cr->read_buffer(msglen)))    SASLcontext = 0; // Clears context and approves server    else    errtype = PROTOCOLERROR;   #ifdef PG_DEBUG    msglen=0;   #endif    break;    default:    PD("Unknown Authentication Method %c\n",authtype);    errtype=PROTOCOLUNSUPPORTED;