[5/6] secur32: Implement schannel EncryptMessage().

Rob Shearman robertshearman at gmail.com
Mon Dec 29 05:17:26 CST 2008


2008/12/28 Henri Verbeet <hverbeet at gmail.com>:
> +    while (received < data_size)
> +    {
> +        ret = pgnutls_record_recv(ctx->session, data + received, data_size - received);
> +        if (ret < 0)
> +        {
> +            if (ret == GNUTLS_E_AGAIN)
> +            {
> +                if (!received)

Shouldn't this be "if (received == data_size)"?

> +                {
> +                    pgnutls_perror(ret);
> +                    HeapFree(GetProcessHeap(), 0, data);
> +                    TRACE("Returning SEC_E_INCOMPLETE_MESSAGE\n");
> +                    return SEC_E_INCOMPLETE_MESSAGE;
> +                }
> +                break;
> +            }
> +            else
> +            {
> +                pgnutls_perror(ret);
> +                HeapFree(GetProcessHeap(), 0, data);
> +                ERR("Returning SEC_E_INTERNAL_ERROR\n");
> +                return SEC_E_INTERNAL_ERROR;
> +            }
> +        }
> +        received += ret;
> +    }

-- 
Rob Shearman



More information about the wine-devel mailing list