Commit 5525e66
committed
Fix error return check of EVP_CIPHER_CTX_ctrl()
OpenSSL can return -1 on error [1, 2], and OpenBSD's docs confirm this
[3]. Existing checks check for 1 for the success value, so do the same.
[1] https://github.com/openssl/openssl/blob/b3161bd9a9329be3d6bf6b29a06835e2721898bb/crypto/evp/evp_enc.c#L1530-L1531
[2] https://github.com/openssl/openssl/blob/b3161bd9a9329be3d6bf6b29a06835e2721898bb/crypto/evp/evp_enc.c#L1611
[3] https://man.openbsd.org/EVP_CIPHER_CTX_ctrl.31 parent aee1d7f commit 5525e66
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7547 | 7547 | | |
7548 | 7548 | | |
7549 | 7549 | | |
7550 | | - | |
| 7550 | + | |
7551 | 7551 | | |
7552 | 7552 | | |
7553 | 7553 | | |
7554 | 7554 | | |
7555 | 7555 | | |
7556 | 7556 | | |
7557 | 7557 | | |
7558 | | - | |
| 7558 | + | |
7559 | 7559 | | |
7560 | 7560 | | |
7561 | 7561 | | |
| |||
0 commit comments