Fix aes ofb, cfb and cfb8 for s390x
..which was broken since
@@ -55,7 +55,7 @@ static int s390x_aes_ofb128_initkey(PROV_CIPHER_CTX *dat,
{
PROV_AES_CTX *adat = (PROV_AES_CTX *)dat;
- memcpy(adat->plat.s390x.param.kmo_kmf.cv, dat->iv, dat->blocksize);
+ memcpy(adat->plat.s390x.param.kmo_kmf.cv, dat->iv, dat->ivlen);
memcpy(adat->plat.s390x.param.kmo_kmf.k, key, keylen);
adat->plat.s390x.fc = S390X_AES_FC(keylen);
adat->plat.s390x.res = 0;
@@ -114,7 +114,7 @@ static int s390x_aes_cfb128_initkey(PROV_CIPHER_CTX *dat,
adat->plat.s390x.fc |= S390X_DECRYPT;
adat->plat.s390x.res = 0;
- memcpy(adat->plat.s390x.param.kmo_kmf.cv, dat->iv, dat->blocksize);
+ memcpy(adat->plat.s390x.param.kmo_kmf.cv, dat->iv, dat->ivlen);
memcpy(adat->plat.s390x.param.kmo_kmf.k, key, keylen);
return 1;
}
@@ -175,7 +175,7 @@ static int s390x_aes_cfb8_initkey(PROV_CIPHER_CTX *dat,
if (!dat->enc)
adat->plat.s390x.fc |= S390X_DECRYPT;
- memcpy(adat->plat.s390x.param.kmo_kmf.cv, dat->iv, dat->blocksize);
+ memcpy(adat->plat.s390x.param.kmo_kmf.cv, dat->iv, dat->ivlen);
memcpy(adat->plat.s390x.param.kmo_kmf.k, key, keylen);
return 1;
}
