qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH 01/17] crypto: add QCryptoSecret object class fo


From: Paolo Bonzini
Subject: Re: [Qemu-block] [PATCH 01/17] crypto: add QCryptoSecret object class for password/key handling
Date: Mon, 19 Oct 2015 17:18:56 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0


On 19/10/2015 17:09, Daniel P. Berrange wrote:
> +
> +    switch (secret->format) {
> +    case QCRYPTO_SECRET_FORMAT_UTF8:
> +        if (!g_utf8_validate(input, strlen(input), NULL)) {
> +            error_setg(errp,
> +                       "Data from secret %s is not valid UTF-8",
> +                       secretid);
> +            goto cleanup;
> +        }
> +        output = input;
> +        input = NULL;
> +        break;

Why validate secrets as UTF-8?  In other words why have "utf8" instead
of "binary" as a possible QCryptoSecretFormat?

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]