[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PULL 54/54] crypto: Introduce RSA algorithm
From: |
Michael S. Tsirkin |
Subject: |
Re: [PULL 54/54] crypto: Introduce RSA algorithm |
Date: |
Fri, 10 Jun 2022 20:35:58 -0400 |
On Fri, Jun 10, 2022 at 11:05:13AM -0700, Richard Henderson wrote:
> On 6/10/22 08:55, Philippe Mathieu-Daudé wrote:
> > On 10/6/22 09:59, Michael S. Tsirkin wrote:
> > > From: zhenwei pi <pizhenwei@bytedance.com>
> > > +static int cryptodev_builtin_set_rsa_options(
> > > + int virtio_padding_algo,
> > > + int virtio_hash_algo,
> > > + QCryptoAkCipherOptionsRSA *opt,
> > > + Error **errp)
> > > +{
> > > + if (virtio_padding_algo == VIRTIO_CRYPTO_RSA_PKCS1_PADDING) {
> > > + opt->padding_alg = QCRYPTO_RSA_PADDING_ALG_PKCS1;
> > > + opt->hash_alg =
> > > + cryptodev_builtin_get_rsa_hash_algo(virtio_hash_algo, errp);
> > > + if (opt->hash_alg < 0) {
> > > + return -1;
> > > + }
> > > + return 0;
> > > + }
> > > +
> > > + if (virtio_padding_algo == VIRTIO_CRYPTO_RSA_RAW_PADDING) {
> > > + opt->padding_alg = QCRYPTO_RSA_PADDING_ALG_RAW;
> > > + return 0;
> > > + }
> > > +
> > > + error_setg(errp, "Unsupported rsa padding algo: %d",
> > > virtio_padding_algo);
> > > + return -1;
> > > +}
> >
> > Build failure:
> >
> > ../backends/cryptodev-builtin.c:187:27: error: result of comparison of
> > unsigned enum expression < 0 is always false
> > [-Werror,-Wtautological-unsigned-enum-zero-compare]
> > if (opt->hash_alg < 0) {
> > ~~~~~~~~~~~~~ ^ ~
>
> Yep, e.g.
>
> https://gitlab.com/qemu-project/qemu/-/jobs/2574418442
>
Dropped now and re-pushed a tag. Can you try pulling that pls?
> r~
- [PULL 47/54] hw/acpi/viot: move the individual PCI host bridge entry generation to a new function, (continued)
- [PULL 47/54] hw/acpi/viot: move the individual PCI host bridge entry generation to a new function, Michael S. Tsirkin, 2022/06/10
- [PULL 48/54] hw/acpi/viot: build array of PCI host bridges before generating VIOT ACPI table, Michael S. Tsirkin, 2022/06/10
- [PULL 49/54] tests/acpi: virt: allow VIOT acpi table changes, Michael S. Tsirkin, 2022/06/10
- [PULL 50/54] hw/acpi/viot: sort VIOT ACPI table entries by PCI host bridge min_bus, Michael S. Tsirkin, 2022/06/10
- [PULL 51/54] tests/acpi: virt: update golden masters for VIOT, Michael S. Tsirkin, 2022/06/10
- [PULL 52/54] hw/virtio/vhost-user: don't use uninitialized variable, Michael S. Tsirkin, 2022/06/10
- [PULL 53/54] hw/vhost-user-scsi|blk: set `supports_config` flag correctly, Michael S. Tsirkin, 2022/06/10
- [PULL 54/54] crypto: Introduce RSA algorithm, Michael S. Tsirkin, 2022/06/10
- Re: [PULL 54/54] crypto: Introduce RSA algorithm, Michael S. Tsirkin, 2022/06/10