| .. | .. |
|---|
| 214 | 214 | struct crypto_async_request *child_async_req, int err) |
|---|
| 215 | 215 | { |
|---|
| 216 | 216 | struct akcipher_request *req = child_async_req->data; |
|---|
| 217 | | - struct crypto_async_request async_req; |
|---|
| 218 | 217 | |
|---|
| 219 | 218 | if (err == -EINPROGRESS) |
|---|
| 220 | | - return; |
|---|
| 219 | + goto out; |
|---|
| 221 | 220 | |
|---|
| 222 | | - async_req.data = req->base.data; |
|---|
| 223 | | - async_req.tfm = crypto_akcipher_tfm(crypto_akcipher_reqtfm(req)); |
|---|
| 224 | | - async_req.flags = child_async_req->flags; |
|---|
| 225 | | - req->base.complete(&async_req, |
|---|
| 226 | | - pkcs1pad_encrypt_sign_complete(req, err)); |
|---|
| 221 | + err = pkcs1pad_encrypt_sign_complete(req, err); |
|---|
| 222 | + |
|---|
| 223 | +out: |
|---|
| 224 | + akcipher_request_complete(req, err); |
|---|
| 227 | 225 | } |
|---|
| 228 | 226 | |
|---|
| 229 | 227 | static int pkcs1pad_encrypt(struct akcipher_request *req) |
|---|
| .. | .. |
|---|
| 332 | 330 | struct crypto_async_request *child_async_req, int err) |
|---|
| 333 | 331 | { |
|---|
| 334 | 332 | struct akcipher_request *req = child_async_req->data; |
|---|
| 335 | | - struct crypto_async_request async_req; |
|---|
| 336 | 333 | |
|---|
| 337 | 334 | if (err == -EINPROGRESS) |
|---|
| 338 | | - return; |
|---|
| 335 | + goto out; |
|---|
| 339 | 336 | |
|---|
| 340 | | - async_req.data = req->base.data; |
|---|
| 341 | | - async_req.tfm = crypto_akcipher_tfm(crypto_akcipher_reqtfm(req)); |
|---|
| 342 | | - async_req.flags = child_async_req->flags; |
|---|
| 343 | | - req->base.complete(&async_req, pkcs1pad_decrypt_complete(req, err)); |
|---|
| 337 | + err = pkcs1pad_decrypt_complete(req, err); |
|---|
| 338 | + |
|---|
| 339 | +out: |
|---|
| 340 | + akcipher_request_complete(req, err); |
|---|
| 344 | 341 | } |
|---|
| 345 | 342 | |
|---|
| 346 | 343 | static int pkcs1pad_decrypt(struct akcipher_request *req) |
|---|
| .. | .. |
|---|
| 512 | 509 | struct crypto_async_request *child_async_req, int err) |
|---|
| 513 | 510 | { |
|---|
| 514 | 511 | struct akcipher_request *req = child_async_req->data; |
|---|
| 515 | | - struct crypto_async_request async_req; |
|---|
| 516 | 512 | |
|---|
| 517 | 513 | if (err == -EINPROGRESS) |
|---|
| 518 | | - return; |
|---|
| 514 | + goto out; |
|---|
| 519 | 515 | |
|---|
| 520 | | - async_req.data = req->base.data; |
|---|
| 521 | | - async_req.tfm = crypto_akcipher_tfm(crypto_akcipher_reqtfm(req)); |
|---|
| 522 | | - async_req.flags = child_async_req->flags; |
|---|
| 523 | | - req->base.complete(&async_req, pkcs1pad_verify_complete(req, err)); |
|---|
| 516 | + err = pkcs1pad_verify_complete(req, err); |
|---|
| 517 | + |
|---|
| 518 | +out: |
|---|
| 519 | + akcipher_request_complete(req, err); |
|---|
| 524 | 520 | } |
|---|
| 525 | 521 | |
|---|
| 526 | 522 | /* |
|---|