aboutsummaryrefslogtreecommitdiff
path: root/gost_pmeth.c
diff options
context:
space:
mode:
authorDmitry Belyavskiy <beldmit@gmail.com>2018-06-15 13:05:58 +0300
committerDmitry Belyavskiy <beldmit@gmail.com>2018-06-15 13:05:58 +0300
commit02519bca598ef347958d0fd70b1c2210afe4a5e4 (patch)
tree9a38d9cca3cd2c5b34d89e2ade28e54e8df0aa9f /gost_pmeth.c
parent843b2565fba31413f4cfc29cbc08e3e6a863b362 (diff)
downloadgost-engine-02519bca598ef347958d0fd70b1c2210afe4a5e4.zip
gost-engine-02519bca598ef347958d0fd70b1c2210afe4a5e4.tar.gz
gost-engine-02519bca598ef347958d0fd70b1c2210afe4a5e4.tar.bz2
Cleanup
Diffstat (limited to 'gost_pmeth.c')
-rw-r--r--gost_pmeth.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/gost_pmeth.c b/gost_pmeth.c
index 5c7352b..69080bd 100644
--- a/gost_pmeth.c
+++ b/gost_pmeth.c
@@ -614,7 +614,6 @@ static int pkey_gost_mac_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)
}
case EVP_PKEY_CTRL_MAC_LEN:
{
- /*TODO*/
if (p1 < 1 || p1 > 8) {
GOSTerr(GOST_F_PKEY_GOST_MAC_CTRL, GOST_R_INVALID_MAC_SIZE);
@@ -746,8 +745,7 @@ static int pkey_gost_omac_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2, si
}
case EVP_PKEY_CTRL_MAC_LEN:
{
- /*TODO*/
- if (p1 < 1 || p1 > 8) {
+ if (p1 < 1 || p1 > max_size) {
GOSTerr(GOST_F_PKEY_GOST_OMAC_CTRL, GOST_R_INVALID_MAC_SIZE);
return 0;