Thread (39 messages) 39 messages, 6 authors, 2017-10-03

Re: [PATCH v8 1/4] crypto: AF_ALG -- add sign/verify API

From: Stephan Mueller <hidden>
Date: 2017-08-10 13:03:41

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

Hi Tudor,

thanks for reviewing
quoted
-		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?
quoted
-	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.
quoted
-		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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help