Am Donnerstag, 10. August 2017, 14:49:39 CEST schrieb Tudor Ambarus:

Hi Tudor,

thanks for reviewing

> > 
> > -           err = ctx->enc ? crypto_aead_encrypt(&areq->cra_u.aead_req) :
> > -                            crypto_aead_decrypt(&areq->cra_u.aead_req);
> > -   } else {
> > +   } else
> 
> Unbalanced braces around else statement.

Is there a style requirement for that? checkpatch.pl does not complain. I 
thought that one liners in a conditional should not have braces?

> > -   ctx->enc = 0;
> > +   ctx->op = 0;
> 
> This implies decryption. Should we change the value of ALG_OP_DECRYPT?

ALG_OP_DECRYPT is a user space interface, so we cannot change it.

Do you see harm in leaving it as is? Note, I did not want to introduce 
functional changes that have no bearing on the addition of the sign/verify 
API. If you think this is problematic, I would like to add another patch that 
is dedicated to fix this.

> > -           err = ctx->enc ?
> > -                   crypto_skcipher_encrypt(&areq->cra_u.skcipher_req) :
> > -                   crypto_skcipher_decrypt(&areq->cra_u.skcipher_req);
> > -   } else {
> > +   } else
> 
> Unbalanced braces around else statement.

Same as above.

Thanks a lot!

Ciao
Stephan

Reply via email to