pike.git / lib / modules / SSL.pmod / ClientConnection.pike

version» Context lines:

pike.git/lib/modules/SSL.pmod/ClientConnection.pike:215:       // When the client HELLO packet data is in the range 256-511 bytes    // f5 SSL terminators will intepret it as SSL2 requiring an    // additional 8k of data, which will cause the connection to hang.    // The solution is to pad the package to more than 511 bytes using a    // dummy exentsion.    // Reference: draft-agl-tls-padding    int packet_size = sizeof(struct)+sizeof(extensions)+2;    ext (EXTENSION_padding, packet_size>255 && packet_size<512)    { -  int padding = max(0, 512-packet_size-4); +  int(0..) padding = max(0, 512-packet_size-4);    SSL3_DEBUG_MSG("SSL.ClientConnection: Adding %d bytes of padding.\n",    padding);    return Buffer()->add("\0"*padding);    };       ext(EXTENSION_early_data, early_data && sizeof([array]early_data)) {    SSL3_DEBUG_MSG("SSL.ClientConnection: Adding %d packets of early data.\n",    sizeof([array]early_data));    Buffer buf = Buffer();    foreach([array] early_data, Packet p) {