[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/2] tests: avoid DOS line endings in PSK file
From: |
Bin Meng |
Subject: |
Re: [PATCH 2/2] tests: avoid DOS line endings in PSK file |
Date: |
Mon, 3 Oct 2022 21:24:33 +0800 |
On Mon, Oct 3, 2022 at 6:27 PM Daniel P. Berrangé <berrange@redhat.com> wrote:
>
> Using FILE * APIs for writing the PSK file results in translation from
> UNIX to DOS line endings on Windows. When the crypto PSK code later
> loads the credentials the stray \r will result in failure to load the
> PSK credentials into GNUTLS.
>
> Rather than switching the FILE* APIs to open in binary format, just
> switch to the more concise g_file_set_contents API.
>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
> tests/unit/crypto-tls-psk-helpers.c | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>